@@ 1242-1247 (lines=6) @@ | ||
1239 | $course_id = $course_info['real_id']; |
|
1240 | $work_id = intval($work_id); |
|
1241 | ||
1242 | if (!empty($group_id)) { |
|
1243 | // set to select only messages posted by the user's group |
|
1244 | $extra_conditions = " work.post_group_id = '".intval($group_id)."' "; |
|
1245 | } else { |
|
1246 | $extra_conditions = " work.post_group_id = '0' "; |
|
1247 | } |
|
1248 | ||
1249 | if ($is_allowed_to_edit) { |
|
1250 | $extra_conditions .= ' AND work.active IN (0, 1) '; |
|
@@ 1881-1886 (lines=6) @@ | ||
1878 | ); |
|
1879 | ||
1880 | if (!empty($work_data)) { |
|
1881 | if (!empty($group_id)) { |
|
1882 | $extra_conditions = " work.post_group_id = '".intval($group_id)."' "; |
|
1883 | // set to select only messages posted by the user's group |
|
1884 | } else { |
|
1885 | $extra_conditions = " work.post_group_id = '0' "; |
|
1886 | } |
|
1887 | ||
1888 | if ($is_allowed_to_edit || $isDrhOfCourse) { |
|
1889 | $extra_conditions .= ' AND work.active IN (0, 1) '; |