Removing unused columns see BT#7139

1.9.x
Julio Montoya 12 years ago
parent 847848ac84
commit c1a3a5f7ce
  1. 12
      main/inc/ajax/model.ajax.php
  2. 8
      main/work/work_list.php

@ -265,7 +265,7 @@ switch ($action) {
case 'get_session_lp_progress':
case 'get_session_progress':
//@TODO replace this for a more efficient function (not retrieving the whole data)
$course = api_get_course_info_by_id($courseId);
$course = api_get_course_info_by_id($courseId);
$users = CourseManager::get_student_list_from_course_code($course['code'], true, intval($_GET['session_id']));
$count = count($users);
break;
@ -510,10 +510,10 @@ switch ($action) {
case 'get_work_user_list':
if (isset($_GET['type']) && $_GET['type'] == 'simple') {
$columns = array(
'type', 'firstname', 'lastname', 'title', 'qualification', 'sent_date', 'qualificator_id', 'actions'
'type', 'title', 'qualification', 'sent_date', 'qualificator_id', 'actions'
);
} else {
$columns = array('type', 'firstname', 'lastname', 'title', 'sent_date', 'actions');
$columns = array('type', 'title', 'sent_date', 'actions');
}
$documents = getAllDocumentToWork($work_id, api_get_course_int_id());
@ -651,7 +651,7 @@ switch ($action) {
{
$sessionId = intval($_GET['session_id']);
$courseId = intval($_GET['course_id']);
$course = api_get_course_info_by_id($courseId);
$course = api_get_course_info_by_id($courseId);
}
/**
* Add lessons of course
@ -670,7 +670,7 @@ switch ($action) {
}
$columns[] = 'total';
$result = SessionManager::get_session_lp_progress($sessionId, $courseId,
$result = SessionManager::get_session_lp_progress($sessionId, $courseId,
array(
'where' => $where_condition,
'order' => "$sidx $sord",
@ -765,7 +765,7 @@ switch ($action) {
'limit'=> "$start , $limit"
)
);
break;
break;
case 'get_timelines':
$columns = array('headline', 'actions');

@ -103,8 +103,6 @@ if (!empty($work_data['enable_qualification']) && !empty($check_qualification))
$columns = array(
get_lang('Type'),
get_lang('FirstName'),
get_lang('LastName'),
get_lang('Title'),
get_lang('Qualification'),
get_lang('Date'),
@ -114,8 +112,6 @@ if (!empty($work_data['enable_qualification']) && !empty($check_qualification))
$column_model = array (
array('name'=>'type', 'index'=>'file', 'width'=>'5', 'align'=>'left', 'search' => 'false'),
array('name'=>'firstname', 'index'=>'firstname', 'width'=>'35', 'align'=>'left', 'search' => 'true'),
array('name'=>'lastname', 'index'=>'lastname', 'width'=>'35', 'align'=>'left', 'search' => 'true'),
array('name'=>'title', 'index'=>'title', 'width'=>'40', 'align'=>'left', 'search' => 'false', 'wrap_cell' => 'true'),
array('name'=>'qualification', 'index'=>'qualification', 'width'=>'10', 'align'=>'left', 'search' => 'true'),
array('name'=>'sent_date', 'index'=>'sent_date', 'width'=>'30', 'align'=>'left', 'search' => 'true', 'wrap_cell' => 'true'),
@ -127,8 +123,6 @@ if (!empty($work_data['enable_qualification']) && !empty($check_qualification))
$columns = array(
get_lang('Type'),
get_lang('FirstName'),
get_lang('LastName'),
get_lang('Title'),
get_lang('Date'),
get_lang('Actions')
@ -136,8 +130,6 @@ if (!empty($work_data['enable_qualification']) && !empty($check_qualification))
$column_model = array (
array('name'=>'type', 'index'=>'file', 'width'=>'5', 'align'=>'left', 'search' => 'false'),
array('name'=>'firstname', 'index'=>'firstname', 'width'=>'35', 'align'=>'left', 'search' => 'true'),
array('name'=>'lastname', 'index'=>'lastname', 'width'=>'35', 'align'=>'left', 'search' => 'true'),
array('name'=>'title', 'index'=>'title', 'width'=>'60', 'align'=>'left', 'search' => 'false', 'wrap_cell' => "true"),
array('name'=>'sent_date', 'index'=>'sent_date', 'width'=>'30', 'align'=>'left', 'search' => 'true', 'wrap_cell' => 'true', 'sortable'=>'false'),
array('name'=>'actions', 'index'=>'actions', 'width'=>'20', 'align'=>'left', 'search' => 'false', 'sortable'=>'false')

Loading…
Cancel
Save