Merge branch 'MDL-64469-master' of https://github.com/lethevinh/moodle

This commit is contained in:
Eloy Lafuente (stronk7) 2019-02-06 22:53:23 +01:00
commit 255e815d19
3 changed files with 6 additions and 8 deletions

View File

@ -115,13 +115,11 @@ class question_category_list_item extends list_item {
// Each section adds html to be displayed as part of this list item.
$questionbankurl = new moodle_url('/question/edit.php', $this->parentlist->pageurl->params());
$questionbankurl->param('cat', $category->id . ',' . $category->contextid);
$catediturl = new moodle_url($this->parentlist->pageurl, array('edit' => $this->id));
$item = '';
$item .= html_writer::tag('b', html_writer::link($catediturl,
format_string($category->name, true, array('context' => $this->parentlist->context)),
array('title' => $str->edit))) . ' ';
$item .= html_writer::link($questionbankurl, '(' . $category->questioncount . ')',
array('title' => $editqestions)) . ' ';
$text = format_string($category->name, true, ['context' => $this->parentlist->context])
. ' (' . $category->questioncount . ')';
$item .= html_writer::tag('b', html_writer::link($questionbankurl, $text,
['title' => $editqestions]) . ' ');
$item .= format_text($category->info, $category->infoformat,
array('context' => $this->parentlist->context, 'noclean' => true));

View File

@ -38,7 +38,7 @@ Feature: A teacher can put questions in categories in the question bank
Scenario: A question category can be edited
When I navigate to "Question bank > Categories" in current page administration
And I click on "Edit" "link" in the "Subcategory" "list_item"
And I click on "Edit this category" "link" in the "Subcategory" "list_item"
And the field "parent" matches value "   Default for C1"
And I set the following fields to these values:
| Name | New name |

View File

@ -44,7 +44,7 @@ Feature: A teacher can put questions with idnumbers in categories with idnumbers
| Course | C1 | Top | top | |
| Course | C1 | top | Used category | c1used |
And I navigate to "Question bank > Categories" in current page administration
And I click on "Edit" "link" in the "Used category" "list_item"
And I click on "Edit this category" "link" in the "Used category" "list_item"
And I press "Save changes"
Then I should not see "This ID number is already in use"