Пример #1
0
         $tooltip[$item_id]['updated_by'] = PSUPerson::get($checked['updated_by'])->formatname('f l');
         $tooltip[$item_id]['updated_time'] = $checked["activity_date"];
         $checked = $checked['item_id'];
     }
     $last_modified_info = TrainingTracker::last_modified($checklist_id);
     $last_modified = $last_modified_info['time'];
     $modified_by = $last_modified_info['modified_by'];
 }
 //the title is the title name in the box.
 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'];