Merge branch 'MDL-28445-master' of git://github.com/peterRd/moodle

This commit is contained in:
Jake Dallimore 2019-01-21 15:58:30 +08:00
commit f50a87f8e5
4 changed files with 12 additions and 9 deletions

View File

@ -72,7 +72,7 @@ $strglossary = get_string("modulename", "glossary");
$PAGE->navbar->add(get_string("categories","glossary"),
new moodle_url('/mod/glossary/editcategories.php', array('id' => $cm->id,'mode' => 'cat')));
if (!empty($action)) {
$navaction = get_string($action). " " . core_text::strtolower(get_string("category","glossary"));
$navaction = get_string(core_text::strtolower($action."category"), 'glossary');
$PAGE->navbar->add($navaction);
}
$PAGE->set_title($glossary->name);
@ -118,7 +118,7 @@ if ( $hook >0 ) {
} else {
echo $OUTPUT->header();
echo $OUTPUT->heading(format_string($glossary->name), 2);
echo $OUTPUT->heading(format_string(get_string("edit"). " " . get_string("category","glossary")), 3);
echo $OUTPUT->heading(format_string(get_string("editcategory", "glossary")), 3);
$name = $category->name;
$usedynalink = $category->usedynalink;
@ -148,7 +148,7 @@ if ( $hook >0 ) {
} else {
echo $OUTPUT->header();
echo $OUTPUT->heading(format_string($glossary->name), 2);
echo $OUTPUT->heading(format_string(get_string("delete"). " " . get_string("category","glossary")), 3);
echo $OUTPUT->heading(format_string(get_string("deletecategory", "glossary")), 3);
echo $OUTPUT->box_start('generalbox boxaligncenter errorboxcontent boxwidthnarrow');
echo "<div class=\"boxaligncenter deletecatconfirm\">".format_string($category->name, true, $fmtoptions)."<br/>";
@ -218,7 +218,7 @@ if ( $hook >0 ) {
} else {
echo $OUTPUT->header();
echo $OUTPUT->heading(format_string($glossary->name), 2);
echo "<h3 class=\"main\">" . get_string("add"). " " . get_string("category","glossary"). "</h3>";
echo "<h3 class=\"main\">" . get_string("addcategory", "glossary"). "</h3>";
$name="";
require "editcategories.html";
}
@ -287,7 +287,7 @@ echo $OUTPUT->heading(format_string($glossary->name), 2);
$options['action'] = "add";
echo "<table class=\"editbuttons\" border=\"0\"><tr><td align=\"$rightalignment\">";
echo $OUTPUT->single_button(new moodle_url("editcategories.php", $options), get_string("add") . " " . get_string("category","glossary"));
echo $OUTPUT->single_button(new moodle_url("editcategories.php", $options), get_string("addcategory", "glossary"));
echo "</td><td align=\"$leftalignment\">";
unset($options['action']);
$options['mode'] = 'cat';

View File

@ -24,6 +24,7 @@
*/
$string['addcomment'] = 'Add comment';
$string['addcategory'] = 'Add category';
$string['addentry'] = 'Add a new entry';
$string['addingcomment'] = 'Add a comment';
$string['alias'] = 'Keyword';
@ -105,6 +106,7 @@ $string['defaultsortorder'] = 'Default sort order';
$string['definition'] = 'Definition';
$string['definitions'] = 'Definitions';
$string['deleteentry'] = 'Delete entry';
$string['deletecategory'] = 'Delete category';
$string['deleteentrya'] = 'Delete entry: {$a}';
$string['deletenotenrolled'] = 'Delete entries by users not enrolled';
$string['deletingcomment'] = 'Deleting comment';
@ -138,6 +140,7 @@ $string['duplicateentry'] = 'Duplicate entry';
$string['editalways'] = 'Always allow editing';
$string['editalways_help'] = 'This setting specifies whether entries are always editable or whether students can only edit their entries during a configured editing time (usually 30 minutes).';
$string['editcategories'] = 'Edit categories';
$string['editcategory'] = 'Edit category';
$string['editentry'] = 'Edit entry';
$string['editentrya'] = 'Edit entry: {$a}';
$string['editingcomment'] = 'Editing comment';

View File

@ -65,7 +65,7 @@ class behat_mod_glossary extends behat_base {
$this->execute("behat_forms::press_button", get_string('editcategories', 'mod_glossary'));
$this->execute("behat_forms::press_button", get_string('add').' '.get_string('category', 'glossary'));
$this->execute("behat_forms::press_button", get_string('addcategory', 'glossary'));
$this->execute('behat_forms::i_set_the_field_to', array('name', $this->escape($categoryname)));

View File

@ -34,16 +34,16 @@ Feature: Glossary entries can be organised in categories
And I follow "MyGlossary"
And I follow "Browse by category"
And I press "Edit categories"
And I press "Add Category"
And I press "Add category"
And I set the field "name" to "CategoryNoLinks"
And I press "Save changes"
And I should see "0 Entries" in the "CategoryNoLinks" "table_row"
And I press "Add Category"
And I press "Add category"
And I set the field "name" to "CategoryAutoLinks"
And I set the field "usedynalink" to "Yes"
And I press "Save changes"
And I should see "0 Entries" in the "CategoryAutoLinks" "table_row"
And I press "Add Category"
And I press "Add category"
And I set the field "name" to "Category2"
And I press "Save changes"
And I click on "Edit" "link" in the "Category2" "table_row"