Fixes bug when showing table see #4063

skala
Julio Montoya 14 years ago
parent c69c72a8b0
commit 3d5ca143c0
  1. 3
      main/gradebook/gradebook_flatview.php
  2. 6
      main/gradebook/gradebook_showlog_eval.php

@ -21,7 +21,6 @@ require_once 'lib/scoredisplay.class.php';
require_once api_get_path(SYS_CODE_PATH).'gradebook/lib/gradebook_functions.inc.php';
require_once api_get_path(LIBRARY_PATH).'pdf.lib.php';
api_block_anonymous_users();
block_students();
@ -91,6 +90,8 @@ if (!empty($keyword)) {
$offset = isset($_GET['offset']) ? $_GET['offset'] : '0';
$flatviewtable = new FlatViewTable($cat[0], $users, $alleval, $alllinks, true, $offset, $addparams);
$parameters=array('selectcat'=>intval($_GET['selectcat']));
$flatviewtable->set_additional_parameters($parameters);
if (isset($_GET['exportpdf'])) {
$interbreadcrumb[] = array (

@ -40,8 +40,10 @@ echo '</div>';
$t_linkeval_log = Database :: get_main_table(TABLE_MAIN_GRADEBOOK_LINKEVAL_LOG);
$t_user= Database :: get_main_table(TABLE_MAIN_USER);
$visible_log=Security::remove_XSS($_GET['visiblelog']);
$evaledit = Evaluation :: load($visible_log);
$sql="SELECT le.name,le.description,le.weight,le.visible,le.type,le.created_at,us.username from ".$t_linkeval_log." le inner join ".$t_user." us on le.user_id_log=us.user_id where id_linkeval_log=".$evaledit[0]->get_id()." and type='evaluation';";
$sql="SELECT le.name,le.description,le.weight,le.visible,le.type,le.created_at,us.username FROM ".$t_linkeval_log." le INNER JOIN ".$t_user." us
ON le.user_id_log=us.user_id where id_linkeval_log=".$evaledit[0]->get_id()." and type='evaluation';";
$result=Database::query($sql);
$list_info=array();
while ($row=Database::fetch_row($result)) {
@ -53,7 +55,7 @@ foreach($list_info as $key => $info_log) {
$list_info[$key][3]=($info_log[3]==1) ? get_lang('GradebookVisible') : get_lang('GradebookInvisible');
}
$parameters=array('visiblelog'=>Security::remove_XSS($_GET['visiblelog']),'selectcat'=>Security::remove_XSS($_GET['selectcat']));
$parameters=array('visiblelog'=>$visible_log,'selectcat'=>intval($_GET['selectcat']));
$table = new SortableTableFromArrayConfig($list_info, 1,20,'gradebookeval');
$table->set_additional_parameters($parameters);

Loading…
Cancel
Save