@@ 1324-1333 (lines=10) @@ | ||
1321 | $extra_conditions = " work.post_group_id = '0' "; |
|
1322 | } |
|
1323 | ||
1324 | if ($is_allowed_to_edit) { |
|
1325 | $extra_conditions .= ' AND work.active IN (0, 1) '; |
|
1326 | } else { |
|
1327 | $extra_conditions .= ' AND work.active IN (0, 1) AND accepted = 1'; |
|
1328 | if (isset($course_info['show_score']) && $course_info['show_score'] == 1) { |
|
1329 | $extra_conditions .= " AND work.user_id = ".api_get_user_id()." "; |
|
1330 | } else { |
|
1331 | $extra_conditions .= ''; |
|
1332 | } |
|
1333 | } |
|
1334 | ||
1335 | $extra_conditions .= " AND parent_id = ".$work_id." "; |
|
1336 | ||
@@ 1955-1965 (lines=11) @@ | ||
1952 | $extra_conditions = " work.post_group_id = '0' "; |
|
1953 | } |
|
1954 | ||
1955 | if ($is_allowed_to_edit || $isDrhOfCourse) { |
|
1956 | $extra_conditions .= ' AND work.active IN (0, 1) '; |
|
1957 | } else { |
|
1958 | if (isset($course_info['show_score']) && |
|
1959 | $course_info['show_score'] == 1 |
|
1960 | ) { |
|
1961 | $extra_conditions .= " AND (u.user_id = ".api_get_user_id()." AND work.active IN (0, 1)) "; |
|
1962 | } else { |
|
1963 | $extra_conditions .= ' AND work.active IN (0, 1) '; |
|
1964 | } |
|
1965 | } |
|
1966 | ||
1967 | $extra_conditions .= " AND parent_id = ".$work_id." "; |
|
1968 |