mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 16:32:18 +02:00
Merge branch 'MDL-64469-master' of https://github.com/lethevinh/moodle
This commit is contained in:
commit
255e815d19
@ -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 "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 |
|
||||
|
@ -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"
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user