public function CourseObjectManual::getStatus in Course 6
Same name and namespace in other branches
- 7.2 modules/course_object_manual/course_object_manual.classes.inc \CourseObjectManual::getStatus()
- 7 modules/course_object_manual/course_object_manual.classes.inc \CourseObjectManual::getStatus()
Return a message about the user's status in this object, for when this object is hidden.
Overrides CourseObject::getStatus
1 call to CourseObjectManual::getStatus()
- CourseObjectManual::take in modules/
course_object_manual/ course_object_manual.classes.inc - Display status message as course content.
File
- modules/
course_object_manual/ course_object_manual.classes.inc, line 16
Class
Code
public function getStatus() {
$grade = $this
->getFulfillment()
->getGrade();
$config = $this
->getOptions();
if (!$this
->getFulfillment()
->getId()) {
// User has not been given a status yet.
return $config['incomplete_msg'];
}
if ($this
->getFulfillment()
->isComplete()) {
// Complete. User given passed status.
return $config['complete_msg'];
}
else {
// User given a status but it wasn't complete. This means they failed.
return $config['failed_msg'];
}
}