diff --git a/admin/tool/behat/tests/behat/i_am_on_page.feature b/admin/tool/behat/tests/behat/i_am_on_page.feature index 422cb86e56f..88b4372fa20 100644 --- a/admin/tool/behat/tests/behat/i_am_on_page.feature +++ b/admin/tool/behat/tests/behat/i_am_on_page.feature @@ -29,9 +29,9 @@ Feature: Use core page resolvers for the I am on the page steps | Course Short name | ECON101 | COURSE | Fundamentals of Economics | | Course idnumber | "2021-econ101" | Course | Fundamentals of Economics | | Forum idnumber | fundamentalsofeconomics | Activity | Add discussion topic | - | Generic activity editing | fundamentalsofeconomics | "Activity editing" | Updating: Forum | + | Generic activity editing | fundamentalsofeconomics | "Activity editing" | Edit settings | | Forum name | "Fundamentals of Economics" | "Forum activity" | Add discussion topic | - | Forum name editing | "Fundamentals of Economics" | "Forum activity editing" | Updating: Forum | + | Forum name editing | "Fundamentals of Economics" | "Forum activity editing" | Edit settings | | Forum name permissions | "Fundamentals of Economics" | "Forum activity permissions" | Permissions in Forum: Fun | | Forum name roles | "Fundamentals of Economics" | "Forum activity roles" | Assign roles in Forum: Fun | @@ -59,9 +59,9 @@ Feature: Use core page resolvers for the I am on the page steps | Course Short name | ECON101 | COURSE | Fundamentals of Economics | | Course idnumber | "2021-econ101" | Course | Fundamentals of Economics | | Forum idnumber | fundamentalsofeconomics | Activity | Add discussion topic | - | Generic activity editing | fundamentalsofeconomics | "Activity editing" | Updating: Forum | + | Generic activity editing | fundamentalsofeconomics | "Activity editing" | Edit settings | | Forum name | "Fundamentals of Economics" | "Forum activity" | Add discussion topic | - | Forum name editing | "Fundamentals of Economics" | "Forum activity editing" | Updating: Forum | + | Forum name editing | "Fundamentals of Economics" | "Forum activity editing" | Edit settings | | Forum name permissions | "Fundamentals of Economics" | "Forum activity permissions" | Permissions in Forum: Fun | | Forum name roles | "Fundamentals of Economics" | "Forum activity roles" | Assign roles in Forum: Fun | diff --git a/course/format/singleactivity/tests/behat/create_course.feature b/course/format/singleactivity/tests/behat/create_course.feature index abce67e9eca..75c6bc2fb32 100644 --- a/course/format/singleactivity/tests/behat/create_course.feature +++ b/course/format/singleactivity/tests/behat/create_course.feature @@ -33,4 +33,4 @@ Feature: Courses can be created in Single Activity mode Then I should see "Quiz" in the "Type of activity" "field" And I should not see "Forum" in the "Type of activity" "field" And I press "Save and display" - And I should see "Adding a new Quiz" + And I should see "New Quiz" diff --git a/course/format/singleactivity/tests/behat/edit_format_course.feature b/course/format/singleactivity/tests/behat/edit_format_course.feature index 15935c9db2f..649a061d3ef 100644 --- a/course/format/singleactivity/tests/behat/edit_format_course.feature +++ b/course/format/singleactivity/tests/behat/edit_format_course.feature @@ -24,4 +24,4 @@ Feature: Edit format course to Single Activity format And I press "Update format" Then I should see "Forum" in the "Type of activity" "field" And I press "Save and display" - And I should see "Adding a new Forum" + And I should see "New Forum" diff --git a/course/format/tests/behat/coursepage_completion.feature b/course/format/tests/behat/coursepage_completion.feature index 263048c4095..c5b3e728b71 100644 --- a/course/format/tests/behat/coursepage_completion.feature +++ b/course/format/tests/behat/coursepage_completion.feature @@ -155,7 +155,7 @@ Feature: Course page activities completion But I am on "C1" course homepage with editing mode on And I click on "Edit conditions" "link" in the "Activity sample" "core_courseformat > Activity completion" And I should see "Activity sample" in the "page-header" "region" - And I should see "Updating: Assignment" + And I should see "Edit settings" And I should see "Activity completion" Scenario: Completion dialog shows warning message if there are no criterias diff --git a/course/modedit.php b/course/modedit.php index 82a4eed3e65..cbc72fc0685 100644 --- a/course/modedit.php +++ b/course/modedit.php @@ -85,15 +85,7 @@ if (!empty($add)) { $sectionname = get_section_name($course, $cw); $fullmodulename = get_string('modulename', $module->name); - - if ($data->section && $course->format != 'site') { - $heading = new stdClass(); - $heading->what = $fullmodulename; - $heading->to = $sectionname; - $pageheading = get_string('addinganewto', 'moodle', $heading); - } else { - $pageheading = get_string('addinganew', 'moodle', $fullmodulename); - } + $pageheading = $pagetitle = get_string('addinganew', 'moodle', $fullmodulename); $navbaraddition = $pageheading; } else if (!empty($update)) { @@ -123,15 +115,8 @@ if (!empty($add)) { $sectionname = get_section_name($course, $cw); $fullmodulename = get_string('modulename', $module->name); - - if ($data->section && $course->format != 'site') { - $heading = new stdClass(); - $heading->what = $fullmodulename; - $heading->in = $sectionname; - $pageheading = get_string('updatingain', 'moodle', $heading); - } else { - $pageheading = get_string('updatinga', 'moodle', $fullmodulename); - } + $pageheading = get_string('editsettings', 'moodle'); + $pagetitle = get_string('edita', 'moodle', $fullmodulename); $navbaraddition = null; } else { @@ -207,10 +192,6 @@ if ($mform->is_cancelled()) { exit; } else { - - $streditinga = get_string('editinga', 'moodle', $fullmodulename); - $strmodulenameplural = get_string('modulenameplural', $module->name); - if (!empty($cm->id)) { $context = context_module::instance($cm->id); } else { @@ -218,7 +199,10 @@ if ($mform->is_cancelled()) { } $PAGE->set_heading($course->fullname); - $PAGE->set_title($streditinga); + if ($course->id !== $SITE->id) { + $pagetitle = $pagetitle . moodle_page::TITLE_SEPARATOR . $course->shortname; + } + $PAGE->set_title($pagetitle); $PAGE->set_cacheable(false); if (isset($navbaraddition)) { @@ -227,12 +211,7 @@ if ($mform->is_cancelled()) { $PAGE->activityheader->disable(); echo $OUTPUT->header(); - - if (get_string_manager()->string_exists('modulename_help', $module->name)) { - echo $OUTPUT->heading_with_help($pageheading, 'modulename', $module->name, 'monologo'); - } else { - echo $OUTPUT->heading_with_help($pageheading, '', $module->name, 'monologo'); - } + echo $OUTPUT->heading_with_help($pageheading, '', $module->name, 'monologo'); $mform->display(); diff --git a/course/tests/behat/activity_chooser.feature b/course/tests/behat/activity_chooser.feature index 89fc48c5361..2695d62bf93 100644 --- a/course/tests/behat/activity_chooser.feature +++ b/course/tests/behat/activity_chooser.feature @@ -27,7 +27,7 @@ Feature: Display and choose from the available activities in course Scenario: The teacher can choose to add an activity from the activity items in the activity chooser Given I click on "Add an activity or resource" "button" in the "Topic 4" "section" When I click on "Add a new Assignment" "link" in the "Add an activity or resource" "dialogue" - Then I should see "Adding a new Assignment" + Then I should see "New Assignment" And I set the following fields to these values: | Assignment name | Test Assignment Topic 4 | And I press "Save and return to course" @@ -37,7 +37,7 @@ Feature: Display and choose from the available activities in course Given I click on "Add an activity or resource" "button" in the "Topic 1" "section" When I click on "Information about the Assignment activity" "button" in the "Add an activity or resource" "dialogue" When I click on "Add a new Assignment" "link" in the "help" "core_course > Activity chooser screen" - Then I should see "Adding a new Assignment" + Then I should see "New Assignment" Scenario: Show summary Given I click on "Add an activity or resource" "button" in the "Topic 1" "section" diff --git a/course/tests/behat/add_activities.feature b/course/tests/behat/add_activities.feature index 47d76d7ec0c..d737ec069f3 100644 --- a/course/tests/behat/add_activities.feature +++ b/course/tests/behat/add_activities.feature @@ -20,7 +20,7 @@ Feature: Add activities to courses | Allow comments on entries | Yes | | Force language | English | And I turn editing mode off - Then I should not see "Adding a new" + Then I should not see "New" And I turn editing mode on And I open "Test name" actions menu And I click on "Edit settings" "link" in the "Test name" activity diff --git a/course/tests/behat/course_controls.feature b/course/tests/behat/course_controls.feature index 38270953cb6..b43147c0c4e 100644 --- a/course/tests/behat/course_controls.feature +++ b/course/tests/behat/course_controls.feature @@ -40,7 +40,7 @@ Feature: Course activity controls works as expected And "section" exist And I open "Test forum name 1" actions menu And I click on "Edit settings" "link" in the "Test forum name 1" activity - And I should see "Updating Forum" + And I should see "Edit settings" And I should see "Display description on course page" And I set the following fields to these values: | Forum name | Just to check that I can edit the name | @@ -107,7 +107,7 @@ Feature: Course activity controls works as expected And I press "Yes" And "section" exist And I click on "Edit settings" "link" in the "Test forum name 1" activity - And I should see "Updating Forum" + And I should see "Edit settings" And I should see "Display description on course page" And I press "Save and return to course" And "section" exist diff --git a/lang/en/deprecated.txt b/lang/en/deprecated.txt index 0e7cc6c77a1..bb5b3974b32 100644 --- a/lang/en/deprecated.txt +++ b/lang/en/deprecated.txt @@ -119,3 +119,8 @@ backupcourse,core_backup linkcoursesections,core_admin linkcoursesections_help,core_admin showallusers,core +updatinga,core +updatingain,core +addnew,core +addinganewto,core +editinga,core diff --git a/lang/en/moodle.php b/lang/en/moodle.php index 60623e966f3..2c8cb5fbd6b 100644 --- a/lang/en/moodle.php +++ b/lang/en/moodle.php @@ -62,10 +62,8 @@ $string['addedtogroup'] = 'Added to group "{$a}"'; $string['addedtogroupnot'] = 'Not added to group "{$a}"'; $string['addedtogroupnotenrolled'] = 'Not added to group "{$a}", because not enrolled in course'; $string['addfilehere'] = 'Drop files here to add them at the bottom of this section'; -$string['addinganew'] = 'Adding a new {$a}'; +$string['addinganew'] = 'New {$a}'; $string['additionalcustomnav'] = 'Additional custom navigation'; -$string['addnew'] = 'Add a new {$a}'; -$string['addinganewto'] = 'Adding a new {$a->what} to {$a->to}'; $string['addingdatatoexisting'] = 'Adding data to existing'; $string['additionalnames'] = 'Additional names'; $string['addlinkhere'] = 'Add link here'; @@ -614,7 +612,6 @@ $string['editcoursesettings'] = 'Edit course settings'; $string['editsettings'] = 'Edit settings'; $string['editfiles'] = 'Edit files'; $string['editgroupprofile'] = 'Edit group profile'; -$string['editinga'] = 'Editing {$a}'; $string['editingteachershort'] = 'Editor'; $string['editmode'] = 'Edit mode'; $string['editlock'] = 'This value cannot be edited!'; @@ -2319,8 +2316,6 @@ $string['updatemyprofile'] = 'Update profile'; $string['updatesevery'] = 'Updates every {$a} seconds'; $string['updatethis'] = 'Update this {$a}'; $string['updatethiscourse'] = 'Update this course'; -$string['updatinga'] = 'Updating: {$a}'; -$string['updatingain'] = 'Updating {$a->what} in {$a->in}'; $string['upload'] = 'Upload'; $string['uploadafile'] = 'Upload a file'; $string['uploadcantwrite'] = 'Failed to write file to disk'; @@ -2500,3 +2495,8 @@ $string['passwordrecovery'] = 'Yes, help me log in'; $string['passwordconfirmchange'] = 'Confirm password change'; $string['passwordnohelp'] = 'No help is available to find your lost password. Please contact your Moodle administrator.'; $string['showallusers'] = 'Show all users'; +$string['updatinga'] = 'Updating: {$a}'; +$string['updatingain'] = 'Updating {$a->what} in {$a->in}'; +$string['addnew'] = 'Add a new {$a}'; +$string['addinganewto'] = 'Adding a new {$a->what} to {$a->to}'; +$string['editinga'] = 'Editing {$a}'; diff --git a/lib/classes/output/mustache_clean_string_helper.php b/lib/classes/output/mustache_clean_string_helper.php index 0e56f4ce267..144cd62e2a5 100644 --- a/lib/classes/output/mustache_clean_string_helper.php +++ b/lib/classes/output/mustache_clean_string_helper.php @@ -53,7 +53,7 @@ class mustache_clean_string_helper { * * {{#cleanstr}}activity{{/cleanstr}} * {{#cleanstr}}actionchoice, core, {{#str}}delete{{/str}}{{/cleanstr}} (Together with the str helper) - * {{#cleanstr}}addinganewto, core, {"what":"This", "to":"That"}{{/cleanstr}} (Complex $a) + * {{#cleanstr}}uploadrenamedchars, core, {"oldname":"Old", "newname":"New"}{{/cleanstr}} (Complex $a) * * The args are comma separated and only the first is required. * The last is a $a argument for get string. For complex data here, use JSON. diff --git a/mod/quiz/accessrule/seb/tests/behat/edit_form.feature b/mod/quiz/accessrule/seb/tests/behat/edit_form.feature index 2466304fc1b..baf3a822808 100644 --- a/mod/quiz/accessrule/seb/tests/behat/edit_form.feature +++ b/mod/quiz/accessrule/seb/tests/behat/edit_form.feature @@ -50,13 +50,13 @@ Feature: Safe Exam Browser settings in quiz edit form # Create the quiz. When I add a "Quiz" to section "0" and I fill the form with: | Name | My quiz | - Then I should not see "Adding a new Quiz" + Then I should not see "New Quiz" # Edit the quiz. And I open "My quiz" actions menu And I click on "Edit settings" "link" in the "My quiz" activity And I set the field "Name" to "My quiz edited" And I press "Save and return to course" - And I should not see "Updating: Quiz" + And I should not see "Edit settings" Scenario: SEB settings if using No SEB Given the following "quizaccess_seb > seb templates" exist: diff --git a/mod/workshop/tests/behat/grade_to_pass.feature b/mod/workshop/tests/behat/grade_to_pass.feature index 4050c6515a4..6b6183d3bf5 100644 --- a/mod/workshop/tests/behat/grade_to_pass.feature +++ b/mod/workshop/tests/behat/grade_to_pass.feature @@ -33,7 +33,7 @@ Feature: Setting grades to pass via workshop editing form | activity | course | name | submissiongradepass | gradinggradepass | submissiontypetextavailable | | workshop | c1 | Another workshop | 42 | 10.1 | 0 | When I am on the "Course1" course page logged in as teacher1 - Then I should not see "Adding a new Workshop" + Then I should not see "New Workshop" And I am on the "Another workshop" "workshop activity editing" page And the field "Submission grade to pass" matches value "42.00" And the field "Assessment grade to pass" matches value "10.10" @@ -53,7 +53,7 @@ Feature: Setting grades to pass via workshop editing form When I am on the "Another awesome workshop" "workshop activity editing" page logged in as teacher1 And I set the field "Assessment grade to pass" to "You shall not pass!" And I press "Save and return to course" - Then I should see "Updating Workshop in Topic 1" + Then I should see "Edit settings" And I should see "You must enter a number here" Scenario: Adding a new workshop with invalid value of a grade to pass @@ -63,7 +63,7 @@ Feature: Setting grades to pass via workshop editing form When I am on the "Almost awesome workshop" "workshop activity editing" page logged in as teacher1 And I set the field "Assessment grade to pass" to "10000000" And I press "Save and return to course" - Then I should see "Updating Workshop in Topic 1" + Then I should see "Edit settings" And I should see "The grade to pass can not be greater than the maximum possible grade" Scenario: Emptying grades to pass fields sets them to zero @@ -74,14 +74,14 @@ Feature: Setting grades to pass via workshop editing form And I set the field "Submission grade to pass" to "59.99" And I set the field "Assessment grade to pass" to "0.000" And I press "Save and return to course" - And I should not see "Updating Workshop in Topic 1" + And I should not see "Edit settings" And I am on the "Super awesome workshop" "workshop activity editing" page And the field "Submission grade to pass" matches value "59.99" And the field "Assessment grade to pass" matches value "0.00" When I set the field "Submission grade to pass" to "" And I set the field "Assessment grade to pass" to "" And I press "Save and display" - Then I should not see "Adding a new Workshop" + Then I should not see "New Workshop" And I am on the "Super awesome workshop" "workshop activity editing" page And the field "Submission grade to pass" matches value "0.00" And the field "Assessment grade to pass" matches value "0.00" diff --git a/theme/classic/tests/behat/pageadministrationmenu.feature b/theme/classic/tests/behat/pageadministrationmenu.feature index e549fe2555f..8d1843819d8 100644 --- a/theme/classic/tests/behat/pageadministrationmenu.feature +++ b/theme/classic/tests/behat/pageadministrationmenu.feature @@ -25,7 +25,7 @@ Feature: Page administration menu And I should see the page administration menu And "Settings" "link" should exist in current page administration And I navigate to "Settings" in current page administration - And I should see "Updating: Choice" + And I should see "Edit settings" And I navigate to course participants And I should see the page administration menu And I am on the "Course 1" "Enrolment methods" page