diff --git a/course/lib.php b/course/lib.php index 72d94e910e21d..a1092b83bef1d 100644 --- a/course/lib.php +++ b/course/lib.php @@ -1834,6 +1834,9 @@ function print_section_add_menus($course, $section, $modnames, $vertical=false, $straddactivity = get_string('addactivity'); $straddresource = get_string('addresource'); + $sectionname = get_section_name($course, $section); + $strresourcelabel = get_string('addresourcetosection', null, $sectionname); + $stractivitylabel = get_string('addactivitytosection', null, $sectionname); $output = html_writer::start_tag('div', array('class' => 'section_add_menus', 'id' => 'add_menus-section-' . $section)); @@ -1844,12 +1847,14 @@ function print_section_add_menus($course, $section, $modnames, $vertical=false, if (!empty($resources)) { $select = new url_select($resources, '', array(''=>$straddresource), "ressection$section"); $select->set_help_icon('resources'); + $select->set_label($strresourcelabel, array('class' => 'accesshide')); $output .= $OUTPUT->render($select); } if (!empty($activities)) { $select = new url_select($activities, '', array(''=>$straddactivity), "section$section"); $select->set_help_icon('activities'); + $select->set_label($stractivitylabel, array('class' => 'accesshide')); $output .= $OUTPUT->render($select); } diff --git a/lang/en/moodle.php b/lang/en/moodle.php index a9f4b3ee51879..bfd4374035765 100644 --- a/lang/en/moodle.php +++ b/lang/en/moodle.php @@ -43,6 +43,7 @@ $string['activityweighted'] = 'Activity per user'; $string['add'] = 'Add'; $string['addactivity'] = 'Add an activity...'; +$string['addactivitytosection'] = 'Add an activity to section \'{$a}\''; $string['addadmin'] = 'Add admin'; $string['addblock'] = 'Add a block'; $string['addcomment'] = 'Add a comment...'; @@ -67,6 +68,7 @@ $string['addpagehere'] = 'Add page here'; $string['addresource'] = 'Add a resource...'; $string['addresourceoractivity'] = 'Add an activity or resource'; +$string['addresourcetosection'] = 'Add a resource to section \'{$a}\''; $string['address'] = 'Address'; $string['addstudent'] = 'Add student'; $string['addsubcategory'] = 'Add a sub-category';