* @param int $column The column on which the data should be sorted (default = 0)
* @param int $column The column on which the data should be sorted (default = 0)
* @param string $direction The direction to sort (SORT_ASC (default) orSORT_DESC)
* @param string $direction The direction to sort (SORT_ASC (default) orSORT_DESC)
* @param array $column_show The columns that we will show in the table i.e: $column_show=array('1','0','1') we will show the 1st and the 3th column.
* @param array $column_show The columns that we will show in the table i.e: $column_show=array('1','0','1') we will show the 1st and the 3th column.
* @param array $column_order Changes how the columns will be sorted ie. $column_order=array('1','4','3','4') The 2nd column will be sorted like the 4 column
* @param array $column_order Changes how the columns will be sorted ie. $column_order = array('0','3','2','3') The column [1] will be sorted like the column [3]
* @param constant $type How should data be sorted (SORT_REGULAR, SORT_NUMERIC,SORT_STRING,SORT_DATE,SORT_IMAGE) *
* @param constant $type How should data be sorted (SORT_REGULAR, SORT_NUMERIC,SORT_STRING,SORT_DATE,SORT_IMAGE)
* @return array The sorted dataset
* @return array The sorted dataset
* @author bart.mollet@hogent.be
* @author bart.mollet@hogent.be
*/
*/
public function sort_table_config($data, $column = 0, $direction = SORT_ASC, $column_show = null, $column_order = null, $type = SORT_REGULAR) {
public function sort_table_config($data, $column = 0, $direction = SORT_ASC, $column_show = null, $column_order = null, $type = SORT_REGULAR) {
if (!is_array($data) or count($data) == 0) {
if (!is_array($data) or count($data) == 0) {
return array();
return array();
}
}
@ -136,17 +101,11 @@ class TableSort {
// Change columns sort
// Change columns sort
// Here we say that the real way of how the columns are going to be order is manage by the $column_order array
// Here we say that the real way of how the columns are going to be order is manage by the $column_order array
@ -1431,7 +1424,7 @@ function get_list_users_without_publication($task_id) {
if (!empty($session_id)){
if (!empty($session_id)){
$sql = "SELECT user_id as id FROM $work_table WHERE parent_id='$task_id' and session_id='".$session_id."'";
$sql = "SELECT user_id as id FROM $work_table WHERE parent_id='$task_id' and session_id='".$session_id."'";
} else {
} else {
$sql = "SELECT user_id as id FROM $work_table WHERE parent_id='$task_id'";
$sql = "SELECT user_id as id FROM $work_table WHERE parent_id='$task_id'";
}
}
@ -1446,7 +1439,7 @@ function get_list_users_without_publication($task_id) {
} else {
} else {
$sql_users = "SELECT cu.user_id, u.lastname, u.firstname, u.email FROM $table_course_user AS cu, $table_user AS u WHERE u.status!=1 and cu.course_code='".api_get_course_id()."' AND u.user_id=cu.user_id";
$sql_users = "SELECT cu.user_id, u.lastname, u.firstname, u.email FROM $table_course_user AS cu, $table_user AS u WHERE u.status!=1 and cu.course_code='".api_get_course_id()."' AND u.user_id=cu.user_id";
}
}
$result_users = Database::query($sql_users);
$result_users = Database::query($sql_users);
$users_without_tasks = array();
$users_without_tasks = array();
while ($row_users = Database::fetch_row($result_users)) {
while ($row_users = Database::fetch_row($result_users)) {