function opigno_in_house_training_app_preprocess_page in Opigno in house training app 7
Implements hook_preprocess_page().
File
- ./
opigno_in_house_training_app.module, line 389
Code
function opigno_in_house_training_app_preprocess_page(&$vars) {
$group = og_context('node');
if (!empty($group['gid'])) {
$node = node_load($group['gid']);
if ($node->type == "course") {
$tmp = opigno_in_house_training_app_group_status($group['gid']);
$vars['group_state']['course'][$node->nid]['in-house-training'] = opigno_in_house_training_app_group_status($group['gid']);
}
if ($node->type == "class") {
if (isset($node->opigno_class_courses[LANGUAGE_NONE])) {
foreach ($node->opigno_class_courses[LANGUAGE_NONE] as $cindex => $course) {
$vars['group_state']['course'][$course['target_id']]['in-house-training'] = opigno_in_house_training_app_group_status($course['target_id']);
}
}
}
}
}