function course_ajaj_fulfullment_check in Course 8.2
Same name and namespace in other branches
- 8.3 course.module \course_ajaj_fulfullment_check()
- 6 course.module \course_ajaj_fulfullment_check()
- 7 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 96 - course.module Core functionality for Courses.
Code
function course_ajaj_fulfullment_check($node, $courseObject, $js = FALSE) {
global $user;
$account = $user;
// @todo most implements pull the current user
$courseObject
->poll();
if (course_node_is_course($node)) {
course_set_context($node);
}
module_load_include('inc', 'course', 'includes/course.block');
course_get_course($node);
$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($account)
->isComplete(),
));
}