diff --git a/course/classes/management_renderer.php b/course/classes/management_renderer.php index b44842d0684..0771a161b3c 100644 --- a/course/classes/management_renderer.php +++ b/course/classes/management_renderer.php @@ -204,7 +204,13 @@ class core_course_management_renderer extends plugin_renderer_base { $textlabel = get_string('categorysubcategoryof', 'moodle', $a); } $courseicon = $this->output->pix_icon('i/course', get_string('courses')); - $bcatinput = array('type' => 'checkbox', 'name' => 'bcat[]', 'value' => $category->id, 'class' => 'bulk-action-checkbox', 'aria-label' => $text); + $bcatinput = array( + 'type' => 'checkbox', + 'name' => 'bcat[]', + 'value' => $category->id, + 'class' => 'bulk-action-checkbox', + 'aria-label' => get_string('bulkactionselect', 'moodle', $text) + ); if (!$category->can_resort_subcategories() && !$category->has_manage_capability()) { // Very very hardcoded here. @@ -371,9 +377,13 @@ class core_course_management_renderer extends plugin_renderer_base { public function category_bulk_actions(coursecat $category = null) { // Resort courses. // Change parent. + if (!coursecat::can_resort_any() && !coursecat::can_change_parent_any()) { + return ''; + } $strgo = new lang_string('go'); $html = html_writer::start_div('category-bulk-actions bulk-actions'); + $html .= html_writer::div(get_string('categorybulkaction'), 'accesshide', array('tabindex' => '0')); if (coursecat::can_resort_any()) { $selectoptions = array( 'selectedcategories' => get_string('selectedcategories'), @@ -605,7 +615,7 @@ class core_course_management_renderer extends plugin_renderer_base { 'name' => 'bc[]', 'value' => $course->id, 'class' => 'bulk-action-checkbox', - 'aria-label' => $text + 'aria-label' => get_string('bulkactionselect', 'moodle', $text) ); if (!$category->has_manage_capability()) { // Very very hardcoded here. @@ -722,6 +732,7 @@ class core_course_management_renderer extends plugin_renderer_base { public function course_bulk_actions(coursecat $category) { $html = html_writer::start_div('course-bulk-actions bulk-actions'); if ($category->can_move_courses_out_of()) { + $html .= html_writer::div(get_string('coursebulkaction'), 'accesshide', array('tabindex' => '0')); $options = coursecat::make_categories_list('moodle/category:manage'); $select = html_writer::select( $options, @@ -1205,11 +1216,11 @@ class core_course_management_renderer extends plugin_renderer_base { $url->set_anchor('category-listing'); $html .= html_writer::link($url, get_string('skiptocategorylisting'), array('class' => 'skip')); } - if ($displaycategorylisting) { + if ($displaycourselisting) { $url->set_anchor('course-listing'); $html .= html_writer::link($url, get_string('skiptocourselisting'), array('class' => 'skip')); } - if ($displaycategorylisting) { + if ($displaycoursedetail) { $url->set_anchor('course-detail'); $html .= html_writer::link($url, get_string('skiptocoursedetails'), array('class' => 'skip')); } diff --git a/lang/en/moodle.php b/lang/en/moodle.php index ec467f4df6c..5168d255a5b 100644 --- a/lang/en/moodle.php +++ b/lang/en/moodle.php @@ -210,6 +210,7 @@ $string['blocksetup'] = 'Setting up block tables'; $string['blocksuccess'] = '{$a} tables have been set up correctly'; $string['brief'] = 'Brief'; $string['bulkactions'] = 'Bulk actions'; +$string['bulkactionselect'] = '{$a} bulk action selection'; $string['bulkmovecoursessuccess'] = 'Successfully moved {$a->courses} courses into {$a->category}'; $string['bycourseorder'] = 'By course order'; $string['byname'] = 'by {$a}'; @@ -221,6 +222,7 @@ $string['categories'] = 'Course categories'; $string['categoriesandcoures'] = 'Course categories and courses'; $string['category'] = 'Category'; $string['categoryadded'] = 'The category \'{$a}\' was added'; +$string['categorybulkaction'] = 'Bulk actions for selected categories'; $string['categorycontents'] = 'Subcategories and courses'; $string['categorycurrentcontents'] = 'Contents of {$a}'; $string['categorydeleted'] = 'The category \'{$a}\' was deleted'; @@ -299,6 +301,7 @@ $string['courseapprovedsubject'] = 'Your course has been approved!'; $string['courseavailable'] = 'This course is available to students'; $string['courseavailablenot'] = 'This course is not available to students'; $string['coursebackup'] = 'Course backup'; +$string['coursebulkaction'] = 'Bulk actions for selected courses'; $string['coursecategories'] = 'Course categories'; $string['coursecategory'] = 'Course category'; $string['coursecategory_help'] = 'This setting determines the category in which the course will appear in the list of courses.';