return "The user with id '$this->userid' has moved a ".$this->other['pagetype']." page with the ".
"id '$this->objectid' to the slot after the page with the id '".$this->other['prevpageid'].
"' and before the page with the id '".$this->other['nextpageid'].
- "'in the lesson activity with course module id '$this->contextinstanceid'.";
+ "' in the lesson activity with course module id '$this->contextinstanceid'.";
}
/**
throw new \coding_exception('The \'nextpageid\' value must be set in other.');
}
}
-}
\ No newline at end of file
+}
$page3 = $this->lesson->load_page($pagerecord3->id);
// Trigger and capture the event.
$sink = $this->redirectEvents();
- $page3->move($pagerecord1->id, $pagerecord1->id);
+ $page3->move($pagerecord2->id, $pagerecord1->id);
// Get our event event.
$events = $sink->get_events();
$event = reset($events);
// Check that the event data is valid.
$this->assertInstanceOf('\mod_lesson\event\page_moved', $event);
$this->assertEquals($page3->id, $event->objectid);
+ $this->assertEquals($pagerecord2->id, $event->other['nextpageid']);
+ $this->assertEquals($pagerecord1->id, $event->other['prevpageid']);
$this->assertEventContextNotUsed($event);
$this->assertDebuggingNotCalled();
}