CourseEnrollment.inc in Course 7.2
File
includes/CourseEnrollment.inc
View source
<?php
class CourseEnrollment extends Entity {
function defaultLabel() {
$node = node_load($this->nid);
$account = user_load($this->uid);
return t("@username's enrollment in @title", array(
'@username' => format_username($account),
'@title' => $node->title,
));
}
public function save() {
if (!isset($this->timestamp)) {
$this->timestamp = NULL;
}
$this->updated = REQUEST_TIME;
drupal_static_reset('course_enrollment_load');
return parent::save();
}
}