Fixing query in works see #5332

skala
Yoselyn Castillo 12 years ago
parent d7b750b332
commit 8bc67702af
  1. 5
      main/work/work.lib.php

@ -1522,10 +1522,11 @@ function get_count_work($work_id) {
$extra_conditions .= " AND parent_id = ".$work_id." ";
$sql = "SELECT count(*) as count
FROM ".$iprop_table." prop INNER JOIN ".$work_table." work ON (prop.ref=work.id AND prop.c_id = $course_id AND work.c_id = $course_id )
FROM ".$iprop_table." prop INNER JOIN ".$work_table." work ON (prop.ref=work.id AND prop.c_id = $course_id AND prop.tool='work' AND work.active = 1 AND prop.visibility <> 2 AND work.c_id = $course_id )
INNER JOIN $user_table u ON (work.user_id = u.user_id)
WHERE $extra_conditions $where_condition $condition_session ";
$result = Database::query($sql);
$users_with_work = 0;
@ -1997,4 +1998,4 @@ function display_list_users_without_publication($task_id) {
$column_show[] = 1;
$column_show[] = 1;
Display::display_sortable_config_table('work', $table_header, $table_data, $sorting_options, $paging_options, $my_params, $column_show);
}
}
Loading…
Cancel
Save