original_string: public static function create_from_completion(\stdClass $completion) {
          $event = self::create(
              array(
                  'objectid' => $completion->id,
                  'relateduserid' => $completion->userid,
                  'context' => \context_course::instance($completion->course),
                  'courseid' => $completion->course,
                  'other' => array('relateduserid' => $completion->userid), // Deprecated since 2.7, please use property relateduserid.
              )
          );
          $event->add_record_snapshot('course_completions', $completion);
          return $event;
      }
code: public static function create_from_completion(\stdClass $completion) {
          $event = self::create(
              array(
                  'objectid' => $completion->id,
                  'relateduserid' => $completion->userid,
                  'context' => \context_course::instance($completion->course),
                  'courseid' => $completion->course,
                  'other' => array('relateduserid' => $completion->userid), // Deprecated since 2.7, please use property relateduserid.
              )
          );
          $event->add_record_snapshot('course_completions', $completion);
          return $event;
      }
code_tokens: public static function create_from_completion ( \ stdClass $ completion ) { $ event = self :: create ( array ( 'objectid' => $ completion -> id , 'relateduserid' => $ completion -> userid , 'context' => \ context_course :: instance ( $ completion -> course ) , 'courseid' => $ completion -> course , 'other' => array ( 'relateduserid' => $ completion -> userid ) , // Deprecated since 2.7, please use property relateduserid. ) ) ; $ event -> add_record_snapshot ( 'course_completions' , $ completion ) ; return $ event ; }
docstring: Create event from course_completion record.
  @param \stdClass $completion
  @return course_completed
docstring_tokens: Create event from course_completion record .