Browse Source

[svn r14185] when a student browsed the directories of student publications, he saw always the full list of works (FS#2208)

Eric Marguin 17 years ago
parent
commit
ddad29d045
1 changed files with 3 additions and 2 deletions
  1. 3 2
      main/work/work.lib.php

+ 3 - 2
main/work/work.lib.php

@@ -224,15 +224,16 @@ function display_student_publications_list($work_dir,$sub_course_dir,$currentCou
 		if (!empty($_SESSION['toolgroup']))
 		{
 			$group_query = " WHERE post_group_id = '".$_SESSION['toolgroup']."' "; // set to select only messages posted by the user's group
-			$subdirs_query = "AND url NOT LIKE '$sub_course_dir%/%'";
+			$subdirs_query = "AND url NOT LIKE '$sub_course_dir%/%' AND url LIKE '$sub_course_dir%'";
 		}
 		else
 		{
 			$group_query = '';
-			$subdirs_query = "WHERE url NOT LIKE '$sub_course_dir%/%'";
+			$subdirs_query = "WHERE url NOT LIKE '$sub_course_dir%/%' AND url LIKE '$sub_course_dir%'";
 		}
 		$sql_get_publications_list =	"SELECT * FROM  $work_table $group_query $subdirs_query ORDER BY id";
 	}
+	
 	$sql_result = api_sql_query($sql_get_publications_list,__FILE__,__LINE__);
 
 	$table_header[] = array(get_lang('Title'),true);