Skip to content

Commit

Permalink
Merge branch 'MDL-71926-311' of git://github.com/peterRd/moodle into …
Browse files Browse the repository at this point in the history
…MOODLE_311_STABLE
  • Loading branch information
andrewnicols committed Jun 17, 2021
2 parents 86b8013 + 6c5b6ab commit e66cd8b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions course/renderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,12 @@ public function course_section_cm_edit_actions($actions, cm_info $mod = null, $d
* @return string
*/
function course_section_add_cm_control($course, $section, $sectionreturn = null, $displayoptions = array()) {
// Check to see if user can add menus.
if (!has_capability('moodle/course:manageactivities', context_course::instance($course->id))
|| !$this->page->user_is_editing()) {
return '';
}

$straddeither = get_string('addresourceoractivity');

$ajaxcontrol = html_writer::start_tag('div', array('class' => 'mdl-right'));
Expand Down

0 comments on commit e66cd8b

Please sign in to comment.