-
Improvement
-
Resolution: Fixed
-
Minor
-
2.7.1
-
None
-
MOODLE_27_STABLE
-
MOODLE_26_STABLE, MOODLE_27_STABLE
The Dataform view used to have 3 visibility modes, disabled, visible and hidden. Both visible and hidden were available to participants but hidden view were not displayed in navigation.
In 2.6 the hidden mode was removed in anticipation of a better way to manage the content of Dataform navigation. However, a better navigation does not seem to be available soon, and so the hidden mode is returned.
The implementation preserves the same behavior as before. Visibility can be managed either from the views index or from the view edit form. In the views index it is displayed as a dropdown with different shades for the different modes.
The default view can be either visible or hidden but cannot be disabled.
Access to visible and hidden views require the viewaccess capability.
Access to disabled views require the viewaccesshidden capability (possible terminology confusion noted).
The modes are implemented as dataformview constants:
VISIBILITY_DISABLED = 0
VISIBILITY_VISIBLE = 1
VISIBILITY_HIDDEN = 2
A static method dataformview::get_visibility_modes() return a menu of the visibility modes.
There is a change to view_manager API to support setting visibility by selection from dropdown.
function view_manager::process_views($action, $vids, $confirmed = false)
|
changed to
function view_manager::process_views($action, $vids, $data = null, $confirmed = false)
|
- has a non-specific relationship to
-
CONTRIB-5233 Hidden views appear in views navigation.
-
- Closed
-