@@ 379-386 (lines=8) @@ | ||
376 | post_group_id = '".$group_id."' |
|
377 | ORDER BY sent_date DESC"; |
|
378 | } else { |
|
379 | if (!empty($group_id)) { |
|
380 | // set to select only messages posted by the user's group |
|
381 | $group_query = " WHERE c_id = $course_id AND post_group_id = '".$group_id."' "; |
|
382 | $subdirs_query = "AND parent_id = 0"; |
|
383 | } else { |
|
384 | $group_query = " WHERE c_id = $course_id AND post_group_id = '0' "; |
|
385 | $subdirs_query = "AND parent_id = 0"; |
|
386 | } |
|
387 | //@todo how we can active or not an assignment? |
|
388 | $active_condition = ' AND active IN (1, 0)'; |
|
389 | $sql = "SELECT * FROM $work_table |
|
@@ 1414-1420 (lines=7) @@ | ||
1411 | ||
1412 | // Get list from database |
|
1413 | ||
1414 | if (!empty($group_id)) { |
|
1415 | $group_query = " WHERE w.c_id = $course_id AND post_group_id = '".$group_id."' "; |
|
1416 | $subdirs_query = "AND parent_id = 0"; |
|
1417 | } else { |
|
1418 | $group_query = " WHERE w.c_id = $course_id AND post_group_id = '0' "; |
|
1419 | $subdirs_query = "AND parent_id = 0"; |
|
1420 | } |
|
1421 | ||
1422 | $active_condition = ' AND active IN (1, 0)'; |
|
1423 |