Beispiel #1
0
 if (strlen($modified_by) > 2) {
     $title = $current_user->person()->formatName('f l') . ' - Last modified by ' . PSUPerson::get($modified_by)->formatname('f l') . ' on ' . $last_modified . '.';
 } else {
     $title = $current_user->person()->formatName('f l');
 }
 //getting comments
 $comments = TrainingTracker::get_comments($checklist_id);
 $staff_collection = new TrainingTracker\StaffCollection();
 //get the people that work at the helpdesk
 $staff_collection->load();
 $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];
 }