Browse Source

merge and userportal view session items, exercice css

aragonc 10 years ago
parent
commit
c01d45f7b8
100 changed files with 32 additions and 566 deletions
  1. 2 2
      custompages/first_login-dist.php
  2. 3 3
      custompages/index-unlogged-dist.php
  3. 2 2
      custompages/lostpassword-dist.php
  4. 7 0
      documentation/installation_guide.html
  5. 0 1
      main/admin/calendar.php
  6. 0 2
      main/admin/calendar_ical_export.php
  7. 0 2
      main/admin/calendar_view.php
  8. 2 10
      main/admin/calendar_view_print.php
  9. 4 0
      main/admin/configure_plugin.php
  10. 1 1
      main/admin/languages.php
  11. 1 1
      main/admin/system_announcements.php
  12. 1 1
      main/announcements/announcements.php
  13. 2 2
      main/attendance/attendance_edit.php
  14. 0 1
      main/attendance/index.php
  15. 1 2
      main/auth/courses_controller.php
  16. 1 1
      main/auth/profile.php
  17. 0 2
      main/blog/calendar.php
  18. 1 1
      main/calendar/agenda.php
  19. 1 1
      main/calendar/agenda_js.php
  20. 1 1
      main/calendar/agenda_list.php
  21. 0 2
      main/calendar/allagendas.php
  22. 0 1
      main/calendar/calendar.php
  23. 1 3
      main/calendar/ical_export.php
  24. 0 2
      main/calendar/myagenda.php
  25. 1 3
      main/calendar/print.php
  26. 0 247
      main/conference/api.php
  27. 0 76
      main/conference/audiopost.php
  28. 0 86
      main/conference/checksession.php
  29. BIN
      main/conference/classroom.swf
  30. 0 95
      main/conference/get_translation.lib.php
  31. 0 15
      main/conference/index.php
  32. BIN
      main/conference/player2.swf
  33. BIN
      main/conference/recorder2.swf
  34. BIN
      main/conference/resources/themes/darkblue/background.png
  35. BIN
      main/conference/resources/themes/darkblue/background2.png
  36. BIN
      main/conference/resources/themes/darkblue/backgroundsanspied.png
  37. BIN
      main/conference/resources/themes/darkblue/buttons/button_quit.png
  38. BIN
      main/conference/resources/themes/darkblue/buttons/menudraw_down.png
  39. BIN
      main/conference/resources/themes/darkblue/buttons/menudraw_down_back.png
  40. BIN
      main/conference/resources/themes/darkblue/buttons/menudraw_down_close.png
  41. BIN
      main/conference/resources/themes/darkblue/buttons/menudraw_down_color.png
  42. BIN
      main/conference/resources/themes/darkblue/buttons/menudraw_down_colorline.png
  43. BIN
      main/conference/resources/themes/darkblue/buttons/menudraw_down_letter.png
  44. BIN
      main/conference/resources/themes/darkblue/buttons/menudraw_down_line.png
  45. BIN
      main/conference/resources/themes/darkblue/buttons/menudraw_down_newfile.png
  46. BIN
      main/conference/resources/themes/darkblue/buttons/menudraw_down_next.png
  47. BIN
      main/conference/resources/themes/darkblue/buttons/menudraw_down_paint.png
  48. BIN
      main/conference/resources/themes/darkblue/buttons/menudraw_down_point.png
  49. BIN
      main/conference/resources/themes/darkblue/buttons/menudraw_down_underline.png
  50. BIN
      main/conference/resources/themes/darkblue/buttons/menudraw_over.png
  51. BIN
      main/conference/resources/themes/darkblue/buttons/menudraw_over.swf
  52. BIN
      main/conference/resources/themes/darkblue/buttons/menudraw_over_back.png
  53. BIN
      main/conference/resources/themes/darkblue/buttons/menudraw_over_close.png
  54. BIN
      main/conference/resources/themes/darkblue/buttons/menudraw_over_color.png
  55. BIN
      main/conference/resources/themes/darkblue/buttons/menudraw_over_colorline.png
  56. BIN
      main/conference/resources/themes/darkblue/buttons/menudraw_over_letter.png
  57. BIN
      main/conference/resources/themes/darkblue/buttons/menudraw_over_line.png
  58. BIN
      main/conference/resources/themes/darkblue/buttons/menudraw_over_newfile.png
  59. BIN
      main/conference/resources/themes/darkblue/buttons/menudraw_over_next.png
  60. BIN
      main/conference/resources/themes/darkblue/buttons/menudraw_over_paint.png
  61. BIN
      main/conference/resources/themes/darkblue/buttons/menudraw_over_point.png
  62. BIN
      main/conference/resources/themes/darkblue/buttons/menudraw_over_underline.png
  63. BIN
      main/conference/resources/themes/darkblue/buttons/menudraw_up.png
  64. BIN
      main/conference/resources/themes/darkblue/buttons/menudraw_up.swf
  65. BIN
      main/conference/resources/themes/darkblue/buttons/menudraw_up_back.png
  66. BIN
      main/conference/resources/themes/darkblue/buttons/menudraw_up_close.png
  67. BIN
      main/conference/resources/themes/darkblue/buttons/menudraw_up_color.png
  68. BIN
      main/conference/resources/themes/darkblue/buttons/menudraw_up_colorline.png
  69. BIN
      main/conference/resources/themes/darkblue/buttons/menudraw_up_letter.png
  70. BIN
      main/conference/resources/themes/darkblue/buttons/menudraw_up_line.png
  71. BIN
      main/conference/resources/themes/darkblue/buttons/menudraw_up_newfile.png
  72. BIN
      main/conference/resources/themes/darkblue/buttons/menudraw_up_next.png
  73. BIN
      main/conference/resources/themes/darkblue/buttons/menudraw_up_paint.png
  74. BIN
      main/conference/resources/themes/darkblue/buttons/menudraw_up_point.png
  75. BIN
      main/conference/resources/themes/darkblue/buttons/menudraw_up_underline.png
  76. BIN
      main/conference/resources/themes/darkblue/buttons/menupointer.png
  77. BIN
      main/conference/resources/themes/darkblue/buttons/menuseperator.png
  78. BIN
      main/conference/resources/themes/darkblue/buttons/messagebox_info.png
  79. BIN
      main/conference/resources/themes/darkblue/buttons/mix_record.png
  80. BIN
      main/conference/resources/themes/darkblue/buttons/next.png
  81. BIN
      main/conference/resources/themes/darkblue/buttons/tabbutton_dn_lf.png
  82. BIN
      main/conference/resources/themes/darkblue/buttons/tabbutton_dn_mid.png
  83. BIN
      main/conference/resources/themes/darkblue/buttons/tabbutton_dn_re.png
  84. BIN
      main/conference/resources/themes/darkblue/buttons/tabbutton_mo_lf.png
  85. BIN
      main/conference/resources/themes/darkblue/buttons/tabbutton_mo_mid.png
  86. BIN
      main/conference/resources/themes/darkblue/buttons/tabbutton_mo_re.png
  87. BIN
      main/conference/resources/themes/darkblue/buttons/tabbutton_up_lf.png
  88. BIN
      main/conference/resources/themes/darkblue/buttons/tabbutton_up_mid.png
  89. BIN
      main/conference/resources/themes/darkblue/buttons/tabbutton_up_re.png
  90. BIN
      main/conference/resources/themes/darkblue/buttons/top.png
  91. BIN
      main/conference/resources/themes/darkblue/splash.swf
  92. BIN
      main/conference/resources/themes/grey/background.png
  93. BIN
      main/conference/resources/themes/grey/backgroundstuff.png
  94. BIN
      main/conference/resources/themes/grey/buttons/button_quit.png
  95. BIN
      main/conference/resources/themes/grey/buttons/menudraw_down.png
  96. BIN
      main/conference/resources/themes/grey/buttons/menudraw_down_back.png
  97. BIN
      main/conference/resources/themes/grey/buttons/menudraw_down_close.png
  98. BIN
      main/conference/resources/themes/grey/buttons/menudraw_down_color.png
  99. BIN
      main/conference/resources/themes/grey/buttons/menudraw_down_colorline.png
  100. BIN
      main/conference/resources/themes/grey/buttons/menudraw_down_letter.png

