Juan Carlos Raña 14 years ago
parent
commit
28c81c0160

+ 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 = '';

BIN
main/img/briefcase.png


+ 13 - 9
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>				
@@ -743,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;}

+ 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;}

+ 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'),

+ 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();
+?>