Skip to content

Commit

Permalink
Merge pull request #33 from talis/ensure_latest_moodle_includes_corre…
Browse files Browse the repository at this point in the history
…ct_context_data

Ensure latest moodle includes correct context data
  • Loading branch information
lordtatty authored Jun 1, 2018
2 parents 41189e0 + c08c8ce commit 8c8ee7c
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion 2.4/blocks/aspirelists/version.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@

defined('MOODLE_INTERNAL') || die();

$plugin->version = 201803081830; // YYYYMMDDHHMM (year, month, day, 24-hr time)
$plugin->version = 201805291000; // YYYYMMDDHHMM (year, month, day, 24-hr time)
$plugin->requires = 2012120300; // YYYYMMDDHH (This is the release version for Moodle 2.4)
$plugin->component = 'block_aspirelists';
4 changes: 4 additions & 0 deletions 2.x-activity-module/mod/aspirelists/db/upgrade.php
Original file line number Diff line number Diff line change
Expand Up @@ -131,4 +131,8 @@ function xmldb_aspirelists_upgrade($oldversion) {
upgrade_mod_savepoint(true, 2017070400, 'aspirelists');
}

if ($oldversion < 201805291000){
upgrade_mod_savepoint(true, 201805291000, 'aspirelists');
}

}
6 changes: 6 additions & 0 deletions 2.x-activity-module/mod/aspirelists/launch.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@
$course = $DB->get_record('course', array('id' => $cm->course), '*', MUST_EXIST);
$context = context_module::instance($cm->id);

if($CFG->version >= 2017111300) {
$PAGE->set_cm($cm, $course); // set up global $COURSE
}

// Log the launch
if($CFG->version < 2014051200) {
add_to_log($course->id, "aspirelists", "launch", "launch.php?id=$cm->id", "$list->id");
} else {
Expand All @@ -32,6 +37,7 @@
$event->trigger();
}

// Perform the launch
$list->cmid = $cm->id;
aspirelists_add_lti_properties($list);
if($CFG->version >= 2015111600) {
Expand Down

0 comments on commit 8c8ee7c

Please sign in to comment.