+ 2 - 2
custompages/first_login-dist.php

@@ -88,9 +88,9 @@ if ($_GET['invalid'] == 2) {
 		}?>
 			<form id="changepassword-form" class="form" method="post">
 				<div>
-          <label for="password">*<?php echo custompages_get_lang('langPass');?></label>
+          <label for="password">*<?php echo custompages_get_lang('Password');?></label>
 					<input name="password" type="password" /><br />
-          <label for="password2">*<?php echo custompages_get_lang('langPass');?></label>
+          <label for="password2">*<?php echo custompages_get_lang('Password');?></label>
 					<input name="password2" type="password" /><br />
 				</div>
 			</form>

+ 3 - 3
custompages/index-unlogged-dist.php

@@ -92,7 +92,7 @@ $rootWeb = api_get_path('WEB_PATH');
                 <div>
                     <label for="login">*<?php echo custompages_get_lang('User');?></label>
                     <input name="login" type="text" /><br />
-                    <label for="password">*<?php echo custompages_get_lang('langPass');?></label>
+                    <label for="password">*<?php echo custompages_get_lang('Password');?></label>
                     <input name="password" type="password" /><br />
                 </div>
             </form>
@@ -103,12 +103,12 @@ $rootWeb = api_get_path('WEB_PATH');
 
                 <?php if (api_get_setting('allow_registration') === 'true') { ?>
                 <a href="<?php echo api_get_path(WEB_PATH); ?>main/auth/inscription.php?language=<?php echo api_get_interface_language(); ?>">
-                    <?php echo custompages_get_lang('langReg')?>
+                    <?php echo custompages_get_lang('Registration')?>
                 </a><br />
                 <?php } ?>
 
                 <a href="<?php echo api_get_path(WEB_PATH); ?>main/auth/lostPassword.php?language=<?php echo api_get_interface_language(); ?>">
-                    <?php echo custompages_get_lang('langLostPassword')?>
+                    <?php echo custompages_get_lang('LostPassword')?>
                 </a>
 			</div>
 		</div> <!-- #form -->

+ 2 - 2
custompages/lostpassword-dist.php

@@ -43,7 +43,7 @@ require_once('language.php');
         <?php if(isset($content['error']) && !empty($content['error'])){
           echo $content['info'];
         } else {
-          echo custompages_get_lang('lang_enter_email_and_well_send_you_password');
+          echo custompages_get_lang('EnterEmailAndWeWillSendYouYourPassword');
         }?>
       </div>
 		<div id="lostpassword-form-box" class="form-box">
@@ -57,7 +57,7 @@ require_once('language.php');
 				</div>
 			</form>
 			<div id="lostpassword-form-submit" class="form-submit" onclick="document.forms['lostpassword-form'].submit();">
-      <span><?php echo custompages_get_lang('langSend'); ?> </span>
+      <span><?php echo custompages_get_lang('Send'); ?> </span>
 			</div> <!-- #form-submit -->
 		</div> <!-- #form -->
 		<div id="footer">

+ 7 - 0
documentation/installation_guide.html

@@ -341,6 +341,13 @@ responsible for what would happen to your data without professional supervision)
 This is why we *really* recommend you take a full backup of your system before
 you upgrade.</em>
 <br />
+<br />
+Also note that Chamilo LMS 1.10 removes some deprecated language files from the
+main/lang/ directory. If you have changed language files directly (instead of
+using the recommended way of sublanguages), you should take a backup copy of
+these changed translations before you upgrade. Sublanguages might also require
+som manual work, but the upgrade procedure will not touch sublanguages directly.
+<br />
 <div class="muted"> NOTE: For very heavy Chamilo databases, some of our official
 providers have developed improved migration procedures that use more memory but
 process the upgrades up to 20 times faster. If this is the kind of thing you

