function CourseObjectUbercart::take in Course 6
Same name and namespace in other branches
- 8.3 modules/course_uc/course_uc.classes.inc \CourseObjectUbercart::take()
- 8.2 modules/course_uc/course_uc.classes.inc \CourseObjectUbercart::take()
- 7.2 modules/course_uc/course_uc.classes.inc \CourseObjectUbercart::take()
- 7 modules/course_uc/course_uc.classes.inc \CourseObjectUbercart::take()
Overrides CourseObject::take
File
- modules/
course_uc/ course_uc.classes.inc, line 16
Class
Code
function take() {
if ($this
->getFulfillment()
->isComplete()) {
return "You've already purchased this activity.";
}
else {
$atc = drupal_get_form('uc_product_add_to_cart_form', $this->node);
if (!$atc) {
// The add to cart form was hidden?
return "Something isn't right...";
}
else {
return $atc;
}
}
}