Merge branch 'm35_MDL-63727_Wrong_SCO_Launched_Link' of https://github.com/scara/moodle into MOODLE_35_STABLE

This commit is contained in:
Andrew Nicols
2018-11-01 07:01:42 +08:00
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -76,7 +76,7 @@ class sco_launched extends \core\event\base {
* @return \moodle_url
*/
public function get_url() {
return new \moodle_url('/mod/scorm/player.php', array('id' => $this->contextinstanceid, 'scoid' => $this->objectid));
return new \moodle_url('/mod/scorm/player.php', array('cm' => $this->contextinstanceid, 'scoid' => $this->objectid));
}
/**
+1 -1
View File
@@ -855,7 +855,7 @@ class mod_scorm_external_testcase extends externallib_advanced_testcase {
// Checking that the event contains the expected values.
$this->assertInstanceOf('\mod_scorm\event\sco_launched', $event);
$this->assertEquals($this->context, $event->get_context());
$moodleurl = new \moodle_url('/mod/scorm/player.php', array('id' => $this->cm->id, 'scoid' => $sco->id));
$moodleurl = new \moodle_url('/mod/scorm/player.php', array('cm' => $this->cm->id, 'scoid' => $sco->id));
$this->assertEquals($moodleurl, $event->get_url());
$this->assertEventContextNotUsed($event);
$this->assertNotEmpty($event->get_name());