'; $header .= ' . get_lang( ' . get_lang('BackToOverview') . ''; if ($evalobj->get_course_code() == null) { $header .= 'get_id() . '> . get_lang( ' . get_lang('AddStudent') . ''; } elseif (!$evalobj->has_results()) { $header .= ' . get_lang( ' . get_lang('AddResult') . ''; } $header .= '' . ' ' . get_lang('ImportResult') . ''; if ($evalobj->has_results()) { $header .= '' . ' ' . get_lang('ExportResult') . ''; $header .= 'get_id() .'> . get_lang( ' . get_lang('EditResult') . ''; $header .= '' . ' ' . get_lang('DeleteResult') . ''; } $header .= 'get_id() . ' target="_blank"> . get_lang( ' . get_lang('Print') . ''; $header .= ''; } if ($evalobj->is_visible() == '1') { $visible= get_lang('Yes'); } else { $visible= get_lang('No'); } $scoredisplay = ScoreDisplay :: instance(); if (($evalobj->has_results())) // TODO this check needed ? { $score= $evalobj->calc_score(); if ($score != null) $average= get_lang('Average') . ' : ' .$scoredisplay->display_score($score,SCORE_AVERAGE) . ''; } if (!$evalobj->get_description() == '') { $description= get_lang('Description') . ' : ' . $evalobj->get_description() . '
'; } if ($evalobj->get_course_code() == null) $course= get_lang('CourseIndependent'); else $course= get_course_name_from_code($evalobj->get_course_code()); $evalinfo= '
'; $evalinfo .= get_lang('EvaluationName') . ' : ' . $evalobj->get_name() . ' (' . date('j/n/Y g:i', $evalobj->get_date()) . ')
' . get_lang('Course') . ' : ' . $course . '
' . get_lang('Weight') . ' : ' . $evalobj->get_weight() . '
' . get_lang('Max') . ' : ' . $evalobj->get_max() . '
' . $description . get_lang('Visible') . ' : ' . $visible . '
' . $average; if (!$evalobj->has_results()) $evalinfo .= '
' . get_lang('NoResultsInEvaluation') . ''; elseif ($scoredisplay->is_custom() && api_get_self() != '/dokeos/main/gradebook/gradebook_statistics.php') $evalinfo .= '

'. get_lang('ViewStatistics') . ''; $evalinfo .= '
'; Display :: display_normal_message($evalinfo,false); echo $header; } /** * Displays the header for the flatview page containing filters * @param $catobj * @param $showeval * @param $showlink */ function display_header_flatview($catobj, $showeval, $showlink,$simple_search_form) { $header= ''; $header .= ''; $header .= ''; if (!$catobj->get_id() == '0') $header .= ''; $header .= ''; $header .= '
<< ' . get_lang('BackToOverview') . '' . get_lang('FilterCategory') . '
'.get_lang('Up').''.$simple_search_form->toHtml().' . get_lang( ' . get_lang('ExportPDF') . ''; $header .= ' . get_lang( ' . get_lang('Print') . ''; $header .= '
'; if (!$catobj->get_id() == '0') { $header .= '
Show Evaluations  '; $header .= 'Show Links
'; } if (isset ($_GET['search'])) $header .= ''.get_lang('SearchResults').' :'; echo $header; } /** * Displays the header for the gradebook containing the navigation tree and links * @param category_object $currentcat * @param int $showtree '1' will show the browse tree and naviation buttons * @param boolean $is_course_admin * @param boolean $is_platform_admin */ function display_header_gradebook($catobj, $showtree, $selectcat, $is_course_admin, $is_platform_admin,$simple_search_form) { //student if (!$is_course_admin) { $user= get_user_info_from_id(api_get_user_id()); $catcourse= Category :: load($catobj->get_id()); $scoredisplay = ScoreDisplay :: instance(); $scorecourse = $catcourse[0]->calc_score(api_get_user_id()); $scorecourse_display = (isset($scorecourse) ? $scoredisplay->display_score($scorecourse,SCORE_AVERAGE) : get_lang('NoResultsAvailable')); $cattotal = Category :: load(0); $scoretotal= $cattotal[0]->calc_score(api_get_user_id()); $scoretotal_display = (isset($scoretotal) ? $scoredisplay->display_score($scoretotal,SCORE_PERCENT) : get_lang('NoResultsAvailable')); $scoreinfo = get_lang('StatsStudent') . ' : '.$user['lastname'].' '.$user['firstname'].'
'; if ((!$catobj->get_id() == '0') && (!isset ($_GET['studentoverview'])) && (!isset ($_GET['search']))) $scoreinfo.= '
'.get_lang('TotalForThisCategory') . ' : ' . $scorecourse_display . ''; $scoreinfo.= '
'.get_lang('Total') . ' : ' . $scoretotal_display . ''; Display :: display_normal_message($scoreinfo,false); } // show navigation tree and buttons? $header .= ''; if (($showtree == '1') || (isset ($_GET['studentoverview']))) { $header .= ''; if (!$selectcat == '0') { $header .= ''; } $header .= ''; if ($is_course_admin) { $header .= ''; } $header.='
' . get_lang('CurrentCategory') . '
'.$simple_search_form->toHtml().'get_id() . '> . get_lang( ' . get_lang('FlatView') . ''; if ($is_platform_admin) $header .= ' . get_lang( ' . get_lang('ScoreEdit') . ''; } elseif (!(isset ($_GET['studentoverview']))) { $header .= ' . get_lang( ' . get_lang('FlatView') . ''; } else { $header .= ' . get_lang( ' . get_lang('ExportPDF') . ''; } $header .= '
'; // for course admin & platform admin add item buttons are added to the header $header .= ''; $header .= ''; $header .= '
'; if (($is_course_admin) && (!isset ($_GET['search']))) { if ($selectcat == '0') { $header .= ' . get_lang( ' . get_lang('NewCategory') . ' . get_lang( ' . get_lang('NewEvaluation') . ''; } else { $header .= 'get_id() . '> . get_lang( ' . get_lang('NewSubCategory') . 'get_id() . '> . get_lang( ' . get_lang('NewEvaluation') . ''; $cats= Category :: load($selectcat); if ($cats[0]->get_course_code() != null) { $header .= 'get_id() . '> . get_lang( ' . get_lang('MakeLink') . ''; } else { $header .= 'get_id() . '> . get_lang( ' . get_lang('MakeLink') . ''; } } } elseif (isset ($_GET['search'])) { $header .= ''.get_lang('SearchResults').' :'; } $header .= '
'; echo $header; } function display_header_user($userid) { $user= get_user_info_from_id($userid); $image= $user['picture_uri']; $image_file= ($image != '' ? api_get_path(WEB_CODE_PATH) . "upload/users/$image" : api_get_path(WEB_CODE_PATH) . 'img/unknown.jpg'); $image_size= @ getimagesize($image_file); $img_attributes= 'src="' . $image_file . '?rand=' . time() . '" ' . 'alt="' . $user['lastname'] . ' ' . $user['firstname'] . '" '; if ($image_size[0] > 200) //limit display width to 200px $img_attributes .= 'width="200" '; $cattotal= Category :: load(0); $info = '
'; $info.= get_lang('Name') . ' : ' . $user['lastname'] . ' ' . $user['firstname'] . ' ( ' . get_lang('MoreInfo') . '... )
'; $info.= get_lang('Email') . ' : ' . $user['email'] . '

'; $scoredisplay = ScoreDisplay :: instance(); $score_stud= $cattotal[0]->calc_score($userid); $score_stud_display = (isset($score_stud) ? $scoredisplay->display_score($score_stud,SCORE_PERCENT) : get_lang('NoResultsAvailable') ); $score_avg= $cattotal[0]->calc_score(); $score_avg_display = (isset($score_avg) ? $scoredisplay->display_score($score_avg,SCORE_AVERAGE) : get_lang('NoResultsAvailable') ); $info.= get_lang('TotalUser') . ' : ' . $score_stud_display . '
'; $info.= get_lang('AverageTotal') . ' : ' . $score_avg_display . ''; $info.= '
'; $info.= '
'; echo Display :: display_normal_message($info,false); } } ?>