Beispiel #1
0
 $active_user_level = TrainingTracker::get_user_level($app->user->wpid);
 $checklist_id = TrainingTracker::get_checklist_id($current_user->person()->pidm);
 if (strlen($checklist_id) > 2) {
     //get the data for which check boxes are checked
     $checklist_checked = TrainingTracker::checklist_checked($checklist_id);
     // TODO: Y U NO USE FOREACH( $something as &$item ) by reference?
     // yes
     $tooltip = array();
     foreach ($checklist_checked as &$checked) {
         $item_id = $checked['item_id'];
         $tooltip[$item_id]['item_id'] = $item_id;
         $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();