Пример #1
0
 $mentor = $staff_collection->mentors();
 //select all the mentors
 $mentee = $staff_collection->mentees();
 //select all the mentees
 //populating some variables to generate the checklist.
 $checklist_builder = TrainingTracker::checklist_builder($current_user_level, $current_user->wpid);
 $checklist_items = $checklist_builder['items'];
 $checklist_item_sub_cat = $checklist_builder['sub_cat'];
 $checklist_item_cat = $checklist_builder['category'];
 //adding the tooltip data to the checklist_items
 foreach ($checklist_items as &$checklist_item) {
     $item_id = $checklist_item['id'];
     $checklist_item['updated_by'] = $tooltip[$item_id]['updated_by'];
     $checklist_item['updated_time'] = $tooltip[$item_id]['updated_time'];
 }
 $stats = $current_user->stats();
 $progress = $current_user->stats('progress');
 foreach ($checklist_item_sub_cat as &$sub_cat) {
     $id = $sub_cat['id'];
     $sub_cat['stat'] = $stats[$id];
 }
 if ($current_user->wpid == $app->user->wpid) {
     $disabled = true;
 } else {
     $disabled = false;
 }
 $app->tpl->assign('disabled', $disabled);
 $app->tpl->assign('progress', $progress);
 $app->tpl->assign('title', $title);
 $app->tpl->assign('checked', $checklist_checked);
 $app->tpl->assign('comments', $comments);