mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 00:12:56 +02:00
MDL-74887 course: Hide stealth mode without view page
This commit is contained in:
parent
cc4fec275f
commit
c4523503d2
@ -213,6 +213,7 @@ abstract class moodleform_mod extends moodleform {
|
||||
$this->_features->showdescription = plugin_supports('mod', $this->_modname, FEATURE_SHOW_DESCRIPTION, false);
|
||||
$this->_features->gradecat = ($this->_features->outcomes or $this->_features->hasgrades);
|
||||
$this->_features->advancedgrading = plugin_supports('mod', $this->_modname, FEATURE_ADVANCED_GRADING, false);
|
||||
$this->_features->hasnoview = plugin_supports('mod', $this->_modname, FEATURE_NO_VIEW_LINK, false);
|
||||
$this->_features->canrescale = (component_callback_exists('mod_' . $this->_modname, 'rescale_activity_grades') !== false);
|
||||
}
|
||||
|
||||
@ -613,7 +614,10 @@ abstract class moodleform_mod extends moodleform {
|
||||
$mform->addElement('header', 'modstandardelshdr', get_string('modstandardels', 'form'));
|
||||
|
||||
$section = get_fast_modinfo($COURSE)->get_section_info($this->_section);
|
||||
$allowstealth = !empty($CFG->allowstealth) && $this->courseformat->allow_stealth_module_visibility($this->_cm, $section);
|
||||
$allowstealth =
|
||||
!empty($CFG->allowstealth) &&
|
||||
$this->courseformat->allow_stealth_module_visibility($this->_cm, $section) &&
|
||||
!$this->_features->hasnoview;
|
||||
if ($allowstealth && $section->visible) {
|
||||
$modvisiblelabel = 'modvisiblewithstealth';
|
||||
} else if ($section->visible) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user