Fixing jqgrid tables

skala
Julio Montoya 13 years ago
parent d0ea1354d8
commit e3bccdfa89
  1. 24
      main/session/index.php

@ -317,7 +317,7 @@ $extra_params_courses['pgbuttons'] = false;*/
$url = api_get_path(WEB_AJAX_PATH).'course_home.ajax.php?a=session_courses_lp_default&session_id='.$session_id.'&course_id='.$course_id;
$columns = array(get_lang('PublicationDate'),get_lang('Course'), get_lang('LearningPaths'));
$column_model = array(array('name'=>'date', 'index'=>'date', 'width'=>'120', 'align'=>'left', 'sortable'=>'true'),
array('name'=>'course', 'index'=>'course', 'width'=>'300', 'align'=>'left', 'sortable'=>'true'),
array('name'=>'course', 'index'=>'course', 'width'=>'300', 'align'=>'left', 'sortable'=>'true', 'wrap_cell' => 'true'),
array('name'=>'lp', 'index'=>'lp', 'width'=>'440', 'align'=>'left', 'sortable'=>'true'));
$extra_params = array();
/*
@ -335,6 +335,9 @@ $extra_params['height'] = "100%";
//$extra_params['forceFit'] = 'true'; //use the width of the parent
//$extra_params['altRows'] = 'true'; //zebra style
$extra_params['height'] = '100%';
$extra_params['autowidth'] = 'true'; //use the width of the parent
//Per course grid settings
$url_by_course = api_get_path(WEB_AJAX_PATH).'course_home.ajax.php?a=session_courses_lp_by_course&session_id='.$session_id.'&course_id='.$course_id;
$extra_params_course = array();
@ -343,16 +346,17 @@ $extra_params_course['groupingView'] = array('groupCollapse' => false,
'groupField' => array('course'),
'groupColumnShow' => array('false'),
'groupText' => array('<b>'.get_lang('Course').' {0}</b>'));
//$extra_params_course['autowidth'] = 'true'; //use the width of the parent
$extra_params_course['autowidth'] = 'true'; //use the width of the parent
$extra_params_course['height'] = "100%";
//Per Week grid
$url_week = api_get_path(WEB_AJAX_PATH).'course_home.ajax.php?a=session_courses_lp_by_week&session_id='.$session_id.'&course_id='.$course_id;
$column_week = array(get_lang('PeriodWeek'), get_lang('PublicationDate'), get_lang('Course'), get_lang('LearningPaths'));
$column_week_model = array (
array('name'=>'week', 'index'=>'week', 'width'=>'50', 'align'=>'left', 'sortable'=>'false'),
array('name'=>'date', 'index'=>'date', 'width'=>'113', 'align'=>'left', 'sortable'=>'false'),
array('name'=>'course', 'index'=>'course', 'width'=>'282', 'align'=>'left', 'sortable'=>'true'),
array('name'=>'lp', 'index'=>'lp', 'width'=>'416', 'align'=>'left', 'sortable'=>'true'));
array('name'=>'week', 'index'=>'week', 'width'=>'40', 'align'=>'left', 'sortable'=>'false'),
array('name'=>'date', 'index'=>'date', 'width'=>'120', 'align'=>'left', 'sortable'=>'false'),
array('name'=>'course', 'index'=>'course', 'width'=>'300', 'align'=>'left', 'sortable'=>'true', 'wrap_cell' => 'true'),
array('name'=>'lp', 'index'=>'lp', 'width'=>'440', 'align'=>'left', 'sortable'=>'true'));
$extra_params_week = array();
$extra_params_week['grouping'] = 'true';
@ -363,21 +367,23 @@ $extra_params_week['groupingView'] = array('groupCollapse' => false,
'groupOrder' => array('desc'),
'groupColumnShow' => 'false',
'groupText' => array('<b>'.get_lang('PeriodWeek').' {0}</b>'));
//$extra_params_week['autowidth'] = 'true'; //use the width of the parent
$extra_params_week['autowidth'] = 'true'; //use the width of the parent
$extra_params_week['height'] = '100%';
//MyQCM grid
$column_exercise = array(get_lang('Status'), get_lang('ExerciseStartDate'), get_lang('Course'), get_lang('Exercise'),get_lang('Attempts'), get_lang('Result'), get_lang('BestResultInCourse'), get_lang('Ranking'));
$column_exercise_model = array(
array('name'=>'status', 'index'=>'status', 'width'=>'40', 'align'=>'left', 'sortable'=>'false'),
array('name'=>'date', 'index'=>'date', 'width'=>'130','align'=>'left', 'sortable'=>'true'),
array('name'=>'course', 'index'=>'course', 'width'=>'200','align'=>'left', 'sortable'=>'true'),
array('name'=>'course', 'index'=>'course', 'width'=>'200','align'=>'left', 'sortable'=>'true', 'wrap_cell' => 'true'),
array('name'=>'exercise', 'index'=>'exercise', 'width'=>'200','align'=>'left', 'sortable'=>'false'),
array('name'=>'attempt', 'index'=>'attempt', 'width'=>'60', 'align'=>'center', 'sortable'=>'true'),
array('name'=>'result', 'index'=>'result', 'width'=>'120','align'=>'center', 'sortable'=>'true'),
array('name'=>'best_result','index'=>'best_result','width'=>'140','align'=>'center', 'sortable'=>'true'),
array('name'=>'position', 'index'=>'position', 'width'=>'55', 'align'=>'center', 'sortable'=>'true')
);
$extra_params_exercise['height'] = '300';
$extra_params_exercise['height'] = '100%';
$extra_params_exercise['autowidth'] = 'true';
//$extra_params_exercise['sortname'] = 'status';
//$extra_params_exercise['sortorder'] = 'desc';
//$extra_params_exercise['grouping'] = 'true';

Loading…
Cancel
Save