mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
"MDL-23308, bring course files back"
This commit is contained in:
parent
b3dbdce822
commit
e921afa874
6 changed files with 123 additions and 40 deletions
|
@ -2905,9 +2905,9 @@ class settings_navigation extends navigation_node {
|
|||
}
|
||||
|
||||
// Manage files
|
||||
if ($course->legacyfiles == 2 and has_capability('moodle/course:managefiles', $coursecontext)) {
|
||||
if (has_capability('moodle/course:managefiles', $coursecontext)) {
|
||||
// hidden in new courses and courses where legacy files were turned off
|
||||
$url = new moodle_url('/files/index.php', array('contextid'=>$coursecontext->id, 'itemid'=>0, 'component' => 'course', 'filearea'=>'legacy'));
|
||||
$url = new moodle_url('/files/index.php', array('contextid'=>$coursecontext->id));
|
||||
$coursenode->add(get_string('courselegacyfiles'), $url, self::TYPE_SETTING, null, 'coursefiles', new pix_icon('i/files', ''));
|
||||
}
|
||||
|
||||
|
@ -3582,9 +3582,9 @@ class settings_navigation extends navigation_node {
|
|||
}
|
||||
|
||||
// Manage files
|
||||
if ($course->legacyfiles == 2 and has_capability('moodle/course:managefiles', $this->context)) {
|
||||
if (has_capability('moodle/course:managefiles', $this->context)) {
|
||||
//hiden in new installs
|
||||
$url = new moodle_url('/files/index.php', array('contextid'=>$coursecontext->id, 'itemid'=>0, 'component' => 'course', 'filearea'=>'legacy'));
|
||||
$url = new moodle_url('/files/index.php', array('contextid'=>$coursecontext->id));
|
||||
$frontpage->add(get_string('sitelegacyfiles'), $url, self::TYPE_SETTING, null, null, new pix_icon('i/files', ''));
|
||||
}
|
||||
return $frontpage;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue