From 22cc97570592e4c1a9271ae659efc92c67e8f7a7 Mon Sep 17 00:00:00 2001 From: Sara Arjona Date: Wed, 8 May 2024 18:20:01 +0200 Subject: [PATCH] MDL-81872 course: Improve wording and workflow for reset --- .upgradenotes/MDL-81872-2024052707330838.yml | 12 ++++++++ course/reset_form.php | 15 +++++++--- grade/export/grade_export_form.php | 1 - lang/en/blog.php | 2 +- lang/en/calendar.php | 2 +- lang/en/competency.php | 3 +- lang/en/completion.php | 2 +- lang/en/grades.php | 4 +-- lang/en/group.php | 8 +++--- lang/en/moodle.php | 7 +++-- lang/en/notes.php | 2 +- lang/en/role.php | 4 +-- mod/assign/lang/en/assign.php | 6 ++-- mod/assign/lib.php | 1 + mod/book/lang/en/book.php | 2 +- mod/book/lib.php | 1 + mod/chat/lang/en/chat.php | 2 +- mod/chat/lib.php | 1 + mod/choice/lang/en/choice.php | 2 +- mod/choice/lib.php | 3 +- mod/data/lang/en/data.php | 6 ++-- mod/data/lib.php | 1 + mod/forum/lang/en/forum.php | 10 +++---- mod/forum/lib.php | 29 +++++++++++--------- mod/glossary/lang/en/glossary.php | 6 ++-- mod/glossary/lib.php | 12 ++++---- mod/h5pactivity/lang/en/h5pactivity.php | 2 +- mod/h5pactivity/lib.php | 1 + mod/lesson/lang/en/lesson.php | 6 ++-- mod/lesson/lib.php | 3 +- mod/quiz/lang/en/quiz.php | 6 ++-- mod/quiz/lib.php | 1 + mod/scorm/lang/en/scorm.php | 2 +- mod/scorm/lib.php | 1 + mod/survey/lang/en/survey.php | 4 +-- mod/survey/lib.php | 7 +++-- mod/wiki/lang/en/wiki.php | 5 ++-- mod/wiki/lib.php | 1 + mod/workshop/lang/en/workshop.php | 4 +-- mod/workshop/lib.php | 10 ++++--- 40 files changed, 115 insertions(+), 82 deletions(-) create mode 100644 .upgradenotes/MDL-81872-2024052707330838.yml diff --git a/.upgradenotes/MDL-81872-2024052707330838.yml b/.upgradenotes/MDL-81872-2024052707330838.yml new file mode 100644 index 00000000000..0b3c43c35f1 --- /dev/null +++ b/.upgradenotes/MDL-81872-2024052707330838.yml @@ -0,0 +1,12 @@ +issueNumber: MDL-81872 +notes: + core_course: + - message: >+ + The reset course page has been improved. The "Delete" or "Remove" wording have been removed from all the options to make it easier to focus on the data to be removed and avoid inconsistencies and duplicated information. + Third party plugins implementing reset methods might need to: + + - Add static element in the _reset_course_form_definition method before all the options with the Delete string: + `$mform->addElement('static', 'assigndelete', get_string('delete'));` + - Review all the strings used in the reset page to remove the "Delete" or "Remove" words from them. + + type: changed diff --git a/course/reset_form.php b/course/reset_form.php index bebfbb30e24..e8851ef976e 100644 --- a/course/reset_form.php +++ b/course/reset_form.php @@ -41,6 +41,7 @@ class course_reset_form extends moodleform { $mform->addHelpButton('reset_start_date', 'startdate'); $mform->addElement('date_time_selector', 'reset_end_date', get_string('enddate'), ['optional' => true]); $mform->addHelpButton('reset_end_date', 'enddate'); + $mform->addElement('static', 'generaldelete', get_string('delete')); $mform->addElement('checkbox', 'reset_events', get_string('deleteevents', 'calendar')); $mform->addElement('checkbox', 'reset_notes', get_string('deletenotes', 'notes')); $mform->addElement('checkbox', 'reset_comments', get_string('deleteallcomments', 'moodle')); @@ -53,12 +54,17 @@ class course_reset_form extends moodleform { $roles = get_assignable_roles(context_course::instance($COURSE->id)); $roles[0] = get_string('noroles', 'role'); $roles = array_reverse($roles, true); - $mform->addElement('select', 'unenrol_users', get_string('unenrolroleusers', 'enrol'), $roles, ['multiple' => 'multiple']); - $mform->addElement('checkbox', 'reset_roles_overrides', get_string('deletecourseoverrides', 'role')); - $mform->setAdvanced('reset_roles_overrides'); + $attributes = [ + 'multiple' => 1, + 'size' => min(count($roles), 10), + ]; + $mform->addElement('select', 'unenrol_users', get_string('unenrolroleusers', 'enrol'), $roles, $attributes); + $mform->addElement('static', 'rolesdelete', get_string('delete')); $mform->addElement('checkbox', 'reset_roles_local', get_string('deletelocalroles', 'role')); + $mform->addElement('checkbox', 'reset_roles_overrides', get_string('deletecourseoverrides', 'role')); $mform->addElement('header', 'gradebookheader', get_string('gradebook', 'grades')); + $mform->addElement('static', 'gradebookdelete', get_string('delete')); $mform->addElement('checkbox', 'reset_gradebook_items', get_string('removeallcourseitems', 'grades')); $mform->addHelpButton('reset_gradebook_items', 'removeallcourseitems', 'grades'); $mform->addElement('checkbox', 'reset_gradebook_grades', get_string('removeallcoursegrades', 'grades')); @@ -66,6 +72,7 @@ class course_reset_form extends moodleform { $mform->disabledIf('reset_gradebook_grades', 'reset_gradebook_items', 'checked'); $mform->addElement('header', 'groupheader', get_string('groups')); + $mform->addElement('static', 'groupdelete', get_string('delete')); $mform->addElement('checkbox', 'reset_groups_remove', get_string('deleteallgroups', 'group')); $mform->addElement('checkbox', 'reset_groups_members', get_string('removegroupsmembers', 'group')); $mform->disabledIf('reset_groups_members', 'reset_groups_remove', 'checked'); @@ -98,9 +105,9 @@ class course_reset_form extends moodleform { // Mention unsupported mods. if (!empty($unsupportedmods)) { $mform->addElement('header', 'unsupportedheader', get_string('resetnotimplemented')); + $mform->addElement('static', 'unsupportedinfo', get_string('resetnotimplementedinfo')); foreach ($unsupportedmods as $mod) { $mform->addElement('static', 'unsup'.$mod->name, get_string('modulenameplural', $mod->name)); - $mform->setAdvanced('unsup'.$mod->name); } } diff --git a/grade/export/grade_export_form.php b/grade/export/grade_export_form.php index c704cefa5fc..1af06b4f1d2 100644 --- a/grade/export/grade_export_form.php +++ b/grade/export/grade_export_form.php @@ -229,4 +229,3 @@ class grade_export_form extends moodleform { return $data; } } - diff --git a/lang/en/blog.php b/lang/en/blog.php index 43e9de3d6de..fd7f91b304c 100644 --- a/lang/en/blog.php +++ b/lang/en/blog.php @@ -68,7 +68,7 @@ $string['configuseexternalblogs'] = 'Enables users to specify external blog feed $string['courseblog'] = 'Course blog: {$a}'; $string['courseblogdisable'] = 'Course blogs are not enabled'; $string['courseblogs'] = 'Users can only see blogs for people who share a course'; -$string['deleteblogassociations'] = 'Delete blog associations'; +$string['deleteblogassociations'] = 'Blog associations'; $string['deleteblogassociations_help'] = 'If ticked then blog entries will no longer be associated with this course or any course activities or resources. The blog entries themselves will not be deleted.'; $string['deleteentry'] = 'Delete entry'; $string['deleteexternalblog'] = 'Unregister this external blog'; diff --git a/lang/en/calendar.php b/lang/en/calendar.php index 5846cd1254d..f922d5d46d9 100644 --- a/lang/en/calendar.php +++ b/lang/en/calendar.php @@ -66,7 +66,7 @@ $string['dayviewtitle'] = 'Day view: {$a}'; $string['daywithnoevents'] = 'There are no events this day.'; $string['default'] = 'Default'; $string['deleteevent'] = 'Delete event'; -$string['deleteevents'] = 'Delete events'; +$string['deleteevents'] = 'Events'; $string['deleteoneevent'] = 'Delete this event'; $string['deleteallevents'] = 'Delete all events'; $string['detailedmonthviewfor'] = 'Detailed month view for:'; diff --git a/lang/en/competency.php b/lang/en/competency.php index 0c1ca6e7c99..53c78ef1c2c 100644 --- a/lang/en/competency.php +++ b/lang/en/competency.php @@ -37,7 +37,7 @@ $string['coursemodulecompetencyoutcome_complete'] = 'Complete the competency'; $string['coursemodulecompetencyoutcome_evidence'] = 'Attach evidence'; $string['coursemodulecompetencyoutcome_none'] = 'Do nothing'; $string['coursemodulecompetencyoutcome_recommend'] = 'Send for review'; -$string['deletecompetencyratings'] = 'Delete competency ratings'; +$string['deletecompetencyratings'] = 'Competency ratings'; $string['duplicateditemname'] = '{$a} (copy)'; $string['enablecompetencies'] = 'Enable competencies'; $string['enablecompetencies_desc'] = 'Competencies allow users to be assessed according to learning plans.'; @@ -200,4 +200,3 @@ $string['usercompetencystatus_idle'] = 'Idle'; $string['usercompetencystatus_inreview'] = 'In review'; $string['usercompetencystatus_waitingforreview'] = 'Waiting for review'; $string['userplans'] = 'Learning plans'; - diff --git a/lang/en/completion.php b/lang/en/completion.php index 8e036459c42..f00fd478cc4 100644 --- a/lang/en/completion.php +++ b/lang/en/completion.php @@ -145,7 +145,7 @@ $string['defaultactivitycompletionsite'] = 'These are the default completion con $string['defaultactivitycompletioncourse'] = 'These are the default completion conditions for activities in this course.'; $string['defaultcompletion'] = 'Default activity completion'; $string['defaultcompletionupdated'] = 'Changes saved'; -$string['deletecompletiondata'] = 'Delete completion data'; +$string['deletecompletiondata'] = 'Completion data'; $string['dependencies'] = 'Dependencies'; $string['dependenciescompleted'] = 'Completion of other courses'; $string['detail_desc:receivegrade'] = 'Receive a grade'; diff --git a/lang/en/grades.php b/lang/en/grades.php index 0bb3339f88a..ac1620e57c3 100644 --- a/lang/en/grades.php +++ b/lang/en/grades.php @@ -715,9 +715,9 @@ $string['recovergradesdefault'] = 'Recover grades default'; $string['recovergradesdefault_help'] = 'By default recover old grades when re-enrolling a user in a course.'; $string['refreshpreview'] = 'Refresh preview'; $string['regradeanyway'] = 'Regrade anyway'; -$string['removeallcoursegrades'] = 'Delete all grades'; +$string['removeallcoursegrades'] = 'All grades'; $string['removeallcoursegrades_help'] = 'If ticked, all grade items and grades that were manually added to the gradebook will be deleted, as well as data on overridden, excluded, hidden and locked grades. Only grade items and grades associated with activities will remain.'; -$string['removeallcourseitems'] = 'Delete all items and categories'; +$string['removeallcourseitems'] = 'All items and categories'; $string['removeallcourseitems_help'] = 'If ticked, all categories and grade items which were manually added to the gradebook will be deleted, together with grades and data on overridden, excluded, hidden and locked grades. Only grade items associated with activities will remain.'; $string['report'] = 'Report'; $string['reportdefault'] = 'Report default ({$a})'; diff --git a/lang/en/group.php b/lang/en/group.php index 21bf1c262c0..4e5b33db302 100644 --- a/lang/en/group.php +++ b/lang/en/group.php @@ -48,8 +48,8 @@ $string['databaseupgradegroups'] = 'Groups version is now {$a}'; $string['defaultgrouping'] = 'Default grouping'; $string['defaultgroupingname'] = 'Grouping'; $string['defaultgroupname'] = 'Group'; -$string['deleteallgroupings'] = 'Delete all groupings'; -$string['deleteallgroups'] = 'Delete all groups'; +$string['deleteallgroupings'] = 'All groupings'; +$string['deleteallgroups'] = 'All groups'; $string['deletegroupconfirm'] = 'Are you sure you want to delete group \'{$a}\'?'; $string['deletegrouping'] = 'Delete grouping'; $string['deletegroupingconfirm'] = 'Are you sure you want to delete grouping \'{$a}\'? (Groups in the grouping are not deleted.)'; @@ -196,8 +196,8 @@ $string['random'] = 'Randomly'; $string['removegroupfromselectedgrouping'] = 'Remove group from grouping'; $string['removefromgroup'] = 'Remove user from group {$a}'; $string['removefromgroupconfirm'] = 'Do you really want to remove user "{$a->user}" from group "{$a->group}"?'; -$string['removegroupingsmembers'] = 'Remove all groups from groupings'; -$string['removegroupsmembers'] = 'Remove all group members'; +$string['removegroupingsmembers'] = 'All groups from groupings'; +$string['removegroupsmembers'] = 'All group members'; $string['removeselectedusers'] = 'Remove selected users'; $string['selectfromgroup'] = 'Select members from group'; $string['selectfromgrouping'] = 'Select members from grouping'; diff --git a/lang/en/moodle.php b/lang/en/moodle.php index 56ade3c7c02..2b30a3f7026 100644 --- a/lang/en/moodle.php +++ b/lang/en/moodle.php @@ -520,8 +520,8 @@ $string['delete'] = 'Delete'; $string['deleteablock'] = 'Delete a block'; $string['deleteall'] = 'Delete all'; $string['deleteallcannotundo'] = 'Delete all - cannot be undone'; -$string['deleteallcomments'] = 'Delete all comments'; -$string['deleteallratings'] = 'Delete all ratings'; +$string['deleteallcomments'] = 'All comments'; +$string['deleteallratings'] = 'All ratings'; $string['deletecategory'] = 'Delete category: {$a}'; $string['deletecategoryempty'] = 'This category is empty.'; $string['deletecategorycheck'] = 'Are you absolutely sure you want to completely delete this category \'{$a}\'?
This will move all courses into the parent category if there is one, or into Miscellaneous.'; @@ -1864,7 +1864,8 @@ $string['reset'] = 'Reset'; $string['resetcomponent'] = 'Component'; $string['resetcourse'] = 'Reset course'; $string['resetinfo'] = 'Delete all user data and reset this course to its original state, keeping activities and settings intact.'; -$string['resetnotimplemented'] = 'Reset not implemented'; +$string['resetnotimplemented'] = 'Reset not supported'; +$string['resetnotimplementedinfo'] = 'These activities can\'t be reset:'; $string['resetrecordexpired'] = 'The password reset link you used is more than {$a} minutes old and has expired. Please initiate a new password reset.'; $string['resetstartdate'] = 'Reset start date'; $string['resetstatus'] = 'Status'; diff --git a/lang/en/notes.php b/lang/en/notes.php index b42a53ba9b7..62b79a45b50 100644 --- a/lang/en/notes.php +++ b/lang/en/notes.php @@ -37,7 +37,7 @@ $string['course'] = 'course'; $string['coursenotes'] = 'Course notes'; $string['created'] = 'created'; $string['deleteconfirm'] = 'Delete this note?'; -$string['deletenotes'] = 'Delete all notes'; +$string['deletenotes'] = 'All notes'; $string['editnote'] = 'Edit note'; $string['enablenotes'] = 'Enable notes'; $string['eventnotecreated'] = 'Note created'; diff --git a/lang/en/role.php b/lang/en/role.php index 33a742a69e7..97fa8405422 100644 --- a/lang/en/role.php +++ b/lang/en/role.php @@ -226,8 +226,8 @@ $string['defaultrole'] = 'Default role'; $string['defaultx'] = 'Default: {$a}'; $string['defineroles'] = 'Define roles'; $string['definitionofrolex'] = 'Definition of role \'{$a}\''; -$string['deletecourseoverrides'] = 'Delete all overrides in course'; -$string['deletelocalroles'] = 'Delete all local role assignments'; +$string['deletecourseoverrides'] = 'All overrides in course'; +$string['deletelocalroles'] = 'All local role assignments'; $string['deleterolesure'] = '

Are you sure that you want to delete role "{$a->name} ({$a->shortname})"?

Currently this role is assigned to {$a->count} users.

'; $string['deletexrole'] = 'Delete {$a} role'; $string['duplicaterole'] = 'Duplicate role'; diff --git a/mod/assign/lang/en/assign.php b/mod/assign/lang/en/assign.php index e8c0db01c83..f8fc331e211 100644 --- a/mod/assign/lang/en/assign.php +++ b/mod/assign/lang/en/assign.php @@ -157,7 +157,7 @@ $string['defaultlayout'] = 'Restore default layout'; $string['defaultsettings'] = 'Default assignment settings'; $string['defaultsettings_help'] = 'These settings define the defaults for all new assignments.'; $string['defaultteam'] = 'Default group'; -$string['deleteallsubmissions'] = 'Delete all submissions'; +$string['deleteallsubmissions'] = 'All submissions'; $string['description'] = 'Description'; $string['disabled'] = 'Disabled'; $string['downloadall'] = 'Download all submissions'; @@ -469,8 +469,8 @@ $string['quickgradingresult'] = 'Quick grading'; $string['quickgradingchangessaved'] = 'The grade changes were saved'; $string['quickgrading_help'] = 'Quick grading allows you to assign grades (and outcomes) directly in the submissions table. Quick grading is not compatible with advanced grading and is not recommended when there are multiple markers.'; $string['relativedatessubmissiontimeleft'] = 'Calculated for each student'; -$string['removeallgroupoverrides'] = 'Delete all group overrides'; -$string['removealluseroverrides'] = 'Delete all user overrides'; +$string['removeallgroupoverrides'] = 'All group overrides'; +$string['removealluseroverrides'] = 'All user overrides'; $string['reopenuntilpassincompatiblewithblindmarking'] = 'Reopen until pass option is incompatible with anonymous submissions, because the grades are not released to the gradebook until the student identities are revealed.'; $string['requiresubmissionstatement'] = 'Require that students accept the submission statement'; $string['requiresubmissionstatement_help'] = 'Require that students accept the submission statement for all submissions to this assignment.'; diff --git a/mod/assign/lib.php b/mod/assign/lib.php index 1e1fcddf91a..36c5c3ba67f 100644 --- a/mod/assign/lib.php +++ b/mod/assign/lib.php @@ -207,6 +207,7 @@ function assign_reset_gradebook($courseid, $type='') { */ function assign_reset_course_form_definition(&$mform) { $mform->addElement('header', 'assignheader', get_string('modulenameplural', 'assign')); + $mform->addElement('static', 'assigndelete', get_string('delete')); $name = get_string('deleteallsubmissions', 'assign'); $mform->addElement('advcheckbox', 'reset_assign_submissions', $name); $mform->addElement('advcheckbox', 'reset_assign_user_overrides', diff --git a/mod/book/lang/en/book.php b/mod/book/lang/en/book.php index a9aeda657b7..5b4bf2081bd 100644 --- a/mod/book/lang/en/book.php +++ b/mod/book/lang/en/book.php @@ -111,7 +111,7 @@ $string['subchapternotice'] = '(Only available once the first chapter has been c $string['subplugintype_booktool'] = 'Book tool'; $string['subplugintype_booktool_plural'] = 'Book tools'; -$string['removeallbooktags'] = 'Remove all book tags'; +$string['removeallbooktags'] = 'All book tags'; $string['tagarea_book_chapters'] = 'Book chapters'; $string['tagsdeleted'] = 'Book tags have been deleted'; diff --git a/mod/book/lib.php b/mod/book/lib.php index e4ebc8e2189..7d80b908d56 100644 --- a/mod/book/lib.php +++ b/mod/book/lib.php @@ -171,6 +171,7 @@ function book_reset_userdata($data) { */ function book_reset_course_form_definition(&$mform) { $mform->addElement('header', 'bookheader', get_string('modulenameplural', 'book')); + $mform->addElement('static', 'bookdelete', get_string('delete')); $mform->addElement('checkbox', 'reset_book_tags', get_string('removeallbooktags', 'book')); } diff --git a/mod/chat/lang/en/chat.php b/mod/chat/lang/en/chat.php index 02a8ca0955c..b336a4e26f8 100644 --- a/mod/chat/lang/en/chat.php +++ b/mod/chat/lang/en/chat.php @@ -142,7 +142,7 @@ $string['privacy:metadata:messages:timestamp'] = 'The time when the message was $string['privacy:metadata:messages:userid'] = 'The user ID of the author of the message'; $string['refreshroom'] = 'Refresh room'; $string['refreshuserlist'] = 'Refresh user list'; -$string['removemessages'] = 'Remove all messages'; +$string['removemessages'] = 'All messages'; $string['repeatdaily'] = 'At the same time every day'; $string['repeatnone'] = 'No repeats - publish the specified time only'; $string['repeattimes'] = 'Repeat/publish session times'; diff --git a/mod/chat/lib.php b/mod/chat/lib.php index 128063246a0..e5f0b2e6d76 100644 --- a/mod/chat/lib.php +++ b/mod/chat/lib.php @@ -1208,6 +1208,7 @@ function chat_print_overview() { */ function chat_reset_course_form_definition(&$mform) { $mform->addElement('header', 'chatheader', get_string('modulenameplural', 'chat')); + $mform->addElement('static', 'chatdelete', get_string('delete')); $mform->addElement('advcheckbox', 'reset_chat', get_string('removemessages', 'chat')); } diff --git a/mod/choice/lang/en/choice.php b/mod/choice/lang/en/choice.php index 73f60813c6b..1945ca0a564 100644 --- a/mod/choice/lang/en/choice.php +++ b/mod/choice/lang/en/choice.php @@ -137,7 +137,7 @@ $string['publishinfonever'] = 'The results of this activity will not be publishe $string['publishnames'] = 'Publish full results, showing names and their choices'; $string['publishnot'] = 'Do not publish results to students'; $string['removemychoice'] = 'Remove my choice'; -$string['removeresponses'] = 'Remove all responses'; +$string['removeresponses'] = 'All responses'; $string['responses'] = 'Responses'; $string['responsesresultgraphheader'] = 'Graph display'; $string['responsesa'] = 'Responses: {$a}'; diff --git a/mod/choice/lib.php b/mod/choice/lib.php index c6a51ec8081..a38712173ae 100644 --- a/mod/choice/lib.php +++ b/mod/choice/lib.php @@ -725,7 +725,8 @@ function choice_get_post_actions() { */ function choice_reset_course_form_definition(&$mform) { $mform->addElement('header', 'choiceheader', get_string('modulenameplural', 'choice')); - $mform->addElement('advcheckbox', 'reset_choice', get_string('removeresponses','choice')); + $mform->addElement('static', 'choicedelete', get_string('delete')); + $mform->addElement('advcheckbox', 'reset_choice', get_string('removeresponses', 'choice')); } /** diff --git a/mod/data/lang/en/data.php b/mod/data/lang/en/data.php index caeee04f10c..74a2400a16e 100644 --- a/mod/data/lang/en/data.php +++ b/mod/data/lang/en/data.php @@ -114,13 +114,13 @@ $string['defaultfieldenclosure'] = '(default is none)'; $string['defaultsortfield'] = 'Default sort field'; $string['delcheck'] = 'Bulk delete checkbox'; $string['delete'] = 'Delete'; -$string['deleteallentries'] = 'Delete all entries'; +$string['deleteallentries'] = 'All entries'; $string['deletecomment'] = 'Are you sure you want to delete this comment?'; $string['deleteconfirm'] = 'Delete preset {$a}?'; $string['deleted'] = 'deleted'; $string['deleteentry'] = 'Delete entry'; $string['deletefield'] = 'Delete field'; -$string['deletenotenrolled'] = 'Delete entries by users not enrolled'; +$string['deletenotenrolled'] = 'Entries by users not enrolled'; $string['deletewarning'] = 'Deleting a preset removes it from the list of available presets in all courses.'; $string['descending'] = 'Descending'; $string['directorynotapreset'] = '{$a->directory} Not a preset: missing files: {$a->missing_files}'; @@ -381,7 +381,7 @@ $string['recorddeleted'] = 'Entry deleted'; $string['recorddisapproved'] = 'Entry unapproved'; $string['recordsnotsaved'] = 'No entry was saved. Please check the format of the uploaded file.'; $string['recordssaved'] = 'entries saved'; -$string['removealldatatags'] = 'Remove all database tags'; +$string['removealldatatags'] = 'All database tags'; $string['requireapproval'] = 'Approval required'; $string['requireapproval_help'] = 'A teacher has to approve entries before they’re visible to everyone.'; $string['required'] = 'Required'; diff --git a/mod/data/lib.php b/mod/data/lib.php index ef04db6600d..56c783abac5 100644 --- a/mod/data/lib.php +++ b/mod/data/lib.php @@ -2833,6 +2833,7 @@ function data_preset_path($course, $userid, $shortname) { */ function data_reset_course_form_definition(&$mform) { $mform->addElement('header', 'dataheader', get_string('modulenameplural', 'data')); + $mform->addElement('static', 'datadelete', get_string('delete')); $mform->addElement('checkbox', 'reset_data', get_string('deleteallentries','data')); $mform->addElement('checkbox', 'reset_data_notenrolled', get_string('deletenotenrolled', 'data')); diff --git a/mod/forum/lang/en/forum.php b/mod/forum/lang/en/forum.php index 1c3e24377c2..206196af0be 100644 --- a/mod/forum/lang/en/forum.php +++ b/mod/forum/lang/en/forum.php @@ -613,7 +613,7 @@ $string['qandaforum'] = 'Q and A forum'; $string['qandanotify'] = 'This is a question and answer forum. To see other replies, you must first post your reply.'; $string['re'] = 'Re:'; $string['readtherest'] = 'Read the rest of this topic'; -$string['removeallforumtags'] = 'Remove all forum tags'; +$string['removeallforumtags'] = 'All forum tags'; $string['removefromfavourites'] = 'Unstar this discussion'; $string['replies'] = 'Replies'; $string['repliesmany'] = '{$a} replies so far'; @@ -628,10 +628,10 @@ $string['replytouser'] = 'Use email address in reply'; $string['reply_handler'] = 'Reply to forum posts via email'; $string['reply_handler_name'] = 'Reply to forum posts'; $string['resetforums'] = 'Delete posts from'; -$string['resetforumsall'] = 'Delete all posts'; -$string['resetdigests'] = 'Delete all per-user forum digest preferences'; -$string['resetsubscriptions'] = 'Delete all forum subscriptions'; -$string['resettrackprefs'] = 'Delete all forum tracking preferences'; +$string['resetforumsall'] = 'All posts'; +$string['resetdigests'] = 'All per-user forum digest preferences'; +$string['resetsubscriptions'] = 'All forum subscriptions'; +$string['resettrackprefs'] = 'All forum tracking preferences'; $string['rsssubscriberssdiscussions'] = 'RSS feed of discussions'; $string['rsssubscriberssposts'] = 'RSS feed of posts'; $string['rssarticles'] = 'Number of RSS recent articles'; diff --git a/mod/forum/lib.php b/mod/forum/lib.php index 2d918ff9b05..74c5b200bcb 100644 --- a/mod/forum/lib.php +++ b/mod/forum/lib.php @@ -5255,28 +5255,31 @@ function forum_reset_userdata($data) { */ function forum_reset_course_form_definition(&$mform) { $mform->addElement('header', 'forumheader', get_string('modulenameplural', 'forum')); + $mform->addElement('static', 'forumdelete', get_string('delete')); - $mform->addElement('checkbox', 'reset_forum_all', get_string('resetforumsall','forum')); + $mform->addElement('checkbox', 'reset_forum_digests', get_string('resetdigests', 'forum')); - $mform->addElement('select', 'reset_forum_types', get_string('resetforums', 'forum'), forum_get_forum_types_all(), array('multiple' => 'multiple')); - $mform->setAdvanced('reset_forum_types'); - $mform->disabledIf('reset_forum_types', 'reset_forum_all', 'checked'); + $mform->addElement('checkbox', 'reset_forum_subscriptions', get_string('resetsubscriptions', 'forum')); - $mform->addElement('checkbox', 'reset_forum_digests', get_string('resetdigests','forum')); - $mform->setAdvanced('reset_forum_digests'); + $mform->addElement('checkbox', 'reset_forum_all', get_string('resetforumsall', 'forum')); - $mform->addElement('checkbox', 'reset_forum_subscriptions', get_string('resetsubscriptions','forum')); - $mform->setAdvanced('reset_forum_subscriptions'); + $mform->addElement( + 'select', + 'reset_forum_types', + get_string('resetforums', 'forum'), + forum_get_forum_types_all(), + ['multiple' => 'multiple'], + ); + $mform->hideIf('reset_forum_types', 'reset_forum_all', 'checked'); - $mform->addElement('checkbox', 'reset_forum_track_prefs', get_string('resettrackprefs','forum')); - $mform->setAdvanced('reset_forum_track_prefs'); - $mform->disabledIf('reset_forum_track_prefs', 'reset_forum_all', 'checked'); + $mform->addElement('checkbox', 'reset_forum_track_prefs', get_string('resettrackprefs', 'forum')); + $mform->hideIf('reset_forum_track_prefs', 'reset_forum_all', 'checked'); $mform->addElement('checkbox', 'reset_forum_ratings', get_string('deleteallratings')); - $mform->disabledIf('reset_forum_ratings', 'reset_forum_all', 'checked'); + $mform->hideIf('reset_forum_ratings', 'reset_forum_all', 'checked'); $mform->addElement('checkbox', 'reset_forum_tags', get_string('removeallforumtags', 'forum')); - $mform->disabledIf('reset_forum_tags', 'reset_forum_all', 'checked'); + $mform->hideIf('reset_forum_tags', 'reset_forum_all', 'checked'); } /** diff --git a/mod/glossary/lang/en/glossary.php b/mod/glossary/lang/en/glossary.php index 5629fa85995..18969278df3 100644 --- a/mod/glossary/lang/en/glossary.php +++ b/mod/glossary/lang/en/glossary.php @@ -109,7 +109,7 @@ $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['deletenotenrolled'] = 'Entries by users not enrolled'; $string['deletingcomment'] = 'Deleting comment'; $string['deletingnoneemptycategory'] = 'Deleting this category will not delete the entries it contains - they will be marked as uncategorised.'; $string['descending'] = 'descending'; @@ -301,9 +301,9 @@ $string['privacy:metadata:glossary_entries:timemodified'] = 'The timestamp indic $string['question'] = 'Question'; $string['rejectedentries'] = 'Rejected entries'; $string['rejectionrpt'] = 'Rejection report'; -$string['removeallglossarytags'] = 'Remove all glossary tags'; +$string['removeallglossarytags'] = 'All glossary tags'; $string['resetglossaries'] = 'Delete entries from'; -$string['resetglossariesall'] = 'Delete entries from all glossaries'; +$string['resetglossariesall'] = 'Entries from all glossaries'; $string['rssarticles'] = 'Number of RSS recent articles'; $string['rssarticles_help'] = 'This setting specifies the number of glossary entry concepts to include in the RSS feed. Between 5 and 20 generally acceptable.'; $string['rsssubscriberss'] = 'Display the RSS feed for \'{$a}\' concepts'; diff --git a/mod/glossary/lib.php b/mod/glossary/lib.php index 930b19c76f4..82b3b90ad80 100644 --- a/mod/glossary/lib.php +++ b/mod/glossary/lib.php @@ -2795,24 +2795,24 @@ function glossary_get_post_actions() { */ function glossary_reset_course_form_definition(&$mform) { $mform->addElement('header', 'glossaryheader', get_string('modulenameplural', 'glossary')); + $mform->addElement('static', 'glossarydelete', get_string('delete')); $mform->addElement('checkbox', 'reset_glossary_all', get_string('resetglossariesall','glossary')); $mform->addElement('select', 'reset_glossary_types', get_string('resetglossaries', 'glossary'), array('main'=>get_string('mainglossary', 'glossary'), 'secondary'=>get_string('secondaryglossary', 'glossary')), array('multiple' => 'multiple')); - $mform->setAdvanced('reset_glossary_types'); - $mform->disabledIf('reset_glossary_types', 'reset_glossary_all', 'checked'); + $mform->hideIf('reset_glossary_types', 'reset_glossary_all', 'checked'); $mform->addElement('checkbox', 'reset_glossary_notenrolled', get_string('deletenotenrolled', 'glossary')); - $mform->disabledIf('reset_glossary_notenrolled', 'reset_glossary_all', 'checked'); + $mform->hideIf('reset_glossary_notenrolled', 'reset_glossary_all', 'checked'); $mform->addElement('checkbox', 'reset_glossary_ratings', get_string('deleteallratings')); - $mform->disabledIf('reset_glossary_ratings', 'reset_glossary_all', 'checked'); + $mform->hideIf('reset_glossary_ratings', 'reset_glossary_all', 'checked'); $mform->addElement('checkbox', 'reset_glossary_comments', get_string('deleteallcomments')); - $mform->disabledIf('reset_glossary_comments', 'reset_glossary_all', 'checked'); + $mform->hideIf('reset_glossary_comments', 'reset_glossary_all', 'checked'); $mform->addElement('checkbox', 'reset_glossary_tags', get_string('removeallglossarytags', 'glossary')); - $mform->disabledIf('reset_glossary_tags', 'reset_glossary_all', 'checked'); + $mform->hideIf('reset_glossary_tags', 'reset_glossary_all', 'checked'); } /** diff --git a/mod/h5pactivity/lang/en/h5pactivity.php b/mod/h5pactivity/lang/en/h5pactivity.php index bae7c3a546f..624b4a66536 100644 --- a/mod/h5pactivity/lang/en/h5pactivity.php +++ b/mod/h5pactivity/lang/en/h5pactivity.php @@ -58,7 +58,7 @@ $string['completion'] = 'Completion'; $string['contentbank'] = 'More information about the content bank'; $string['contentbank_help'] = 'In the content bank you can create and store content using several authoring tools, including an integrated H5P creator.'; $string['correct_answer'] = 'Correct answer'; -$string['deleteallattempts'] = 'Delete all H5P attempts'; +$string['deleteallattempts'] = 'All H5P attempts'; $string['displayexport'] = 'Allow download'; $string['displayembed'] = 'Embed button'; $string['displaycopyright'] = 'Copyright button'; diff --git a/mod/h5pactivity/lib.php b/mod/h5pactivity/lib.php index 0e27d6bfa57..26a35a264e7 100644 --- a/mod/h5pactivity/lib.php +++ b/mod/h5pactivity/lib.php @@ -253,6 +253,7 @@ function h5pactivity_rescale_activity_grades(stdClass $course, stdClass $cm, flo */ function h5pactivity_reset_course_form_definition(&$mform): void { $mform->addElement('header', 'h5pactivityheader', get_string('modulenameplural', 'mod_h5pactivity')); + $mform->addElement('static', 'h5pactivitydelete', get_string('delete')); $mform->addElement('advcheckbox', 'reset_h5pactivity', get_string('deleteallattempts', 'mod_h5pactivity')); } diff --git a/mod/lesson/lang/en/lesson.php b/mod/lesson/lang/en/lesson.php index e868800c9f7..ff260d52641 100644 --- a/mod/lesson/lang/en/lesson.php +++ b/mod/lesson/lang/en/lesson.php @@ -146,7 +146,7 @@ $string['customscoring'] = 'Custom scoring'; $string['customscoring_help'] = 'If enabled, a whole number value (positive or negative) may be entered for each answer.'; $string['deadline'] = 'Deadline'; $string['defaultessayresponse'] = 'Your essay will be graded by your teacher.'; -$string['deleteallattempts'] = 'Delete all lesson attempts'; +$string['deleteallattempts'] = 'All lesson attempts'; $string['deletedefaults'] = 'Deleted {$a} x lesson default'; $string['deletedpage'] = 'Deleted page'; $string['deletepagenamed'] = 'Delete page: {$a}'; @@ -515,8 +515,8 @@ $string['rank'] = 'Rank'; $string['rawgrade'] = 'Raw grade'; $string['receivedcredit'] = 'Received credit'; $string['redisplaypage'] = 'Redisplay page'; -$string['removeallgroupoverrides'] = 'Delete all group overrides'; -$string['removealluseroverrides'] = 'Delete all user overrides'; +$string['removeallgroupoverrides'] = 'All group overrides'; +$string['removealluseroverrides'] = 'All user overrides'; $string['report'] = 'Report'; $string['reports'] = 'Reports'; $string['response'] = 'Response'; diff --git a/mod/lesson/lib.php b/mod/lesson/lib.php index c7138b5187a..73ca2dcf4b1 100644 --- a/mod/lesson/lib.php +++ b/mod/lesson/lib.php @@ -836,7 +836,8 @@ function lesson_process_post_save(&$lesson) { */ function lesson_reset_course_form_definition(&$mform) { $mform->addElement('header', 'lessonheader', get_string('modulenameplural', 'lesson')); - $mform->addElement('advcheckbox', 'reset_lesson', get_string('deleteallattempts','lesson')); + $mform->addElement('static', 'lessondelete', get_string('delete')); + $mform->addElement('advcheckbox', 'reset_lesson', get_string('deleteallattempts', 'lesson')); $mform->addElement('advcheckbox', 'reset_lesson_user_overrides', get_string('removealluseroverrides', 'lesson')); $mform->addElement('advcheckbox', 'reset_lesson_group_overrides', diff --git a/mod/quiz/lang/en/quiz.php b/mod/quiz/lang/en/quiz.php index 788dae2638b..ffd35dff0a4 100644 --- a/mod/quiz/lang/en/quiz.php +++ b/mod/quiz/lang/en/quiz.php @@ -867,9 +867,9 @@ $string['regradenotallowed'] = 'You do not have permission to regrade this quiz' $string['regradingquestion'] = 'Regrading "{$a}".'; $string['regradingquiz'] = 'Regrading quiz "{$a}"'; $string['remove'] = 'Remove'; -$string['removeallgroupoverrides'] = 'Delete all group overrides'; -$string['removeallquizattempts'] = 'Delete all quiz attempts'; -$string['removealluseroverrides'] = 'Delete all user overrides'; +$string['removeallgroupoverrides'] = 'All group overrides'; +$string['removeallquizattempts'] = 'All quiz attempts'; +$string['removealluseroverrides'] = 'All user overrides'; $string['removeemptypage'] = 'Remove empty page'; $string['removepagebreak'] = 'Remove page break'; $string['removeselected'] = 'Remove selected'; diff --git a/mod/quiz/lib.php b/mod/quiz/lib.php index 98ac5626f20..60a02d25d59 100644 --- a/mod/quiz/lib.php +++ b/mod/quiz/lib.php @@ -1415,6 +1415,7 @@ function quiz_questions_in_use($questionids) { */ function quiz_reset_course_form_definition($mform) { $mform->addElement('header', 'quizheader', get_string('modulenameplural', 'quiz')); + $mform->addElement('static', 'quizdelete', get_string('delete')); $mform->addElement('advcheckbox', 'reset_quiz_attempts', get_string('removeallquizattempts', 'quiz')); $mform->addElement('advcheckbox', 'reset_quiz_user_overrides', diff --git a/mod/scorm/lang/en/scorm.php b/mod/scorm/lang/en/scorm.php index 2950d5c7439..ba0096706f1 100644 --- a/mod/scorm/lang/en/scorm.php +++ b/mod/scorm/lang/en/scorm.php @@ -107,7 +107,7 @@ $string['defaultdisplaysettings'] = 'Default display settings'; $string['defaultgradesettings'] = 'Default grade settings'; $string['defaultothersettings'] = 'Other default settings'; $string['deleteattemptcheck'] = 'Are you absolutely sure you want to completely delete these attempts?'; -$string['deleteallattempts'] = 'Delete all SCORM attempts'; +$string['deleteallattempts'] = 'All SCORM attempts'; $string['deleteselected'] = 'Delete selected attempts'; $string['deleteuserattemptcheck'] = 'Are you absolutely sure you want to completely delete all your attempts?'; $string['details'] = 'Track details'; diff --git a/mod/scorm/lib.php b/mod/scorm/lib.php index f7b2783d1f9..86ca4d21f22 100644 --- a/mod/scorm/lib.php +++ b/mod/scorm/lib.php @@ -776,6 +776,7 @@ function scorm_option2text($scorm) { */ function scorm_reset_course_form_definition(&$mform) { $mform->addElement('header', 'scormheader', get_string('modulenameplural', 'scorm')); + $mform->addElement('static', 'scormdelete', get_string('delete')); $mform->addElement('advcheckbox', 'reset_scorm', get_string('deleteallattempts', 'scorm')); } diff --git a/mod/survey/lang/en/survey.php b/mod/survey/lang/en/survey.php index 640b9150e2a..4260896339b 100644 --- a/mod/survey/lang/en/survey.php +++ b/mod/survey/lang/en/survey.php @@ -188,8 +188,8 @@ $string['colles8short'] = 'I\'m critical of readings'; $string['colles9'] = 'I explain my ideas to other students.'; $string['colles9short'] = 'I explain my ideas'; $string['customintro'] = 'Description'; -$string['deleteallanswers'] = 'Delete all survey responses'; -$string['deleteanalysis'] = 'Delete response analysis'; +$string['deleteallanswers'] = 'All survey responses'; +$string['deleteanalysis'] = 'Response analysis'; $string['done'] = 'Done'; $string['download'] = 'Download'; $string['downloadexcel'] = 'Download data as Excel spreadsheet'; diff --git a/mod/survey/lib.php b/mod/survey/lib.php index d0ae2cf5072..01bd5703599 100644 --- a/mod/survey/lib.php +++ b/mod/survey/lib.php @@ -726,9 +726,10 @@ function survey_get_post_actions() { */ function survey_reset_course_form_definition(&$mform) { $mform->addElement('header', 'surveyheader', get_string('modulenameplural', 'survey')); - $mform->addElement('checkbox', 'reset_survey_answers', get_string('deleteallanswers','survey')); - $mform->addElement('checkbox', 'reset_survey_analysis', get_string('deleteanalysis','survey')); - $mform->disabledIf('reset_survey_analysis', 'reset_survey_answers', 'checked'); + $mform->addElement('static', 'surveydelete', get_string('delete')); + $mform->addElement('checkbox', 'reset_survey_answers', get_string('deleteallanswers', 'survey')); + $mform->addElement('checkbox', 'reset_survey_analysis', get_string('deleteanalysis', 'survey')); + $mform->hideIf('reset_survey_analysis', 'reset_survey_answers', 'checked'); } /** diff --git a/mod/wiki/lang/en/wiki.php b/mod/wiki/lang/en/wiki.php index 6ed9399d80c..d33d275b779 100644 --- a/mod/wiki/lang/en/wiki.php +++ b/mod/wiki/lang/en/wiki.php @@ -44,7 +44,7 @@ $string['defaultformat_help'] = 'This setting determines the default format used * HTML - The HTML editor is available * Creole - A common wiki markup language for which a small edit toolbar is available * Nwiki - Mediawiki-like markup language used in the contributed Nwiki module'; -$string['deleteallpages'] = 'Delete all wiki pages'; +$string['deleteallpages'] = 'All wiki pages'; $string['deletecomment'] = 'Deleting comment'; $string['deletecommentcheck'] = 'Delete comment'; $string['deletecommentcheckfull'] = 'Are you sure you want to delete the comment?'; @@ -237,7 +237,7 @@ $string['ratingmode'] = 'Rating mode'; $string['reparsetimeout'] = 'Reparsing default timeout'; $string['repeatedsection'] = 'Wiki error: Section name cannot be repeated \'{$a}\''; $string['restore'] = 'Restore'; -$string['removeallwikitags'] = 'Remove all wiki tags'; +$string['removeallwikitags'] = 'All wiki tags'; $string['removepages'] = 'Remove pages'; $string['restoreconfirm'] = 'Are you sure you want to restore version #{$a}?'; $string['restoreerror'] = 'Version #{$a} could not be restored'; @@ -311,4 +311,3 @@ $string['wiki:viewpage'] = 'View wiki pages'; $string['wikipages'] = 'Wiki pages'; $string['wrongversionlock'] = 'Another user has edited this page while you were editing and your content is obsolete.'; $string['wrongversionsave'] = 'Another user has created a version while you were editing and you have overwritten his changes, check the page history.'; - diff --git a/mod/wiki/lib.php b/mod/wiki/lib.php index 1e72128ba9b..2e6584faf2f 100644 --- a/mod/wiki/lib.php +++ b/mod/wiki/lib.php @@ -257,6 +257,7 @@ function wiki_reset_userdata($data) { function wiki_reset_course_form_definition(&$mform) { $mform->addElement('header', 'wikiheader', get_string('modulenameplural', 'wiki')); + $mform->addElement('static', 'wikidelete', get_string('delete')); $mform->addElement('advcheckbox', 'reset_wiki_pages', get_string('deleteallpages', 'wiki')); $mform->addElement('advcheckbox', 'reset_wiki_tags', get_string('removeallwikitags', 'wiki')); $mform->addElement('advcheckbox', 'reset_wiki_comments', get_string('deleteallcomments')); diff --git a/mod/workshop/lang/en/workshop.php b/mod/workshop/lang/en/workshop.php index 2455568bf73..40d3012c860 100644 --- a/mod/workshop/lang/en/workshop.php +++ b/mod/workshop/lang/en/workshop.php @@ -318,9 +318,9 @@ $string['reassess'] = 'Re-assess'; $string['receivedgrades'] = 'Grades received'; $string['recentassessments'] = 'Workshop assessments:'; $string['recentsubmissions'] = 'Workshop submissions:'; -$string['resetassessments'] = 'Delete all assessments'; +$string['resetassessments'] = 'All assessments'; $string['resetassessments_help'] = 'You can choose to delete just allocated assessments without affecting submissions. If submissions are to be deleted, their assessments will be deleted implicitly and this option is ignored. Note this also includes assessments of example submissions.'; -$string['resetsubmissions'] = 'Delete all submissions'; +$string['resetsubmissions'] = 'All submissions'; $string['resetsubmissions_help'] = 'All the submissions and their assessments will be deleted. This does not affect example submissions.'; $string['resetphase'] = 'Switch to the setup phase'; $string['resetphase_help'] = 'If enabled, all workshops will be put into the initial setup phase.'; diff --git a/mod/workshop/lib.php b/mod/workshop/lib.php index cd1692470b7..df42f3a1de6 100644 --- a/mod/workshop/lib.php +++ b/mod/workshop/lib.php @@ -1985,15 +1985,17 @@ function workshop_reset_course_form_definition($mform) { $mform->addElement('header', 'workshopheader', get_string('modulenameplural', 'mod_workshop')); + $mform->addElement('advcheckbox', 'reset_workshop_phase', get_string('resetphase', 'mod_workshop')); + $mform->addHelpButton('reset_workshop_phase', 'resetphase', 'mod_workshop'); + + $mform->addElement('static', 'workshopdelete', get_string('delete')); + $mform->addElement('advcheckbox', 'reset_workshop_submissions', get_string('resetsubmissions', 'mod_workshop')); $mform->addHelpButton('reset_workshop_submissions', 'resetsubmissions', 'mod_workshop'); $mform->addElement('advcheckbox', 'reset_workshop_assessments', get_string('resetassessments', 'mod_workshop')); $mform->addHelpButton('reset_workshop_assessments', 'resetassessments', 'mod_workshop'); - $mform->disabledIf('reset_workshop_assessments', 'reset_workshop_submissions', 'checked'); - - $mform->addElement('advcheckbox', 'reset_workshop_phase', get_string('resetphase', 'mod_workshop')); - $mform->addHelpButton('reset_workshop_phase', 'resetphase', 'mod_workshop'); + $mform->hideIf('reset_workshop_assessments', 'reset_workshop_submissions', 'checked'); } /** -- 2.43.0