mirror of
https://github.com/moodle/moodle.git
synced 2025-03-21 08:00:37 +01:00
Merge branch 'MDL-66553-master-fix' of git://github.com/junpataleta/moodle
This commit is contained in:
commit
e7fad4ac6a
@ -78,7 +78,7 @@ class question_name_idnumber_tags_column extends question_name_column {
|
||||
public function is_sortable() {
|
||||
return [
|
||||
'name' => ['field' => 'q.name', 'title' => get_string('questionname', 'question')],
|
||||
'lastname' => ['field' => 'q.idnumber', 'title' => get_string('idnumber', 'question')],
|
||||
'idnumber' => ['field' => 'q.idnumber', 'title' => get_string('idnumber', 'question')],
|
||||
];
|
||||
}
|
||||
|
||||
|
@ -347,7 +347,10 @@ class view {
|
||||
}
|
||||
|
||||
protected function default_sort() {
|
||||
return array('core_question\bank\question_type_column' => 1, 'core_question\bank\question_name_column' => 1);
|
||||
return array(
|
||||
'core_question\bank\question_type_column' => 1,
|
||||
'core_question\bank\question_name_idnumber_tags_column-name' => 1
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -18,10 +18,10 @@ Feature: The questions in the question bank can be sorted in various ways
|
||||
| contextlevel | reference | name |
|
||||
| Course | C1 | Test questions |
|
||||
And the following "questions" exist:
|
||||
| questioncategory | qtype | name | user | questiontext | idnumber |
|
||||
| Test questions | essay | A question 1 name | admin | Question 1 text | |
|
||||
| Test questions | essay | B question 2 name | teacher1 | Question 2 text | |
|
||||
| Test questions | numerical | C question 3 name | teacher1 | Question 3 text | numidnum |
|
||||
| questioncategory | qtype | name | user | questiontext | idnumber |
|
||||
| Test questions | essay | A question 1 name | admin | Question 1 text | numidnuma |
|
||||
| Test questions | essay | B question 2 name | teacher1 | Question 2 text | |
|
||||
| Test questions | numerical | C question 3 name | teacher1 | Question 3 text | numidnumc |
|
||||
And I log in as "teacher1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I navigate to "Question bank > Questions" in current page administration
|
||||
@ -33,8 +33,10 @@ Feature: The questions in the question bank can be sorted in various ways
|
||||
@javascript
|
||||
Scenario: The questions can be sorted by idnumber
|
||||
When I follow "Sort by ID number ascending"
|
||||
Then "C question 3 name" "checkbox" should appear before "A question 1 name" "checkbox"
|
||||
And I should see "numidnum" in the "C question 3 name" "table_row"
|
||||
Then "C question 3 name" "checkbox" should appear after "A question 1 name" "checkbox"
|
||||
And I should see "numidnumc" in the "C question 3 name" "table_row"
|
||||
And I follow "Sort by ID number descending"
|
||||
And "C question 3 name" "checkbox" should appear before "A question 1 name" "checkbox"
|
||||
|
||||
@javascript
|
||||
Scenario: The questions can be sorted in reverse order by type
|
||||
|
Loading…
x
Reference in New Issue
Block a user