mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 08:56:36 +02:00
MDL-42710 course: management cat sorting perfecting taking place
This commit is contained in:
parent
61bac37cf1
commit
e69a0251dc
4 changed files with 28 additions and 40 deletions
|
@ -337,48 +337,39 @@ class core_course_management_renderer extends plugin_renderer_base {
|
||||||
$form .= html_writer::empty_tag('input', array('type' => 'hidden', 'name' => 'currentcategoryid', 'value' => $category->id));
|
$form .= html_writer::empty_tag('input', array('type' => 'hidden', 'name' => 'currentcategoryid', 'value' => $category->id));
|
||||||
}
|
}
|
||||||
$form .= html_writer::div(
|
$form .= html_writer::div(
|
||||||
html_writer::span(get_string('for'), '', array('id' => 'selectsortby')) .
|
|
||||||
' ' .
|
|
||||||
html_writer::select(
|
html_writer::select(
|
||||||
$selectoptions,
|
$selectoptions,
|
||||||
'selectsortby',
|
'selectsortby',
|
||||||
'',
|
'selectedcategories',
|
||||||
array('' => 'choosedots'),
|
false
|
||||||
array('aria-labelledby' => 'selectsortby')
|
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
$form .= html_writer::div(
|
$form .= html_writer::div(
|
||||||
html_writer::span(get_string('sortcategoriesby'), '', array('id' => 'resortselectedcategoriesby')) .
|
|
||||||
' ' .
|
|
||||||
html_writer::select(
|
html_writer::select(
|
||||||
array(
|
array(
|
||||||
'name' => get_string('resortbyname'),
|
'name' => get_string('sortcategoriesbyname'),
|
||||||
'idnumber' => get_string('resortbyidnumber'),
|
'idnumber' => get_string('sortcategoriesbyidnumber'),
|
||||||
'none' => get_string('dontsortcategories')
|
'none' => get_string('dontsortcategories')
|
||||||
),
|
),
|
||||||
'resortcategoriesby',
|
'resortcategoriesby',
|
||||||
'',
|
'name',
|
||||||
array('none' => 'choosedots'),
|
false
|
||||||
array('aria-labelledby' => 'resortselectedcategoriesby')
|
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
$form .= html_writer::div(
|
$form .= html_writer::div(
|
||||||
html_writer::span(get_string('sortcoursesby'), '', array('id' => 'resortselectedcoursesby')) .
|
|
||||||
' ' .
|
|
||||||
html_writer::select(
|
html_writer::select(
|
||||||
array(
|
array(
|
||||||
'fullname' => get_string('resortbyfullname'),
|
'fullname' => get_string('sortcoursesbyfullname'),
|
||||||
'shortname' => get_string('resortbyshortname'),
|
'shortname' => get_string('sortcoursesbyshortname'),
|
||||||
'idnumber' => get_string('resortbyidnumber'),
|
'idnumber' => get_string('sortcoursesbyidnumber'),
|
||||||
'none' => get_string('dontsortcourses')
|
'none' => get_string('dontsortcourses')
|
||||||
),
|
),
|
||||||
'resortcoursesby',
|
'resortcoursesby',
|
||||||
'',
|
'fullname',
|
||||||
array('none' => 'choosedots'),
|
false
|
||||||
array('aria-labelledby' => 'resortselectedcoursesby')
|
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
$form .= html_writer::empty_tag('input', array('type' => 'submit', 'name' => 'bulksort', 'value' => $strgo));
|
$form .= html_writer::empty_tag('input', array('type' => 'submit', 'name' => 'bulksort', 'value' => get_string('sort')));
|
||||||
$form .= html_writer::end_div();
|
$form .= html_writer::end_div();
|
||||||
$html .= $this->detail_pair(
|
$html .= $this->detail_pair(
|
||||||
get_string('sorting'),
|
get_string('sorting'),
|
||||||
|
@ -398,7 +389,7 @@ class core_course_management_renderer extends plugin_renderer_base {
|
||||||
array('' => 'choosedots'),
|
array('' => 'choosedots'),
|
||||||
array('aria-labelledby' => 'moveselectedcategoriesto')
|
array('aria-labelledby' => 'moveselectedcategoriesto')
|
||||||
);
|
);
|
||||||
$submit = array('type' => 'submit', 'name' => 'bulkmovecategories', 'value' => $strgo);
|
$submit = array('type' => 'submit', 'name' => 'bulkmovecategories', 'value' => get_string('move'));
|
||||||
$html .= $this->detail_pair(
|
$html .= $this->detail_pair(
|
||||||
html_writer::span(get_string('moveselectedcategoriesto'), '', array('id' => 'moveselectedcategoriesto')),
|
html_writer::span(get_string('moveselectedcategoriesto'), '', array('id' => 'moveselectedcategoriesto')),
|
||||||
$select . html_writer::empty_tag('input', $submit)
|
$select . html_writer::empty_tag('input', $submit)
|
||||||
|
@ -680,7 +671,7 @@ class core_course_management_renderer extends plugin_renderer_base {
|
||||||
array('' => 'choosedots'),
|
array('' => 'choosedots'),
|
||||||
array('aria-labelledby' => 'moveselectedcoursesto')
|
array('aria-labelledby' => 'moveselectedcoursesto')
|
||||||
);
|
);
|
||||||
$submit = array('type' => 'submit', 'name' => 'bulkmovecourses', 'value' => get_string('go'));
|
$submit = array('type' => 'submit', 'name' => 'bulkmovecourses', 'value' => get_string('move'));
|
||||||
$html .= $this->detail_pair(
|
$html .= $this->detail_pair(
|
||||||
html_writer::span(get_string('moveselectedcoursesto'), '', array('id' => 'moveselectedcoursesto')),
|
html_writer::span(get_string('moveselectedcoursesto'), '', array('id' => 'moveselectedcoursesto')),
|
||||||
$select . html_writer::empty_tag('input', $submit)
|
$select . html_writer::empty_tag('input', $submit)
|
||||||
|
|
|
@ -17,7 +17,7 @@ Feature: Test we can resort categories in the management interface.
|
||||||
And I should see the "Course categories" management page
|
And I should see the "Course categories" management page
|
||||||
And I select "All categories" from "menuselectsortby"
|
And I select "All categories" from "menuselectsortby"
|
||||||
And I select <sortby> from "menuresortcategoriesby"
|
And I select <sortby> from "menuresortcategoriesby"
|
||||||
And I press "Go"
|
And I press "Sort"
|
||||||
# Redirect.
|
# Redirect.
|
||||||
And I should see the "Course categories" management page
|
And I should see the "Course categories" management page
|
||||||
And I should see category listing <cat1> before <cat2>
|
And I should see category listing <cat1> before <cat2>
|
||||||
|
@ -25,8 +25,8 @@ Feature: Test we can resort categories in the management interface.
|
||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
| sortby | cat1 | cat2 | cat3 |
|
| sortby | cat1 | cat2 | cat3 |
|
||||||
| "By name" | "Applied sciences" | "Extended social studies" | "Social studies" |
|
| "Sort categories by name" | "Applied sciences" | "Extended social studies" | "Social studies" |
|
||||||
| "By idnumber" | "Extended social studies" | "Social studies" | "Applied sciences" |
|
| "Sort categories by ID number" | "Extended social studies" | "Social studies" | "Applied sciences" |
|
||||||
|
|
||||||
Scenario Outline: Test bulk sorting current category.
|
Scenario Outline: Test bulk sorting current category.
|
||||||
Given the following "categories" exists:
|
Given the following "categories" exists:
|
||||||
|
@ -44,7 +44,7 @@ Feature: Test we can resort categories in the management interface.
|
||||||
And I should see the "Course categories and courses" management page
|
And I should see the "Course categories and courses" management page
|
||||||
And I select "This category" from "menuselectsortby"
|
And I select "This category" from "menuselectsortby"
|
||||||
And I select <sortby> from "menuresortcategoriesby"
|
And I select <sortby> from "menuresortcategoriesby"
|
||||||
And I press "Go"
|
And I press "Sort"
|
||||||
# Redirect.
|
# Redirect.
|
||||||
And I should see the "Course categories and courses" management page
|
And I should see the "Course categories and courses" management page
|
||||||
And I should see category listing <cat1> before <cat2>
|
And I should see category listing <cat1> before <cat2>
|
||||||
|
@ -52,8 +52,8 @@ Feature: Test we can resort categories in the management interface.
|
||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
| sortby | cat1 | cat2 | cat3 |
|
| sortby | cat1 | cat2 | cat3 |
|
||||||
| "By name" | "Applied sciences" | "Extended social studies" | "Social studies" |
|
| "Sort categories by name" | "Applied sciences" | "Extended social studies" | "Social studies" |
|
||||||
| "By idnumber" | "Extended social studies" | "Social studies" | "Applied sciences" |
|
| "Sort categories by ID number" | "Extended social studies" | "Social studies" | "Applied sciences" |
|
||||||
|
|
||||||
Scenario Outline: Test resorting subcategories.
|
Scenario Outline: Test resorting subcategories.
|
||||||
Given the following "categories" exists:
|
Given the following "categories" exists:
|
||||||
|
|
|
@ -247,7 +247,7 @@ Feature: Course category management interface performs as expected
|
||||||
And I should see the "Course categories" management page
|
And I should see the "Course categories" management page
|
||||||
And I select "All categories" from "menuselectsortby"
|
And I select "All categories" from "menuselectsortby"
|
||||||
And I select <sortby> from "menuresortcategoriesby"
|
And I select <sortby> from "menuresortcategoriesby"
|
||||||
And I press "Go"
|
And I press "Sort"
|
||||||
# Redirect.
|
# Redirect.
|
||||||
And I should see the "Course categories" management page
|
And I should see the "Course categories" management page
|
||||||
And I should see category listing <cat1> before <cat2>
|
And I should see category listing <cat1> before <cat2>
|
||||||
|
@ -255,8 +255,8 @@ Feature: Course category management interface performs as expected
|
||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
| sortby | cat1 | cat2 | cat3 |
|
| sortby | cat1 | cat2 | cat3 |
|
||||||
| "By name" | "Applied sciences" | "Extended social studies" | "Social studies" |
|
| "Sort categories by name" | "Applied sciences" | "Extended social studies" | "Social studies" |
|
||||||
| "By idnumber" | "Extended social studies" | "Social studies" | "Applied sciences" |
|
| "Sort categories by ID number" | "Extended social studies" | "Social studies" | "Applied sciences" |
|
||||||
|
|
||||||
@javascript
|
@javascript
|
||||||
Scenario Outline: Sub categories are displayed correctly when resorted
|
Scenario Outline: Sub categories are displayed correctly when resorted
|
||||||
|
|
|
@ -1479,18 +1479,12 @@ $string['resetstartdate'] = 'Reset start date';
|
||||||
$string['resetstatus'] = 'Status';
|
$string['resetstatus'] = 'Status';
|
||||||
$string['resettask'] = 'Task';
|
$string['resettask'] = 'Task';
|
||||||
$string['resettodefaults'] = 'Reset to defaults';
|
$string['resettodefaults'] = 'Reset to defaults';
|
||||||
$string['resortcategories'] = 'Sort categories';
|
|
||||||
$string['resortcategoriesbyname'] = 'Sort the top level categories by name';
|
|
||||||
$string['resortcategoriesbyidnumber'] = 'Sort the top level categories by idnumber';
|
|
||||||
$string['resortsubcategoriesbyname'] = 'Sort subcategories by name';
|
$string['resortsubcategoriesbyname'] = 'Sort subcategories by name';
|
||||||
$string['resortsubcategoriesbyidnumber'] = 'Sort subcategories by idnumber';
|
$string['resortsubcategoriesbyidnumber'] = 'Sort subcategories by idnumber';
|
||||||
$string['resortcourses'] = 'Sort courses';
|
$string['resortcourses'] = 'Sort courses';
|
||||||
$string['resortcoursesbyname'] = 'Sort courses by name';
|
|
||||||
$string['resortbyname'] = 'By name';
|
|
||||||
$string['resortbyshortname'] = 'By shortname';
|
$string['resortbyshortname'] = 'By shortname';
|
||||||
$string['resortbyfullname'] = 'By fullname';
|
$string['resortbyfullname'] = 'By fullname';
|
||||||
$string['resortbyidnumber'] = 'By idnumber';
|
$string['resortbyidnumber'] = 'By idnumber';
|
||||||
$string['resortselectedcategoriesby'] = 'Sort subcategories of selected categories';
|
|
||||||
$string['resource'] = 'Resource';
|
$string['resource'] = 'Resource';
|
||||||
$string['resourcedisplayauto'] = 'Automatic';
|
$string['resourcedisplayauto'] = 'Automatic';
|
||||||
$string['resourcedisplaydownload'] = 'Force download';
|
$string['resourcedisplaydownload'] = 'Force download';
|
||||||
|
@ -1682,8 +1676,11 @@ $string['sort'] = 'Sort';
|
||||||
$string['sortby'] = 'Sort by';
|
$string['sortby'] = 'Sort by';
|
||||||
$string['sortbyx'] = 'Sort by {$a} ascending';
|
$string['sortbyx'] = 'Sort by {$a} ascending';
|
||||||
$string['sortbyxreverse'] = 'Sort by {$a} descending';
|
$string['sortbyxreverse'] = 'Sort by {$a} descending';
|
||||||
$string['sortcategoriesby'] = 'Sort categories by';
|
$string['sortcategoriesbyname'] = 'Sort categories by name';
|
||||||
$string['sortcoursesby'] = 'Sort courses by';
|
$string['sortcategoriesbyidnumber'] = 'Sort categories by ID number';
|
||||||
|
$string['sortcoursesbyfullname'] = 'Sort courses by full name';
|
||||||
|
$string['sortcoursesbyshortname'] = 'Sort courses by short name';
|
||||||
|
$string['sortcoursesbyidnumber'] = 'Sort courses by ID number';
|
||||||
$string['sorting'] = 'Sorting';
|
$string['sorting'] = 'Sorting';
|
||||||
$string['sourcerole'] = 'Source role';
|
$string['sourcerole'] = 'Source role';
|
||||||
$string['specifyname'] = 'You must specify a name.';
|
$string['specifyname'] = 'You must specify a name.';
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue