Yannick Warnier před 14 roky
rodič
revize
8ce719150f

+ 10 - 1
main/document/document.inc.php

@@ -173,7 +173,16 @@ function create_document_link($www, $title, $path, $filetype, $size, $visibility
 		} else {
 			$force_download_html = ($size==0)?'':'<a href="'.$forcedownload_link.'" style="float:right"'.$prevent_multiple_click.'>'.Display::return_icon($forcedownload_icon, get_lang('Download'), array('height'=>'16', 'width' => '16')).'</a>';
 		}
-		return '<a href="'.$url.'" title="'.$tooltip_title_alt.'" target="'.$target.'"'.$visibility_class.' style="float:left">'.$title.'</a>'.$force_download_html;
+		//copy files to users myfiles
+		$copy_myfiles_link = ($filetype == 'file') ? api_get_self().'?'.api_get_cidreq().'&amp;action=copytomyfiles&amp;id='.$url_path.$req_gid :api_get_self().'?'.api_get_cidreq();
+		
+		if($filetype == 'file')
+		{		
+		$copy_to_myfiles='<a href="'.$copy_myfiles_link.'" style="float:right"'.$prevent_multiple_click.'>'.Display::return_icon('briefcase.png', get_lang('CopyToMyFiles'), array('height'=>'16', 'width' => '16')).'&nbsp;&nbsp;</a>';		
+		}
+		
+		return '<a href="'.$url.'" title="'.$tooltip_title_alt.'" target="'.$target.'"'.$visibility_class.' style="float:left">'.$title.'</a>'.$force_download_html.$copy_to_myfiles;
+		//end copy files to users myfiles
 	} else {
 		if(preg_match('/shared_folder/', urldecode($url)) && preg_match('/shared_folder$/', urldecode($url))==false && preg_match('/shared_folder_session_'.$current_session_id.'$/', urldecode($url))==false){
 			return '<a href="'.$url.'" title="'.$tooltip_title_alt.'" target="'.$target.'"'.$visibility_class.' style="float:left">'.build_document_icon_tag($filetype, $tooltip_title).Display::return_icon('shared.png', get_lang('ResourceShared'), array('hspace' => '5', 'align' => 'middle', 'height' => 22, 'width' => 22)).'</a>';

+ 21 - 1
main/document/document.php

@@ -299,7 +299,7 @@ if (isset($_GET['action']) && $_GET['action'] == 'download') {
 
 
 // Download a folder
-if (isset($_GET['action']) && $_GET['action'] == 'downloadfolder' && (api_get_setting('students_download_folders') == 'true' || api_is_allowed_to_edit() || api_is_platform_admin())) {
+if (isset($_GET['action']) && $_GET['action'] == 'downloadfolder' && (api_get_setting('students_copy_folders') == 'true' || api_is_allowed_to_edit() || api_is_platform_admin())) {
 	
 	//filter when I am into shared folder, I can donwload only my shared folder
 	
@@ -317,6 +317,26 @@ if (isset($_GET['action']) && $_GET['action'] == 'downloadfolder' && (api_get_se
 	
 }
 
+// Copy a file to general my files user's
+if (isset($_GET['action']) && $_GET['action'] == 'copytomyfiles' && (api_get_setting('students_copy_folders') == 'true')) {	
+	
+	$clean_get_id = Security::remove_XSS($_GET['id']);
+	$user_folder  = api_get_path(SYS_CODE_PATH).'upload/users/'.api_get_user_id().'/my_files/';
+		if (!file_exists($user_folder)) {	
+			@mkdir($user_folder, $permissions_for_new_directories, true);
+		}
+
+		$file = $sys_course_path.$_course['path'].'/document'.$clean_get_id;
+		$copyfile = $user_folder.basename($clean_get_id);
+		if (file_exists($copyfile)) {
+			//Display::display_error_message(get_lang('Overwrite. Warning already copy'));//TODO: fix message and show acept or cancel
+		}
+		if (!copy($file, $copyfile)) {
+			//Display::display_error_message(get_lang('Copy Failled'));//TODO: fix message
+		}
+}
+
+
 // Slideshow inititalisation
 $_SESSION['image_files_only'] = '';
 $image_files_only = '';

+ 59 - 45
main/exercice/exercice.php

@@ -1110,14 +1110,14 @@ if ($_configuration['tracking_enabled'] && ($show == 'result')) {
 			$exercise_where_query = 'te.exe_exo_id =ce.id AND ';
 		}
 
-			$sql="SELECT ".(api_is_western_name_order() ? "CONCAT(firstname,' ',lastname)" : "CONCAT(lastname,' ',firstname)")." as users, ce.title, te.exe_result ,
-								 te.exe_weighting, te.exe_date, te.exe_id, email, te.start_date, steps_counter,cuser.user_id,te.exe_duration
+			$sql="SELECT ".(api_is_western_name_order() ? "firstname as userpart1, lastname userpart2" : "lastname as userpart1, firstname as userpart2").", ce.title as extitle, te.exe_result as exresult ,
+								 te.exe_weighting as exweight, te.exe_date as exdate, te.exe_id as exid, email as exemail, te.start_date as exstart, steps_counter as exstep,cuser.user_id as excruid,te.exe_duration as exduration
 						  FROM $TBL_EXERCICES AS ce , $TBL_TRACK_EXERCICES AS te, $TBL_USER AS user,$tbl_course_rel_user AS cuser
 						  WHERE  user.user_id=cuser.user_id AND cuser.relation_type<>".COURSE_RELATION_TYPE_RRHH." AND te.exe_exo_id = ce.id AND te.status != 'incomplete' AND cuser.user_id=te.exe_user_id AND te.exe_cours_id='" . Database :: escape_string($_cid) . "'
 						  AND cuser.status<>1 $user_id_and $session_id_and AND ce.active <>-1 AND orig_lp_id = 0 AND orig_lp_item_id = 0
-						  AND cuser.course_code=te.exe_cours_id ORDER BY users, te.exe_cours_id ASC, ce.title ASC, te.exe_date DESC";
+						  AND cuser.course_code=te.exe_cours_id ORDER BY userpart2, te.exe_cours_id ASC, ce.title ASC, te.exe_date DESC";
 
-			$hpsql="SELECT ".(api_is_western_name_order() ? "CONCAT(tu.firstname,' ',tu.lastname)" : "CONCAT(tu.lastname,' ',tu.firstname)").", tth.exe_name,
+			$hpsql="SELECT ".(api_is_western_name_order() ? "firstname as userpart1, lastname userpart2" : "lastname as userpart1, firstname as userpart2").", tth.exe_name,
 								tth.exe_result , tth.exe_weighting, tth.exe_date
 							FROM $TBL_TRACK_HOTPOTATOES tth, $TBL_USER tu
 							WHERE  tu.user_id=tth.exe_user_id AND tth.exe_cours_id = '" . Database :: escape_string($_cid) . " $user_id_and '
@@ -1127,19 +1127,27 @@ if ($_configuration['tracking_enabled'] && ($show == 'result')) {
 		// get only this user's results
 		$user_id_and = ' AND te.exe_user_id = ' . api_get_user_id() . ' ';
 
-				$sql="SELECT ".(api_is_western_name_order() ? "CONCAT(firstname,' ',lastname)" : "CONCAT(lastname,' ',firstname)")." as users,ce.title, te.exe_result ,
-							 te.exe_weighting, te.exe_date, te.exe_id, email, te.start_date, steps_counter,cuser.user_id,te.exe_duration, ce.results_disabled
-						  FROM $TBL_EXERCICES AS ce , $TBL_TRACK_EXERCICES AS te, $TBL_USER AS user,$tbl_course_rel_user AS cuser
-						  WHERE  user.user_id=cuser.user_id AND te.exe_exo_id = ce.id AND te.status != 'incomplete' AND cuser.user_id=te.exe_user_id AND te.exe_cours_id='" . Database :: escape_string($_cid) . "'
-						  AND cuser.status<>1 AND cuser.relation_type<>".COURSE_RELATION_TYPE_RRHH." $user_id_and $session_id_and AND ce.active <>-1 AND orig_lp_id = 0 AND orig_lp_item_id = 0
-						  AND cuser.course_code=te.exe_cours_id ORDER BY users, te.exe_cours_id ASC, ce.title ASC, te.exe_date DESC";
+				$sql="SELECT ".(api_is_western_name_order() ? "firstname as userpart1, lastname userpart2" : "lastname as userpart1, firstname as userpart2").", ce.title as extitle, te.exe_result as exresult, " .
+							"te.exe_weighting as exweight, te.exe_date as exdate, te.exe_id as exid, email as exemail, " .
+							"te.start_date as exstart, steps_counter as exstep, cuser.user_id as excruid, te.exe_duration as exduration, ce.results_disabled as exdisabled
+							FROM $TBL_EXERCICES AS ce , $TBL_TRACK_EXERCICES AS te, $TBL_USER AS user,$tbl_course_rel_user AS cuser
+					WHERE  user.user_id=cuser.user_id AND te.exe_exo_id = ce.id AND te.status != 'incomplete' AND cuser.user_id=te.exe_user_id 
+                    AND te.exe_cours_id='" . Database :: escape_string($_cid) . "'
+					AND cuser.status<>1 AND cuser.relation_type<>".COURSE_RELATION_TYPE_RRHH." $user_id_and $session_id_and AND ce.active <>-1 AND" .
+					" orig_lp_id = 0 AND orig_lp_item_id = 0 AND cuser.course_code=te.exe_cours_id ORDER BY userpart2, te.exe_cours_id ASC, ce.title ASC," .
+					"te.exe_date DESC";
 
 		$hpsql = "SELECT '',exe_name, exe_result , exe_weighting, exe_date
 						FROM $TBL_TRACK_HOTPOTATOES
 						WHERE exe_user_id = '" . $_user['user_id'] . "' AND exe_cours_id = '" . Database :: escape_string($_cid) . "'
 						ORDER BY exe_cours_id ASC, exe_date DESC";
 	}
-	$results = getManyResultsXCol($sql, 12);
+	$results = array();
+	$resx = Database::query($sql);
+	while ($rowx = Database::fetch_array($resx,'ASSOC')) {
+		$results[] = $rowx;
+	}
+	//$results = getManyResultsXCol($sql, 12);
 	$hpresults = getManyResultsXCol($hpsql, 5);
 
 	$has_test_results = false;
@@ -1158,8 +1166,10 @@ if ($_configuration['tracking_enabled'] && ($show == 'result')) {
 			$from_gradebook = true;
 		}
 		$sizeof = sizeof($results);
+		
 		$user_list_id = array ();
-		$user_list_name = '';
+		$user_last_name = '';
+		$user_first_name = '';
 		$quiz_name_list = '';
 		$duration_list = '';
 		$date_list = '';
@@ -1168,7 +1178,7 @@ if ($_configuration['tracking_enabled'] && ($show == 'result')) {
 		for ($i = 0; $i < $sizeof; $i++) {
 			$revised = false;
 			$sql_exe = 'SELECT exe_id FROM ' . Database :: get_statistic_table(TABLE_STATISTIC_TRACK_E_ATTEMPT_RECORDING) . '
-									  WHERE author != ' . "''" . ' AND exe_id = ' . "'" . Database :: escape_string($results[$i][5]) . "'" . ' LIMIT 1';
+									  WHERE author != ' . "''" . ' AND exe_id = ' . "'" . Database :: escape_string($results[$i]['exid']) . "'" . ' LIMIT 1';
 			$query = Database::query($sql_exe);
 
 			if (Database :: num_rows($query) > 0) {
@@ -1181,26 +1191,27 @@ if ($_configuration['tracking_enabled'] && ($show == 'result')) {
 				continue;
 			}
 			if ($from_gradebook && ($is_allowedToEdit || $is_tutor)) {
-				if (in_array($results[$i][1] . $results[$i][0], $users_array_id)) {
+				if (in_array($results[$i]['extitle'] . $results[$i]['userpart1'] . $results[$i]['userpart2'], $users_array_id)) {
 					continue;
 				}
-				$users_array_id[] = $results[$i][1] . $results[$i][0];
+				$users_array_id[] = $results[$i]['extitle'] . $results[$i]['userpart1'] . $results[$i]['userpart2'];
 			}
 
-			$user_list_name = $results[$i][0];
-			$user_list_id[] = $results[$i][9];
-			$id = $results[$i][5];
-			$mailid = $results[$i][6];
-			$user = $results[$i][0];
-			$test = $results[$i][1];
+			$user_first_name = $results[$i]['userpart1'];
+			$user_last_name = $results[$i]['userpart2'];
+			$user_list_id[] = $results[$i]['excruid'];
+			$id = $results[$i]['exid'];
+			$mailid = $results[$i]['exemail'];
+			$user = $results[$i]['userpart1'] . $results[$i]['userpart2'];;
+			$test = $results[$i]['extitle'];
 			$quiz_name_list = $test;
-			$dt = api_convert_and_format_date($results[$i][4], null, date_default_timezone_get());
-			$res = $results[$i][2];
+			$dt = api_convert_and_format_date($results[$i]['exweight'], null, date_default_timezone_get());
+			$res = $results[$i]['exresult'];
 
-			$duration = intval($results[$i][10]);
+			$duration = intval($results[$i]['exduration']);
 			// we filter the results if we have the permission to
-			if (isset ($results[$i][11]))
-				$result_disabled = intval($results[$i][11]);
+			if (isset ($results[$i]['exdisabled']))
+				$result_disabled = intval($results[$i]['exdisabled']);
 			else
 				$result_disabled = 0;
 
@@ -1208,31 +1219,31 @@ if ($_configuration['tracking_enabled'] && ($show == 'result')) {
 				$add_start_date = $lang_nostartdate;
 
 				if ($is_allowedToEdit || $is_tutor) {
-					$user = $results[$i][0];
+					$user = $results[$i]['userpart1'] . $results[$i]['userpart2'];
 				}
-				if ($results[$i][7] != "0000-00-00 00:00:00") {
+				if ($results[$i]['exstart'] != "0000-00-00 00:00:00") {
 					//echo ceil((($results[$i][4] - $results[$i][7]) / 60)) . ' ' . get_lang('MinMinutes');
-					$exe_date_timestamp = api_strtotime($results[$i][4], date_default_timezone_get());
-					$start_date_timestamp = api_strtotime($results[$i][7], date_default_timezone_get());
+					$exe_date_timestamp = api_strtotime($results[$i]['exdate'], date_default_timezone_get());
+					$start_date_timestamp = api_strtotime($results[$i]['exstart'], date_default_timezone_get());
 					$duration_list = ceil((($exe_date_timestamp - $start_date_timestamp) / 60)) . ' ' . get_lang('MinMinutes');
-					if ($results[$i][8] > 1) {
+					if ($results[$i]['exstep'] > 1) {
 						//echo ' ( ' . $results[$i][8] . ' ' . get_lang('Steps') . ' )';
-						$duration_list = ' ( ' . $results[$i][8] . ' ' . get_lang('Steps') . ' )';
+						$duration_list = ' ( ' . $results[$i]['exstep'] . ' ' . get_lang('Steps') . ' )';
 					}
-					$add_start_date = api_convert_and_format_date($results[$i][7], null, date_default_timezone_get()) . ' / ';
+					$add_start_date = api_convert_and_format_date($results[$i]['exstart'], null, date_default_timezone_get()) . ' / ';
 				} else {
 					$duration_list = get_lang('NoLogOfDuration');
 					//echo get_lang('NoLogOfDuration');
 				}
 				// Date conversion
-				$date_list = api_get_local_time($results[$i][7], null, date_default_timezone_get()). ' / ' . api_get_local_time($results[$i][4], null, date_default_timezone_get());
+				$date_list = api_get_local_time($results[$i]['exstart'], null, date_default_timezone_get()). ' / ' . api_get_local_time($results[$i]['exdate'], null, date_default_timezone_get());
 				// there are already a duration test period calculated??
 				//echo '<td>'.sprintf(get_lang('DurationFormat'), $duration).'</td>';
 
 				// if the float look like 10.00 we show only 10
 
-				$my_res		= float_format($results[$i][2],1);
-				$my_total 	= float_format($results[$i][3],1);
+				$my_res		= float_format($results[$i]['exresult'],1);
+				$my_total 	= float_format($results[$i]['exweight'],1);
 
 				//echo '<td>' . round(($my_res / ($my_total != 0 ? $my_total : 1)) * 100, 2) . '% (' . $my_res . ' / ' . $my_total . ')</td>';
 				$result_list = round(($my_res / ($my_total != 0 ? $my_total : 1)) * 100, 2) . '% (' . $my_res . ' / ' . $my_total . ')';
@@ -1287,7 +1298,7 @@ if ($_configuration['tracking_enabled'] && ($show == 'result')) {
 				}
 				$more_details_list = $html_link;
 				if ($is_allowedToEdit || $is_tutor) {
-					$list_info [] = array($user_list_name,$quiz_name_list,$duration_list,$date_list,$result_list,$more_details_list);
+					$list_info [] = array($user_first_name,$user_last_name,$quiz_name_list,$duration_list,$date_list,$result_list,$more_details_list);
 				} else {
 					$list_info [] = array($quiz_name_list,$duration_list,$date_list,$result_list,$more_details_list);
 				}
@@ -1326,17 +1337,20 @@ if ($_configuration['tracking_enabled'] && ($show == 'result')) {
 
 		$table = new SortableTableFromArrayConfig($list_info, 1,20,'quiz_table');
 		$table->set_additional_parameters($parameters);
-		if ($is_allowedToEdit || $is_tutor) {
-			$table->set_header(0, get_lang('User'));
+		if (api_is_western_name_order()) {
+			$table->set_header(0, get_lang('FirstName'));
+			$table->set_header(1, get_lang('LastName'));
 			$secuence = 0;
 		} else {
-			$secuence = 1;
+			$table->set_header(0, get_lang('LastName'));
+			$table->set_header(1, get_lang('FirstName'));
+			$secuence = 0;
 		}
-		$table->set_header(-$secuence + 1, get_lang('Exercice'));
-		$table->set_header(-$secuence + 2, get_lang('Duration'),false);
-		$table->set_header(-$secuence + 3, get_lang('Date'));
-		$table->set_header(-$secuence + 4, get_lang('Result'),false);
-		$table->set_header(-$secuence + 5, (($is_allowedToEdit||$is_tutor) ? get_lang('CorrectTest') : get_lang('ViewTest')), false);
+		$table->set_header(-$secuence + 2, get_lang('Exercice'));
+		$table->set_header(-$secuence + 3, get_lang('Duration'),false);
+		$table->set_header(-$secuence + 4, get_lang('Date'));
+		$table->set_header(-$secuence + 5, get_lang('Result'),false);
+		$table->set_header(-$secuence + 6, (($is_allowedToEdit||$is_tutor) ? get_lang('CorrectTest') : get_lang('ViewTest')), false);
 		$table->display();
 
 	} else {

+ 59 - 39
main/exercice/exercise_result.class.php

@@ -108,15 +108,16 @@ class ExerciseResult
     	$user_id = intval($user_id);
     	$session_id_and = ' AND ce.session_id = ' . api_get_session_id() . ' ';
 		if (empty($user_id)) {
-			$sql="SELECT ".(api_is_western_name_order() ? "CONCAT(firstname,' ',lastname)" : "CONCAT(lastname,' ',firstname)").", ce.title, te.exe_result ,
-								 te.exe_weighting, te.exe_date, te.exe_id, user.email, user.user_id
+			
+			$sql="SELECT ".(api_is_western_name_order() ? "firstname as userpart1, lastname as userpart1" : "lastname as userpart1, firstname as userpart2").", ce.title as extitle, te.exe_result as exresult ,
+								 te.exe_weighting as exweight, te.exe_date as exdate, te.exe_id as exid, user.email as exemail, user.user_id as userid
 				  FROM $TBL_EXERCISES AS ce , $TBL_TRACK_EXERCISES AS te, $TBL_USER AS user,$TBL_COURSE_REL_USER AS cuser
 				  WHERE  user.user_id=cuser.user_id AND cuser.relation_type<>".COURSE_RELATION_TYPE_RRHH." AND te.exe_exo_id = ce.id AND te.status != 'incomplete' AND cuser.user_id=te.exe_user_id AND te.exe_cours_id='" . Database :: escape_string($cid) . "'
 				 	 	AND cuser.status<>1 $session_id_and AND ce.active <>-1 AND orig_lp_id = 0 AND orig_lp_item_id = 0
 				  		AND cuser.course_code=te.exe_cours_id ORDER BY te.exe_cours_id ASC, ce.title ASC, te.exe_date ASC";
 
-			$hpsql="SELECT ".(api_is_western_name_order() ? "CONCAT(tu.firstname,' ',tu.lastname)" : "CONCAT(tu.lastname,' ',tu.firstname)").", tth.exe_name,
-								tth.exe_result , tth.exe_weighting, tth.exe_date, tu.email, tu.user_id
+			$hpsql="SELECT ".(api_is_western_name_order() ? "tu.firstname as userpart1, tu.lastname as userpart2" : "tu.lastname as userpart1, tu.firstname as userpart2").", tth.exe_name as exname,
+								tth.exe_result as exresult , tth.exe_weighting as exweight, tth.exe_date as exdate, tu.email as exemail, tu.user_id as userid
 					FROM $TBL_TRACK_HOTPOTATOES tth, $TBL_USER tu
 					WHERE  tu.user_id=tth.exe_user_id AND tth.exe_cours_id = '" . Database :: escape_string($cid) . " $user_id_and '
 					ORDER BY tth.exe_cours_id ASC, tth.exe_date ASC";
@@ -124,22 +125,28 @@ class ExerciseResult
 
 		} else {
 			// get only this user's results
-			$sql="SELECT '', ce.title, te.exe_result ,
-						 te.exe_weighting, te.exe_date, te.exe_id
-					  FROM $TBL_EXERCISES AS ce , $TBL_TRACK_EXERCISES AS te, $TBL_USER AS user,$TBL_COURSE_REL_USER AS cuser
+			$sql="SELECT '', ce.title as extitle, te.exe_result as exresult ,
+						 te.exe_weighting as exweight, te.exe_date as exdate, te.exe_id as exid
+					  FROM $TBL_EXERCISES AS ce , $TBL_TRACK_EXERCISES AS te, $TBL_USER AS userpart, $TBL_COURSE_REL_USER AS cuser
 					  WHERE  user.user_id=cuser.user_id AND cuser.relation_type<>".COURSE_RELATION_TYPE_RRHH." AND te.exe_exo_id = ce.id AND te.status != 'incomplete' AND cuser.user_id=te.exe_user_id AND te.exe_cours_id='" . Database :: escape_string($cid) . "'
 					  AND cuser.status<>1 AND te.exe_user_id='".Database::escape_string($user_id)."' $session_id_and AND ce.active <>-1 AND orig_lp_id = 0 AND orig_lp_item_id = 0
 					  AND cuser.course_code=te.exe_cours_id ORDER BY te.exe_cours_id ASC, ce.title ASC, te.exe_date DESC";
 
-			$hpsql = "SELECT '',exe_name, exe_result , exe_weighting, exe_date
+			$hpsql = "SELECT '',exe_name as exname, exe_result as exresult , exe_weighting as exweight, exe_date as date
 					FROM $TBL_TRACK_HOTPOTATOES
 					WHERE exe_user_id = '" . $user_id . "' AND exe_cours_id = '" . Database :: escape_string($cid) . "'
 					ORDER BY exe_cours_id ASC, exe_date DESC";
 
 		}
 
-		$results	= getManyResultsXCol($sql,8);
-		$hpresults	= getManyResultsXCol($hpsql,7);
+		$results = array();
+		$resx = Database::query($sql);
+			while ($rowx = Database::fetch_array($resx,'ASSOC')) {
+				$results[] = $rowx;
+		}
+
+		//$results	= getManyResultsXCol($sql,9);
+		$hpresults	= getManyResultsXCol($hpsql,8);
 
 		$NoTestRes = 0;
 		$NoHPTestRes = 0;
@@ -164,7 +171,7 @@ class ExerciseResult
 
 				$revised = false;
 				$sql_exe = 'SELECT exe_id FROM ' . Database :: get_statistic_table(TABLE_STATISTIC_TRACK_E_ATTEMPT_RECORDING) . '
-							WHERE author != ' . "''" . ' AND exe_id = ' . "'" . Database :: escape_string($results[$i][5]) . "'" . ' LIMIT 1';
+							WHERE author != ' . "''" . ' AND exe_id = ' . "'" . Database :: escape_string($results[$i]['exid']) . "'" . ' LIMIT 1';
 				$query = Database::query($sql_exe);
 
 				if (Database :: num_rows($query) > 0) $revised = true;
@@ -172,20 +179,22 @@ class ExerciseResult
 				if ($filter_by_revised && !$revised) continue;
 
 				$return[$i] = array();
-				$id = $results[$i][5];
-				$mailid = $results[$i][6];
-				$user = $results[$i][0];
-				$test = $results[$i][1];
-				$res = $results[$i][2];
+				$id = $results[$i]['exid'];
+				$mailid = $results[$i]['exemail'];
+				$userlast = $results[$i]['userpart1'];
+				$userfirst = $results[$i]['userpart2'];
+				$test = $results[$i]['extitle'];
+				$res = $results[$i]['exresult'];
 				if(empty($user_id)) {
-					$user = $results[$i][0];
-					$return[$i]['user'] = $user;
-					$return[$i]['user_id'] = $results[$i][7];
+					$user = $results[$i]['userpart1'];//.$results[$i]['userpart2'];
+					$return[$i]['last_name'] = $user;
+					$return[$i]['first_name'] = $userfirst;
+					$return[$i]['user_id'] = $results[$i]['userid'];
 				}
 				$return[$i]['title'] = $test;
-				$return[$i]['time'] = api_convert_and_format_date($results[$i][4], null, date_default_timezone_get());
+				$return[$i]['time'] = api_convert_and_format_date($results[$i]['exdate'], null, date_default_timezone_get());
 				$return[$i]['result'] = $res;
-				$return[$i]['max'] = $results[$i][3];
+				$return[$i]['max'] = $results[$i]['exweight'];
 				$j=$i;
 			}
 		}
@@ -196,21 +205,20 @@ class ExerciseResult
 			for($i = 0; $i < sizeof($hpresults); $i++)
 			{
 				$return[$j+$i] = array();
-				$title = GetQuizName($hpresults[$i][1],$document_path);
+				$title = GetQuizName($hpresults[$i]['exname'],$document_path);
 				if ($title =='')
 				{
-					$title = basename($hpresults[$i][1]);
+					$title = basename($hpresults[$i]['exname']);
 				}
 				if(empty($user_id))
 				{
-					$return[$j+$i]['user'] = $hpresults[$i][0];
-					$return[$j+$i]['user_id'] = $results[$i][6];
-
+					$return[$j+$i]['user'] = $hpresults[$i]['userpart1'].$hpresults[$i]['userpart2'];
+					$return[$j+$i]['user_id'] = $results[$i]['userid'];
 				}
 				$return[$j+$i]['title'] = $title;
-				$return[$j+$i]['time'] = api_convert_and_format_date($hpresults[$i][4], null, date_default_timezone_get());
-				$return[$j+$i]['result'] = $hpresults[$i][2];
-				$return[$j+$i]['max'] = $hpresults[$i][3];
+				$return[$j+$i]['time'] = api_convert_and_format_date($hpresults[$i]['exdate'], null, date_default_timezone_get());
+				$return[$j+$i]['result'] = $hpresults[$i]['exresult'];
+				$return[$j+$i]['max'] = $hpresults[$i]['exweight'];
 			}
 		}
 		$this->results = $return;
@@ -235,9 +243,13 @@ class ExerciseResult
 		$data = '';
 		//build the results
 		//titles
-		if(!empty($this->results[0]['user']))
+		if(!empty($this->results[0]['last_name']))
+		{
+			$data .= get_lang('last_name').';';
+		}
+		if(!empty($this->results[0]['first_name']))
 		{
-			$data .= get_lang('User').';';
+			$data .= get_lang('first_name').';';
 		}
 		if($export_user_fields)
 		{
@@ -246,7 +258,7 @@ class ExerciseResult
 			$num = count($extra_user_fields);
 			foreach($extra_user_fields as $field)
 			{
-				$data .= '"'.str_replace("\r\n",'  ',api_html_entity_decode(strip_tags($field[3]), ENT_QUOTES, $charset)).'";';
+				$data .= '"'.str_replace("\r\n",'  ',api_html_entity_decode(strip_tags($field[4]), ENT_QUOTES, $charset)).'";';
 			}
 			$display_extra_user_fields = true;
 		}
@@ -258,9 +270,14 @@ class ExerciseResult
 		//results
 		foreach($this->results as $row)
 		{
-			if(!empty($row['user']))
+			if(!empty($row['last_name']))
 			{
-				$data .= str_replace("\r\n",'  ',api_html_entity_decode(strip_tags($row['user']), ENT_QUOTES, $charset)).';';
+				$data .= str_replace("\r\n",'  ',api_html_entity_decode(strip_tags($row['last_name']), ENT_QUOTES, $charset)).';';
+			}
+			
+			if(!empty($row['first_name']))
+			{
+				$data .= str_replace("\r\n",'  ',api_html_entity_decode(strip_tags($row['first_name']), ENT_QUOTES, $charset)).';';
 			}
 			if($export_user_fields)
 			{
@@ -328,17 +345,18 @@ class ExerciseResult
 		// check if exists column 'user'
 		$with_column_user = false;
 		foreach ($this->results as $result) {
-			if (!empty($result['user'])) {
+			if (!empty($result['last_name']) && !empty($result['first_name'])) {
 				$with_column_user = true;
 				break;
 			}
 		}
 
 		if($with_column_user) {
-		   	$worksheet->write($line,$column,get_lang('User'));
+		   	$worksheet->write($line,$column,get_lang('last_name'));
+				$column++;
+			$worksheet->write($line,$column,get_lang('first_name'));
 				$column++;
 		}
-
 		$export_user_fields = true;
 
 		if($export_user_fields)
@@ -363,9 +381,11 @@ class ExerciseResult
 
 		foreach($this->results as $row) {
 			$column = 0;
-			if(!empty($row['user']))
+			if(!empty($row['last_name']) && !empty($row['first_name']))
 			{
-				$worksheet->write($line,$column,api_html_entity_decode(strip_tags($row['user']), ENT_QUOTES, $charset));
+				$worksheet->write($line,$column,api_html_entity_decode(strip_tags($row['last_name']), ENT_QUOTES, $charset));
+				$column++;
+				$worksheet->write($line,$column,api_html_entity_decode(strip_tags($row['first_name']), ENT_QUOTES, $charset));
 				$column++;
 			}
 

binární
main/img/briefcase.png


+ 3 - 3
main/inc/lib/add_course.lib.inc.php

@@ -937,11 +937,10 @@ function update_Db_course($courseDbName, $language = null)
 		PRIMARY KEY (id),
 		KEY reflink (reflink),
 		KEY group_id (group_id),
-		KEY page_id (page_id)
+		KEY page_id (page_id),
+		KEY session_id (session_id)
 		)" . $charset_clause;
 	Database::query($sql);
-	$sql = "ALTER TABLE `".$TABLETOOLWIKI . "` ADD INDEX ( session_id ) ";
-	Database::query($sql);
 
 	//
 	$sql = "CREATE TABLE `".$TABLEWIKICONF . "` (
@@ -983,6 +982,7 @@ function update_Db_course($courseDbName, $language = null)
 		user_id int NOT NULL,
 		type text NOT NULL,
 		group_id int DEFAULT NULL,
+		session_id smallint default 0,
 		KEY (id)
 		)" . $charset_clause;
 	Database::query($sql);

+ 8 - 2
main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/_ajax_get_details_listing.php

@@ -80,9 +80,15 @@
                                             {
 											//add icon into ajaxfilemanager if sharedfolder is into Chamilo
 											?>
-                                            	<td  lign="center" class="fileColumns" id="tdst<?php echo $count; ?>">&nbsp;<a id="a<?php echo $count; ?>" href="<?php echo $file['path']; ?>" <?php echo $file['cssClass'] == 'filePicture'?'rel="ajaxPhotos"':''; ?>  ><span class="<?php echo ($file['file']&&$file['subdir']?$file['cssClass']:"folderShared"); ?>">&nbsp;</span></a></td>
+                                            	<td  lign="center" class="fileColumns" id="tdst<?php echo $count; ?>">&nbsp;<a id="a<?php echo $count; ?>" href="<?php echo $file['path']; ?>" <?php echo $file['cssClass'] == 'filePicture'?'rel="ajaxPhotos"':''; ?>  ><span class="<?php echo ($file['type'] == 'folder '?$file['cssClass']:"folderShared"); ?>">&nbsp;</span></a></td>
                                             <?php
-                                            }											
+                                            }
+											elseif(preg_match('/sf_user_/', basename($file['path'])))
+											{
+											?>
+											<td  lign="center" class="fileColumns" id="tdst<?php echo $count; ?>">&nbsp;<a id="a<?php echo $count; ?>" href="<?php echo $file['path']; ?>" <?php echo $file['cssClass'] == 'filePicture'?'rel="ajaxPhotos"':''; ?>  ><span class="<?php echo ($file['type'] == 'folder '?$file['cssClass']:"unknownUser"); ?>">&nbsp;</span></a></td>											
+											<?php
+											}
                                             else
 											{
 											?>

+ 9 - 3
main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/_ajax_get_thumbnail_listing.php

@@ -43,11 +43,17 @@
 			?>
 				<dl class="thumbnailListing" id="dl<?php echo $count; ?>">
                  <?php
-                 if(preg_match('/shared_folder/', basename($file['path'])))
-                 { //add icon into ajaxfilemanager if sharedfolder is in Chamilo
+				 if(preg_match('/shared_folder/', basename($file['path'])))
+				 { //add icon into ajaxfilemanager if sharedfolder is in Chamilo
                 ?>
 
-                	<dt id="dt<?php echo $count; ?>" class="<?php echo ($file['type'] == 'folder' && empty($file['file']) || empty($file['subdir'])?'folderShared':$file['cssClass']); ?>" class="<?php echo $file['cssClass']; ?>">
+                	<dt id="dt<?php echo $count; ?>" class="<?php echo ($file['type'] == 'folder' || empty($file['file']) || empty($file['subdir'])?'folderShared':$file['cssClass']); ?>" class="<?php echo $file['cssClass']; ?>">
+                <?php
+				}
+				elseif(preg_match('/sf_user_/', basename($file['path'])))
+				{				
+				?>
+                	<dt id="dt<?php echo $count; ?>" class="<?php echo ($file['type'] == 'folder' || empty($file['file']) || empty($file['subdir'])?'unknownUser':$file['cssClass']); ?>" class="<?php echo $file['cssClass']; ?>">
                 <?php
 				}
 				else

+ 14 - 11
main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/ajaxfilemanager.php

@@ -77,14 +77,18 @@
 <script type="text/javascript" src="jscripts/ajaxfileupload.js"></script>
 <script type="text/javascript" src="jscripts/ajaxfilemanager.js"></script>-->
 <script type="text/javascript">
-	// Added by Ivan Tcholakov, 22-JUL-2009.
-	// For integration with the editor's dialig system.
-	var oEditor = null ;
-	if ( !window.opener && window.parent ) {
-		// The file manager is inside a dialog.
-		oEditor = window.parent.InnerDialogLoaded() ;
+
+	var mode_editor = '<?php echo Security::remove_XSS($_GET['editor']);?>';<!-- Chamilo hack for general my files users  -->
+	if (!mode_editor){		
+		// Added by Ivan Tcholakov, 22-JUL-2009.
+		// For integration with the editor's dialig system.
+		var oEditor = null ;
+		if ( !window.opener && window.parent ) {
+			// The file manager is inside a dialog.
+			oEditor = window.parent.InnerDialogLoaded() ;
+		}
+		//end hack
 	}
-	//end hack
 	var globalSettings = {'upload_init':false};
 	var queryString = '<?php echo makeQueryString(array('path')); ?>';
 	var paths = {'root':'<?php echo addTrailingSlash(backslashToSlash(CONFIG_SYS_ROOT_PATH)); ?>', 'root_title':'<?php echo LBL_FOLDER_ROOT; ?>'};
@@ -435,7 +439,7 @@ $(document).ready(
         <p class="searchButtons" id="returnCurrentUrl">
   
         	<span class="right" id="linkSelect">
-        		<input type="button" value="<?php echo MENU_SELECT; ?>"  id="selectCurrentUrl" class="button">
+        		<input type="button" value="<?php echo MENU_SELECT; ?>"  id="selectCurrentUrl" class="select_button"><!-- Change button class by Chamilo select_button class -->
         	</span>
         	
         </p>				
@@ -514,9 +518,8 @@ $(document).ready(
                 <input type="hidden" name="search_mtime_from" id="search_mtime_from" value="<?php //echo (!empty($_GET['search_mtime_from'])?$_GET['search_mtime_from']:''); ?>" />
         		<input type="hidden" name="search_mtime_to" id="search_mtime_to" value="<?php //echo (!empty($_GET['search_mtime_to'])?$_GET['search_mtime_to']:''); ?>" />        
         	<!--</td></tr>
-
 			<tr>
-				<td>  <!-- comment these lines while integrating into Chamilo -->
+				<td>  --><!-- comment these lines while integrating into Chamilo -->
                 </td><td><!--add a col while integrating -->
           	<b><?php  // echo LBL_SEARCH_RECURSIVELY; ?></b>&nbsp;&nbsp;
 		<!--change for Chamilo recursively by default  -->
@@ -744,7 +747,7 @@ $(document).ready(
   	<ul>
   		<li><a href="#" class="contentMenuItem" id="menuSelect"><?php echo MENU_SELECT; ?></a></li>
   		<li><a href="#" class="contentMenuItem"  id="menuPreview"><?php echo MENU_PREVIEW; ?></a></li>
-  		<!--	<li><a href="#" class="contentMenuItem"  id="menuDownload"><?php echo MENU_DOWNLOAD; ?></a></li> Chamilo temporarily disable contextual menu download -->
+  		<li><a href="#" class="contentMenuItem"  id="menuDownload"><?php echo MENU_DOWNLOAD; ?></a></li>
   		<li><a href="#" class="contentMenuItem"  id="menuRename"><?php echo MENU_RENAME; ?></a></li>
   		<li><a href="#" class="contentMenuItem"  id="menuEdit"><?php echo MENU_EDIT; ?></a></li>
   		<li><a href="#" class="contentMenuItem"  id="menuCut"><?php echo MENU_CUT; ?></a></li>

+ 19 - 9
main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/jscripts/ajaxfilemanager_c.js

@@ -108,16 +108,26 @@ d=new Date();savEvtTime=d.getTime();savTO=setTimeout(function()
 {var ext=getFileExtension(path);var supportedExts=supporedPreviewExts.split(",");var isSupportedExt=false;for(i in supportedExts)
 {var typeOf=typeof(supportedExts[i]);if(typeOf.toLowerCase()=='string'&&supportedExts[i].toLowerCase()==ext.toLowerCase())
 {isSupportedExt=true;break;}}
-if(isSupportedExt)
-{switch(files[num].cssClass)
-{ case 'fileVideo':
-case 'fileMusic':
-case 'fileFlash':
-$('#playGround').html('<a id="playGround' + num + '" href="' + '../'+files[num].path + '"><div id="player">&nbsp;this is mine</div></a> '); $('#playGround' + num).html(''); $('#playGround' + num).media({ width: 255, height: 210, autoplay: true }); showThickBox($('#a' + num).get(0), appendQueryString('#TB_inline', 'height=250' + '&width=256' + '&inlineId=winPlay&modal=true')); break; //Juan Carlos Raña added for Chamilo '../'+  for preview video and flash on  href="' + '../'+files[num].path +
-default:
-showThickBox(linkElem, appendQueryString('../'+path, 'KeepThis=true&TB_iframe=true&height=' + thickbox.height + '&width=' + thickbox.width));}
+/////start hack for Chamilo
+if(isSupportedExt){
+	switch(files[num].cssClass){
+		case 'fileVideo':
+		case 'fileMusic':
+		case 'fileFlash':
+		if(mode_editor==='stand_alone'){// Juan Carlos Raña add swich for mode editor. default is fckeditor
+			$('#playGround').html('<a id="playGround' + num + '" href="' + files[num].path + '"><div id="player">&nbsp;this is mine</div></a> '); $('#playGround' + num).html(''); $('#playGround' + num).media({ width: 255, height: 210, autoplay: true }); showThickBox($('#a' + num).get(0), appendQueryString('#TB_inline', 'height=250' + '&width=256' + '&inlineId=winPlay&modal=true')); break;
+		}else{
+			$('#playGround').html('<a id="playGround' + num + '" href="' + '../'+files[num].path + '"><div id="player">&nbsp;this is mine</div></a> '); $('#playGround' + num).html(''); $('#playGround' + num).media({ width: 255, height: 210, autoplay: true }); showThickBox($('#a' + num).get(0), appendQueryString('#TB_inline', 'height=250' + '&width=256' + '&inlineId=winPlay&modal=true')); break; //Juan Carlos Raña added for Chamilo '../'+  for preview video and flash on  href="' + '../'+files[num].path +
+		}
+		default:
+		if(mode_editor==='stand_alone'){
+			showThickBox(linkElem, appendQueryString(path, 'KeepThis=true&TB_iframe=true&height=' + thickbox.height + '&width=' + thickbox.width));
+		}else{
+			showThickBox(linkElem, appendQueryString('../'+path, 'KeepThis=true&TB_iframe=true&height=' + thickbox.height + '&width=' + thickbox.width)); //Juan Carlos Raña (line above added '../'+ to line for preview and don't go to main showThickBox(linkElem, appendQueryString('../'+path, 'KeepThis=true&TB_iframe=true&height=' + thickbox.height + '&width=' + thickbox.width));
+		}
+	}
 }
-//Juan Carlos Raña (line above added '../'+ to line for preview and don't go to main showThickBox(linkElem, appendQueryString('../'+path, 'KeepThis=true&TB_iframe=true&height=' + thickbox.height + '&width=' + thickbox.width));}
+/////end hack for Chamilo
 }
 return false;},dcTime);return false;});$(this).dblclick(function()
 {var d=new Date();dcAt=d.getTime();if(savTO!=null){clearTimeout(savTO);savTO=null;}

+ 6 - 2
main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/theme/default/css/fckeditor.css

@@ -105,6 +105,7 @@ overflow-x: hidden;
 }
 .inputSearchSelect{
 	visibility:hidden;
+	max-width:160px;
 }
 .calendar_trigger{
 	background:none;
@@ -273,7 +274,7 @@ span.filePPT, span.fileExcel, span.filePhp,
 span.fileMusic, span.fileExe, span.fileAcrobat,
 span.fileRTF, span.fileXml, span.fileCode,
 span.fileZip, span.addMore, span.deleteFile,
-span.cancel,span.uploadProcessing, span.folderShared{
+span.cancel,span.uploadProcessing, span.folderShared, span.unknownUser{
 padding:2px 0 2px 16px;
 background-repeat:no-repeat;
 background-position:0 50%;
@@ -302,6 +303,7 @@ span.fileCode{background-image:url(../images/small_icon/fileCode.png);}
 span.fileZip{background-image:url(../images/small_icon/fileZip.png);}
 
 span.folderShared{background-image:url(../images/small_icon/folderShared.png);}
+span.unknownUser{background-image:url(../images/small_icon/smallunknownUser.png);}
 
 /* big icon */
 dt.folderEmpty, dt.folder, dt.folderParent,
@@ -310,7 +312,7 @@ dt.fileFlash, dt.fileVideo,
 dt.filePPT, dt.fileExcel, dt.filePhp,
 dt.fileMusic, dt.fileExe, dt.fileAcrobat,
 dt.fileRTF, dt.fileXml, dt.fileCode,
-dt.fileZip,dt.folderShared{
+dt.fileZip,dt.folderShared, dt.unknownUser{
 margin: 0px;
 padding:0px;
 border:solid #ccc 1px;
@@ -344,6 +346,8 @@ dt.fileCode{background-image:url(../images/big_icon/fileCode.png);}
 dt.fileZip{background-image:url(../images/big_icon/fileZip.png);}
 
 dt.folderShared{background-image:url(../images/big_icon/bigfolderShared.png);}
+dt.unknownUser{background-image:url(../images/big_icon/biguserUnknown.png);}
+
 
 table.tableSummary{
 border-collapse:collapse;

+ 580 - 536
main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/theme/default/css/stand_alone.css

@@ -1,536 +1,580 @@
-/*~~~~~~Global Setting ~~~~~~~~*/
-html, body{
-    margin: 0px;
-    padding: 0px;
-}
-body,td
-{
-    font: 10px Verdana, Arial, Helvetica, sans-serif;
-	color:#070707;
-}
-a,a:link,a:visited{color: #001C4D; text-decoration:none;}
-a:hover,a:active,a:visited:hover{color: #FF6131; text-decoration:none;}
-a img{border: none;}
-ul li{  line-height: 1.5em; display:inline}
-form{margin: 0;}
-#leftCol fieldset{
-	position: relative;
-	padding: 6px;
-	margin:8px;
-	border:1px solid #a1a1a1;
-	background-image: url(../images/panel_bg.gif);
-	background-repeat: repeat-y;
-	background-position: left top;
-	background-color: #d9dbdc;
-}
-#leftCol legend {
-	
-	/*
-	position: absolute;
-	top: -.5em;
-	left: .2em;*/
-	top: -5px;
-	left: 2px;
-	font-size: 11px;
-	font-weight: bold;
-	color: #000000;
-}
-ul{list-style:none;}
-.clear{
-clear:both;
-}
-input{ padding: 0; background-color: transparent;}
-/*~~~~~~Layout Setting ~~~~~~~~*/
-#leftCol, #rightCol, #body{
-
-}
-#wrapper
-{
-    margin: 0px 0px;
-	min-width:760px;
-	width:100%;
-    padding:0px;
-		
-}
-#body{
-position:absolute;
-top:60px;
-width:100%;
-border-color:#0000CC;
-}
-#leftCol{
-	background:#e8e8e8;
-	width:265px;
-	float:left;
-	text-align:left;
-	
-}
-#rightCol{
-	width:100%;
-	border: none;
-	margin-left: -265px;
-	float:right;
-	
-
-}
-#rightCol img.ajaxLoadingImg{
-margin-left: 50%;
-margin-top:100px;
-}
-#content{
-  margin-left: 265px;
-overflow: auto;
-overflow-x: hidden;	
-max-height:380px;
-}
- .pagination_content{
-  margin-left: 265px;
-overflow: auto;
-overflow-x: hidden;	  
- }
-.leftToRightArrow{
-	background-image:url(../images/arrow_right.png);
-    padding:2px 0 2px 16px;
-    background-repeat:no-repeat;
-    background-position:0 50%;
-    text-decoration:none;
-    height:100%;
-}
-/*      forms                */
-.inputMtime{width:55px; height:14px; font-size:9px;}
-.radio{
-	background-color:none;
-}
-.calendar_trigger{
-	background:none;
-	border:none;
-	height:17px;
-	vertical-align:bottom;
-}
-table.tableSearch{
-padding:0;
-margin:0;
-}
-.boxSearch{
-padding:0;
-margin:0;
-}
-.boxSearchItems{
-margin:0;
-padding:0;
-}
-.boxSearchItems td{
-text-align:left;
-margin-left:5px;
-}
-.boxSearchItems dt{
-text-align:left;
-font-size:14px;
-margin:0;
-padding:0;
-margin-left:5px;
-}
-.boxSearchItems dd{
-display:block;
-margin:0;
-padding:0;
-margin-left:20px;
-}
-.boxSearchItems dd b{
-margin:0;
-display:block;
-}
-
-#linkSearch{
-float:right;
-padding-right:8px;
-}
-.tableSearch{
-margin:0;
-}
-p.searchButtons{
-padding-top:5px;
-}
-#linkClose{
-float:left;
-
-}
-#fileName{overflow:hidden;}
-#header
-{
-	text-align:left;
-	margin:0;
-	padding:0;
-	padding-top:0px;
-	padding-left:18px;
-	padding-right:18px;
-	height:59px;
-	background-image: url(../images/header.jpg);
-	background-repeat: no-repeat;
-	background-position: right top;
-	background-color:#ececed;
-	border-bottom-width: 1px;
-	border-bottom-style: solid;
-	border-bottom-color: #b3b3b4;
-}
-
-#currentFolderInfo dl{
-	list-style:none;
-	margin:0;
-	padding:0;
-	font-size: 14px;
-	font-weight: bold;
-	color: #666666;
-	
-}
-#currentFolderInfo dt{
-	font-size:12px;
-	font-weight:bold;
-	display:inline;
-	margin:0;
-	padding:0;
-	color: #666666;
-}
-#currentFolderInfo dd{
-display:inline;
-
-}
-#currentFolderInfo dd a{
-text-decoration:underline;
-}
-#viewList{
-position:absolute;
-left:18px;
-top:36px;
-}
-#actionHeader
-{
-    list-style-type: none;
-    margin:0;
-    padding:0;
-	text-align:right;
-}
-#actionHeader li{line-height: 24px;}
-/*~~~~~~Links Setting ~~~~~~~~*/
-#actionHeader li a, #tickAll, .flagYes, .flagNo
-{
-    padding:2px 1px 2px 16px;
-    background-repeat:no-repeat;
-    background-position:0 50%;
-    text-decoration:none;
-    height:100%;
-}
-#actionInfo{background-image:url(../images/info.png);}
-.check_all{background-image:url(../images/tickAll.png);}
-.uncheck_all{background-image:url(../images/uncheckAll.png);}
-.flagYes{background-image:url(../images/flagYes.png);}
-.flagNo{background-image:url(../images/flagno.png);}
-#actionCopy{background-image:url(../images/copy.png);}
-#actionPaste{background-image:url(../images/paste.png);}
-#actionCut{background-image:url(../images/cut.png);}
-#actionDelete{background-image:url(../images/delete.png);}
-#actionZip{background-image:url(../images/zip.png);}
-#actionRefresh{background-image:url(../images/refresh.png);}
-#actionUnzip{background-image:url(../images/unzip.png);}
-#actionUnzip{background-image:url(../images/unzip.png);}
-#actionUpload{background-image:url(../images/action/upload.png);}
-#actionNewFolder{background-image:url(../images/action/folder_add.png);}
-#actionNewFile{background-image:url(../images/action/page_add.png);}
-#tickAll{margin-left:5px;}
-a.action{
-text-decoration:none;};
-
-/*~~~~~~File / Folder Icon ~~~~~~~~*/
-.noFlag{
-background-image:none;
-
-}
-.cutFlag, .copyFlag{
-    /*padding:2px 0 2px 7px;*/
-		width:7px;
-		height:7px;
-    background-repeat:no-repeat;
-		background-position:0 0px;
-		overflow:hidden;
-    text-decoration:none;
-    height:100%;
-}
-.cutFlag{
-background-image:url(../images/cut_flag.gif);
-}
-.copyFlag{
-background-image:url(../images/copy_flag.gif);
-}
-span.folderEmpty, span.folder, span.folderParent,
-span.fileUnknown, span.fileText, span.fileWord,
-span.fileFlash, span.fileVideo, span.filePicture,
-span.filePPT, span.fileExcel, span.filePhp,
-span.fileMusic, span.fileExe, span.fileAcrobat,
-span.fileRTF, span.fileXml, span.fileCode,
-span.fileZip, span.addMore, span.deleteFile,
-span.cancel,span.uploadProcessing{
-padding:2px 0 2px 16px;
-background-repeat:no-repeat;
-background-position:0 50%;
-}
-span.uploadProcessing{background-image:url(../images/uploadProcessing.gif);}
-span.deleteFile,span.cancel{background-image:url(../images/flagno.png);}
-span.addMore{background-image:url(../images/add.png);}
-span.folderEmpty{background-image:url(../images/small_icon/folderEmpty.png);}
-span.folder{background-image:url(../images/small_icon/folder.png);}
-span.folderParent{background-image:url(../images/small_icon/folderParent.png);}
-span.fileUnknown{background-image:url(../images/small_icon/fileUnknown.png);}
-span.fileText{background-image:url(../images/small_icon/fileText.png);}
-span.fileWord{background-image:url(../images/small_icon/fileWord.png);}
-span.fileFlash{background-image:url(../images/small_icon/fileFlash.png);}
-span.fileVideo{background-image:url(../images/small_icon/fileVideo.png);}
-span.filePicture{background-image:url(../images/small_icon/filePicture.png);}
-span.filePPT{background-image:url(../images/small_icon/filePowerpoint.png);}
-span.fileExcel{background-image:url(../images/small_icon/fileExcel.png);}
-span.filePhp{background-image:url(../images/small_icon/filePhp.png);}
-span.fileMusic{background-image:url(../images/small_icon/fileMusic.png);}
-span.fileExe{background-image:url(../images/small_icon/fileExe.png);}
-span.fileAcrobat{background-image:url(../images/small_icon/fileAcrobat.png);}
-span.fileRTF{background-image:url(../images/small_icon/fileRTF.png);}
-span.fileXml{background-image:url(../images/small_icon/fileXml.png);}
-span.fileCode{background-image:url(../images/small_icon/fileCode.png);}
-span.fileZip{background-image:url(../images/small_icon/fileZip.png);}
-/* big icon */
-dt.folderEmpty, dt.folder, dt.folderParent,
-dt.fileUnknown, dt.fileText, dt.fileWord,
-dt.fileFlash, dt.fileVideo,
-dt.filePPT, dt.fileExcel, dt.filePhp,
-dt.fileMusic, dt.fileExe, dt.fileAcrobat,
-dt.fileRTF, dt.fileXml, dt.fileCode,
-dt.fileZip{
-margin: 0px;
-padding:0px;
-border:solid #ccc 1px;
-display:block;
-background-color:#ffffff;
-background-repeat:no-repeat;
-background-position:center;
-cursor:pointer;
-}
-
-
-dt.folderEmpty{background-image:url(../images/big_icon/folderEmpty.png);}
-dt.folder{background-image:url(../images/big_icon/folder.png);
-}
-dt.folderParent{background-image:url(../images/big_icon/folderParent.png);}
-dt.fileUnknown{background-image:url(../images/big_icon/fileUnknown.png);}
-dt.fileText{background-image:url(../images/big_icon/fileText.png);}
-dt.fileWord{background-image:url(../images/big_icon/fileWord.png);}
-dt.fileFlash{background-image:url(../images/big_icon/fileFlash.png);}
-dt.fileVideo{background-image:url(../images/big_icon/fileVideo.png);}
-
-dt.filePPT{background-image:url(../images/big_icon/filePowerpoint.png);}
-dt.fileExcel{background-image:url(../images/big_icon/fileExcel.png);}
-dt.filePhp{background-image:url(../images/big_icon/filePhp.png);}
-dt.fileMusic{background-image:url(../images/big_icon/fileMusic.png);}
-dt.fileExe{background-image:url(../images/big_icon/fileExe.png);}
-dt.fileAcrobat{background-image:url(../images/big_icon/fileAcrobat.png);}
-dt.fileRTF{background-image:url(../images/big_icon/fileRTF.png);}
-dt.fileXml{background-image:url(../images/big_icon/fileXml.png);}
-dt.fileCode{background-image:url(../images/big_icon/fileCode.png);}
-dt.fileZip{background-image:url(../images/big_icon/fileZip.png);}
-
-table.tableSummary{
-border-collapse:collapse;
-width:100%;
-}
-table.tableSummary tbody td
-{
-	border:none;
-	padding:2px 6px;
-	text-align:left;
-}
-table.tableSummary tbody th{
-	border:none;
-	color:#000;
-	white-space:nowrap;
-	padding:1px 6px ;
-	text-align:left;
-}
-
-/*  text listing*/
-#textListing{
-list-style:none;
-}
-#textListing li{
-width:150px;
-border:solid #999999 1px;
-display:block;
-float:left;
-margin: 4px 4px;
-padding:2px 2px;
-}
-/** thumbnail listing */
-.thumbnailListing{
-border:solid #ccc 1px;
-display:block;
-float:left;
-margin: 3px 3px;
-padding:1px;
-background-color:#f4f4f4;
-}
-.thumbnailListing dt{
-width:120px;
-height:110px;
-text-align:center;
-margin:2px 2px;
-padding:0;
-border:solid #ccc 1px;
-}
-
-.thumbnailListing dt img{
-vertical-align:middle;
-}
-.thumbnailListing_info{
-width:125px;
-display:block;
-height:25px;
-text-align:center;
-margin:0px;
-}
-dd.thumbnailListing_info span, dd.thumbnailListing_info input, dd.thumbnailListing_info a{
-vertical-align:middle;
-}
-/* ~~~ === PAGINATION ===================================================== ~~~ */
-.pagination_summany
-{
-    font-weight: bold;
-}
-p.pagination{
-	clear: both;
-	margin:0;
-	padding:5px;
-	width:100%;
-	background-color:#e6e6e6;
-	border-bottom-width: 1px;
-	border-bottom-style: solid;
-	border-bottom-color: #FFFFFF;
-}
-#pagination_parent_link
-{
-    background: url(../images/go_parent.png) no-repeat 100% 50%;
-    padding: 2px 6px 2px 10px;
-}
-a.pagination_first,
-a.pagination_previous,
-a.pagination_next,
-a.pagination_last,
-a.pagination_group
-{
-    background: url(../images/pagination/pagination_left.gif) no-repeat 0 50%;
-    text-decoration: none;
-    padding: 2px 0 2px 6px;
-    font-size: 11px;
-}
-a.pagination_first span,
-a.pagination_previous span,
-a.pagination_next span,
-a.pagination_last span,
-a.pagination_group span
-{
-    background: url(../images/pagination/pagination_right.gif) no-repeat 100% 50%;
-    padding: 2px 6px 2px 0;
-}
-a.pagination_first:hover,
-a.pagination_previous:hover,
-a.pagination_next:hover,
-a.pagination_last:hover,
-a.pagination_group:hover{color: #FF9900;}
-a.pagination_active{font-weight: bold; color: #CC0000;}
-
-/*~~~~~~Form Setting ~~~~~~~~*/
-.input, .inputFile{
-    border: 1px solid #86888B;
-	font: 12px Verdana, Arial, Helvetica, sans-serif;
-	background-color: #fff;
-}
-
-.button{
-	font: bold 10px Verdana, Arial, Helvetica, sans-serif;
-	background:url(../images/button.gif);
-	width:90px;
-	height:20px;
-	border:none;
-}
-
-/**  Detail View */
-#tableList{
-font-size:100%;
-width:100%; 
-}
-#tableList thead th{
-	text-align:left;
-	color:#7a92c2;
-	padding:8px 8px 6px 8px;
-	background-color: #DDDBD2;
-} 
-#tableList thead th.docName{
-	background:#DDDBD2; 
-	padding:2px 0px 2px 20px;
-	border-right-width: 2px;	
-	border-right-style: groove;
-} 
-#tableList tbody td		{ background:#f2f1ee; padding:0; }
-#tableList tbody td.docName	{ 
-	background-color:#fff; 
-	height: 22px; 
-	border-right-width: 2px;
-	border-right-style: groove;
-	padding:2px 0px 2px 20px;
-}
-#tableList tbody td.docInfo{ 
-	background-color:#f2f1ee; 
-	height: 22px; 
-	border-right-width: 2px;
-	border-right-style: groove;
-	padding:2px 0px 2px 20px;
-}
-.fileColumns{
-	border-right-width: 2px;
-	border-right-style: groove;
-}
-/*thinkbox*/
-.jqmContainer{
-
-
-}
-
-.jqmHeader{
-
-height:15px;
-}
-.jqmHeader a{
-float:right;
-margin-right:10px;
-margin-top:-5px;
-}
-.jqmBody table thead th{
-font-size:16px;
-font-weight:bold;
-text-align:center;
-padding: 5px 5px;
-}
-.jqmBody table tbody th{
-text-align:right;
-padding: 2px 10px;
-}
-
-.jqmBody{
-
-	border:1px solid #a1a1a1;
-	background-image: url(../images/panel_bg.gif);
-	background-repeat: repeat-y;
-	background-position: left top;
-	background-color: #d9dbdc;
-
-}
-
-/*~~~~~~Global Low Priority Setting ~~~~~~~~*/
-.left, td.left, th.left, td.leftDisabled{text-align:left;}
-.right, td.right, th.right{text-align:right;}
-.center, td.center, th.center{text-align:center;}
+/*~~~~~~ Hack for Chamilo ~~~~~~~~*/
+/*~~~~~~Global Setting ~~~~~~~~*/
+html, body{
+    margin: 0px;
+    padding: 0px;
+}
+body,td
+{
+    font: 10px Verdana, Arial, Helvetica, sans-serif;
+	color:#070707;
+}
+a,a:link,a:visited{color: #001C4D; text-decoration:none;}
+a:hover,a:active,a:visited:hover{color: #FF6131; text-decoration:none;}
+a img{border: none;}
+ul li{  line-height: 1.5em; display:inline}
+form{margin: 0;}
+#leftCol fieldset{
+	position: relative;
+	padding: 6px;
+	margin:8px;
+	border:1px solid #a1a1a1;
+	background-image: url(../images/panel_bg.gif);
+	background-repeat: repeat-y;
+	background-position: left top;
+	background-color: #d9dbdc;
+}
+#leftCol legend {
+
+	/*
+	position: absolute;
+	top: -.5em;
+	left: .2em;*/
+	top: -5px;
+	left: 2px;
+	font-size: 11px;
+	font-weight: bold;
+	color: #000000;
+}
+ul{list-style:none;}
+.clear{
+clear:both;
+}
+input{ padding: 0; background-color: transparent;}
+/*~~~~~~Layout Setting ~~~~~~~~*/
+#leftCol, #rightCol, #body{
+
+}
+#wrapper
+{
+    margin: 0px 0px;	
+	min-width:760px;
+	width:100%;
+    padding:0px;
+
+}
+#body{
+position:absolute;
+top:60px;
+width:100%;
+border-color:#0000CC;
+margin-top:15px;
+}
+#leftCol{
+	background:#e8e8e8;
+	width:200px;
+	float:left;
+	text-align:left;
+
+}
+#rightCol{
+	width:100%;
+	border: none;
+	margin-left: -200px;
+	float:right;
+
+
+}
+#rightCol img.ajaxLoadingImg{
+margin-left: 50%;
+margin-top:100px;
+}
+#content{
+margin-left: 200px;
+overflow: auto;
+overflow-x: hidden;
+max-height:380px;
+}
+ .pagination_content{
+  margin-left: 200px;
+overflow: auto;
+overflow-x: hidden;
+ }
+.leftToRightArrow{
+	background-image:url(../images/arrow_right.png);
+    padding:2px 0 2px 16px;
+    background-repeat:no-repeat;
+    background-position:0 50%;
+    text-decoration:none;
+    height:100%;
+}
+/*      forms                */
+.inputMtime{width:75px; height:14px; font-size:9px;}
+.radio{
+	background-color:none;
+}
+.inputSearchSelect{
+	visibility:hidden;
+	max-width:160px;
+}
+.calendar_trigger{
+	background:none;
+	border:none;
+	height:17px;
+	vertical-align:bottom;
+}
+table.tableSearch{
+padding:0;
+margin:0;
+}
+.boxSearch{
+padding:0;
+margin:0;
+}
+.boxSearchItems{
+margin:0;
+padding:0;
+}
+.boxSearchItems td{
+text-align:left;
+margin-left:5px;
+}
+.boxSearchItems dt{
+text-align:left;
+font-size:14px;
+margin:0;
+padding:0;
+margin-left:5px;
+}
+.boxSearchItems dd{
+display:block;
+margin:0;
+padding:0;
+margin-left:20px;
+}
+.boxSearchItems dd b{
+margin:0;
+display:block;
+}
+
+#linkSearch{
+float:right;
+padding-right:8px;
+}
+.tableSearch{
+margin:0;
+}
+p.searchButtons{
+padding-top:5px;
+}
+#linkClose{
+float:left;
+
+}
+#fileName{overflow:hidden;}
+#header
+{
+	text-align:left;
+	margin:0;
+	padding:0;
+	padding-top:0px;
+	padding-left:18px;
+	padding-right:18px;
+	height:59px;
+	background-image: url(../images/header.jpg);
+	background-repeat: no-repeat;
+	background-position: right top;
+	background-color:#ececed;
+	border-bottom-width: 1px;
+	border-bottom-style: solid;
+	border-bottom-color: #b3b3b4;
+	cursor: default;
+}
+
+#currentFolderInfo dl{
+	list-style:none;
+	margin:0;
+	padding:0;
+	font-size: 14px;
+	font-weight: bold;
+	color: #666666;
+}
+#currentFolderInfo dt{
+	font-size:12px;
+	font-weight:bold;
+	display:inline;
+	margin:0;
+	padding:0;
+	color: #666666;
+}
+#currentFolderInfo dd{
+display:inline;
+
+}
+#currentFolderInfo dd a{
+text-decoration:underline;
+}
+#viewList{
+position:absolute;
+left:18px;
+top:36px;
+}
+#actionHeader
+{
+    list-style-type: none;
+    margin:0;
+    padding:0;
+	text-align:right;
+}
+#actionHeader li{line-height: 24px;}
+/*~~~~~~Links Setting ~~~~~~~~*/
+#actionHeader li a, #tickAll, .flagYes, .flagNo
+{
+    padding:2px 1px 2px 16px;
+    background-repeat:no-repeat;
+    background-position:0 50%;
+    text-decoration:none;
+    height:100%;
+}
+#actionInfo{background-image:url(../images/info.png);}
+.check_all{background-image:url(../images/tickAll.png);}
+.uncheck_all{background-image:url(../images/uncheckAll.png);}
+.flagYes{background-image:url(../images/flagYes.png);}
+.flagNo{background-image:url(../images/flagno.png);}
+#actionCopy{background-image:url(../images/copy.png);}
+#actionPaste{background-image:url(../images/paste.png);}
+#actionCut{background-image:url(../images/cut.png);}
+#actionDelete{background-image:url(../images/delete.png);}
+#actionZip{background-image:url(../images/zip.png);}
+#actionRefresh{background-image:url(../images/refresh.png);}
+#actionUnzip{background-image:url(../images/unzip.png);}
+#actionUnzip{background-image:url(../images/unzip.png);}
+#actionUpload{background-image:url(../images/action/upload.png);}
+#actionNewFolder{background-image:url(../images/action/folder_add.png);}
+#actionNewFile{background-image:url(../images/action/page_add.png);}
+#tickAll{margin-left:5px;}
+a.action{
+text-decoration:none;};
+
+/*~~~~~~File / Folder Icon ~~~~~~~~*/
+.noFlag{
+background-image:none;
+
+}
+.cutFlag, .copyFlag{
+    /*padding:2px 0 2px 7px;*/
+		width:7px;
+		height:7px;
+    background-repeat:no-repeat;
+		background-position:0 0px;
+		overflow:hidden;
+    text-decoration:none;
+    height:100%;
+}
+.cutFlag{
+background-image:url(../images/cut_flag.gif);
+}
+.copyFlag{
+background-image:url(../images/copy_flag.gif);
+}
+span.folderEmpty, span.folder, span.folderParent,
+span.fileUnknown, span.fileText, span.fileWord,
+span.fileFlash, span.fileVideo, span.filePicture,
+span.filePPT, span.fileExcel, span.filePhp,
+span.fileMusic, span.fileExe, span.fileAcrobat,
+span.fileRTF, span.fileXml, span.fileCode,
+span.fileZip, span.addMore, span.deleteFile,
+span.cancel,span.uploadProcessing, span.folderShared, span.unknownUser{
+padding:2px 0 2px 16px;
+background-repeat:no-repeat;
+background-position:0 50%;
+}
+span.uploadProcessing{background-image:url(../images/uploadProcessing.gif);}
+span.deleteFile,span.cancel{background-image:url(../images/flagno.png);}
+span.addMore{background-image:url(../images/add.png);}
+span.folderEmpty{background-image:url(../images/small_icon/folderEmpty.png);}
+span.folder{background-image:url(../images/small_icon/folder.png);}
+span.folderParent{background-image:url(../images/small_icon/folderParent.png);}
+span.fileUnknown{background-image:url(../images/small_icon/fileUnknown.png);}
+span.fileText{background-image:url(../images/small_icon/fileText.png);}
+span.fileWord{background-image:url(../images/small_icon/fileWord.png);}
+span.fileFlash{background-image:url(../images/small_icon/fileFlash.png);}
+span.fileVideo{background-image:url(../images/small_icon/fileVideo.png);}
+span.filePicture{background-image:url(../images/small_icon/filePicture.png);}
+span.filePPT{background-image:url(../images/small_icon/filePowerpoint.png);}
+span.fileExcel{background-image:url(../images/small_icon/fileExcel.png);}
+span.filePhp{background-image:url(../images/small_icon/filePhp.png);}
+span.fileMusic{background-image:url(../images/small_icon/fileMusic.png);}
+span.fileExe{background-image:url(../images/small_icon/fileExe.png);}
+span.fileAcrobat{background-image:url(../images/small_icon/fileAcrobat.png);}
+span.fileRTF{background-image:url(../images/small_icon/fileRTF.png);}
+span.fileXml{background-image:url(../images/small_icon/fileXml.png);}
+span.fileCode{background-image:url(../images/small_icon/fileCode.png);}
+span.fileZip{background-image:url(../images/small_icon/fileZip.png);}
+
+span.folderShared{background-image:url(../images/small_icon/folderShared.png);}
+span.unknownUser{background-image:url(../images/small_icon/smallunknownUser.png);}
+
+/* big icon */
+dt.folderEmpty, dt.folder, dt.folderParent,
+dt.fileUnknown, dt.fileText, dt.fileWord,
+dt.fileFlash, dt.fileVideo,
+dt.filePPT, dt.fileExcel, dt.filePhp,
+dt.fileMusic, dt.fileExe, dt.fileAcrobat,
+dt.fileRTF, dt.fileXml, dt.fileCode,
+dt.fileZip,dt.folderShared, dt.unknownUser{
+margin: 0px;
+padding:0px;
+border:solid #ccc 1px;
+display:block;
+background-color:#ffffff;
+background-repeat:no-repeat;
+background-position:center;
+cursor:pointer;
+}
+
+
+dt.folderEmpty{background-image:url(../images/big_icon/folderEmpty.png);}
+dt.folder{background-image:url(../images/big_icon/folder.png);
+}
+dt.folderParent{background-image:url(../images/big_icon/folderParent.png);}
+dt.fileUnknown{background-image:url(../images/big_icon/fileUnknown.png);}
+dt.fileText{background-image:url(../images/big_icon/fileText.png);}
+dt.fileWord{background-image:url(../images/big_icon/fileWord.png);}
+dt.fileFlash{background-image:url(../images/big_icon/fileFlash.png);}
+dt.fileVideo{background-image:url(../images/big_icon/fileVideo.png);}
+
+dt.filePPT{background-image:url(../images/big_icon/filePowerpoint.png);}
+dt.fileExcel{background-image:url(../images/big_icon/fileExcel.png);}
+dt.filePhp{background-image:url(../images/big_icon/filePhp.png);}
+dt.fileMusic{background-image:url(../images/big_icon/fileMusic.png);}
+dt.fileExe{background-image:url(../images/big_icon/fileExe.png);}
+dt.fileAcrobat{background-image:url(../images/big_icon/fileAcrobat.png);}
+dt.fileRTF{background-image:url(../images/big_icon/fileRTF.png);}
+dt.fileXml{background-image:url(../images/big_icon/fileXml.png);}
+dt.fileCode{background-image:url(../images/big_icon/fileCode.png);}
+dt.fileZip{background-image:url(../images/big_icon/fileZip.png);}
+
+dt.folderShared{background-image:url(../images/big_icon/bigfolderShared.png);}
+dt.unknownUser{background-image:url(../images/big_icon/biguserUnknown.png);}
+
+
+table.tableSummary{
+border-collapse:collapse;
+width:100%;
+}
+table.tableSummary tbody td
+{
+	border:none;
+	padding:2px 6px;
+	text-align:left;
+}
+table.tableSummary tbody th{
+	border:none;
+	color:#000;
+	white-space:nowrap;
+	padding:1px 6px ;
+	text-align:left;
+}
+
+/*  text listing*/
+#textListing{
+list-style:none;
+}
+#textListing li{
+width:150px;
+border:solid #999999 1px;
+display:block;
+float:left;
+margin: 4px 4px;
+padding:2px 2px;
+}
+/** thumbnail listing */
+.thumbnailListing{
+border:solid #ccc 1px;
+display:block;
+float:left;
+margin: 3px 3px;
+padding:1px;
+background-color:#f4f4f4;
+}
+.thumbnailListing dt{
+width:120px;
+height:110px;
+text-align:center;
+margin:2px 2px;
+padding:0;
+border:solid #ccc 1px;
+}
+
+.thumbnailListing dt img{
+vertical-align:middle;
+}
+.thumbnailListing_info{
+width:125px;
+display:block;
+height:25px;
+text-align:center;
+margin:0px;
+}
+dd.thumbnailListing_info span, dd.thumbnailListing_info input, dd.thumbnailListing_info a{
+vertical-align:middle;
+}
+/* ~~~ === PAGINATION ===================================================== ~~~ */
+.pagination_summany
+{
+    font-weight: bold;
+}
+p.pagination{
+	clear: both;
+	margin:0;
+	padding:5px;
+	width:100%;
+	background-color:#e6e6e6;
+	border-bottom-width: 1px;
+	border-bottom-style: solid;
+	border-bottom-color: #FFFFFF;
+}
+
+#pagination_parent_link
+{
+    background: url(../images/go_parent.png) no-repeat 100% 50%;
+    padding: 2px 30px 2px 370px;	
+}
+a.pagination_first,
+a.pagination_previous,
+a.pagination_next,
+a.pagination_last,
+a.pagination_group
+{
+    background: url(../images/pagination/pagination_left.gif) no-repeat 0 50%;
+    text-decoration: none;
+    padding: 2px 0 2px 6px;
+    font-size: 11px;
+}
+a.pagination_first span,
+a.pagination_previous span,
+a.pagination_next span,
+a.pagination_last span,
+a.pagination_group span
+{
+    background: url(../images/pagination/pagination_right.gif) no-repeat 100% 50%;
+    padding: 2px 6px 2px 0;
+}
+a.pagination_first:hover,
+a.pagination_previous:hover,
+a.pagination_next:hover,
+a.pagination_last:hover,
+a.pagination_group:hover{color: #FF9900;}
+a.pagination_active{font-weight: bold; color: #CC0000;}
+
+/*~~~~~~Form Setting ~~~~~~~~*/
+.input, .inputFile{
+    border: 1px solid #86888B;
+	font: 12px Verdana, Arial, Helvetica, sans-serif;
+	background-color: #fff;
+}
+
+.button{
+	border:1px solid #4171b5;
+	background:#F0F0F0;
+	padding:5px 15px 5px 15px;
+	font-weight:bold;
+	color:#4171b5;
+	margin: 5px;
+}
+
+.select_button{
+	visibility:hidden;
+}
+
+.search_button{
+	font-family: bold arial, verdana, helvetica, sans-serif;
+	font-size: 100%;
+	line-height :130%;
+	text-decoration: none;
+	color: black;
+	cursor: pointer;
+	padding:5px 15px 5px 15px;
+	vertical-align:middle;
+	border:1px solid #4171b5;
+	background:#F0F0F0;
+	padding-left:30px;
+	padding-right:10px;
+	font-weight:bold;
+	color:#4171b5;
+	background: url(../images/button_search.gif);
+	background-position:10px;
+	background-repeat:no-repeat;
+
+}
+
+.search_folder{ 
+visibility:hidden;	
+}
+/**  Detail View */
+#tableList{
+font-size:100%;
+width:100%;
+}
+#tableList thead th{
+	text-align:left;
+	color:#7a92c2;
+	padding:8px 8px 6px 8px;
+	background-color: #DDDBD2;
+}
+#tableList thead th.docName{
+	background:#DDDBD2;
+	padding:2px 0px 2px 20px;
+	border-right-width: 2px;
+	border-right-style: groove;
+}
+#tableList tbody td		{ background:#f2f1ee; padding:0; }
+#tableList tbody td.docName	{
+	background-color:#fff;
+	height: 22px;
+	border-right-width: 2px;
+	border-right-style: groove;
+	padding:2px 0px 2px 20px;
+}
+#tableList tbody td.docInfo{
+	background-color:#f2f1ee;
+	height: 22px;
+	border-right-width: 2px;
+	border-right-style: groove;
+	padding:2px 0px 2px 20px;
+}
+.fileColumns{
+	border-right-width: 2px;
+	border-right-style: groove;
+}
+/*thinkbox*/
+.jqmContainer{
+
+
+}
+
+.jqmHeader{
+
+height:15px;
+}
+.jqmHeader a{
+float:right;
+margin-right:10px;
+margin-top:-5px;
+}
+.jqmBody table thead th{
+font-size:16px;
+font-weight:bold;
+text-align:center;
+padding: 5px 5px;
+}
+.jqmBody table tbody th{
+text-align:right;
+padding: 2px 10px;
+}
+
+.jqmBody{
+
+	border:1px solid #a1a1a1;
+	background-image: url(../images/panel_bg.gif);
+	background-repeat: repeat-y;
+	background-position: left top;
+	background-color: #d9dbdc;
+
+}
+
+/*~~~~~~Global Low Priority Setting ~~~~~~~~*/
+.left, td.left, th.left, td.leftDisabled{text-align:left;}
+.right, td.right, th.right{text-align:right;}
+.center, td.center, th.center{text-align:center;}

