mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 14:27:22 +01:00
Merge branch 'MDL-71926-master' of git://github.com/peterRd/moodle
This commit is contained in:
commit
a7cce0186e
@ -274,6 +274,12 @@ class core_course_renderer extends plugin_renderer_base {
|
||||
* @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'));
|
||||
|
Loading…
x
Reference in New Issue
Block a user