diff --git a/main/gradebook/gradebook_edit_all.php b/main/gradebook/gradebook_edit_all.php index fe5e0f53ab..5627209081 100755 --- a/main/gradebook/gradebook_edit_all.php +++ b/main/gradebook/gradebook_edit_all.php @@ -61,9 +61,13 @@ if (!isset($_GET['exportpdf']) and !isset($_GET['export_certificate'])) { $interbreadcrumb[]= array ( 'url' => 'index.php?', 'name' => get_lang('Gradebook')); + + $interbreadcrumb[]= array ( + 'url' => 'index.php?&selectcat='.Security::remove_XSS($_GET['selectcat']), + 'name' => get_lang('Details')); Display :: display_header(''); - //api_get_cidreq() + } } diff --git a/main/gradebook/index.php b/main/gradebook/index.php index 880edb8c66..f23ddbd660 100755 --- a/main/gradebook/index.php +++ b/main/gradebook/index.php @@ -402,11 +402,14 @@ if (!isset($_GET['exportpdf']) and !isset($_GET['export_certificate'])) { 'name' => get_lang('Gradebook') ); - $interbreadcrumb[]= array ( - 'url' => $_SESSION['gradebook_dest'].'?selectcat=' . Security::remove_XSS($_GET['selectcat']), - 'name' => get_lang('Details') - ); - Display :: display_header(); + if (!isset($_GET['gradebooklist_direction'])) { + $interbreadcrumb[]= array ( + 'url' => $_SESSION['gradebook_dest'].'?selectcat=' . Security::remove_XSS($_GET['selectcat']), + 'name' => get_lang('Details') + ); + } + + Display :: display_header(''); } else { Display :: display_header(get_lang('Gradebook')); } @@ -632,6 +635,13 @@ if (isset($_GET['search'])) { if (isset ($_GET['studentoverview'])) { $addparams['studentoverview'] = ''; } +//$addparams['cidReq']=''; +if (isset($_GET['cidReq']) && $_GET['cidReq']!='') { + $addparams['cidReq']=$_GET['cidReq']; +} else { + $addparams['cidReq']=''; +} + $gradebooktable= new GradebookTable($cats[0], $allcat, $alleval,$alllink, $addparams); $no_qualification = false; if (( count($allcat) == 0) && ( count($alleval) == 0 ) && ( count($alllink) == 0 )) { @@ -649,10 +659,15 @@ if ($category != '0') { } if (api_is_platform_admin() || api_is_allowed_to_create_course()) { - if (!isset ($_GET['selectcat'])) { - $cats = Category :: load(null, null, $course_code, null, null, $session_id, false); - DisplayGradebook :: display_reduce_header_gradebook($cats[0],$is_course_admin, $is_platform_admin, $simple_search_form, false, false); - } + + if ( (isset ($_GET['selectcat']) && $_GET['selectcat']<>0) ) { + // + } else { + if ( ((isset ($_GET['selectcat']) && $_GET['selectcat']==0) || ((isset($_GET['cidReq']) && $_GET['cidReq']!==''))) ) { + $cats = Category :: load(null, null, $course_code, null, null, $session_id, false); + DisplayGradebook :: display_reduce_header_gradebook($cats[0],$is_course_admin, $is_platform_admin, $simple_search_form, false, false); + } + } } $gradebooktable->display(); Display :: display_footer(); \ No newline at end of file diff --git a/main/gradebook/lib/fe/displaygradebook.php b/main/gradebook/lib/fe/displaygradebook.php index 81cf351afe..b4a833d974 100644 --- a/main/gradebook/lib/fe/displaygradebook.php +++ b/main/gradebook/lib/fe/displaygradebook.php @@ -133,7 +133,7 @@ class DisplayGradebook */ function display_header_reduce_flatview($catobj, $showeval, $showlink,$simple_search_form) { $header= ''; - $header .= ''; + $header .= ''; // $header .= ''; } if ($show_add_link === true) { - $header .= '
<< ' . get_lang('BackToOverview') . '<< ' . get_lang('BackToOverview') . ' . get_lang( ' . get_lang('ExportPDF') . ''; @@ -280,17 +280,17 @@ class DisplayGradebook $header .= '' . get_lang('NewSubCategory') . ' ' . get_lang('NewSubCategory') . '' . get_lang('NewEvaluation') . ' ' . get_lang('NewEvaluation') . ''; + $header .= '' . get_lang('NewEvaluation') . ' ' . get_lang('NewEvaluation') . ' '; $cats= Category :: load($selectcat); if ($cats[0]->get_course_code() != null) { //$header .= '' . get_lang('MakeLink') . ' ' . get_lang('MakeLink') . ''; - $header .= '' . get_lang('MakeLink') . ' ' . get_lang('MakeLink') . ''; + $header .= '' . get_lang('MakeLink') . ' ' . get_lang('MakeLink') . ' '; } else { - $header .= '' . get_lang('MakeLink') . ' ' . get_lang('MakeLink') . ''; + $header .= '' . get_lang('MakeLink') . ' ' . get_lang('MakeLink') . ' '; } } - $header .= '' . get_lang('EditAllWeights') . ' ' . get_lang('EditAllWeights') . ''; + $header .= '' . get_lang('EditAllWeights') . ' ' . get_lang('EditAllWeights') . ''; } } elseif (isset ($_GET['search'])) { $header .= ''.get_lang('SearchResults').' :'; diff --git a/main/gradebook/lib/flatview_data_generator.class.php b/main/gradebook/lib/flatview_data_generator.class.php index a9e20e6c77..d449527962 100644 --- a/main/gradebook/lib/flatview_data_generator.class.php +++ b/main/gradebook/lib/flatview_data_generator.class.php @@ -152,8 +152,11 @@ class FlatViewDataGenerator ($count < $items_count ) && ($items_start + $count < count($this->evals_links)); $count++) { $item = $this->evals_links [$count + $items_start]; - $score = $item->calc_score($user[0]); - $item_value+=$score[0]/$score[1]*$item->get_weight(); + $score = $item->calc_score($user[0]); + $divide=$score[1]*$item->get_weight(); + if ($divide!=0) { + $item_value+=$score[0]/$divide; + } $item_total+=$item->get_weight(); $row[] = $scoredisplay->display_score($score,SCORE_DIV_PERCENT); } diff --git a/main/gradebook/lib/gradebook_functions.inc.php b/main/gradebook/lib/gradebook_functions.inc.php index 0571d4b6cb..5a2bdd288a 100644 --- a/main/gradebook/lib/gradebook_functions.inc.php +++ b/main/gradebook/lib/gradebook_functions.inc.php @@ -188,7 +188,7 @@ function build_edit_icons_cat($cat, $selectcat) { if ($cat->is_movable()) { $modify_icons .= ' '; } else { - $modify_icons .= ' '; + //$modify_icons .= ' '; } $modify_icons .= ' '; return $modify_icons;