binární
main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/theme/default/images/big_icon/biguserUnknown.png


binární
main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/theme/default/images/small_icon/smallunknownUser.png


+ 2 - 1
main/inc/lib/internationalization_database/name_order_conventions.php

@@ -83,7 +83,8 @@ return array(
 	'slovak' =>           array(  'format' => 'title first_name last_name',  'sort_by' => 'first_name'  ),
 	'slovenian' =>        array(  'format' => 'title first_name last_name',  'sort_by' => 'first_name'  ),
 
-	'spanish' =>          array(  'format' => 'title first_name last_name',  'sort_by' => 'last_name'  ),
+	//'spanish' =>          array(  'format' => 'title first_name last_name',  'sort_by' => 'last_name'  ),
+	'spanish' =>          array(  'format' => 'title last_name first_name',  'sort_by' => 'last_name'  ),
 	// Some experimental settings for Spanish language:
 	//'spanish' =>          array(  'format' => 'title first_name LAST_NAME',  'sort_by' => 'first_name'  ), // Western order, last name is uppercase when a full name is assembled
 	//'spanish' =>          array(  'format' => 'title first_name LAST_NAME',  'sort_by' => 'last_name'   ), // Western order, last name is uppercase when a full name is assembled

+ 12 - 4
main/inc/lib/social.lib.php

@@ -656,18 +656,26 @@ class SocialManager extends UserManager {
 
 	        //Invitations
 	        echo '<li><a href="'.api_get_path(WEB_PATH).'main/social/invitations.php">'.Display::return_icon('invitation.png',get_lang('Invitations'),array('hspace'=>'6')).'<span class="'.($show=='invitations'?'social-menu-text-active':'social-menu-text4').'" >'.get_lang('Invitations').$total_invitations.'</span></a></li>';
+			
+			//Shared profile
 	        echo '<li><a href="'.api_get_path(WEB_PATH).'main/social/profile.php">'.Display::return_icon('my_shared_profile.png',get_lang('ViewMySharedProfile'),array('hspace'=>'6')).'<span class="'.($show=='shared_profile'?'social-menu-text-active':'social-menu-text4').'" >'.get_lang('ViewMySharedProfile').'</span></a></li>
 	        	  <li><a href="'.api_get_path(WEB_PATH).'main/social/friends.php">'.Display::return_icon('friend.png',get_lang('Friends'),array('hspace'=>'6')).'<span class="'.($show=='friends'?'social-menu-text-active':'social-menu-text4').'" >'.get_lang('Friends').'</span></a></li>
 	              <li><a href="'.api_get_path(WEB_PATH).'main/social/groups.php">'.Display::return_icon('group.png',get_lang('Groups'),array('hspace'=>'6')).'<span class="'.($show=='groups'?'social-menu-text-active':'social-menu-text4').'" >'.get_lang('Groups').'</span></a></li>';
-
+			
+			//Show groups
 	        if (in_array($show,$show_groups)) {
 					echo '<li><ul>';
 						echo $create_group_item;
 						echo '<li class="social-menu-sub-level" style="background:none;padding:0px"><a href="'.api_get_path(WEB_PATH).'main/social/groups.php?view=mygroups">'.Display::return_icon('group.png',get_lang('MyGroups'),array('hspace'=>'6')).'<span class="'.($show=='mygroups'?'social-menu-text-active':'social-menu-text4').'" >'.get_lang('MyGroups').'</span></a></li>';
 					echo '</ul></li>';
 			}
-	        echo '<li><a href="'.api_get_path(WEB_PATH).'main/social/search.php">'.Display::return_icon('zoom.png',get_lang('Search'),array('hspace'=>'6')).'<span class="'.($show=='search'?'social-menu-text-active':'social-menu-text4').'" >'.get_lang('Search').'</span></a></li>
-	        	  </ul>
+			
+			//Search users and groups
+	        echo '<li><a href="'.api_get_path(WEB_PATH).'main/social/search.php">'.Display::return_icon('zoom.png',get_lang('Search'),array('hspace'=>'6')).'<span class="'.($show=='search'?'social-menu-text-active':'social-menu-text4').'" >'.get_lang('Search').'</span></a></li>';
+			
+			//My files
+			 echo '<li><a href="'.api_get_path(WEB_PATH).'main/social/myfiles.php">'.Display::return_icon('briefcase.png',get_lang('MyFiles'),array('hspace'=>'6')).'<span class="'.($show=='myfiles'?'social-menu-text-active':'social-menu-text4').'" >'.get_lang('MyFiles').'</span></a></li>';	
+	        echo'</ul>
 				  </div>';
 
 	        if (in_array($show, $show_groups) && !empty($group_id)) {
@@ -690,7 +698,7 @@ class SocialManager extends UserManager {
 	        	echo	'<li><a href="'.api_get_path(WEB_PATH).'main/social/profile.php">'.Display::return_icon('my_shared_profile.png',get_lang('ViewMySharedProfile'),array('hspace'=>'6','style'=>'float:left')).'<span class="social-menu-text-active" >'.get_lang('ViewMySharedProfile').'</span></a></li>
 	        			 <li><a href="'.api_get_path(WEB_PATH).'main/social/friends.php">'.Display::return_icon('friend.png',get_lang('Friends'),array('hspace'=>'6')).'<span class="social-menu-text4" >'.get_lang('Friends').'</span></a></li>
 	                     <li><a href="'.api_get_path(WEB_PATH).'main/social/groups.php">'.Display::return_icon('group.png',get_lang('Groups'),array('hspace'=>'6')).'<span class="social-menu-text4" >'.get_lang('Groups').'</span></a></li>';
-
+				echo '<li><a href="'.api_get_path(WEB_PATH).'main/social/myfiles.php">'.Display::return_icon('briefcase.png',get_lang('MyFiles'),array('hspace'=>'6')).'<span class="'.($show=='myfiles'?'social-menu-text-active':'social-menu-text4').'" >'.get_lang('MyFiles').'</span></a></li>';
     	  	}
 
 

+ 3 - 0
main/install/db_main.sql

@@ -753,6 +753,7 @@ VALUES
 ('block_copy_paste_for_students',NULL,'radio','Editor','false','BlockCopyPasteForStudentsTitle','BlockCopyPasteForStudentsComment',NULL,NULL, 0),
 ('more_buttons_maximized_mode',NULL,'radio','Editor','false','MoreButtonsForMaximizedModeTitle','MoreButtonsForMaximizedModeComment',NULL,NULL, 0),
 ('students_download_folders',NULL,'radio','Tools','true','AllowStudentsDownloadFoldersTitle','AllowStudentsDownloadFoldersComment',NULL,NULL, 0),
+('students_copy_folders',NULL,'radio','Tools','true','AllowStudentsCopyFoldersTitle','AllowStudentsCopyFoldersComment',NULL,NULL, 0),
 ('show_tabs', 'social', 'checkbox', 'Platform', 'true', 'ShowTabsTitle','ShowTabsComment',NULL,'TabsSocial', 0),
 ('allow_students_to_create_groups_in_social',NULL,'radio','Tools','false','AllowStudentsToCreateGroupsInSocialTitle','AllowStudentsToCreateGroupsInSocialComment',NULL,NULL, 0),
 ('allow_send_message_to_all_platform_users',NULL,'radio','Tools','false','AllowSendMessageToAllPlatformUsersTitle','AllowSendMessageToAllPlatformUsersComment',NULL,NULL, 0),
@@ -967,6 +968,8 @@ VALUES
 ('more_buttons_maximized_mode','false','No'),
 ('students_download_folders','true','Yes'),
 ('students_download_folders','false','No'),
+('students_copy_folders','true','Yes'),
+('students_copy_folders','false','No'),
 ('allow_students_to_create_groups_in_social','true','Yes'),
 ('allow_students_to_create_groups_in_social','false','No'),
 ('allow_send_message_to_all_platform_users','true','Yes'),

+ 1 - 0
main/install/migrate-db-1.8.7-1.8.8-pre.sql

@@ -23,3 +23,4 @@ UPDATE settings_current SET selected_value = '1.8.8.12378' WHERE variable = 'cha
 -- xxCOURSExx
 ALTER TABLE forum_forum ADD start_time DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00';
 ALTER TABLE forum_forum ADD end_time DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00';
+ALTER TABLE wiki_mailcue ADD session_id smallint DEFAULT 0;

+ 125 - 0
main/social/myfiles.php

@@ -0,0 +1,125 @@
+<?php
+/* For licensing terms, see /chamilo_license.txt */
+/**
+ * @author Juan  Carlos Raña Trabado herodoto@telefonica.net
+ */
+$language_file = array('messages','userInfo');
+$cidReset=true;
+require '../inc/global.inc.php';
+require_once api_get_path(LIBRARY_PATH).'image.lib.php';
+require_once api_get_path(LIBRARY_PATH).'usermanager.lib.php';
+require_once api_get_path(LIBRARY_PATH).'social.lib.php';
+require_once api_get_path(LIBRARY_PATH).'group_portal_manager.lib.php';
+
+$this_section = SECTION_SOCIAL;
+
+$interbreadcrumb[]= array ('url' =>'profile.php','name' => get_lang('Social'));
+$interbreadcrumb[]= array ('url' =>'#','name' => get_lang('MyFiles'));
+
+$htmlHeadXtra[] = '<script src="'.api_get_path(WEB_LIBRARY_PATH).'javascript/jquery.js" type="text/javascript" language="javascript"></script>'; //jQuery
+$htmlHeadXtra[] = '<script type="text/javascript" src="'.api_get_path(WEB_LIBRARY_PATH).'javascript/thickbox.js"></script>';
+$htmlHeadXtra[] = '<link rel="stylesheet" href="'.api_get_path(WEB_LIBRARY_PATH).'javascript/thickbox.css" type="text/css" media="projection, screen">';
+
+$htmlHeadXtra[] = '
+<script type="text/javascript">
+		
+function denied_friend (element_input) {
+	name_button=$(element_input).attr("id");
+	name_div_id="id_"+name_button.substring(13);
+	user_id=name_div_id.split("_");
+	friend_user_id=user_id[1];	
+	 $.ajax({
+		contentType: "application/x-www-form-urlencoded",
+		beforeSend: function(objeto) {
+		$("#id_response").html("<img src=\'../inc/lib/javascript/indicator.gif\' />"); },
+		type: "POST",
+		url: "'.api_get_path(WEB_AJAX_PATH).'social.ajax.php?a=deny_friend",
+		data: "denied_friend_id="+friend_user_id,
+		success: function(datos) {
+		 $("div#"+name_div_id).hide("slow");
+		 $("#id_response").html(datos);
+		}
+	});
+}
+function register_friend(element_input) {
+ if(confirm("'.get_lang('AddToFriends').'")) {
+		name_button=$(element_input).attr("id");
+		name_div_id="id_"+name_button.substring(13);
+		user_id=name_div_id.split("_");
+		user_friend_id=user_id[1];
+		 $.ajax({
+			contentType: "application/x-www-form-urlencoded",
+			beforeSend: function(objeto) {
+			$("div#dpending_"+user_friend_id).html("<img src=\'../inc/lib/javascript/indicator.gif\' />"); },
+			type: "POST",
+			url: "'.api_get_path(WEB_AJAX_PATH).'social.ajax.php?a=add_friend",
+			data: "friend_id="+user_friend_id+"&is_my_friend="+"friend",
+			success: function(datos) {  $("div#"+name_div_id).hide("slow");
+				$("form").submit()
+			}
+		});
+ }
+}
+	
+
+function show_icon_edit(element_html) {	
+	ident="#edit_image";
+	$(ident).show();
+}		
+
+function hide_icon_edit(element_html)  {
+	ident="#edit_image";
+	$(ident).hide();
+}		
+		
+
+</script>';
+api_block_anonymous_users();
+
+Display :: display_header($tool_name, 'Groups');
+
+// easy links
+if (is_array($_GET) && count($_GET)>0) {
+	foreach($_GET as $key => $value) { 
+		switch ($key) {
+			case 'accept':				
+				$user_role = GroupPortalManager::get_user_group_role(api_get_user_id(), $value);							
+				if (in_array($user_role , array(GROUP_USER_PERMISSION_PENDING_INVITATION_SENT_BY_USER,GROUP_USER_PERMISSION_PENDING_INVITATION))) {				
+					GroupPortalManager::update_user_role(api_get_user_id(), $value, GROUP_USER_PERMISSION_READER);
+					$show_message = get_lang('UserIsSubscribedToThisGroup');
+				} elseif (in_array($user_role , array(GROUP_USER_PERMISSION_READER, GROUP_USER_PERMISSION_ADMIN, GROUP_USER_PERMISSION_MODERATOR))) {
+					$show_message = get_lang('UserIsAlreadySubscribedToThisGroup');
+				} else {
+					$show_message = get_lang('UserIsNotSubscribedToThisGroup');
+				}			
+			break 2;			
+			case 'deny':
+				// delete invitation
+				GroupPortalManager::delete_user_rel_group(api_get_user_id(), $value); 
+				$show_message = get_lang('GroupInvitationWasDeny');
+			break 2;
+		}		
+	}
+}
+
+$language_variable = get_lang('PendingInvitations');
+$language_comment  = get_lang('SocialInvitesComment');
+
+echo '<div id="social-content">';
+
+	echo '<div id="social-content-left">';	
+		//this include the social menu div
+		SocialManager::show_social_menu('myfiles');
+	echo '</div>';
+
+	echo '<div id="social-content-right>';
+		echo '<a href=""></a>';//TODO: hack and delete this line
+
+		echo '<iframe name="fileManager" id="fileManager" src="'.api_get_path(WEB_PATH).'main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/ajaxfilemanager.php?editor=stand_alone" scrolling="no" noresize="noresize" frameborder="no" style="height:450px; width:80%; border: 0px; padding: 0px; float:left"></iframe>';
+	echo '</div>';
+echo '</div>';
+
+
+
+Display::display_footer();
+?>