diff --git a/blocks/myoverview/tests/behat/block_myoverview_dashboard.feature b/blocks/myoverview/tests/behat/block_myoverview_dashboard.feature index f5b486b1b4f1e..fbaea9f839de5 100644 --- a/blocks/myoverview/tests/behat/block_myoverview_dashboard.feature +++ b/blocks/myoverview/tests/behat/block_myoverview_dashboard.feature @@ -32,20 +32,20 @@ Feature: The my overview block allows users to easily access their courses and s And I click on "Timeline" "link" in the "Course overview" "block" When I click on "Sort by dates" "link" in the "Course overview" "block" Then I should see "Next 7 days" in the "Course overview" "block" - And I should see "Choice Test choice 1 closes" in the "Course overview" "block" + And I should see "Test choice 1 closes" in the "Course overview" "block" And I should see "View choices" in the "Course overview" "block" - And I should see "Feedback Test feedback 1 closes" in the "Course overview" "block" + And I should see "Test feedback 1 closes" in the "Course overview" "block" And I should see "Answer the questions" in the "Course overview" "block" And I should see "Future" in the "Course overview" "block" - And I should see "Choice Test choice 3 closes" in the "Course overview" "block" - And I should see "Feedback Test feedback 3 closes" in the "Course overview" "block" + And I should see "Test choice 3 closes" in the "Course overview" "block" + And I should see "Test feedback 3 closes" in the "Course overview" "block" And I log out Scenario: Past activities should not be displayed on the timeline view Given I log in as "student1" And I click on "Timeline" "link" in the "Course overview" "block" When I click on "Sort by dates" "link" in the "Course overview" "block" - And I should not see "Choice Test choice 2 closes" in the "Course overview" "block" + And I should not see "Test choice 2 closes" in the "Course overview" "block" And I log out Scenario: See the courses I am enrolled by their status on courses view diff --git a/blocks/myoverview/tests/behat/block_myoverview_progress.feature b/blocks/myoverview/tests/behat/block_myoverview_progress.feature index e8d86921d4a27..44cd5398341e9 100644 --- a/blocks/myoverview/tests/behat/block_myoverview_progress.feature +++ b/blocks/myoverview/tests/behat/block_myoverview_progress.feature @@ -24,7 +24,7 @@ Feature: Course overview block show users their progress on courses Given I log in as "student1" And I click on "Timeline" "link" in the "Course overview" "block" When I click on "Sort by courses" "link" in the "Course overview" "block" - Then I should see "Choice Test choice 1 closes" in the "#myoverview_timeline_courses" "css_element" + Then I should see "Test choice 1 closes" in the "#myoverview_timeline_courses" "css_element" And I should not see "0%" in the "Course overview" "block" And I click on "Courses" "link" in the "Course overview" "block" And I click on "In progress" "link" in the "Course overview" "block" @@ -44,7 +44,7 @@ Feature: Course overview block show users their progress on courses And I log out And I log in as "student1" And I click on "Sort by courses" "link" in the "Course overview" "block" - And I should see "Choice Test choice 1 closes" in the "#myoverview_timeline_courses" "css_element" + And I should see "Test choice 1 closes" in the "#myoverview_timeline_courses" "css_element" And I should see "0%" in the "Course overview" "block" And I click on "Courses" "link" in the "Course overview" "block" When I click on "In progress" "link" in the "Course overview" "block" diff --git a/lib/db/upgrade.php b/lib/db/upgrade.php index d0fb99f05b2d2..7bdfdf6ac0253 100644 --- a/lib/db/upgrade.php +++ b/lib/db/upgrade.php @@ -2601,5 +2601,20 @@ function xmldb_main_upgrade($oldversion) { upgrade_main_savepoint(true, 2017092900.00); } + if ($oldversion < 2017100800.00) { + // Create adhoc task for upgrading of existing calendar events. + $record = new \stdClass(); + $record->classname = '\core\task\refresh_mod_calendar_events_task'; + $record->component = 'core'; + + // Next run time based from nextruntime computation in \core\task\manager::queue_adhoc_task(). + $nextruntime = time() - 1; + $record->nextruntime = $nextruntime; + $DB->insert_record('task_adhoc', $record); + + // Main savepoint reached. + upgrade_main_savepoint(true, 2017100800.00); + } + return true; } diff --git a/mod/assign/lang/en/assign.php b/mod/assign/lang/en/assign.php index c38641eeca5c5..9b4be331196ae 100644 --- a/mod/assign/lang/en/assign.php +++ b/mod/assign/lang/en/assign.php @@ -105,6 +105,8 @@ $string['blindmarking'] = 'Blind marking'; $string['blindmarkingenabledwarning'] = 'Blind marking is enabled for this activity.'; $string['blindmarking_help'] = 'Blind marking hides the identity of students from markers. Blind marking settings will be locked once a submission or grade has been made in relation to this assignment.'; +$string['calendardue'] = '{$a} is due'; +$string['calendargradingdue'] = '{$a} is due to be graded'; $string['changeuser'] = 'Change user'; $string['changefilters'] = 'Change filters'; $string['choosegradingaction'] = 'Grading action'; diff --git a/mod/assign/locallib.php b/mod/assign/locallib.php index 0ae808ed15cd4..5059452d196a4 100644 --- a/mod/assign/locallib.php +++ b/mod/assign/locallib.php @@ -1162,7 +1162,6 @@ public function update_calendar($coursemoduleid) { $event->groupid = 0; $event->userid = 0; $event->instance = $instance->id; - $event->name = $instance->name; $event->type = CALENDAR_EVENT_TYPE_ACTION; // Convert the links to pluginfile. It is a bit hacky but at this stage the files @@ -1189,6 +1188,7 @@ public function update_calendar($coursemoduleid) { $eventtype = ASSIGN_EVENT_TYPE_DUE; if ($instance->duedate) { + $event->name = get_string('calendardue', 'assign', $instance->name); $event->eventtype = $eventtype; $event->timestart = $instance->duedate; $event->timesort = $instance->duedate; @@ -1214,6 +1214,7 @@ public function update_calendar($coursemoduleid) { $eventtype = ASSIGN_EVENT_TYPE_GRADINGDUE; if ($instance->gradingduedate) { + $event->name = get_string('calendargradingdue', 'assign', $instance->name); $event->eventtype = $eventtype; $event->timestart = $instance->gradingduedate; $event->timesort = $instance->gradingduedate; diff --git a/mod/choice/lang/en/choice.php b/mod/choice/lang/en/choice.php index 91db2436fa619..914256188cfad 100644 --- a/mod/choice/lang/en/choice.php +++ b/mod/choice/lang/en/choice.php @@ -27,8 +27,8 @@ $string['allowupdate'] = 'Allow choice to be updated'; $string['allowmultiple'] = 'Allow more than one choice to be selected'; $string['answered'] = 'Answered'; -$string['calendarend'] = 'Choice {$a} closes'; -$string['calendarstart'] = 'Choice {$a} opens'; +$string['calendarend'] = '{$a} closes'; +$string['calendarstart'] = '{$a} opens'; $string['cannotsubmit'] = 'Sorry, there was a problem submitting your choice. Please try again.'; $string['closebeforeopen'] = 'You have specified a close date before the open date.'; $string['completionsubmit'] = 'Show as complete when user makes a choice'; diff --git a/mod/data/lang/en/data.php b/mod/data/lang/en/data.php index 315d53881fb3f..37a32089b9973 100644 --- a/mod/data/lang/en/data.php +++ b/mod/data/lang/en/data.php @@ -54,8 +54,8 @@ $string['blank'] = 'Blank'; $string['buttons'] = 'Actions'; $string['bynameondate'] = 'by {$a->name} - {$a->date}'; -$string['calendarend'] = 'Database {$a} closes'; -$string['calendarstart'] = 'Database {$a} opens'; +$string['calendarend'] = '{$a} closes'; +$string['calendarstart'] = '{$a} opens'; $string['cancel'] = 'Cancel'; $string['cannotaccesspresentsother'] = 'You are not allowed to access presets from other users'; $string['cannotadd'] = 'Can not add entries!'; diff --git a/mod/feedback/lang/en/feedback.php b/mod/feedback/lang/en/feedback.php index cd6de5afbc7a0..327ada54b17e8 100644 --- a/mod/feedback/lang/en/feedback.php +++ b/mod/feedback/lang/en/feedback.php @@ -38,8 +38,8 @@ $string['autonumbering_help'] = 'Enables or disables automated numbers for each question'; $string['average'] = 'Average'; $string['bold'] = 'Bold'; -$string['calendarend'] = 'Feedback {$a} closes'; -$string['calendarstart'] = 'Feedback {$a} opens'; +$string['calendarend'] = '{$a} closes'; +$string['calendarstart'] = '{$a} opens'; $string['cannotaccess'] = 'You can only access this feedback from a course'; $string['cannotsavetempl'] = 'saving templates is not allowed'; $string['captcha'] = 'Captcha'; diff --git a/mod/lesson/lang/en/lesson.php b/mod/lesson/lang/en/lesson.php index dcc450f2fdfdf..9e3329e0c8a74 100644 --- a/mod/lesson/lang/en/lesson.php +++ b/mod/lesson/lang/en/lesson.php @@ -276,6 +276,7 @@ $string['lesson:grade'] = 'Grade lesson essay questions'; $string['lessonclosed'] = 'This lesson closed on {$a}.'; $string['lessoncloses'] = 'Lesson closes'; +$string['lessoneventcloses'] = '{$a} closes'; $string['lessoncloseson'] = 'Lesson closes on {$a}'; $string['lesson:edit'] = 'Edit a lesson activity'; $string['lessonformating'] = 'Lesson formatting'; @@ -289,6 +290,7 @@ $string['lessonnotready2'] = 'This lesson is not ready to be taken.'; $string['lessonopen'] = 'This lesson will be open on {$a}.'; $string['lessonopens'] = 'Lesson opens'; +$string['lessoneventopens'] = '{$a} opens'; $string['lessonpagelinkingbroken'] = 'First page not found. Lesson page linking must be broken. Please contact an admin.'; $string['lessonstats'] = 'Lesson statistics'; $string['linkedmedia'] = 'Linked media'; diff --git a/mod/lesson/lib.php b/mod/lesson/lib.php index 7558f1bb5a3b6..1e74ecd94a7c9 100644 --- a/mod/lesson/lib.php +++ b/mod/lesson/lib.php @@ -211,7 +211,7 @@ function lesson_update_events($lesson, $override = null) { } else { unset($event->id); } - $event->name = $eventname.' ('.get_string('lessonopens', 'lesson').')'; + $event->name = get_string('lessoneventopens', 'lesson', $eventname); // The method calendar_event::create will reuse a db record if the id field is set. calendar_event::create($event); } @@ -222,7 +222,7 @@ function lesson_update_events($lesson, $override = null) { unset($event->id); } $event->type = CALENDAR_EVENT_TYPE_ACTION; - $event->name = $eventname.' ('.get_string('lessoncloses', 'lesson').')'; + $event->name = get_string('lessoneventcloses', 'lesson'); $event->timestart = $deadline; $event->timesort = $deadline; $event->eventtype = LESSON_EVENT_TYPE_CLOSE; diff --git a/mod/quiz/lang/en/quiz.php b/mod/quiz/lang/en/quiz.php index 96abb5d1ae3d4..7ef3a14683a91 100644 --- a/mod/quiz/lang/en/quiz.php +++ b/mod/quiz/lang/en/quiz.php @@ -667,6 +667,7 @@ $string['quizclose'] = 'Close the quiz'; $string['quizclosed'] = 'This quiz closed on {$a}'; $string['quizcloses'] = 'Quiz closes'; +$string['quizeventcloses'] = '{$a} closes'; $string['quizcloseson'] = 'This quiz will close at {$a}'; $string['quiz:deleteattempts'] = 'Delete quiz attempts'; $string['quiz:emailconfirmsubmission'] = 'Get a confirmation message when submitting'; @@ -682,6 +683,7 @@ $string['quiz:manageoverrides'] = 'Manage quiz overrides'; $string['quiznavigation'] = 'Quiz navigation'; $string['quizopen'] = 'Open the quiz'; +$string['quizeventopens'] = '{$a} opens'; $string['quizopenclose'] = 'Open and close dates'; $string['quizopenclose_help'] = 'Students can only start their attempt(s) after the open time and they must complete their attempts before the close time.'; $string['quizopenclose_link'] = 'mod/quiz/timing'; diff --git a/mod/quiz/lib.php b/mod/quiz/lib.php index 3940908d2d223..499f0386c298e 100644 --- a/mod/quiz/lib.php +++ b/mod/quiz/lib.php @@ -1308,7 +1308,7 @@ function quiz_update_events($quiz, $override = null) { } else { unset($event->id); } - $event->name = $eventname.' ('.get_string('quizopens', 'quiz').')'; + $event->name = get_string('quizeventopens', 'quiz', $eventname); // The method calendar_event::create will reuse a db record if the id field is set. calendar_event::create($event); } @@ -1319,7 +1319,7 @@ function quiz_update_events($quiz, $override = null) { unset($event->id); } $event->type = CALENDAR_EVENT_TYPE_ACTION; - $event->name = $eventname.' ('.get_string('quizcloses', 'quiz').')'; + $event->name = get_string('quizeventcloses', 'quiz', $eventname); $event->timestart = $timeclose; $event->timesort = $timeclose; $event->eventtype = QUIZ_EVENT_TYPE_CLOSE; diff --git a/mod/scorm/lang/en/scorm.php b/mod/scorm/lang/en/scorm.php index e68df73d41246..06c2e1c558c99 100644 --- a/mod/scorm/lang/en/scorm.php +++ b/mod/scorm/lang/en/scorm.php @@ -72,8 +72,8 @@ $string['browsemode'] = 'Preview mode'; $string['browserepository'] = 'Browse repository'; $string['calculatedweight'] = 'Calculated weight'; -$string['calendarend'] = 'The SCORM activity \'{$a}\' closes'; -$string['calendarstart'] = 'The SCORM activity \'{$a}\' opens'; +$string['calendarend'] = '{$a} closes'; +$string['calendarstart'] = '{$a} opens'; $string['cannotaccess'] = 'You cannot call this script in that way'; $string['cannotfindsco'] = 'Could not find SCO'; $string['closebeforeopen'] = 'You have specified a close date before the open date.'; diff --git a/mod/workshop/lang/en/workshop.php b/mod/workshop/lang/en/workshop.php index 6bf6f921702c0..b09bb2a65d01f 100644 --- a/mod/workshop/lang/en/workshop.php +++ b/mod/workshop/lang/en/workshop.php @@ -57,7 +57,7 @@ $string['assessmentdeleted'] = 'Assessment deallocated'; $string['assessmentend'] = 'Deadline for assessment'; $string['assessmentendbeforestart'] = 'Deadline for assessment can not be specified before the open for assessment date'; -$string['assessmentendevent'] = '{$a} (assessment deadline)'; +$string['assessmentendevent'] = '{$a} deadline for assessment'; $string['assessmentenddatetime'] = 'Assessment deadline: {$a->daydatetime} ({$a->distanceday})'; $string['assessmentform'] = 'Assessment form'; $string['assessmentofsubmission'] = 'Assessment of {$a->submissiontitle}'; @@ -66,7 +66,7 @@ $string['assessmentreferenceneeded'] = 'You have to assess this example submission to provide a reference assessment. Click \'Continue\' button to assess the submission.'; $string['assessmentsettings'] = 'Assessment settings'; $string['assessmentstart'] = 'Open for assessment from'; -$string['assessmentstartevent'] = '{$a} (opens for assessment)'; +$string['assessmentstartevent'] = '{$a} opens for assessment'; $string['assessmentstartdatetime'] = 'Open for assessment from {$a->daydatetime} ({$a->distanceday})'; $string['assessmentweight'] = 'Assessment weight'; $string['assignedassessments'] = 'Assigned submissions to assess'; @@ -274,7 +274,7 @@ $string['submissiondeleteconfirmassess'] = 'Are you sure you want to delete the following submission? Note this will also delete {$a->count} assessments associated with this submission, which may affect the reviewers\' grades.'; $string['submissionend'] = 'Submissions deadline'; $string['submissionendbeforestart'] = 'Submissions deadline can not be specified before the open for submissions date'; -$string['submissionendevent'] = '{$a} (submissions deadline)'; +$string['submissionendevent'] = '{$a} deadline for submissions'; $string['submissionenddatetime'] = 'Submissions deadline: {$a->daydatetime} ({$a->distanceday})'; $string['submissionendswitch'] = 'Switch to the next phase after the submissions deadline'; $string['submissionendswitch_help'] = 'If the submissions deadline is specified and this box is checked, the workshop will automatically switch to the assessment phase after the submissions deadline. @@ -288,7 +288,7 @@ $string['submissionrequiredfile'] = 'You need to add a file or enter some text.'; $string['submissionsettings'] = 'Submission settings'; $string['submissionstart'] = 'Open for submissions from'; -$string['submissionstartevent'] = '{$a} (opens for submissions)'; +$string['submissionstartevent'] = '{$a} opens for submissions'; $string['submissionstartdatetime'] = 'Open for submissions from {$a->daydatetime} ({$a->distanceday})'; $string['submissiontitle'] = 'Title'; $string['submissionsreport'] = 'Workshop submissions report'; diff --git a/version.php b/version.php index a8c58ddd6fb4f..8a74a1bb1f9f2 100644 --- a/version.php +++ b/version.php @@ -29,7 +29,7 @@ defined('MOODLE_INTERNAL') || die(); -$version = 2017100600.00; // YYYYMMDD = weekly release date of this DEV branch. +$version = 2017100800.00; // YYYYMMDD = weekly release date of this DEV branch. // RR = release increments - 00 in DEV branches. // .XX = incremental changes.