function course_ajaj_fulfullment_check in Course 7
Same name and namespace in other branches
- 8.3 course.module \course_ajaj_fulfullment_check()
- 8.2 course.module \course_ajaj_fulfullment_check()
- 6 course.module \course_ajaj_fulfullment_check()
- 3.x course.module \course_ajaj_fulfullment_check()
Fulfillment check callback.
This function is polled from nav.js to check remote fulfillments for external learning objects.
1 string reference to 'course_ajaj_fulfullment_check'
- course_menu in ./
course.module - Implements hook_menu().
File
- ./
course.module, line 376 - course.module Core functionality for Courses.
Code
function course_ajaj_fulfullment_check($node, $courseObject, $js = FALSE) {
$courseObject
->poll();
if (course_node_is_course($node)) {
course_set_context($node);
}
module_load_include('inc', 'course', 'includes/course.block');
// Bust cache.
/** @deprecated do not use getUser() */
course_get_course($node, $courseObject
->getCourse()
->getUser());
$block = block_load('course', 'navigation');
$block_rend = _block_render_blocks(array(
$block,
));
drupal_json_output(array(
'content' => $block_rend['course_navigation']->content['#markup'],
'complete' => $courseObject
->getFulfillment()
->isComplete(),
));
}