+ 0 - 1
main/admin/calendar.php

@@ -8,7 +8,6 @@
 
 // name of the language file that needs to be included
 $language_file[] = 'admin';
-$language_file[] = 'agenda';
 
 // resetting the course id
 $cidReset=true;

+ 0 - 2
main/admin/calendar_ical_export.php

@@ -8,8 +8,6 @@
 /**
  * Initialisation
  */
-// name of the language file that needs to be included
-$language_file = 'agenda';
 // we are not inside a course, so we reset the course id
 $cidReset = true;
 // setting the global file that gets the general configuration, the databases, the languages, ...

+ 0 - 2
main/admin/calendar_view.php

@@ -5,8 +5,6 @@
 *	@author Carlos Vargas
 *	This file is the calendar/calendar.php
 */
-// name of the language file that needs to be included
-$language_file = 'agenda';
 // including the claroline global
 require_once '../inc/global.inc.php';
 

+ 2 - 10
main/admin/calendar_view_print.php

@@ -5,28 +5,20 @@
 *	@author Carlos Vargas
 *	This file is the calendar/print.php
 */
-// name of the language file that needs to be included
-$language_file = 'agenda';
 $id=$_GET['id'];
 
-if(strstr($id,','))
-{
+if (strstr($id,',')) {
 	$id=explode(',',$id);
 	$id=array_map('intval',$id);
 	$id=implode(',',$id);
-}
-else
-{
+} else {
 	$id=intval($id);
 }
 
 // setting the global file that gets the general configuration, the databases, the languages, ...
 require('../inc/global.inc.php');
 
-
-
 $TABLEAGENDA 		= Database::get_main_table(TABLE_MAIN_SYSTEM_CALENDAR);
-
 $sql 			= "SELECT * FROM $TABLEAGENDA WHERE id IN($id) ORDER BY start_date DESC";
 $result			= Database::query($sql);
 ?>

+ 4 - 0
main/admin/configure_plugin.php

@@ -89,6 +89,10 @@ if (isset($form)) {
 
         header("Location: $currentUrl");
         exit;
+    } else {
+        foreach ($form->_errors as $error) {
+            $message .= Display::return_message($error, 'error');
+        }
     }
 }
 

+ 1 - 1
main/admin/languages.php

