MDL-43557 add missing description to \mod_quiz\event\attempt_becameoverdue

This commit is contained in:
Petr Skoda 2014-04-30 15:00:03 +08:00
parent 8b233bdacd
commit b649341dab
2 changed files with 2 additions and 1 deletions

View File

@ -59,7 +59,7 @@ class attempt_becameoverdue extends \core\event\base {
* @return string
*/
public function get_description() {
return "Attempt with the id '$this->objectid' for the user with the id '$this->relateduserid' became overdue.";
}
/**

View File

@ -138,6 +138,7 @@ class mod_quiz_events_testcase extends advanced_testcase {
$this->assertEquals('quiz_attempts', $event->objecttable);
$this->assertEquals($quizobj->get_context(), $event->get_context());
$this->assertEquals($attempt->userid, $event->relateduserid);
$this->assertNotEmpty($event->get_description());
// Submitterid should be the user, but as we are in PHP Unit, CLI_SCRIPT is set to true which sets null in submitterid.
$this->assertEquals(null, $event->other['submitterid']);
$this->assertEquals('quiz_attempt_overdue', $event->get_legacy_eventname());