From 8a4a205bb52c576376d606b0a416a3b1ed151c71 Mon Sep 17 00:00:00 2001 From: Huong Nguyen Date: Tue, 11 May 2021 15:52:17 +0700 Subject: [PATCH] MDL-71590 usertours: Create language string for activity information --- admin/tool/usertours/classes/manager.php | 8 ++++---- admin/tool/usertours/db/upgrade.php | 4 ++-- admin/tool/usertours/lang/en/tool_usertours.php | 12 ++++++++++++ .../311_activity_information_activity_page_student.json | 2 +- .../311_activity_information_activity_page_teacher.json | 2 +- .../tours/311_activity_information_course_page_student.json | 2 +- .../tours/311_activity_information_course_page_teacher.json | 2 +- admin/tool/usertours/version.php | 2 +- 8 files changed, 23 insertions(+), 11 deletions(-) diff --git a/admin/tool/usertours/classes/manager.php b/admin/tool/usertours/classes/manager.php index faa94c84893..40758355454 100644 --- a/admin/tool/usertours/classes/manager.php +++ b/admin/tool/usertours/classes/manager.php @@ -854,10 +854,10 @@ class manager { // the format filename => version. The version value needs to // be increased if the tour has been updated. $shippedtours = [ - '311_activity_information_activity_page_student.json' => 1, - '311_activity_information_activity_page_teacher.json' => 1, - '311_activity_information_course_page_student.json' => 1, - '311_activity_information_course_page_teacher.json' => 1 + '311_activity_information_activity_page_student.json' => 2, + '311_activity_information_activity_page_teacher.json' => 2, + '311_activity_information_course_page_student.json' => 2, + '311_activity_information_course_page_teacher.json' => 2 ]; // These are tours that we used to ship but don't ship any longer. diff --git a/admin/tool/usertours/db/upgrade.php b/admin/tool/usertours/db/upgrade.php index 177c764c330..e1b9442309a 100644 --- a/admin/tool/usertours/db/upgrade.php +++ b/admin/tool/usertours/db/upgrade.php @@ -79,11 +79,11 @@ function xmldb_tool_usertours_upgrade($oldversion) { // Automatically generated Moodle v3.10.0 release upgrade line. // Put any upgrade step following this. - if ($oldversion < 2020110901) { + if ($oldversion < 2020110902) { // Updating shipped tours. manager::update_shipped_tours(); - upgrade_plugin_savepoint(true, 2020110901, 'tool', 'usertours'); + upgrade_plugin_savepoint(true, 2020110902, 'tool', 'usertours'); } return true; diff --git a/admin/tool/usertours/lang/en/tool_usertours.php b/admin/tool/usertours/lang/en/tool_usertours.php index f142b46f304..7390bd84ff9 100644 --- a/admin/tool/usertours/lang/en/tool_usertours.php +++ b/admin/tool/usertours/lang/en/tool_usertours.php @@ -234,5 +234,17 @@ $string['tour4_content_starred'] = 'You can choose to star particular conversati $string['tour4_title_settings'] = 'Messaging settings'; $string['tour4_content_settings'] = 'You can access your messaging settings via the cog icon. A new privacy setting allows you to restrict who can message you.'; +// 3.11 Activity information tour. +$string['tour_activityinfo_activity_student_title'] = 'New: Activity information'; +$string['tour_activityinfo_activity_student_content'] = 'Activity dates plus what to do to complete the activity are shown on the activity page.'; +$string['tour_activityinfo_activity_teacher_title'] = 'New: Activity information'; +$string['tour_activityinfo_activity_teacher_content'] = 'Activity dates and completion conditions are now displayed for students on each activity page (and optionally on the course page). + +For activities requiring students to manually mark an activity as completed, a \'Mark as done\' button is shown on the activity page.'; +$string['tour_activityinfo_course_student_title'] = 'New: Activity information'; +$string['tour_activityinfo_course_student_content'] = 'Activity dates and/or what to do to complete the activity are displayed on the course page.'; +$string['tour_activityinfo_course_teacher_title'] = 'New: Activity information'; +$string['tour_activityinfo_course_teacher_content'] = 'New course settings \'Show completion conditions\' and \'Show activity dates\' enable you to choose whether activity completion conditions (if set) and/or dates are displayed for students on the course page.'; + $string['tour_final_step_title'] = 'End of tour'; $string['tour_final_step_content'] = 'This is the end of your user tour. It won\'t show again unless you reset it using the link in the footer.'; diff --git a/admin/tool/usertours/tours/311_activity_information_activity_page_student.json b/admin/tool/usertours/tours/311_activity_information_activity_page_student.json index 88e5e700ef6..a3aa5538d84 100644 --- a/admin/tool/usertours/tours/311_activity_information_activity_page_student.json +++ b/admin/tool/usertours/tours/311_activity_information_activity_page_student.json @@ -1 +1 @@ -{"name":"Activity information in activity page (Student)","description":"A tour of the activity information for Student display on the activity page","pathmatch":"\/mod\/%\/view.php%","enabled":"1","sortorder":"0","configdata":"{\"placement\":\"bottom\",\"orphan\":\"0\",\"backdrop\":\"1\",\"reflex\":\"0\",\"filtervalues\":{\"accessdate\":{\"filter_accessdate\":\"tool_usertours_accountcreation\",\"filter_accessdate_range\":0,\"filter_accessdate_enabled\":\"0\"},\"category\":[],\"course\":[],\"courseformat\":[],\"role\":[\"student\"],\"theme\":[],\"cssselector\":[\"[data-region=activity-information]\"]},\"majorupdatetime\":1620110287,\"shipped_tour\":true,\"shipped_filename\":\"311_activity_information_activity_page_student.json\",\"shipped_version\":1}","version":"2020110901","steps":[{"title":"New: Activity information","content":"Activity dates plus what to do to complete the activity are shown on the activity page.","targettype":"0","targetvalue":"[data-region=activity-information]","sortorder":"0","configdata":"{}"}]} \ No newline at end of file +{"name":"Activity information in activity page (Student)","description":"A tour of the activity information for Student display on the activity page","pathmatch":"\/mod\/%\/view.php%","enabled":"1","sortorder":"0","configdata":"{\"placement\":\"bottom\",\"orphan\":\"0\",\"backdrop\":\"1\",\"reflex\":\"0\",\"filtervalues\":{\"accessdate\":{\"filter_accessdate\":\"tool_usertours_accountcreation\",\"filter_accessdate_range\":0,\"filter_accessdate_enabled\":\"0\"},\"category\":[],\"course\":[],\"courseformat\":[],\"role\":[\"student\"],\"theme\":[],\"cssselector\":[\"[data-region=activity-information]\"]},\"majorupdatetime\":1620110287,\"shipped_tour\":true,\"shipped_filename\":\"311_activity_information_activity_page_student.json\",\"shipped_version\":1}","version":"2020110901","steps":[{"title":"tour_activityinfo_activity_student_title,tool_usertours","content":"tour_activityinfo_activity_student_content,tool_usertours","targettype":"0","targetvalue":"[data-region=activity-information]","sortorder":"0","configdata":"{}"}]} \ No newline at end of file diff --git a/admin/tool/usertours/tours/311_activity_information_activity_page_teacher.json b/admin/tool/usertours/tours/311_activity_information_activity_page_teacher.json index 484ab2c9f7a..d9f7044b452 100644 --- a/admin/tool/usertours/tours/311_activity_information_activity_page_teacher.json +++ b/admin/tool/usertours/tours/311_activity_information_activity_page_teacher.json @@ -1 +1 @@ -{"name":"Activity information in activity page (Teacher)","description":"A tour of the activity information for Teacher display on the activity page","pathmatch":"\/mod\/%\/view.php%","enabled":"1","sortorder":"1","configdata":"{\"placement\":\"bottom\",\"orphan\":\"0\",\"backdrop\":\"1\",\"reflex\":\"0\",\"filtervalues\":{\"accessdate\":{\"filter_accessdate\":\"tool_usertours_accountcreation\",\"filter_accessdate_range\":0,\"filter_accessdate_enabled\":\"0\"},\"category\":[],\"course\":[],\"courseformat\":[],\"role\":[\"manager\",\"teacher\",\"editingteacher\"],\"theme\":[],\"cssselector\":[\"[data-region=activity-information]\"]},\"majorupdatetime\":1620110287,\"shipped_tour\":true,\"shipped_filename\":\"311_activity_information_activity_page_teacher.json\",\"shipped_version\":1}","version":"2020110901","steps":[{"title":"New: Activity information","content":"Activity dates and completion conditions are now displayed for students on each activity page (and optionally on the course page).\r\n\r\nFor activities requiring students to manually mark an activity as completed, a 'Mark as done' button is shown on the activity page.","targettype":"0","targetvalue":"[data-region=activity-information]","sortorder":"0","configdata":"{}"}]} \ No newline at end of file +{"name":"Activity information in activity page (Teacher)","description":"A tour of the activity information for Teacher display on the activity page","pathmatch":"\/mod\/%\/view.php%","enabled":"1","sortorder":"1","configdata":"{\"placement\":\"bottom\",\"orphan\":\"0\",\"backdrop\":\"1\",\"reflex\":\"0\",\"filtervalues\":{\"accessdate\":{\"filter_accessdate\":\"tool_usertours_accountcreation\",\"filter_accessdate_range\":0,\"filter_accessdate_enabled\":\"0\"},\"category\":[],\"course\":[],\"courseformat\":[],\"role\":[\"manager\",\"teacher\",\"editingteacher\"],\"theme\":[],\"cssselector\":[\"[data-region=activity-information]\"]},\"majorupdatetime\":1620110287,\"shipped_tour\":true,\"shipped_filename\":\"311_activity_information_activity_page_teacher.json\",\"shipped_version\":1}","version":"2020110901","steps":[{"title":"tour_activityinfo_activity_teacher_title,tool_usertours","content":"tour_activityinfo_activity_teacher_content,tool_usertours","targettype":"0","targetvalue":"[data-region=activity-information]","sortorder":"0","configdata":"{}"}]} \ No newline at end of file diff --git a/admin/tool/usertours/tours/311_activity_information_course_page_student.json b/admin/tool/usertours/tours/311_activity_information_course_page_student.json index 17910c59447..7037e836a0d 100644 --- a/admin/tool/usertours/tours/311_activity_information_course_page_student.json +++ b/admin/tool/usertours/tours/311_activity_information_course_page_student.json @@ -1 +1 @@ -{"name":"Activity information in course homepage (Student)","description":"A tour of the activity information for Student display on the course homepage","pathmatch":"\/course\/view.php%","enabled":"1","sortorder":"2","configdata":"{\"placement\":\"bottom\",\"orphan\":\"0\",\"backdrop\":\"1\",\"reflex\":\"0\",\"filtervalues\":{\"accessdate\":{\"filter_accessdate\":\"tool_usertours_accountcreation\",\"filter_accessdate_range\":0,\"filter_accessdate_enabled\":\"0\"},\"category\":[],\"course\":[],\"courseformat\":[],\"role\":[\"student\"],\"theme\":[],\"cssselector\":[\"[data-region=activity-information]\"]},\"majorupdatetime\":1620109487,\"shipped_tour\":true,\"shipped_filename\":\"311_activity_information_course_page_student.json\",\"shipped_version\":1}","version":"2020110901","steps":[{"title":"New: Activity information","content":"Activity dates and\/or what to do to complete the activity are displayed on the course page.","targettype":"0","targetvalue":"[data-region=activity-information]","sortorder":"0","configdata":"{}"}]} \ No newline at end of file +{"name":"Activity information in course homepage (Student)","description":"A tour of the activity information for Student display on the course homepage","pathmatch":"\/course\/view.php%","enabled":"1","sortorder":"2","configdata":"{\"placement\":\"bottom\",\"orphan\":\"0\",\"backdrop\":\"1\",\"reflex\":\"0\",\"filtervalues\":{\"accessdate\":{\"filter_accessdate\":\"tool_usertours_accountcreation\",\"filter_accessdate_range\":0,\"filter_accessdate_enabled\":\"0\"},\"category\":[],\"course\":[],\"courseformat\":[],\"role\":[\"student\"],\"theme\":[],\"cssselector\":[\"[data-region=activity-information]\"]},\"majorupdatetime\":1620109487,\"shipped_tour\":true,\"shipped_filename\":\"311_activity_information_course_page_student.json\",\"shipped_version\":1}","version":"2020110901","steps":[{"title":"tour_activityinfo_course_student_title,tool_usertours","content":"tour_activityinfo_course_student_content,tool_usertours","targettype":"0","targetvalue":"[data-region=activity-information]","sortorder":"0","configdata":"{}"}]} \ No newline at end of file diff --git a/admin/tool/usertours/tours/311_activity_information_course_page_teacher.json b/admin/tool/usertours/tours/311_activity_information_course_page_teacher.json index 1c4dea86c76..3a21b0a8c6c 100644 --- a/admin/tool/usertours/tours/311_activity_information_course_page_teacher.json +++ b/admin/tool/usertours/tours/311_activity_information_course_page_teacher.json @@ -1 +1 @@ -{"name":"Activity information in course homepage (Teacher)","description":"A tour of the activity information for Teacher display on the course homepage","pathmatch":"\/course\/view.php%","enabled":"1","sortorder":"3","configdata":"{\"placement\":\"bottom\",\"orphan\":\"0\",\"backdrop\":\"1\",\"reflex\":\"0\",\"filtervalues\":{\"accessdate\":{\"filter_accessdate\":\"tool_usertours_accountcreation\",\"filter_accessdate_range\":0,\"filter_accessdate_enabled\":\"0\"},\"category\":[],\"course\":[],\"courseformat\":[],\"role\":[\"manager\",\"teacher\",\"editingteacher\"],\"theme\":[],\"cssselector\":[\"[data-region=activity-information]\"]},\"majorupdatetime\":1620109487,\"shipped_tour\":true,\"shipped_filename\":\"311_activity_information_course_page_teacher.json\",\"shipped_version\":1}","version":"2020110901","steps":[{"title":"New: Activity information","content":"New course settings 'Show completion conditions' and 'Show activity dates' enable you to choose whether activity completion conditions (if set) and\/or dates are displayed for students on the course page.","targettype":"0","targetvalue":"[data-region=activity-information]","sortorder":"0","configdata":"{}"}]} \ No newline at end of file +{"name":"Activity information in course homepage (Teacher)","description":"A tour of the activity information for Teacher display on the course homepage","pathmatch":"\/course\/view.php%","enabled":"1","sortorder":"3","configdata":"{\"placement\":\"bottom\",\"orphan\":\"0\",\"backdrop\":\"1\",\"reflex\":\"0\",\"filtervalues\":{\"accessdate\":{\"filter_accessdate\":\"tool_usertours_accountcreation\",\"filter_accessdate_range\":0,\"filter_accessdate_enabled\":\"0\"},\"category\":[],\"course\":[],\"courseformat\":[],\"role\":[\"manager\",\"teacher\",\"editingteacher\"],\"theme\":[],\"cssselector\":[\"[data-region=activity-information]\"]},\"majorupdatetime\":1620109487,\"shipped_tour\":true,\"shipped_filename\":\"311_activity_information_course_page_teacher.json\",\"shipped_version\":1}","version":"2020110901","steps":[{"title":"tour_activityinfo_course_teacher_title,tool_usertours","content":"tour_activityinfo_course_teacher_content,tool_usertours","targettype":"0","targetvalue":"[data-region=activity-information]","sortorder":"0","configdata":"{}"}]} \ No newline at end of file diff --git a/admin/tool/usertours/version.php b/admin/tool/usertours/version.php index 6169dc8ab37..dae22750de4 100644 --- a/admin/tool/usertours/version.php +++ b/admin/tool/usertours/version.php @@ -24,6 +24,6 @@ defined('MOODLE_INTERNAL') || die(); -$plugin->version = 2020110901; // The current module version (Date: YYYYMMDDXX). +$plugin->version = 2020110902; // The current module version (Date: YYYYMMDDXX). $plugin->requires = 2020110300; // Requires this Moodle version. $plugin->component = 'tool_usertours'; // Full name of the plugin (used for diagnostics). -- 2.11.4.GIT