@@ -281,7 +281,7 @@ $table = new SortableTableFromArrayConfig($language_data, 1, count($language_dat
 $table->set_header(0, '');
 $table->set_header(1, get_lang('OriginalName'));
 $table->set_header(2, get_lang('EnglishName'));
-$table->set_header(3, get_lang('DokeosFolder'));
+$table->set_header(3, get_lang('LMSFolder'));
 $table->set_header(4, get_lang('Properties'));
 $form_actions = array();
 $form_actions['makeavailable'] = get_lang('MakeAvailable');

+ 1 - 1
main/admin/system_announcements.php

@@ -9,7 +9,7 @@
 /* INIT SECTION */
 
 // Language files that need to be included.
-$language_file = array('admin', 'agenda', 'announcements');
+$language_file = array('admin');
 
 // Resetting the course id.
 $cidReset = true;

+ 1 - 1
main/announcements/announcements.php

@@ -15,7 +15,7 @@
 // name of the language file that needs to be included
 use \ChamiloSession as Session;
 
-$language_file = array('announcements', 'group', 'survey', 'document');
+$language_file = array('group', 'survey', 'document');
 
 // use anonymous mode when accessing this course tool
 $use_anonymous = true;

+ 2 - 2
main/attendance/attendance_edit.php

@@ -11,7 +11,7 @@
 api_protect_course_script(true);
 
 // error messages
-if ($error) {
+if (isset($error)) {
     Display::display_error_message(get_lang('FormHasErrorsPleaseComplete'),false);
 }
 
@@ -20,7 +20,7 @@ if (isset($_SESSION['gradebook'])) {
     $param_gradebook = '&gradebook='.Security::remove_XSS($_SESSION['gradebook']);
 }
 
-if (!$error) {
+if (!isset($error)) {
     $token = Security::get_token();
 }
 

+ 0 - 1
main/attendance/index.php

@@ -13,7 +13,6 @@ $language_file = array(
     'course_info',
     'userInfo',
     'admin',
-    'agenda',
     'tracking',
     'gradebook'
 );

+ 1 - 2
main/auth/courses_controller.php

@@ -553,8 +553,7 @@ class CoursesController
 
         $key = 'name';
         $catalogSessionAutoSubscriptionAllowed = false;
-        if (isset($_configuration['catalog_allow_session_auto_subscription']) &&
-            $_configuration['catalog_allow_session_auto_subscription']) {
+        if (api_get_configuration_value('catalog_allow_session_auto_subscription')) {
             $key = 'id';
             $catalogSessionAutoSubscriptionAllowed = true;
         }

+ 1 - 1
main/auth/profile.php

@@ -10,7 +10,7 @@
 */
 
 // Language files that should be included.
-$language_file = array('registration', 'messages', 'userInfo');
+$language_file = array('registration', 'userInfo');
 $cidReset = true;
 require_once '../inc/global.inc.php';
 

+ 0 - 2
main/blog/calendar.php

@@ -7,8 +7,6 @@
 /**
  * Code
  */
-// name of the language file that needs to be included
-$language_file = 'agenda';
 
 // including the global
 require_once '../inc/global.inc.php';

+ 1 - 1
main/calendar/agenda.php

@@ -8,7 +8,7 @@
 use \ChamiloSession as Session;
 
 // name of the language file that needs to be included
-$language_file = array('agenda', 'group');
+$language_file = array('group');
 
 // use anonymous mode when accessing this course tool
 $use_anonymous = true;

+ 1 - 1
main/calendar/agenda_js.php

@@ -8,7 +8,7 @@
 use \ChamiloSession as Session;
 
 // name of the language file that needs to be included
-$language_file = array('agenda', 'group', 'announcements');
+$language_file = array('group');
 
 // use anonymous mode when accessing this course tool
 $use_anonymous = true;

+ 1 - 1
main/calendar/agenda_list.php

@@ -5,7 +5,7 @@
  */
 
 // name of the language file that needs to be included
-$language_file = array('agenda', 'group', 'announcements');
+$language_file = array('group');
 
 require_once '../inc/global.inc.php';
 require_once 'agenda.inc.php';

+ 0 - 2
main/calendar/allagendas.php

@@ -10,8 +10,6 @@
  * @author Carlos Brolo First code submittion
  */
 
-// name of the language file that needs to be included
-$language_file = 'agenda';
 // we are not inside a course, so we reset the course id
 $cidReset = true;
 // setting the global file that gets the general configuration, the databases, the languages, ...

+ 0 - 1
main/calendar/calendar.php

@@ -1,7 +1,6 @@
 <?php
 /* For licensing terms, see /license.txt */
 
-$language_file = 'agenda';
 require_once dirname(__FILE__).'/../inc/global.inc.php';
 
 //session

+ 1 - 3
main/calendar/ical_export.php

@@ -2,10 +2,8 @@
 /* For licensing terms, see /license.txt */
 /**
  * This file exclusively export calendar items to iCal or similar formats
- * @author Yannick Warnier <yannick.warnier@dokeos.com>
+ * @author Yannick Warnier <yannick.warnier@beeznest.com>
  */
-// name of the language file that needs to be included
-$language_file = 'agenda';
 // we are not inside a course, so we reset the course id
 $cidReset = true;
 // setting the global file that gets the general configuration, the databases, the languages, ...

+ 0 - 2
main/calendar/myagenda.php

@@ -1,8 +1,6 @@
 <?php
 /* For licensing terms, see /license.txt */
 
-// name of the language file that needs to be included
-$language_file = 'agenda';
 // we are not inside a course, so we reset the course id
 $cidReset = true;
 // setting the global file that gets the general configuration, the databases, the languages

+ 1 - 3
main/calendar/print.php

@@ -4,11 +4,9 @@
  * @package chamilo.calendar
  */
 
-// name of the language file that needs to be included
-$language_file = 'agenda';
 $id=$_GET['id'];
 
-if(strstr($id,',')) {
+if (strstr($id,',')) {
 	$id=explode(',',$id);
 	$id=array_map('intval',$id);
 	$id=implode(',',$id);

+ 0 - 247
main/conference/api.php

@@ -1,247 +0,0 @@
-<?php
-/* See license terms in /license.txt */
-
-/* FIX for IE cache when using https */
-session_cache_limiter("none");
-
-/**
-*	This is an interface between Chamilo and Videoconference application
-*
-
-*/
-/*==== DEBUG ====*/
-$debug=0;
-/*==== CONSTANTS ==== */
-define('VIDEOCONF_UPLOAD_PATH', '/videoconf');
-$presentation_extension = array('.ppt', '.odp');
-$image_extension = array ('.png', '.jpg', '.gif', '.jpeg');
-
-if ($debug>0)
-{
-	// dump the request
-	$v = array_keys(get_defined_vars());
-	error_log(var_export($v, true),3, '/tmp/log');
-
-	foreach (array_keys(get_defined_vars()) as $k) {
-		if ($k == 'GLOBALS')
-			continue;
-		error_log($k, 3, '/tmp/log');
-		error_log(var_export($$k, true), 3, '/tmp/log');
-	}
-
-}
-
-
-/*==== Flash loose the cookie ===*/
-/* needed when using the nice upload window :
-if ($_SERVER['HTTP_USER_AGENT'] == 'Shockwave Flash') {
-	$sid = $_REQUEST['sid'];
-	if ($debug>0) error_log("reusing: ".$sid);
-	session_id($sid);
-} */
-
-/*==== INCLUDE ====*/
-require_once '../inc/global.inc.php';
-api_block_anonymous_users();
-require_once ("../newscorm/openoffice_presentation.class.php");
-
-/*==== Variables initialisation ====*/
-$action = $_REQUEST["action"]; //safe as only used in if()'s
-$seek = array('/','%2F','..');
-$destroy = array('','','');
-$cidReq = str_replace($seek,$destroy,$_REQUEST["cidReq"]);
-$cidReq = Security::remove_XSS($cidReq);
-
-$user_id = api_get_user_id();
-$coursePath = api_get_path(SYS_COURSE_PATH).$cidReq.'/document';
-$_course = CourseManager::get_course_information($cidReq);
-$_course['path'] = $_course['directory'];
-// FIXME: add_document needs this to work
-$_course['dbName'] = $_course['db_name'];
-
-// FIXME: check if CourseManager::get_user_in_course_status return !=
-//	COURSEMANAGER when the code is not valid
-if ($debug>0) error_log($coursePath, 0);
-
-if ($action == "uploadgui")
-{
-	echo '<form enctype="multipart/form-data" action="api.php" method="POST">
-	<input type="hidden" name="MAX_FILE_SIZE" value="100000000" />
-	<input type="hidden" name="action" value="upload" />
-	<input type="hidden" name="cidReq" value="'.$cidReq.'" />
-	<input type="hidden" name="sid" value="'.Security::remove_XSS($_REQUEST["sid"]).'" />
-
-	'.get_lang('SelectFile').': <input name="Filedata" type="file" /><br />
-	<input type="submit" value="'.get_lang('UploadFile').'"  />
-	</form>
-	';
-	die();
-}
-else if ($action == "upload")
-{
-	if ($debug >0) error_log("upload".$_FILES['Filedata']);
-	/*==== PERMISSION ====*/
-	$permissions = CourseManager::get_user_in_course_status($user_id, $cidReq);
-	if ($permissions != COURSEMANAGER)
-	{
-		if ($debug >0) error_log("Upload from videoconf not allowed !!!",0);
-		die('Not allowed'); // this user is not allowed to add upload documents
-	}
-	/*==== UPLOAD ====*/
-	$destPath = $coursePath.VIDEOCONF_UPLOAD_PATH;
-
-	/*==== creation of /videoconf ====*/
-	if (!is_dir($destPath))
-	{
-		$result = create_unexisting_directory($_course,$user_id, api_get_session_id(), 0,NULL,$coursePath,VIDEOCONF_UPLOAD_PATH);
-		if (!$result)
-		{
-			if ($debug>0) error_log("Can't create ".$destPath." folder",0);
-		}
-	}
-
-	/*==== file upload ====*/
-	$newPath = $_FILES['Filedata']['name'];
-	if($debug>0) error_log($newPath);
-
-	/*==== extension extraction ====*/
-	$file_name = (strrpos($newPath,'.')>0 ? substr($newPath, 0, strrpos($newPath,'.')) : $newPath);
- 	$file_extension = (strrpos($newPath,'.')>0 ? substr($newPath, strrpos($newPath,'.'),10) : '');
-	if($debug>0) error_log(strrpos($newPath,'.'));
-	if($debug>0) error_log($file_extension);
-
-	/*==== conversion if needed ====*/
-	if (!in_array(strtolower($file_extension), $image_extension))
-	{
-		if($debug>0) error_log("converting: ".$file_extension);
-		$take_slide_name = false;
-		$o_ppt = new OpenofficePresentation($take_slide_name);
-		$o_ppt -> set_slide_size(640,480);
-		$o_ppt -> convert_document($_FILES['Filedata'],'add_docs_to_visio');
-	}
-
-	echo '<html><body><script language="javascript">setTimeout(1000,window.close());</script></body></html>';
-}
-else if ($action == "service")
-{
-	/*==== List files ====*/
-	if ($debug>0) error_log("sending file list",0);
-	$subaction = $_REQUEST["subaction"];
-	$is_manager = (CourseManager::get_user_in_course_status($user_id, $cidReq) == COURSEMANAGER);
-	if ($subaction == "list")
-	{
-		// FIXME: check security around $_REQUEST["cwd"]
-		$cwd = $_REQUEST["cwd"];
-
-
-		// treat /..
-		$nParent = 0; // the number of /.. into the url
-		while (substr($cwd, -3, 3) == "/..")
-		{
-			// go to parent directory
-			$cwd= substr($cwd, 0, -3);
-			if (strlen($cwd) == 0) $cwd="/";
-			$nParent++;
-		}
-		for (;$nParent >0; $nParent--){
-			$cwd = (strrpos($cwd,'/')>-1 ? substr($cwd, 0, strrpos($cwd,'/')) : $cwd);
-		}
-
-		if (strlen($cwd) == 0) $cwd="/";
-
-		if (Security::check_abs_path($cwd,api_get_path(SYS_PATH)))
-			die();
-
-		// check if user can delete files. He must be manager and be inside /videoconf
-		$is_below_videoconf_dir = (substr($cwd,0,strlen(VIDEOCONF_UPLOAD_PATH)) == VIDEOCONF_UPLOAD_PATH);
-		if($debug>0) error_log('Current working directory: '.$cwd);
-		if($debug>0) error_log('Videoconf upload path: '.VIDEOCONF_UPLOAD_PATH);
-		/* $canDelete = ($canDelete && $isBellowVideoConfUploadPath);
-		*/
-		$can_delete = ($is_manager && $is_below_videoconf_dir);
-
-		// get files list
-		$files = DocumentManager::get_all_document_data($_course, $cwd, 0, NULL, false);
-		printf("<dokeosobject><fileListMeta></fileListMeta><fileList>");
-		printf("<folders>");
-
-		// title filter
-		if (is_array($files)) foreach (array_keys($files) as $k)
-		{
-			// converting to UTF-8
-			$files[$k]['title'] = api_convert_encoding(
-						api_strlen($files[$k]['title']) > 32 ?
-							api_substr($files[$k]['title'],0, 32)."..." :
-							$files[$k]['title'],
-						'utf-8',api_get_system_encoding());
-			// removing '<', '>' and '_'
-			$files[$k]['title'] = str_replace(array('<','>','_'),' ', $files[$k]['title']);
-		}
-
-		if(is_array($files))
-		{
-
-			foreach($files as $i)
-			{
-				if ($i["filetype"] == "folder")
-					printf('<folder><path>%s</path><title>%s</title><canDelete>%s</canDelete></folder>', $i['path'],$i['title'],($can_delete?'true':'false'));
-			}
-		}
-		printf("</folders><files>");
-		if(is_array($files))
-		{
-			foreach($files as $i) {
-	  			$extension = (strrpos($i['path'],'.')>0 ? substr($i['path'], strrpos($i['path'],'.'),10) : '');
-				if ($i["filetype"] == "file" && in_array(strtolower($extension), $image_extension))
-					printf('<file><path>%s</path><title>%s</title><canDelete>%s</canDelete></file>', $i['path'],$i['title'],($can_delete?'true':'false'));
-			}
-		}
-		printf("</files><ppts>");
-		printf("</ppts>");
-		printf("</fileList></dokeosobject>");
-	}
-	else if ($subaction == "delete")
-	{
-		/*==== PERMISSION ====*/
-		$permissions = CourseManager::get_user_in_course_status($user_id, $cidReq);
-		if ($permissions != COURSEMANAGER)
-		{
-			if ($debug > 0) error_log("Upload from videoconf not allowed !!!",0);
-			die(); // this user is not allowed to add upload documents
-		}
-		/*==== DELETE ====*/
-		$path = str_replace('../','',$_REQUEST["path"]);
-		if ((substr($path,0,strlen(VIDEOCONF_UPLOAD_PATH)) != VIDEOCONF_UPLOAD_PATH))
-		{
-			if ($debug >0 ) error_log("Delete from videoconf for "+$path+" NOT ALLOWED",0);
-			die();
-		}
-		DocumentManager::delete_document($_course, $path, $coursePath);
-		echo "<result>OK</result>"; // We have to return something to OpenLaszlo
-	}
-} else if ($action == "download") {
-	/*==== DOWNLOAD ====*/
-	//check if the document is in the database
-	if(!DocumentManager::get_document_id($_course,$_REQUEST['file'])) {
-		//file not found!
-		if ($debug>0) error_log("404 ".$_REQUEST["file"]);
-		header("HTTP/1.0 404 Not Found");
-		$error404 = '<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">';
-		$error404 .= '<html><head>';
-		$error404 .= '<title>404 Not Found</title>';
-		$error404 .= '</head><body>';
-		$error404 .= '<h1>Not Found</h1>';
-		$error404 .= '<p>The requested URL was not found on this server.</p>';
-		$error404 .= '<hr>';
-		$error404 .= '</body></html>';
-		echo($error404);
-		exit;
-	}
-	$doc_url = str_replace('../','',$_REQUEST['file']);
-	if ($debug >0) error_log($doc_url);
-	$full_file_name = $coursePath.$doc_url;
-    if (Security::check_abs_path($full_file_name, $coursePath.'/')) {
-	   DocumentManager::file_send_for_download($full_file_name,false);
-    }
-	exit;
-}

+ 0 - 76
main/conference/audiopost.php

@@ -1,76 +0,0 @@
-<?php
-/* See license terms in /license.txt */
-
-require_once '../inc/global.inc.php';
-
-// check the request comes from our red5 server
-$ips = gethostbynamel(api_get_setting('service_visio','visio_host'));
-$is_our_server = false;
-
-// ignoring null file
-if ($_FILES["file"]["size"] == 0)
-	exit(0);
-
-if(is_array($ips))
-{
-	foreach($ips as $ip)
-	{
-		//get 255 range for known server address
-		$split = split('.',$ip);
-		$ip_range_server = $split[0].'.'.$split[1].'.'.$split[2];
-		//get 255 range for request source address
-		$split = split('.',$_SERVER['REMOTE_ADDR']);
-		$ip_range_request = $split[0].'.'.$split[1].'.'.$split[2];
-		if($ip_range_server == $ip_range_request){$is_our_server = true;}
-	}
-}
-if($is_our_server)
-{
-	if(api_get_setting('service_visio','active')=='true')
-	{
-		//check encryption key
-		$string1 = $_GET['course_code'].$_GET['user_id'].gmdate('Ymd').$_configuration['security_key'];
-		$string2 = $_GET['course_code'].$_GET['user_id'].(gmdate('Ymd')-1).$_configuration['security_key'];
-		if(md5($string1) == $_GET['checker'] or md5($string2) == $_GET['checker'])
-		{
-			$course_info = api_get_course_info($_GET['course_code']);
-			$target = api_get_path(SYS_COURSE_PATH).$course_info['path'].'/document/audio/';
-			$basename = basename( $_FILES['file']['name']);
-			$target = $target . $basename ;
-			if(!move_uploaded_file($_FILES['file']['tmp_name'], $target)) {
-				error_log(__FILE__.':'.__LINE__.': File upload to '.$target.' failed',0);
-			} else {
-				$id = add_document($course_info,'/audio/'.$basename,'file',filesize($target),$basename);
-				if($id !== false)
-				{
-					$res = api_item_property_update($course_info,TOOL_DOCUMENT,$id,'DocumentAdded',$_GET['user_id']);
-					if($res === false)
-					{
-						error_log(__FILE__.':'.__LINE__.': Something went wrong with item properties update of '.$target,0);
-					}
-					else
-					{//make sound invisible?
-						//$res = api_item_property_update($course_info,TOOL_DOCUMENT,$id,'invisible',$_GET['user_id']);
-					}
-				}
-				else
-				{
-					error_log(__FILE__.':'.__LINE__.': Could not create document record for document '.$target,0);
-				}
-			}
-		}
-		else
-		{
-			error_log(__FILE__.':'.__LINE__.': Attempting to save file but hash check did not suceed (hacking attempt?)',0);
-		}
-	}
-	else
-	{
-		error_log(__FILE__.':'.__LINE__.': Attempting to save file but videoconf is not enabled',0);
-	}
-}
-else
-{
-	error_log(__FILE__.':'.__LINE__.': Attempting to save file but coming from unknown source',0);
-}
-?>

+ 0 - 86
main/conference/checksession.php

@@ -1,86 +0,0 @@
-<?php
-/* See license terms in /license.txt */
-
-/* FIX for IE cache when using https */
-session_cache_limiter("none");
-
-/**
- * This script gives information to the videoconference scripts (in OpenLaszlo)
- * to use the right URL and ports for the videoconference.
- */
-
-require("../../main/inc/global.inc.php");
-require_once('get_translation.lib.php');
-api_block_anonymous_users();
-
-//$confkey = "0123456789abcdef0123456789abcdef";
-$confkey = api_get_setting('service_visio','visio_pass');
-$challenge = api_generate_password(32); //generate a 32 characters-long challenge key
-
-printf ('<?xml version="1.0" encoding="UTF-8" ?>');
-
-printf('<dokeosobject>');
-
-printf('<courseobject>');
-foreach ($_SESSION['_course'] as $key => $val)
-		printf('<%s>%s</%s>',$key,api_utf8_encode($val),$key);
-printf('</courseobject>');
-
-printf('<userobject>');
-foreach ($_SESSION['_user'] as $key => $val)
-	if ($key != "auth_source")
-	{
-		if (( $key == "lastName" || $key == "firstName" ) && strlen($val) == 0)
-			$val = get_lang('Unknown');
-		printf('<%s>%s</%s>',$key,api_utf8_encode($val),$key);
-	}
-
-printf('<sid>%s</sid>', session_id());
-$isadmin =((CourseManager::get_user_in_course_status($_SESSION['_user']['user_id'], $_SESSION['_course']['sysCode']) == COURSEMANAGER)||
-		api_is_platform_admin() ||
-		api_is_course_tutor() ||
-		api_is_course_admin() ||
-		api_is_course_coach() ? "true" : "false");
-printf('<key>%s</key>', md5($confkey.$challenge));
-printf('<challenge>%s</challenge>', $challenge);
-printf('<isUploadAllowed>%s</isUploadAllowed>', $isadmin);
-printf('<canStartModerator>%s</canStartModerator>',($isadmin=='true' || $_SESSION["roomType"] == "conference")?'true':'false');
-printf('<mustStartModerator>%s</mustStartModerator>',($isadmin=='true' || $_SESSION["roomType"] == "conference")?'true':'false');
-printf('</userobject>');
-
-printf('<config>');
-printf('<host>'.api_get_setting('service_visio','visio_host').'</host>');
-printf('<port>'.api_get_setting('service_visio','visio_port').'</port>');
-printf('</config>');
-
-$path = preg_replace('/^([^:]*:\/\/)/','',api_get_path(WEB_PATH));
-$path = str_replace('/','_',$path);
-printf('<roomConfig>');
-printf('<portal>%s</portal>', $path);
-printf('<roomType>%s</roomType>', $_SESSION['roomType']); // fixme remove +
-printf('</roomConfig>');
-
-printf('<recorderparams>');
-
-if(isset($_SESSION['oLP']))
-{
-	switch ($_SESSION['whereami'])
-	{
-		case 'lp/build' :
-			$student_view = 'false';
-			break;
-		default :
-			$student_view = 'true';
-		break;
-	}
-	$document_id = $_SESSION['oLP']->current;
-}
-
-printf('<studentview>%s</studentview>',$student_view);
-printf('<documentid>%s</documentid>',$document_id);
-printf('</recorderparams>');
-printf('<languageobject>');
-printf(get_language_file_as_xml($language_interface));
-printf('</languageobject>');
-printf('</dokeosobject>');
-?>

BIN
main/conference/classroom.swf


+ 0 - 95
main/conference/get_translation.lib.php

@@ -1,95 +0,0 @@
-<?php
-/* See license terms in /license.txt */
-/**
- * Library for language translation from Chamilo language files to XML for videoconference
- * @uses main_api.lib.php for api_get_path()
- */
-/**
- * This function reads a Chamilo language file and transforms it into XML,
- * then returns the XML string to the caller.
- */
-function get_language_file_as_xml($language='english')
-{
-	$path = api_get_path(SYS_LANG_PATH).$language.'/';
-	if(!is_dir($path) or !is_readable($path))
-	{
-		if($language != 'english')
-		{
-			return get_language_file_as_xml('english');
-		}
-		else
-		{
-			return '';
-		}
-	}
-	//error_log('Analysing path '.$path);
-	$file = $path.'videoconf.inc.php';
-	if(!is_file($file) or !is_readable($file))
-	{
-		if($language != 'english')
-		{
-			return get_language_file_as_xml('english');
-		}
-		else
-		{
-			return '';
-		}
-	}
-
-	/*
-	$convert = true;
-	if(substr($language,-7,7) == 'unicode')
-	{//do not convert if the language ends with 'unicode', which means it's in UTF-8
-		$convert=false;
-	}
-	$list = file($file);
-	$xml = '';
-	foreach ( $list as $line )
-	{
-		if(substr($line,0,1)=='$')
-		{
-			$items = array();
-			$match = preg_match('/^\$([^\s]*)\s*=\s*"(.*)";$/',$line,$items);
-			if($match)
-			{
-				//todo: The following conversion should only happen for old language files (encoded in ISO-8859-1).
-				if($convert)
-				{
-					$string = api_convert_encoding($items[2],'UTF-8','ISO-8859-1');
-				}
-				else
-				{
-					$string = $items[2];
-				}
-				$xml .= '<labelfield><labelid>'.$items[1].'</labelid><labelvalue>'.stripslashes($string).'</labelvalue></labelfield>'."\n";
-			}
-		}
-	}
-	*/
-
-	//---------
-	$non_utf8_encoding = api_get_non_utf8_encoding($language);
-	$list = file($file);
-	$xml = '';
-	foreach ( $list as $line ) {
-		if(substr($line, 0, 1)=='$') {
-			$items = array();
-			$match = preg_match('/^\$([^\s]*)\s*=\s*"(.*)";$/', $line, $items);
-			if($match) {
-				$string = $items[2];
-				if (!api_is_valid_utf8($string)) {
-					$string = api_html_entity_decode(api_utf8_encode($string, $non_utf8_encoding), ENT_QUOTES, 'UTF-8');
-				}
-				$xml .= '<labelfield><labelid>'.$items[1].'</labelid><labelvalue>'.stripslashes($string).'</labelvalue></labelfield>'."\n";
-			}
-		}
-	}
-	//---------
-
-	if(empty($xml) && $language!='english')
-	{
-		return get_language_file_as_xml('english');
-	}
-	return $xml;
-}
-?>

+ 0 - 15
main/conference/index.php

@@ -1,15 +0,0 @@
-<?php
-/* See license terms in /license.txt */
-/**
- * Generates the HTML page containing the iframe that loads the videoconference's Flash plugin
- */
-require_once '../inc/global.inc.php'; 
-api_protect_course_script();
-// Only allow conference or classroom modes. Others are likely to be attacks
-if ($_GET['type'] == 'conference' or $_GET['type'] == 'classroom') {
-	$_SESSION["roomType"] = $_GET['type'];
-}
-?>
-<span align="center">
-<iframe frameborder="0" scrolling="no" width="100%" height="100%" src="videoconference.php"></iframe>
-</span>

BIN
main/conference/player2.swf


BIN
main/conference/recorder2.swf


BIN
main/conference/resources/themes/darkblue/background.png


BIN
main/conference/resources/themes/darkblue/background2.png


BIN
main/conference/resources/themes/darkblue/backgroundsanspied.png


BIN
main/conference/resources/themes/darkblue/buttons/button_quit.png


BIN
main/conference/resources/themes/darkblue/buttons/menudraw_down.png


BIN
main/conference/resources/themes/darkblue/buttons/menudraw_down_back.png


BIN
main/conference/resources/themes/darkblue/buttons/menudraw_down_close.png


BIN
main/conference/resources/themes/darkblue/buttons/menudraw_down_color.png


BIN
main/conference/resources/themes/darkblue/buttons/menudraw_down_colorline.png


BIN
main/conference/resources/themes/darkblue/buttons/menudraw_down_letter.png


BIN
main/conference/resources/themes/darkblue/buttons/menudraw_down_line.png


BIN
main/conference/resources/themes/darkblue/buttons/menudraw_down_newfile.png


BIN
main/conference/resources/themes/darkblue/buttons/menudraw_down_next.png


BIN
main/conference/resources/themes/darkblue/buttons/menudraw_down_paint.png


BIN
main/conference/resources/themes/darkblue/buttons/menudraw_down_point.png


BIN
main/conference/resources/themes/darkblue/buttons/menudraw_down_underline.png


BIN
main/conference/resources/themes/darkblue/buttons/menudraw_over.png


BIN
main/conference/resources/themes/darkblue/buttons/menudraw_over.swf


BIN
main/conference/resources/themes/darkblue/buttons/menudraw_over_back.png


BIN
main/conference/resources/themes/darkblue/buttons/menudraw_over_close.png


BIN
main/conference/resources/themes/darkblue/buttons/menudraw_over_color.png


BIN
main/conference/resources/themes/darkblue/buttons/menudraw_over_colorline.png


BIN
main/conference/resources/themes/darkblue/buttons/menudraw_over_letter.png


BIN
main/conference/resources/themes/darkblue/buttons/menudraw_over_line.png


BIN
main/conference/resources/themes/darkblue/buttons/menudraw_over_newfile.png


BIN
main/conference/resources/themes/darkblue/buttons/menudraw_over_next.png


BIN
main/conference/resources/themes/darkblue/buttons/menudraw_over_paint.png


BIN
main/conference/resources/themes/darkblue/buttons/menudraw_over_point.png


BIN
main/conference/resources/themes/darkblue/buttons/menudraw_over_underline.png


BIN
main/conference/resources/themes/darkblue/buttons/menudraw_up.png


BIN
main/conference/resources/themes/darkblue/buttons/menudraw_up.swf


BIN
main/conference/resources/themes/darkblue/buttons/menudraw_up_back.png


BIN
main/conference/resources/themes/darkblue/buttons/menudraw_up_close.png


BIN
main/conference/resources/themes/darkblue/buttons/menudraw_up_color.png


BIN
main/conference/resources/themes/darkblue/buttons/menudraw_up_colorline.png


BIN
main/conference/resources/themes/darkblue/buttons/menudraw_up_letter.png


BIN
main/conference/resources/themes/darkblue/buttons/menudraw_up_line.png


BIN
main/conference/resources/themes/darkblue/buttons/menudraw_up_newfile.png


BIN
main/conference/resources/themes/darkblue/buttons/menudraw_up_next.png


BIN
main/conference/resources/themes/darkblue/buttons/menudraw_up_paint.png


BIN
main/conference/resources/themes/darkblue/buttons/menudraw_up_point.png


BIN
main/conference/resources/themes/darkblue/buttons/menudraw_up_underline.png


BIN
main/conference/resources/themes/darkblue/buttons/menupointer.png


BIN
main/conference/resources/themes/darkblue/buttons/menuseperator.png


BIN
main/conference/resources/themes/darkblue/buttons/messagebox_info.png


BIN
main/conference/resources/themes/darkblue/buttons/mix_record.png


BIN
main/conference/resources/themes/darkblue/buttons/next.png


BIN
main/conference/resources/themes/darkblue/buttons/tabbutton_dn_lf.png


BIN
main/conference/resources/themes/darkblue/buttons/tabbutton_dn_mid.png


BIN
main/conference/resources/themes/darkblue/buttons/tabbutton_dn_re.png


BIN
main/conference/resources/themes/darkblue/buttons/tabbutton_mo_lf.png


BIN
main/conference/resources/themes/darkblue/buttons/tabbutton_mo_mid.png


BIN
main/conference/resources/themes/darkblue/buttons/tabbutton_mo_re.png


BIN
main/conference/resources/themes/darkblue/buttons/tabbutton_up_lf.png


BIN
main/conference/resources/themes/darkblue/buttons/tabbutton_up_mid.png


BIN
main/conference/resources/themes/darkblue/buttons/tabbutton_up_re.png


BIN
main/conference/resources/themes/darkblue/buttons/top.png


BIN
main/conference/resources/themes/darkblue/splash.swf


BIN
main/conference/resources/themes/grey/background.png


BIN
main/conference/resources/themes/grey/backgroundstuff.png


BIN
main/conference/resources/themes/grey/buttons/button_quit.png


BIN
main/conference/resources/themes/grey/buttons/menudraw_down.png


BIN
main/conference/resources/themes/grey/buttons/menudraw_down_back.png


BIN
main/conference/resources/themes/grey/buttons/menudraw_down_close.png


BIN
main/conference/resources/themes/grey/buttons/menudraw_down_color.png


BIN
main/conference/resources/themes/grey/buttons/menudraw_down_colorline.png


BIN
main/conference/resources/themes/grey/buttons/menudraw_down_letter.png


Some files were not shown because too many files changed in this diff