course_module_instance_list_viewed.php 987 B

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. /**
  3. * The mod_iassign submission created event.
  4. *
  5. * @author Patricia Alves Rodrigues
  6. * @author Leônidas O. Brandão
  7. * @version v 1.0 2015/07/12
  8. * @package mod_iassign
  9. * @since 2015/10/14
  10. * @copyright iMatica (<a href="http://www.matematica.br">iMath</a>) - Computer Science Dep. of IME-USP (Brazil)
  11. * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  12. */
  13. namespace mod_iassign\event;
  14. defined('MOODLE_INTERNAL') || die();
  15. class course_module_instance_list_viewed extends \core\event\course_module_instance_list_viewed {
  16. /// Create the event from course record.
  17. // @param \stdClass $course
  18. // @return course_module_instance_list_viewed
  19. public static function create_from_course (\stdClass $course) {
  20. $params = array('context' => \context_course::instance($course->id));
  21. $event = \mod_iassign\event\course_module_instance_list_viewed::create($params);
  22. $event->add_record_snapshot('course', $course);
  23. return $event;
  24. }
  25. }