MDL-64469 Question bank: Change link questions in category question.

Make it easier to navigate from the category list to the questions in a category.
This commit is contained in:
VinhLe
2019-01-11 11:31:11 +07:00
parent 609b020512
commit 4b1a578e2e
2 changed files with 5 additions and 7 deletions
+4 -6
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));
@@ -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 "Categories" node in "Course administration > Question bank"
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 |