Julio Montoya 14 rokov pred
rodič
commit
90fdd4d199

+ 11 - 3
documentation/changelog.html

@@ -25,10 +25,10 @@
    <li>New application of a drop-down menu to select where to save new documents created (Feature #1758)</li>
    <li>Added possibility to chose target in links even when not on homepage (Feature #1879)</li>
    <li>Now showing teachers results in exercises results list (was confusing for most teachers)</li>
-   <li>Update Google Maps plugin to 1.98 (Feature #1925)</li>
-   <li>Add a personal portfolio to Social Network. All users can easy copy some files from several courses in his/her personal portfolio (Feature #1853)</li>
+   <li>Updated Google Maps plugin to 1.98 (Feature #1925)</li>
+   <li>Added a personal portfolio to Social Network. All users can easy copy some files from several courses in his/her personal portfolio (Feature #1853)</li>
    <li>Students can edit, move and delete documents and drawings; create, move and delete subfolders, create user templates and make personal backups into a course inside his user shared folder (Features #2076, #2484)</li>
-   <li>Learning Path: New LP exercises reports added for teachers and admins (Feature BT#1634)</li>   
+   <li>Learning Path: New LP exercises reports added for teachers and admins (Feature BT#1634)</li>
    <li>Support for displaying vector graphics files (SVG) and multimedia OGG files, facilitating the inclusion of videos and audios in HTML 5 (Feature #2244)</li>
    <li>Admin tool to compare and move scores and tracking from a course to a session course BT#1786</li>
    <li>An optional "Course (training) validation" feature has been implemented. When it is activated, teachers loose ability to create coursers. Teachers fill course requests instead. Then, after approval, the requested courses are created by the platform administrator. (Feature # 2099)</li>
@@ -36,11 +36,19 @@
    <li>Added install/uninstall script possibilities for plugins (BT#1752)</li>
    <li>Integrate svg-edit. Teachers, students (into his/her user folder) and groups can create, edit and import SVG vector graphics online and export to PNG (Feature #2044, #2101,)</li>
    <li>A new plugin for making ASCIIsvg-based mathematical graphics has been created for the online editor (enable it from administrator's section). For using it, browsers should support SVG-technology. See a demo, implemented on TinyMCE: <a href="http://www.imathas.com/editordemo/demo.html" target="_blank">http://www.imathas.com/editordemo/demo.html</a>; for syntax and additional information see <a href="http://www1.chapman.edu/~jipsen/svg/asciisvg.html" target="_blank">http://www1.chapman.edu/~jipsen/svg/asciisvg.html</a>. This plugin uses the library file chamilo/main/inc/lib/asciimath/ASCIIMathML.js which has combined functionality ASCIIMathML + ASCIIsvg (Feature #2132)</li>
+   <li>Feature #2132: In the administrator's section "Administration &gt; Configuration settings &gt; Editor" some settings are to be used as follows:
+     <ul>
+       <li>"ASCIIMathML mathematical editor" - activates the plugin for inserting mathematical formulas;</li>
+       <li>"Mathematical graphics editor ASCIIsvg" - activates the plugin for inserting mathematical graphs;</li>
+       <li>"Load the file ASCIIMathML.js in all the system's pages" - activates the possibility for inserting/showing formulas and graphics outside the "Documents" tool, elsewhere in the system.</li>
+     </ul>
+   </li>
    <li>A new plugin for insert Widgets into your web pages</li>
    <li>Users can use online service to convert your text vozMe in mp3 audio files (Feature #2497)</li>
    <li>Students also can export documents to pdf</li>
    <li>Easy enabled for spellcheck button on web editor (Feature #2207)</li>
    <li>Increased control by platform administrator on the visibility of the folders in the documents tool (Feature #2164,#2484)</li>
+   <li>Added admin feature to hide tools from all courses - BT#1942</li>
 </ul>
 <h3>Debugging</h3>
 <ul>

+ 1 - 0
documentation/credits.html

@@ -446,6 +446,7 @@ rewritten by
     <ul>
       <li>Peter Jipsen</li>
       <li>David Lippman</li>
+      <li>Mauno Korpelainen for extending the symbol tables within the script ASCIIMathML.js</li>
       <li>Ivan Tcholakov for porting code in Chamilo LMS</li>
       <li>Furio Petrossi for advocacy, reserch and recommendations</li>
     </ul>

+ 63 - 63
documentation/installation_guide.html

@@ -1,22 +1,22 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
-	<head>
-	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-	<title>Chamilo 1.8.7.1 Installation Guide</title><link rel="stylesheet" href="default.css" type="text/css" media="screen,projection" />
-	<link rel="shortcut icon" href="../favicon.ico" type="image/x-icon" />
-	<style type="text/css">
-	<!--
-		page { width: 21cm; height: 29.7cm; margin: 2cm }
-		pre { font-family: "Courier New", monospace }
-		p { margin-bottom: 0.21cm }
-		.code {margin: 1em 1em 1em 2em; padding: 0.5em; background-color: rgb(229, 229, 229); vertical-align: top; border: 1px solid #999999;}
-	-->
-	</style>
-	</head>
+    <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+    <title>Chamilo 1.8.7.1 Installation Guide</title><link rel="stylesheet" href="default.css" type="text/css" media="screen,projection" />
+    <link rel="shortcut icon" href="../favicon.ico" type="image/x-icon" />
+    <style type="text/css">
+    <!--
+        page { width: 21cm; height: 29.7cm; margin: 2cm }
+        pre { font-family: "Courier New", monospace }
+        p { margin-bottom: 0.21cm }
+        .code {margin: 1em 1em 1em 2em; padding: 0.5em; background-color: rgb(229, 229, 229); vertical-align: top; border: 1px solid #999999;}
+    -->
+    </style>
+    </head>
 <body>
 
 <div id="header1">
-	<h1>Chamilo 1.8.7.1 : Installation Guide</h1>
+    <h1>Chamilo 1.8.7.1 : Installation Guide</h1>
 </div>
 
 <a href="index.html">Documentation</a> &gt; Installation Guide
@@ -223,11 +223,11 @@ To get the best of Chamilo, you need to finetune PHP settings. Consider : <br />
 
 
 <div class="code">
-	  max_execution_time = 300&nbsp;&nbsp;&nbsp; ; Maximum execution time of each script, in seconds<br />
-	  max_input_time = 600 ; Maximum amount of time each script may spend parsing request data<br />
-	  memory_limit = 256M&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ; Maximum amount of memory a script may consume (128MB)<br />
-	  post_max_size = 64M<br />
-	  upload_max_filesize = 100M
+      max_execution_time = 300&nbsp;&nbsp;&nbsp; ; Maximum execution time of each script, in seconds<br />
+      max_input_time = 600 ; Maximum amount of time each script may spend parsing request data<br />
+      memory_limit = 256M&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ; Maximum amount of memory a script may consume (128MB)<br />
+      post_max_size = 64M<br />
+      upload_max_filesize = 100M
 </div>
 
 <p>Some users could meet problems if their PHP settings don't fit
@@ -263,11 +263,11 @@ date.timezone = 'America/New_York'
 
 <p>You might also add the following php modules and packages:</p>
 <ul>
-	<li>php-ctype</li>
-	<li>php-gd</li>
-	<li>php-iconv</li>
-	<li>php-json</li>
-	<li>php-mbstring</li>
+    <li>php-ctype</li>
+    <li>php-gd</li>
+    <li>php-iconv</li>
+    <li>php-json</li>
+    <li>php-mbstring</li>
 </ul>
 <p><a href="http://dev.mysql.com/doc/mysql/en/index.html"></a><br /></p>
 
@@ -559,21 +559,21 @@ The fields used intensively by the Chamlio module are:<br />
 
 <ul>
 
-	<li>uid, which is matched to the username in Chamilo</li>
+    <li>uid, which is matched to the username in Chamilo</li>
 
-	<li>userPassword, which is matched to the user password, although
+    <li>userPassword, which is matched to the user password, although
 this part will only work for non-encrypted passwords for now, but it
 shouldn't be necessary if using the LDAP server as authentication</li>
 
-	<li>ou should end with the year of the person registration or any
+    <li>ou should end with the year of the person registration or any
 criteria you will use to filter users, so that they can be retrieved on
 that criteria</li>
 
-	<li>sn is used as the lastname field in Chamilo</li>
+    <li>sn is used as the lastname field in Chamilo</li>
 
-	<li>givenName is used as the firstname field in Chamilo</li>
+    <li>givenName is used as the firstname field in Chamilo</li>
 
-	<li>mail is used as the email field in Chamilo</li>
+    <li>mail is used as the email field in Chamilo</li>
 </ul>
 
 
@@ -584,20 +584,20 @@ that criteria</li>
 
 You can enable mathematical equations writing inside the Chamilo online editor (FCKEditor) by applying the following steps:
 <ul>
-	<li>1. Configure your Apache installation to add a cgi-bin directory that contains a symbolic link to the mimetex.cgi in <i>chamilo/main/inc/lib/mimetex/</i> (*see below, step 4)</li>
-	<li>2. Reload your Apache configuration</li>
-	<li>3. Edit the online editor's configuration file <i>chamilo/main/inc/lib/fckeditor/myconfig.php</i> and</li>
-	<li>3.1. Enable the mimetex plugin, find the line //$config['LoadPlugin'][] = 'mimetex'; and modify it to be: <b>$config['LoadPlugin'][] = 'mimetex';</b> (remove the double slash)</li>
-	<li>3.2. The additional settings <b>$config['MimetexExecutableInstalled']</b> , <b>$config['MimetexExecutableDetectionMethod']</b>
+    <li>1. Configure your Apache installation to add a cgi-bin directory that contains a symbolic link to the mimetex.cgi in <i>chamilo/main/inc/lib/mimetex/</i> (*see below, step 4)</li>
+    <li>2. Reload your Apache configuration</li>
+    <li>3. Edit the online editor's configuration file <i>chamilo/main/inc/lib/fckeditor/myconfig.php</i> and</li>
+    <li>3.1. Enable the mimetex plugin, find the line //$config['LoadPlugin'][] = 'mimetex'; and modify it to be: <b>$config['LoadPlugin'][] = 'mimetex';</b> (remove the double slash)</li>
+    <li>3.2. The additional settings <b>$config['MimetexExecutableInstalled']</b> , <b>$config['MimetexExecutableDetectionMethod']</b>
 and <b>$config['MimetexExecutableDetectionTimeout']</b> are configured for best probability of automatic detection of the installed on the server file <i>mimetex.cgi</i> or <i>mimetex.exe</i>.
 In rare cases these options might need to be twicked, see the acccompanying comments about these options within the file <i>myconfig.php</i></li>
 
-	<li>3.3. Once the plugin has been activated, almost in all toolbars the corresponding button appears.
+    <li>3.3. Once the plugin has been activated, almost in all toolbars the corresponding button appears.
 If you need to edit some toolbars, see the configuration files (php) within the directory <i>chamilo/main/inc/lib/fckeditor/toolbars/</i> .
 Here is an example:
     <div class="code">$config['ToolbarSets']['Normal'] = array(<br /> &nbsp;&nbsp;array('FitWindow','Bold','Image','Link','PasteWord','MP3',<b>'mimetex'</b>,'Table','Subscript','Superscript','ShowBlocks')<br />);</div>
-	The item <b>'mimetex'</b> represents the button, you may add it to or remove it from any toolbar.<br /><br />
-	</li>
+    The item <b>'mimetex'</b> represents the button, you may add it to or remove it from any toolbar.<br /><br />
+    </li>
     <li>4. To install mimetex executable file, make these changes:</li>
 </ul>
 
@@ -644,46 +644,46 @@ and about the ASCIIMath formula syntax see <a href="http://www1.chapman.edu/~jip
 and <a href="http://dlippman.imathas.com/asciimathtex/AMT.html">http://dlippman.imathas.com/asciimathtex/AMT.html</a>.</p>
 
 <p>For writing ASCIIMath formulas in documents, a correspondent plugin for the online editor should be activated. For doing this,
-see the platform administration section and open the page "Administration &gt; Configuration settings &gt; WYSIWYG Editor".
+see the platform administration section and open the page "Administration &gt; Configuration settings &gt; Editor".
 Enable the setting <strong>"ASCIIMathML mathematical editor"</strong>.</p>
 
 <p>Inside documents, the script ASCIIMathML.js renders mathematical formulas in two altrnative ways:</p>
 <ul>
-	<li>By translation ASCIIMath formula notation into MathML code. MathML standard currently is supported by the following browsers:
-		<ul>
-			<li>Mozilla Firefox, you may consider installing STIX fonts (<a href="http://www.stixfonts.org">http://www.stixfonts.org</a>) on your client machines for nice looking formulas</li>
-			<li>Internet Explorer 6 or higher with the add-on MathPlayer 2.0 or higher (<a href="http://www.dessci.com/en/products/mathplayer">http://www.dessci.com/en/products/mathplayer</a>)</li>
-			<li>Opera 9.5 or higher</li>
-		</ul>
-	</li>
-	<li>For browser that do not support MathML - by translation ASCIIMath formula notation into TeX notation and passing it to
-	an external service. The external service produces and returns an image that contains the formula. This way is so called
-	"image-based fallback".
-	</li>
+    <li>By translation ASCIIMath formula notation into MathML code. MathML standard currently is supported by the following browsers:
+        <ul>
+            <li>Mozilla Firefox, you may consider installing STIX fonts (<a href="http://www.stixfonts.org">http://www.stixfonts.org</a>) on your client machines for nice looking formulas</li>
+            <li>Internet Explorer 6 or higher with the add-on MathPlayer 2.0 or higher (<a href="http://www.dessci.com/en/products/mathplayer">http://www.dessci.com/en/products/mathplayer</a>)</li>
+            <li>Opera 9.5 or higher</li>
+        </ul>
+    </li>
+    <li>For browser that do not support MathML - by translation ASCIIMath formula notation into TeX notation and passing it to
+    an external service. The external service produces and returns an image that contains the formula. This way is so called
+    "image-based fallback".
+    </li>
 </ul>
 
 <p>For providing <strong>image-based fallback</strong> in a production system, you should pick up and install on your server software for TeX rendering, such as:</p>
 <ul>
-	<li>mimeTeX - <a href="http://www.forkosh.dreamhost.com/source_mimetex.html">http://www.forkosh.dreamhost.com/source_mimetex.html</a>.
-	See <a href="#7._Mathematical_formulas">"7. Mathematical formulas with LaTeX"</a> on how to install the mimetex executable file on your server</li>
-	<li>mathTeX - <a href="http://www.forkosh.com/mathtex.html">http://www.forkosh.com/mathtex.html</a>. Browse the site for installation instructions</li>
+    <li>mimeTeX - <a href="http://www.forkosh.dreamhost.com/source_mimetex.html">http://www.forkosh.dreamhost.com/source_mimetex.html</a>.
+    See <a href="#7._Mathematical_formulas">"7. Mathematical formulas with LaTeX"</a> on how to install the mimetex executable file on your server</li>
+    <li>mathTeX - <a href="http://www.forkosh.com/mathtex.html">http://www.forkosh.com/mathtex.html</a>. Browse the site for installation instructions</li>
 </ul>
 
 <p>As an alternative, you may try to use some public services for TeX rendering, such as:</p>
 <ul>
-	<li>MathTran - <a href="http://www.mathtran.org">http://www.mathtran.org</a></li>
-	<li>Google Chart Tools - <a href="http://code.google.com/apis/charttools">http://code.google.com/apis/charttools</a></li>
+    <li>MathTran - <a href="http://www.mathtran.org">http://www.mathtran.org</a></li>
+    <li>Google Chart Tools - <a href="http://code.google.com/apis/charttools">http://code.google.com/apis/charttools</a></li>
 </ul>
 
 <p>Open with a text editor the file <strong>.../chamilo/main/inc/lib/asciimath/ASCIIMathML.js</strong>.
 Find somewhere at the beginning the line that initializes the variable <strong>AMTcgiloc</strong>.
 You may need to alter the setting to be for example:</p>
 <ul>
-	<li><div class="code">var AMTcgiloc = "http://mychamiloserver.org/cgi-bin/mimetex.cgi";</div></li>
-	<li><div class="code">var AMTcgiloc = "http://mychamiloserver.org/cgi-bin/mathtex.cgi";</div></li>
-	<li><div class="code">var AMTcgiloc = "http://www.mathtran.org/cgi-bin/mathtran?tex=";</div></li>
-	<li><div class="code">var AMTcgiloc = "http://chart.apis.google.com/chart?cht=tx&amp;chs=1x0&amp;chl=";</div></li>
-	<li>... or something else</li>
+    <li><div class="code">var AMTcgiloc = "http://mychamiloserver.org/cgi-bin/mimetex.cgi";</div></li>
+    <li><div class="code">var AMTcgiloc = "http://mychamiloserver.org/cgi-bin/mathtex.cgi";</div></li>
+    <li><div class="code">var AMTcgiloc = "http://www.mathtran.org/cgi-bin/mathtran?tex=";</div></li>
+    <li><div class="code">var AMTcgiloc = "http://chart.apis.google.com/chart?cht=tx&amp;chs=1x0&amp;chl=";</div></li>
+    <li>... or something else</li>
 </ul>
 <p>For testing how the variable <strong>AMTcgiloc</strong> may be set, there are some examples (as comments) inside the script.</p>
 <hr style="width: 100%; height: 2px;" />
@@ -701,7 +701,7 @@ You may need to alter the setting to be for example:</p>
 
 <hr />
     <a href="http://validator.w3.org/check?uri=referer"><img src="http://www.w3.org/Icons/valid-xhtml10-blue" alt="Valid XHTML 1.0 Transitional" style="margin: 1em; float: right;" height="31" width="88" /></a>
-	<a href="http://jigsaw.w3.org/css-validator/">
-		<img src="http://jigsaw.w3.org/css-validator/images/vcss-blue" style="margin: 1em; float: right;" alt="Valid CSS" />
-	</a>
+    <a href="http://jigsaw.w3.org/css-validator/">
+        <img src="http://jigsaw.w3.org/css-validator/images/vcss-blue" style="margin: 1em; float: right;" alt="Valid CSS" />
+    </a>
 </body></html>

+ 6 - 6
main/auth/sso/sso.class.php

@@ -10,12 +10,12 @@
 /**
  * The SSO class allows for management or remote Single Sign On resources
  */
-public class sso {
-    public var $protocol; //    'http://',
-    public var $domain; //    'localhost/project/drupal5',
-    public var $auth_uri; //    '/?q=user',
-    public var $deauth_uri; //    '/?q=logout',
-    public var $referer; // http://my.chamilo.com/main/auth/profile.php
+class sso {
+    public $protocol; //    'http://',
+    public $domain; //    'localhost/project/drupal5',
+    public $auth_uri; //    '/?q=user',
+    public $deauth_uri; //    '/?q=logout',
+    public $referer; // http://my.chamilo.com/main/auth/profile.php
 
     /**
      * Instanciates the object, initializing all relevant URL strings

+ 214 - 38
main/document/create_audio.php

@@ -7,20 +7,17 @@
  *	@package chamilo.document
  *
  * @author Juan Carlos Raña Trabado
- * @since 8/janvier/2011
- * TODO:clean all file and check lang for languages
+ * @since 8/January/2011
+ * TODO:clean all file
 */
 
 /*	INIT SECTION */
-
-// Name of the language file that needs to be included
 $language_file = array('document');
 
 require_once '../inc/global.inc.php';
 $_SESSION['whereami'] = 'document/createaudio';
 $this_section = SECTION_COURSES;
 
-require_once api_get_path(SYS_CODE_PATH).'document/document.inc.php';
 require_once api_get_path(LIBRARY_PATH).'groupmanager.lib.php';
 
 $nameTools = get_lang('CreateAudio');
@@ -34,6 +31,30 @@ if (!isset($_GET['dir'])){
 	api_not_allowed(true);
 }
 
+//javascript jquery
+$htmlHeadXtra[] = '<script src="../inc/lib/javascript/jquery-1.4.4.min.js" type="text/javascript"></script>';
+//jquery textareaCounter
+$htmlHeadXtra[] = '<script src="../inc/lib/javascript/textareacounter/jquery.textareaCounter.plugin.js" type="text/javascript"></script>';
+//need jquery for hide menus
+$htmlHeadXtra[] = '<script type="text/javascript" language="javascript">
+function advanced_parameters() {
+	if(document.getElementById(\'options\').style.display == \'none\') {
+					document.getElementById(\'options\').style.display = \'block\';
+					document.getElementById(\'plus_minus\').innerHTML=\'&nbsp;'.Display::return_icon('div_hide.gif',get_lang('Hide'),array('style'=>'vertical-align:middle')).'&nbsp;'.get_lang('AdvancedParameters').'\';
+	} else {
+					document.getElementById(\'options\').style.display = \'none\';
+					document.getElementById(\'plus_minus\').innerHTML=\'&nbsp;'.Display::return_icon('div_show.gif',get_lang('Show'),array('style'=>'vertical-align:middle')).'&nbsp;'.get_lang('AdvancedParameters').'\';
+	}
+}
+function setFocus(){
+	$("#search_title").focus();
+	}
+	$(document).ready(function () {
+	  setFocus();
+	});
+
+</script>';
+
 $dir = isset($_GET['dir']) ? Security::remove_XSS($_GET['dir']) : Security::remove_XSS($_POST['dir']);
 $is_allowed_to_edit = api_is_allowed_to_edit(null, true);
 
@@ -122,40 +143,195 @@ echo '<div class="actions">';
 		echo '<a href="document.php?curdirpath='.Security::remove_XSS($_GET['dir']).'">'.Display::return_icon('back.png',get_lang('BackTo').' '.get_lang('DocumentsOverview')).get_lang('BackTo').' '.get_lang('DocumentsOverview').'</a>';
 echo '</div>';
 
-
 ?>
-<div align="center">
-<?php Display::display_icon('sound.gif', get_lang('CreateAudio')); echo get_lang('HelpText2Audio'); ?>
-<form id="form1" name="form1" method="post" action="http://vozme.com/text2voice.php" target="mymp3" class="formw">
-  <p>
-    <label><?php echo get_lang('Language')?>: 
-      <select name="lang" id="select">
-        <option value="en" selected="selected">English</option>
-        <option value="es">Español</option>
-        <option value="pt">Português</option>
-        <option value="it">Italiano</option>        
-        <option value="ca">Català</option>
-        <option value="hi">हिन्दी</option>
-      </select>
-    </label>
-    <label><?php echo get_lang('Voice')?>:
-      <select name="gn" id="select1">
-        <option value="ml"><?php echo get_lang('Male')?></option>
-        <option value="fm"><?php echo get_lang('Female')?></option>
-      </select>
-    </label>
-  </p>
-  <div><?php echo get_lang('InsertText2Audio')?></div>
-  <p>
-    <label>
-      <textarea name="text" id="textarea" cols="55" rows="6"></textarea>
-    </label>
-  </p>
-  <p>
-    <button class="save" type="submit" name="SendText2Audio"><?php echo get_lang('BuildMP3');?></button>
-  </p>
-</form>
-</div>
+<!-- javascript and styles for textareaCounter-->
+<script type="text/javascript">
+var info;
+$(document).ready(function(){
+	var options = {
+		'maxCharacterSize': 100,
+		'originalStyle': 'originalTextareaInfo',
+		'warningStyle' : 'warningTextareaInfo',
+		'warningNumber': 10,
+		'displayFormat' : '#input/#max'
+	};
+	$('#textarea').textareaCount(options, function(data){
+		$('#textareaCallBack').html(result);				
+	});
+});
+</script>		        
+<style>
+.overview {
+	background: #FFEC9D;
+	padding: 10px;
+	width: 90%;
+	border: 1px solid #CCCCCC;
+}
+
+.originalTextareaInfo {
+	font-size: 12px;
+	color: #000000;
+	text-align: right;
+}
+
+.warningTextareaInfo {
+	color: #FF0000;
+	font-weight:bold;
+	text-align: right;	
+}
+
+#showData {
+	height: 70px;
+	width: 200px;
+	border: 1px solid #CCCCCC;
+	padding: 10px;
+	margin: 10px;
+}
+</style>
+
 <?php
+echo '<div align="center">'; 
+
+	Display::display_icon('sound.gif', get_lang('CreateAudio')); echo get_lang('HelpText2Audio'); 
+	
+	//Google services
+	echo '<div>&nbsp;</div><input type="checkbox" value="1" name="checktask" onclick="javascript: if(this.checked){document.getElementById(\'option1\').style.display=\'block\';}else{document.getElementById(\'option1\').style.display=\'none\';}"/>&nbsp;<img src="../img/file_sound.gif" title="'.get_lang('HelpGoogleAudio').'" alt="'.get_lang('GoogleAudio').'"/>&nbsp;'.get_lang('GoogleAudio').'';
+	echo '&nbsp;&nbsp;&nbsp;<span id="msg_error1" style="display:none;color:red"></span>';
+	echo '<div id="option1" style="padding:4px; margin:5px; border:1px dotted; display:none;">';
+	echo '<form id="form1" name="form1" method="post" action="'.downloadMP3($filepath, $dir).'" class="formw">';
+		echo '<br/>';
+		echo '<label>'.get_lang('Language').': ';
+		$tbl_admin_languages 	= Database :: get_main_table(TABLE_MAIN_LANGUAGE);
+		$sql_select = "SELECT * FROM $tbl_admin_languages";
+		$result_select = Database::query($sql_select);		
+		echo '<select name="lang" id="select">';
+		while ($row = Database::fetch_array($result_select)) {			
+			if (api_get_setting('platformLanguage')==$row['english_name']){
+				echo '<option value="'.$row['isocode'].'" selected="selected">'.$row['original_name'].' ('.$row['english_name'].')</option>';
+			}
+			else{					
+				echo '<option value="'.$row['isocode'].'">'.$row['original_name'].' ('.$row['english_name'].')</option>';
+			}	
+		}
+		echo '</select>';
+		echo '</label>';  
+		echo '<br/><br/>';
+		echo '<div>'.get_lang('InsertText2Audio').'</div>';
+		echo '<br/>';
+		echo '<label>';
+		echo '<textarea name="text" id="textarea" cols="70" rows="2"></textarea>';
+		echo '</label>';  
+		echo '<br/>';
+		echo '<label>'.get_lang('Title').': ';
+		echo '<input name="title" type="text" size="40" maxlength="40" />';
+		echo '</label>';  
+		echo '<br/><br/>';  
+		echo '<button class="save" type="submit" name="SendText2Audio">'.get_lang('SaveMP3').'</button>';
+		echo '<br/>';
+	echo '</form>';
+	echo '</div>';
+	
+	//vozMe services
+	
+	echo '<div>&nbsp;</div><input type="checkbox" value="1" name="checktask" onclick="javascript: if(this.checked){document.getElementById(\'option2\').style.display=\'block\';}else{document.getElementById(\'option2\').style.display=\'none\';}"/>&nbsp;<img src="../img/file_sound.gif" title="'.get_lang('HelpvozMe').'" alt="'.get_lang('vozMe').'"/>&nbsp;'.get_lang('vozMe').'';
+	echo '&nbsp;&nbsp;&nbsp;<span id="msg_error2" style="display:none;color:red"></span>';
+	echo '<div id="option2" style="padding:4px; margin:5px; border:1px dotted; display:none;">';
+	
+	echo '<form id="form2" name="form2" method="post" action="http://vozme.com/text2voice.php" target="mymp3" class="formw">';
+		echo '<br/>';
+		echo '<label>'.get_lang('Language').': ';
+		$tbl_admin_languages 	= Database :: get_main_table(TABLE_MAIN_LANGUAGE);
+		$sql_select = "SELECT * FROM $tbl_admin_languages";
+		$result_select = Database::query($sql_select);		
+		echo '<select name="lang" id="select">';
+		while ($row = Database::fetch_array($result_select)) {
+			
+			if (in_array($row['isocode'], array('ca', 'en', 'es', 'hi', 'it', 'pt'))){
+			
+				if (api_get_setting('platformLanguage')==$row['english_name']){
+					echo '<option value="'.$row['isocode'].'" selected="selected">'.$row['original_name'].' ('.$row['english_name'].')</option>';
+				}
+				else{					
+					echo '<option value="'.$row['isocode'].'">'.$row['original_name'].' ('.$row['english_name'].')</option>';
+				}
+			}
+		}
+		echo '</select>';
+		echo '</label>';
+		echo '<label>&nbsp;&nbsp;'.get_lang('Voice').': ';
+		echo '<select name="gn" id="select1">';
+		echo '<option value="ml">'.get_lang('Male').'</option>';
+		echo '<option value="fm">'.get_lang('Female').'</option>';
+		echo '</select>';
+		echo '</label>';
+		echo '<br/><br/>';
+		echo '<div>'.get_lang('InsertText2Audio').'</div>';
+		echo '<br/>';
+		echo '<label>';
+		echo '<textarea name="text" id="textarea" cols="70" rows="10"></textarea>';
+		echo '</label>';  
+		echo '<br/><br/>';  
+		echo '<button class="save" type="submit" name="SendText2Audio">'.get_lang('BuildMP3').'</button>';
+		echo '<br/>';
+	echo '</form>';
+	echo '</div>';
+
+echo '</div>';
+
 Display :: display_footer();
+
+//Functions
+
+/**
+ * This function save a post into a file mp3
+ *
+ * @param $filepath
+ * @param $dir
+  * @author Juan Carlos Raña Trabado <herodoto@telefonica.net>
+ * @version january 2011, chamilo 1.8.8
+ */
+function downloadMP3($filepath, $dir){
+	//security
+	if(!isset($_POST['lang']) && !isset($_POST['text']) && !isset($_POST['title']) && !isset($filepath) && !isset($dir)) {
+		return;	
+	}
+
+	$clean_title=trim(Security::remove_XSS($_POST['title']));
+	$clean_text=trim(Security::remove_XSS($_POST['text']));
+	$clean_lang=Security::remove_XSS($_POST['lang']);
+
+	if (strlen($clean_title) < "1") { 
+		return;
+	}
+	
+	$AudioFilename=$clean_title.'.mp3';	
+	$documentPath = $filepath.$AudioFilename;
+	
+	//prev for a fine unicode, borrowed from main api TODO:clean
+	// Safe replacements for some non-letter characters (whitout blank spaces)
+	$search  = array("\0", "\t", "\n", "\r", "\x0B", '/', "\\", '"', "'", '?', '*', '>', '<', '|', ':', '$', '(', ')', '^', '[', ']', '#', '+', '&', '%');
+	$replace = array('',  '_',  '_',  '_',  '_',    '-', '-',  '-', '_', '-', '-', '-', '-', '-', '-', '-', '-', '-', '-', '-', '-', '-', '-', '-', '-');	
+	$filename=$clean_text;
+	// Encoding detection.
+	$encoding = api_detect_encoding($filename);
+	// Converting html-entities into encoded characters.
+	$filename = api_html_entity_decode($filename, ENT_QUOTES, $encoding);
+	// Transliteration to ASCII letters, they are not dangerous for filesystems.
+	$filename = api_transliterate($filename, 'x', $encoding);
+    // Replacing remaining dangerous non-letter characters.
+    $clean_text = str_replace($search, $replace, $filename);
+	
+	//adding the file
+	if (!file_exists($documentPath)){
+		//add new file to disk
+		file_put_contents($documentPath, file_get_contents("http://translate.google.com/translate_tts?tl=".$clean_lang."&q=".urlencode($clean_text).""));
+		//add document to database
+		$current_session_id = api_get_session_id();
+		$groupId=$_SESSION['_gid'];
+		$file_size = filesize($documentPath);
+		$relativeUrlPath=$dir;
+		$doc_id = add_document($_course, $relativeUrlPath.$AudioFilename, 'file', filesize($documentPath), $AudioFilename);
+		api_item_property_update($_course, TOOL_DOCUMENT, $doc_id, 'DocumentAdded', $_user['user_id'], $groupId, null, null, null, $current_session_id);
+	}	
+}
 ?>

+ 2 - 2
main/document/document.php

@@ -929,12 +929,12 @@ if ($is_allowed_to_edit || $group_member_with_upload_rights || is_my_shared_fold
 	}
 	
 	// Create new audio
-	//if (api_get_setting('enabled_text2audio') == 'true'){
+	if (api_get_setting('enabled_text2audio') == 'true'){
 	?>
 		<a href="create_audio.php?<?php echo api_get_cidreq(); ?>&dir=<?php echo $curdirpathurl.$req_gid; ?>">
        <?php Display::display_icon('new_text2audio.png', get_lang('CreateAudio')); echo get_lang('CreateAudio'); ?></a>&nbsp;
 	<?php
-   // }	
+    }	
 
 	// Create new certificate
 	if ($is_certificate_mode) {

+ 12 - 1
main/inc/header.inc.php

@@ -25,6 +25,9 @@ if (api_is_platform_admin()) {
 }
 
 header('Content-Type: text/html; charset='.api_get_system_encoding());
+//show the X-Powered-By header so that parsers can find it
+global $_configuration;
+header('X-Powered-By: '.$_configuration['software_name'].' '.substr($_configuration['system_version'],0,1));
 
 $navigator_info = api_get_navigator();
 //ie6 fix
@@ -32,6 +35,13 @@ if ($navigator_info['name'] == 'Internet Explorer' &&  $navigator_info['version'
     $htmlHeadXtra[] = '<script src="'.api_get_path(WEB_LIBRARY_PATH).'javascript/iepngfix/iepngfix_tilebg.js" type="text/javascript" language="javascript"></script>';
 }
 
+// Include here the script ASCIIMathML.js if you want to show mathematical formulas and graphics
+// not only in the "Documents" tool, but elsewhere in the system. This setting is related to the
+// online editor's plugins 'asciimath' and 'asciisvg'.
+if (api_get_setting('include_asciimathml_script') == 'true') {
+    $htmlHeadXtra[] = '<script src="'.api_get_path(WEB_LIBRARY_PATH).'asciimath/ASCIIMathML.js" type="text/javascript"></script>';
+}
+
 if (isset($httpHeadXtra) && $httpHeadXtra) {
     foreach ($httpHeadXtra as & $thisHttpHead) {
         header($thisHttpHead);
@@ -110,13 +120,14 @@ if ($navigator_info['name']=='Internet Explorer' &&  $navigator_info['version']=
 <script src="<?php echo api_get_path(WEB_LIBRARY_PATH);?>javascript/thickbox.js" type="text/javascript" ></script>
 <link rel="stylesheet" href="<?php echo api_get_path(WEB_LIBRARY_PATH);?>javascript/thickbox.css" type="text/css" media="projection, screen" />
 <link rel="top" href="<?php echo api_get_path(WEB_PATH); ?>index.php" title="" />
-<link rel="courses" href="<?php echo api_get_path(WEB_CODE_PATH); ?>auth/courses.php" title="<?php echo api_htmlentities(get_lang('OtherCourses'), ENT_QUOTES); ?>" />
+ <link rel="courses" href="<?php echo api_get_path(WEB_CODE_PATH); ?>auth/courses.php" title="<?php echo api_htmlentities(get_lang('OtherCourses'), ENT_QUOTES); ?>" />
 <link rel="profil" href="<?php echo api_get_path(WEB_CODE_PATH); ?>auth/profile.php" title="<?php echo api_htmlentities(get_lang('ModifyProfile'), ENT_QUOTES); ?>" />
 <link href="http://www.chamilo.org/documentation.php" rel="Help" />
 <link href="http://www.chamilo.org/team.php" rel="Author" />
 <link href="http://www.chamilo.org" rel="Copyright" />
 <link rel="shortcut icon" href="<?php echo api_get_path(WEB_PATH); ?>favicon.ico" type="image/x-icon" />
 <meta http-equiv="Content-Type" content="text/html; charset=<?php echo api_get_system_encoding(); ?>" />
+<meta name="Generator" content="<?php echo $_configuration['software_name'].' '.substr($_configuration['system_version'],0,1);?>">
 <script src= "<?php echo api_get_path(WEB_LIBRARY_PATH);?>javascript/jquery.menu.js" type="text/javascript"></script>
 
 <script type="text/javascript">

+ 28 - 5
main/inc/lib/asciimath/ASCIIMathML.js

@@ -3842,9 +3842,15 @@ function showHideCode(evt) { // called by onclick event
   var obj=evt.target;
   var name = obj.parentNode.getAttribute("name");
   var node = document.getElementById(name+"input");
-  node.style.display = (node.style.display == "none"?"":"none");
-  var node = document.getElementById(name+"button");
-  node.style.display = (node.style.display == "none"?"":"none");
+  // The try-catch block has been added by Ivan Tcholakov, 08-JAN-2011.
+  try {
+  //
+    node.style.display = (node.style.display == "none"?"":"none");
+    var node = document.getElementById(name+"button");
+    node.style.display = (node.style.display == "none"?"":"none");
+  //
+  } catch (ex) { }
+  //
 //  }
 }
 
@@ -3943,8 +3949,13 @@ function initPicture(x_min,x_max,y_min,y_max) { // set up the graph
   node.setAttribute("height",height);
   node.setAttribute("style",backgroundstyle);
   svgpicture.appendChild(node);
-  svgpicture.setAttribute("onmousemove","displayCoord(evt)");
-  svgpicture.setAttribute("onmouseout","removeCoord(evt)");
+  // Modified by Ivan Tcholakov, 08-JAN-2011.
+  // These events are suppressed because for some browsers
+  // the coordinates are not calculated correctly.
+  // TODO: Calculation to be tested and corrected after IE9 release.
+  //svgpicture.setAttribute("onmousemove","displayCoord(evt)");
+  //svgpicture.setAttribute("onmouseout","removeCoord(evt)");
+  //
   svgpicture.setAttribute("onclick","mClick(evt)");
   node = myCreateElementSVG("text"); // used for displayCoord
   node.appendChild(doc.createTextNode(" "));
@@ -4628,6 +4639,12 @@ function displayCoord(evt) {
     var nl = svgroot.childNodes;
     for (var i=0; i<nl.length && nl.item(i).nodeName!="text"; i++);
     var cnode = nl.item(i);
+    // Added by Ivan Tcholakov, 08-JAN-2011.
+    // Suppresing a javasript error that occurs on Opera 11.
+    if (typeof cnode != 'object') {
+        return;
+    }
+    //
     cnode.mtext = mtext;
     cnode.mtext([svgroot.getAttribute("width")-(-7),svgroot.getAttribute("height")-7],"("+getX(evt).toFixed(2)+", "+getY(evt).toFixed(2)+")", "left", "", "11");
 /*    var dnode = nl.item(i+1);
@@ -4641,6 +4658,12 @@ function removeCoord(evt) {
     var nl = svgroot.childNodes;
     for (var i=0; i<nl.length && nl.item(i).nodeName!="text"; i++);
     var cnode = nl.item(i);
+    // Added by Ivan Tcholakov, 08-JAN-2011.
+    // Suppresing a javasript error that occurs on Opera 11.
+    if (typeof cnode != 'object') {
+        return;
+    }
+    //
     cnode.mtext = mtext;
     cnode.mtext([svgroot.getAttribute("width")-0,svgroot.getAttribute("height")-0],"", "aboveleft", "");
 /*    var dnode = nl.item(i+1);

+ 20 - 1
main/inc/lib/career.lib.php

@@ -473,8 +473,27 @@ class CourseHome {
 					break;
 		}
 
+        //Get the list of hidden tools - this might imply performance slowdowns
+        // if the course homepage is loaded many times, so the list of hidden
+        // tools might benefit from a shared memory storage later on 
+        $list = api_get_settings('Tools','list',api_get_current_access_url_id());
+        $hide_list = array();
+        $check = false;
+        foreach ($list as $line) {
+        	if ($line['variable'] == 'course_hide_tools' and $line['selected_value'] == 'true') {
+        		$hide_list[] = $line['subkey'];
+                $check = true;
+        	}
+        }
 		while ($temp_row = Database::fetch_assoc($result)) {
-			$all_tools_list[] = $temp_row;
+            if ($check) {
+            	if (!in_array($temp_row['name'],$hide_list)) {
+                    $all_tools_list[] = $temp_row;        		
+            	} else {
+            	}
+            } else {
+                    $all_tools_list[] = $temp_row;
+            }
 		}
 
 		/*if(api_is_course_coach()) {

+ 15 - 2
main/inc/lib/fckeditor/myconfig.php

@@ -188,7 +188,10 @@ if ((api_get_setting('math_mimetex') == 'true')) {
 // After enabling it, this plugin is configured to work with full-page html documents out-of-the box.
 // Browser compatibility: Internet Explorer 6.0+ with MathPlayer plugin, Mozilla Firefox 2.0+, Opera 9.5+
 if ((api_get_setting('math_asciimathML') == 'true')) {
-    $config['LoadPlugin'][] = 'asciimath';
+    // The following additional conditions are mandatory for correct working of the plugin. Please, don't alter them.
+    if ($this->Config['FullPage'] || api_get_setting('include_asciimathml_script') == 'true') {
+        $config['LoadPlugin'][] = 'asciimath';
+    }
 }
 
 // asciisvg: A plugin for drawing mathematical graphics on svg-enabled browsers.
@@ -197,7 +200,17 @@ if ((api_get_setting('math_asciimathML') == 'true')) {
 // if there is no security restriction (script-tag should not be filtered, by default this is valid for teachers).
 // Internet Explorer 8 (or prior) needs Adobe SVG Viewer installed, see http://www.adobe.com/svg/viewer/install/
 if ((api_get_setting('enabled_asciisvg') == 'true')) {
-    $config['LoadPlugin'][] = 'asciisvg';
+    // The following additional conditions are mandatory for correct working of the plugin. Please, don't alter them.
+    if ($this->Config['FullPage'] || api_get_setting('include_asciimathml_script') == 'true') {
+        $config['LoadPlugin'][] = 'asciisvg';
+    }
+}
+
+// Yet another mandatory condition for proper working of the plugins 'asciimath' and 'asciisvg'.
+if (api_get_setting('include_asciimathml_script') == 'true') {
+    // The automatic content parsing should be disabled on this case, otherwise content would be damaged.
+    // The editor does the necessary parsing within its separate iframe.
+    echo '<script type="text/javascript">var translateOnLoad = false ;</script>';
 }
 
 // WIRIS: plugin for inserting mathematical formulas

+ 10 - 10
main/inc/lib/fckeditor/toolbars/default/introduction.php

@@ -9,22 +9,22 @@
 
 // This is the visible toolbar set when the editor has "normal" size.
 $config['ToolbarSets']['Normal'] = array(
-	array('NewPage','FitWindow','-','PasteWord','-','Undo','Redo','-','SelectAll'),
-	array('Link','Unlink','Anchor'),
-	array('Image','flvPlayer','Flash','EmbedMovies','YouTube','MP3','mimetex'),
-	array('Table','SpecialChar'),
-	array('OrderedList','UnorderedList','-','Outdent','Indent','-','TextColor','BGColor','-','Source'),
-	'/',
-	array('Style','FontFormat','FontName','FontSize'),
-	array('Bold','Italic','Underline'),
-	array('JustifyLeft','JustifyCenter','JustifyRight')
+    array('NewPage','FitWindow','-','PasteWord','-','Undo','Redo','-','SelectAll'),
+    array('Link','Unlink','Anchor'),
+    array('Image','flvPlayer','Flash','EmbedMovies','YouTube','MP3','mimetex','asciimath','asciisvg'),
+    array('Table','SpecialChar'),
+    array('OrderedList','UnorderedList','-','Outdent','Indent','-','TextColor','BGColor','-','Source'),
+    '/',
+    array('Style','FontFormat','FontName','FontSize'),
+    array('Bold','Italic','Underline'),
+    array('JustifyLeft','JustifyCenter','JustifyRight')
 );
 
 // This is the visible toolbar set when the editor is maximized.
 // If it has not been defined, then the toolbar set for the "normal" size is used.
 /*
 $config['ToolbarSets']['Maximized'] = array(
-	array('FitWindow','-') // ...
+    array('FitWindow','-') // ...
 );
 */
 

+ 23 - 23
main/inc/lib/fckeditor/toolbars/extended/introduction.php

@@ -12,41 +12,41 @@
 
 // Hide/show SpellCheck buttom
 if ((api_get_setting('allow_spellcheck') == 'true')) {
-	$VSpellCheck='SpellCheck';
+    $VSpellCheck='SpellCheck';
 }
 else{
-	$VSpellCheck='';	
+    $VSpellCheck='';
 }
 
 // This is the visible toolbar set when the editor has "normal" size.
 $config['ToolbarSets']['Normal'] = array(
-	array('Save','NewPage','Templates','-','PasteWord'),
-	array('Undo','Redo'),
-	array('Link','Image','flvPlayer','Table','mimetex'),
-	array('UnorderedList','OrderedList','Rule','-','Outdent','Indent'),
-	array('JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'),
-	array('FontFormat','FontName','FontSize','Bold','Italic','Underline','TextColor','BGColor'),
-	array('FitWindow')
+    array('Save','NewPage','Templates','-','PasteWord'),
+    array('Undo','Redo'),
+    array('Link','Image','flvPlayer','Table','mimetex','asciimath','asciisvg'),
+    array('UnorderedList','OrderedList','Rule','-','Outdent','Indent'),
+    array('JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'),
+    array('FontFormat','FontName','FontSize','Bold','Italic','Underline','TextColor','BGColor'),
+    array('FitWindow')
 );
 
 // This is the visible toolbar set when the editor is maximized.
 // If it has not been defined, then the toolbar set for the "normal" size is used.
 $config['ToolbarSets']['Maximized'] = array(
-	array('Save','NewPage','Templates','-','Preview','Print'),
-	array('Cut','Copy','Paste','PasteText','PasteWord'),
-	array('Undo','Redo','-','SelectAll','Find','-','RemoveFormat'),
-	array('Link','Unlink','Anchor','Glossary'),
-	array('Image','imgmapPopup','flvPlayer','EmbedMovies','YouTube','Flash','MP3','googlemaps','Smiley','SpecialChar','insertHtml','mimetex','fckeditor_wiris_openFormulaEditor','fckeditor_wiris_openCAS'),
+    array('Save','NewPage','Templates','-','Preview','Print'),
+    array('Cut','Copy','Paste','PasteText','PasteWord'),
+    array('Undo','Redo','-','SelectAll','Find','-','RemoveFormat'),
+    array('Link','Unlink','Anchor','Glossary'),
+    array('Image','imgmapPopup','flvPlayer','EmbedMovies','YouTube','Flash','MP3','googlemaps','Smiley','SpecialChar','insertHtml','mimetex','asciimath','asciisvg','fckeditor_wiris_openFormulaEditor','fckeditor_wiris_openCAS'),
 '/',
-	array('Table','TableInsertRowAfter','TableDeleteRows','TableInsertColumnAfter','TableDeleteColumns','TableInsertCellAfter','TableDeleteCells','TableMergeCells','TableHorizontalSplitCell','TableVerticalSplitCell','TableCellProp','-','CreateDiv'),
-	array('UnorderedList','OrderedList','Rule','-','Outdent','Indent','Blockquote'),
-	array('JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'),	
-	array('Bold','Italic','Underline','StrikeThrough','-','Subscript','Superscript','-','TextColor','BGColor'),
-	array($VSpellCheck),	
-	array('Style','FontFormat','FontName','FontSize'),	
-	array('PageBreak','ShowBlocks','Source'),
-	array('FitWindow')
-	
+    array('Table','TableInsertRowAfter','TableDeleteRows','TableInsertColumnAfter','TableDeleteColumns','TableInsertCellAfter','TableDeleteCells','TableMergeCells','TableHorizontalSplitCell','TableVerticalSplitCell','TableCellProp','-','CreateDiv'),
+    array('UnorderedList','OrderedList','Rule','-','Outdent','Indent','Blockquote'),
+    array('JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'),
+    array('Bold','Italic','Underline','StrikeThrough','-','Subscript','Superscript','-','TextColor','BGColor'),
+    array($VSpellCheck),
+    array('Style','FontFormat','FontName','FontSize'),
+    array('PageBreak','ShowBlocks','Source'),
+    array('FitWindow')
+
 );
 
 // Sets whether the toolbar can be collapsed/expanded or not.

+ 163 - 0
main/inc/lib/javascript/textareacounter/jquery.textareaCounter.plugin.js

@@ -0,0 +1,163 @@
+/*
+ * jQuery Textarea Characters Counter Plugin v 2.0
+ * Examples and documentation at: http://roy-jin.appspot.com/jsp/textareaCounter.jsp
+ * Copyright (c) 2010 Roy Jin
+ * Version: 2.0 (11-JUN-2010)
+ * Dual licensed under the MIT and GPL licenses:
+ * http://www.opensource.org/licenses/mit-license.php
+ * http://www.gnu.org/licenses/gpl.html
+ * Requires: jQuery v1.4.2 or later
+ */
+(function($){  
+	$.fn.textareaCount = function(options, fn) {   
+		var defaults = {  
+			maxCharacterSize: -1,  
+			originalStyle: 'originalTextareaInfo',
+			warningStyle: 'warningTextareaInfo',  
+			warningNumber: 20,
+			displayFormat: '#input characters | #words words'
+		};  
+		var options = $.extend(defaults, options);
+		
+		var container = $(this);
+		
+		$("<div class='charleft'>&nbsp;</div>").insertAfter(container);
+		
+		//create charleft css
+		var charLeftCss = {
+			'width' : container.width()
+		};
+		
+		var charLeftInfo = getNextCharLeftInformation(container);
+		charLeftInfo.addClass(options.originalStyle);
+		charLeftInfo.css(charLeftCss);
+		
+		var numInput = 0;
+		var maxCharacters = options.maxCharacterSize;
+		var numLeft = 0;
+		var numWords = 0;
+				
+		container.bind('keyup', function(event){limitTextAreaByCharacterCount();})
+				 .bind('mouseover', function(event){setTimeout(function(){limitTextAreaByCharacterCount();}, 10);})
+				 .bind('paste', function(event){setTimeout(function(){limitTextAreaByCharacterCount();}, 10);});
+		
+		
+		function limitTextAreaByCharacterCount(){
+			charLeftInfo.html(countByCharacters());
+			//function call back
+			if(typeof fn != 'undefined'){
+				fn.call(this, getInfo());
+			}
+			return true;
+		}
+		
+		function countByCharacters(){
+			var content = container.val();
+			var contentLength = content.length;
+			
+			//Start Cut
+			if(options.maxCharacterSize > 0){
+				//If copied content is already more than maxCharacterSize, chop it to maxCharacterSize.
+				if(contentLength >= options.maxCharacterSize) {
+					content = content.substring(0, options.maxCharacterSize); 				
+				}
+				
+				var newlineCount = getNewlineCount(content);
+				
+				// newlineCount new line character. For windows, it occupies 2 characters
+				var systemmaxCharacterSize = options.maxCharacterSize - newlineCount;
+				if (!isWin()){
+					 systemmaxCharacterSize = options.maxCharacterSize
+				}
+				if(contentLength > systemmaxCharacterSize){
+					//avoid scroll bar moving
+					var originalScrollTopPosition = this.scrollTop;
+					container.val(content.substring(0, systemmaxCharacterSize));
+					this.scrollTop = originalScrollTopPosition;
+				}
+				charLeftInfo.removeClass(options.warningStyle);
+				if(systemmaxCharacterSize - contentLength <= options.warningNumber){
+					charLeftInfo.addClass(options.warningStyle);
+				}
+				
+				numInput = container.val().length + newlineCount;
+				if(!isWin()){
+					numInput = container.val().length;
+				}
+			
+				numWords = countWord(getCleanedWordString(container.val()));
+				
+				numLeft = maxCharacters - numInput;
+			} else {
+				//normal count, no cut
+				var newlineCount = getNewlineCount(content);
+				numInput = container.val().length + newlineCount;
+				if(!isWin()){
+					numInput = container.val().length;
+				}
+				numWords = countWord(getCleanedWordString(container.val()));
+			}
+			
+			return formatDisplayInfo();
+		}
+		
+		function formatDisplayInfo(){
+			var format = options.displayFormat;
+			format = format.replace('#input', numInput);
+			format = format.replace('#words', numWords);
+			//When maxCharacters <= 0, #max, #left cannot be substituted.
+			if(maxCharacters > 0){
+				format = format.replace('#max', maxCharacters);
+				format = format.replace('#left', numLeft);
+			}
+			return format;
+		}
+		
+		function getInfo(){
+			var info = {
+				input: numInput,
+				max: maxCharacters,
+				left: numLeft,
+				words: numWords
+			};
+			return info;
+		}
+		
+		function getNextCharLeftInformation(container){
+				return container.next('.charleft');
+		}
+		
+		function isWin(){
+			var strOS = navigator.appVersion;
+			if (strOS.toLowerCase().indexOf('win') != -1){
+				return true;
+			}
+			return false;
+		}
+		
+		function getNewlineCount(content){
+			var newlineCount = 0;
+			for(var i=0; i<content.length;i++){
+				if(content.charAt(i) == '\n'){
+					newlineCount++;
+				}
+			}
+			return newlineCount;
+		}
+		
+		function getCleanedWordString(content){
+			var fullStr = content + " ";
+			var initial_whitespace_rExp = /^[^A-Za-z0-9]+/gi;
+			var left_trimmedStr = fullStr.replace(initial_whitespace_rExp, "");
+			var non_alphanumerics_rExp = rExp = /[^A-Za-z0-9]+/gi;
+			var cleanedStr = left_trimmedStr.replace(non_alphanumerics_rExp, " ");
+			var splitString = cleanedStr.split(" ");
+			return splitString;
+		}
+		
+		function countWord(cleanedWordString){
+			var word_count = cleanedWordString.length-1;
+			return word_count;
+		}
+	};  
+})(jQuery); 

+ 5 - 1
main/inc/lib/main_api.lib.php

@@ -4122,7 +4122,11 @@ function api_get_current_access_url_id() {
         $access_url_id = Database::result($result, 0, 0);
         return $access_url_id;
     }
-    return -1;
+    //if the url in WEB_PATH was not found, it can only mean that there is
+    // either a configuration problem or the first URL has not been defined yet
+    // (by default it is http://localhost/). Thus the more sensible thing we can
+    // do is return 1 (the main URL) as the user cannot hack this value anyway 
+    return 1;
 }
 
 /**

+ 4 - 1
main/inc/lib/promotion.lib.php

@@ -1213,6 +1213,10 @@ class SessionManager {
      * @return  array a list with an user list
      */
     public static function get_users_by_session($id) {
+        if (empty($id)) {
+            return array();
+        }
+        $id = intval($id);
         $tbl_user                           = Database::get_main_table(TABLE_MAIN_USER);
         $tbl_session_rel_user               = Database::get_main_table(TABLE_MAIN_SESSION_USER);
         $order_clause ='';
@@ -1221,7 +1225,6 @@ class SessionManager {
         INNER JOIN '.$tbl_session_rel_user.'
             ON '.$tbl_user.'.user_id = '.$tbl_session_rel_user.'.id_user 
             AND '.$tbl_session_rel_user.'.id_session = '.$id.$order_clause;
-
         $result=Database::query($sql);
         //$users=Database::store_result($result);
         while ($row = Database::fetch_array($result,'ASSOC')) {

+ 40 - 2
main/inc/lib/text.lib.php

@@ -281,6 +281,44 @@ function api_fgetcsv($handle, $length = null, $delimiter = ',', $enclosure = '"'
 }
 
 
+/* Functions for supporting ASCIIMathML mathematical formulas and ASCIIsvg maathematical graphics */
+
+/**
+ * Dectects ASCIIMathML formula presence within a given html text.
+ * @param string $html      The input html text.
+ * @return bool             Returns TRUE when there is a formula found or FALSE otherwise.
+ */
+function api_contains_asciimathml($html) {
+    if (!preg_match_all('/<span[^>]*class\s*=\s*[\'"](.*?)[\'"][^>]*>/mi', $html, $matches)) {
+        return false;
+    }
+    foreach ($matches[1] as $string) {
+        $string = ' '.str_replace(',', ' ', $string).' ';
+        if (preg_match('/\sAM\s/m', $string)) {
+            return true;
+        }
+    }
+    return false;
+}
+
+/**
+ * Dectects ASCIIsvg graphics presence within a given html text.
+ * @param string $html      The input html text.
+ * @return bool             Returns TRUE when there is a graph found or FALSE otherwise.
+ */
+function api_contains_asciisvg($html) {
+    if (!preg_match_all('/<embed([^>]*?)>/mi', $html, $matches)) {
+        return false;
+    }
+    foreach ($matches[1] as $string) {
+        $string = ' '.str_replace(',', ' ', $string).' ';
+        if (preg_match('/sscr\s*=\s*[\'"](.*?)[\'"]/m', $string)) {
+            return true;
+        }
+    }
+    return false;
+}
+
 /* Miscellaneous text processing functions */
 
 /**
@@ -583,10 +621,10 @@ function get_last_week() {
  */
 function get_week_from_day($date) {
     if (!empty($date)) {
-	   $time = api_strtotime($date,'UTC');
+       $time = api_strtotime($date,'UTC');
        return date('W', $date);
     } else {
-    	return date('W');
+        return date('W');
     }
 }
 

+ 54 - 47
main/inc/reduced_header.inc.php

@@ -17,10 +17,17 @@
 
 header('Content-Type: text/html; charset='.api_get_system_encoding());
 
+// Include here the script ASCIIMathML.js if you want to show mathematical formulas and graphics
+// not only in the "Documents" tool, but elsewhere in the system. This setting is related to the
+// online editor's plugins 'asciimath' and 'asciisvg'.
+if (api_get_setting('include_asciimathml_script') == 'true') {
+    $htmlHeadXtra[] = '<script src="'.api_get_path(WEB_LIBRARY_PATH).'asciimath/ASCIIMathML.js" type="text/javascript"></script>';
+}
+
 if (isset($httpHeadXtra) && $httpHeadXtra) {
-	foreach ($httpHeadXtra as & $thisHttpHead) {
-		header($thisHttpHead);
-	}
+    foreach ($httpHeadXtra as & $thisHttpHead) {
+        header($thisHttpHead);
+    }
 }
 
 // Get language iso-code for this page - ignore errors
@@ -36,11 +43,11 @@ $document_language = api_get_language_isocode();
 <title>
 <?php
 if (!empty($nameTools)) {
-	echo $nameTools.' - ';
+    echo $nameTools.' - ';
 }
 
 if (!empty($_course['official_code'])) {
-	echo $_course['official_code'].' - ';
+    echo $_course['official_code'].' - ';
 }
 
 echo api_get_setting('siteName');
@@ -58,27 +65,27 @@ $my_style = api_get_visual_theme();
 
 // Sets the css reference it is call from lp_nav.php, lp_toc.php, lp_message, lp_log.php
 if (!empty($scorm_css_header)) {
-	if (!empty($my_style)) {
-		$scorm_css = api_get_path(WEB_CSS_PATH).$my_style.'/scorm.css';
-		$scormfs_css = api_get_path(WEB_CSS_PATH).$my_style.'/scormfs.css';
-	} else {
-		$scorm_css = 'scorm.css';
-		$scormfs_css = 'scormfs.css';
-	}
-
-	if (!empty($display_mode) && $display_mode == 'fullscreen') {
-		$htmlHeadXtra[] = '<style type="text/css" media="screen, projection">
-							/*<![CDATA[*/
-							@import "'.$scormfs_css.'";
-							/*]]>*/
-							</style>';
-	} else {
-		$htmlHeadXtra[] = '<style type="text/css" media="screen, projection">
-							/*<![CDATA[*/
-							@import "'.$scorm_css.'";
-							/*]]>*/
-							</style>';
-	}
+    if (!empty($my_style)) {
+        $scorm_css = api_get_path(WEB_CSS_PATH).$my_style.'/scorm.css';
+        $scormfs_css = api_get_path(WEB_CSS_PATH).$my_style.'/scormfs.css';
+    } else {
+        $scorm_css = 'scorm.css';
+        $scormfs_css = 'scormfs.css';
+    }
+
+    if (!empty($display_mode) && $display_mode == 'fullscreen') {
+        $htmlHeadXtra[] = '<style type="text/css" media="screen, projection">
+                            /*<![CDATA[*/
+                            @import "'.$scormfs_css.'";
+                            /*]]>*/
+                            </style>';
+    } else {
+        $htmlHeadXtra[] = '<style type="text/css" media="screen, projection">
+                            /*<![CDATA[*/
+                            @import "'.$scorm_css.'";
+                            /*]]>*/
+                            </style>';
+    }
 }
 
 
@@ -107,33 +114,33 @@ if ($my_style != '') {
 // This is a patch for the "__flash__removeCallback" bug, see FS#4378.
 if ( ( navigator.userAgent.toLowerCase().indexOf('msie') != -1 ) && ( navigator.userAgent.toLowerCase().indexOf( 'opera' ) == -1 ) )
 {
-	window.attachEvent( 'onunload', function()
-		{
-			window['__flash__removeCallback'] = function ( instance, name )
-			{
-				try
-				{
-					if ( instance )
-					{
-						instance[name] = null ;
-					}
-				}
-				catch ( flashEx )
-				{
-
-				}
-			} ;
-		}
-	) ;
+    window.attachEvent( 'onunload', function()
+        {
+            window['__flash__removeCallback'] = function ( instance, name )
+            {
+                try
+                {
+                    if ( instance )
+                    {
+                        instance[name] = null ;
+                    }
+                }
+                catch ( flashEx )
+                {
+
+                }
+            } ;
+        }
+    ) ;
 }
 //]]>
 </script>
 
 <?php
 if (isset($htmlHeadXtra) && $htmlHeadXtra) {
-	foreach ($htmlHeadXtra as & $this_html_head) {
-		echo $this_html_head;
-	}
+    foreach ($htmlHeadXtra as & $this_html_head) {
+        echo $this_html_head;
+    }
 }
 ?>
 </head>

+ 37 - 11
main/install/db_main.sql

@@ -752,6 +752,7 @@ VALUES
 ('math_mimetex',NULL,'radio','Editor','false','MathMimetexTitle','MathMimetexComment',NULL,NULL, 0),
 ('math_asciimathML',NULL,'radio','Editor','false','MathASCIImathMLTitle','MathASCIImathMLComment',NULL,NULL, 0),
 ('enabled_asciisvg',NULL,'radio','Editor','false','AsciiSvgTitle','AsciiSvgComment',NULL,NULL, 0),
+('include_asciimathml_script',NULL,'radio','Editor','false','IncludeAsciiMathMlTitle','IncludeAsciiMathMlComment',NULL,NULL, 0),
 ('youtube_for_students',NULL,'radio','Editor','true','YoutubeForStudentsTitle','YoutubeForStudentsComment',NULL,NULL, 0),
 ('block_copy_paste_for_students',NULL,'radio','Editor','false','BlockCopyPasteForStudentsTitle','BlockCopyPasteForStudentsComment',NULL,NULL, 0),
 ('more_buttons_maximized_mode',NULL,'radio','Editor','true','MoreButtonsForMaximizedModeTitle','MoreButtonsForMaximizedModeComment',NULL,NULL, 0),
@@ -789,9 +790,32 @@ VALUES
 ('show_users_folders',				NULL,'radio',		'Tools',	'true',	'ShowUsersFoldersTitle','ShowUsersFoldersComment',NULL,NULL, 0),
 ('show_default_folders',				NULL,'radio',		'Tools',	'true',	'ShowDefaultFoldersTitle','ShowDefaultFoldersComment',NULL,NULL, 0),
 ('show_chat_folder',				NULL,'radio',		'Tools',	'true',	'ShowChatFolderTitle','ShowChatFolderComment',NULL,NULL, 0),
-'ShowDefaultFoldersTitle','ShowDefaultFoldersComment',NULL,NULL, 0),
 ('enabled_text2audio',				NULL,'radio',		'Tools',	'false',	'Text2AudioTitle','Text2AudioComment',NULL,NULL, 0),
-('chamilo_database_version', 		NULL,'textfield', 	NULL, '1.8.8.13256','DokeosDatabaseVersion','', NULL, NULL, 0);
+('course_hide_tools','course_description','checkbox','Tools','false','CourseHideToolsTitle','CourseHideToolsComment',NULL,'CourseDescription', 1),
+('course_hide_tools','calendar_event','checkbox','Tools','false','CourseHideToolsTitle','CourseHideToolsComment',NULL,'Agenda', 1),
+('course_hide_tools','document','checkbox','Tools','false','CourseHideToolsTitle','CourseHideToolsComment',NULL,'Documents', 1),
+('course_hide_tools','learnpath','checkbox','Tools','false','CourseHideToolsTitle','CourseHideToolsComment',NULL,'LearningPath', 1),
+('course_hide_tools','link','checkbox','Tools','false','CourseHideToolsTitle','CourseHideToolsComment',NULL,'Links', 1),
+('course_hide_tools','announcement','checkbox','Tools','false','CourseHideToolsTitle','CourseHideToolsComment',NULL,'Announcements', 1),
+('course_hide_tools','forum','checkbox','Tools','false','CourseHideToolsTitle','CourseHideToolsComment',NULL,'Forums', 1),
+('course_hide_tools','dropbox','checkbox','Tools','false','CourseHideToolsTitle','CourseHideToolsComment',NULL,'Dropbox', 1),
+('course_hide_tools','quiz','checkbox','Tools','false','CourseHideToolsTitle','CourseHideToolsComment',NULL,'Quiz', 1),
+('course_hide_tools','user','checkbox','Tools','false','CourseHideToolsTitle','CourseHideToolsComment',NULL,'Users', 1),
+('course_hide_tools','group','checkbox','Tools','false','CourseHideToolsTitle','CourseHideToolsComment',NULL,'Groups', 1),
+('course_hide_tools','chat','checkbox','Tools','false','CourseHideToolsTitle','CourseHideToolsComment',NULL,'Chat', 1),
+('course_hide_tools','student_publication','checkbox','Tools','false','CourseHideToolsTitle','CourseHideToolsComment',NULL,'StudentPublications', 1),
+('course_hide_tools','wiki','checkbox','Tools','false','CourseHideToolsTitle','CourseHideToolsComment',NULL,'Wiki', 1),
+('course_hide_tools','gradebook','checkbox','Tools','false','CourseHideToolsTitle','CourseHideToolsComment',NULL,'Gradebook', 1),
+('course_hide_tools','survey','checkbox','Tools','false','CourseHideToolsTitle','CourseHideToolsComment',NULL,'Survey', 1),
+('course_hide_tools','glossary','checkbox','Tools','false','CourseHideToolsTitle','CourseHideToolsComment',NULL,'Glossary', 1),
+('course_hide_tools','notebook','checkbox','Tools','false','CourseHideToolsTitle','CourseHideToolsComment',NULL,'Notebook', 1),
+('course_hide_tools','attendance','checkbox','Tools','false','CourseHideToolsTitle','CourseHideToolsComment',NULL,'Attendances', 1),
+('course_hide_tools','course_progress','checkbox','Tools','false','CourseHideToolsTitle','CourseHideToolsComment',NULL,'CourseProgress', 1),
+('course_hide_tools','blog_management','checkbox','Tools','false','CourseHideToolsTitle','CourseHideToolsComment',NULL,'Blog',1),
+('course_hide_tools','tracking','checkbox','Tools','false','CourseHideToolsTitle','CourseHideToolsComment',NULL,'Stats',1),
+('course_hide_tools','course_maintenance','checkbox','Tools','false','CourseHideToolsTitle','CourseHideToolsComment',NULL,'Maintenance',1),
+('course_hide_tools','course_setting','checkbox','Tools','false','CourseHideToolsTitle','CourseHideToolsComment',NULL,'CourseSettings',1),
+('chamilo_database_version', 		NULL,'textfield', 	NULL, '1.8.8.13330','DokeosDatabaseVersion','', NULL, NULL, 0);
 
 
 UNLOCK TABLES;
@@ -990,6 +1014,8 @@ VALUES
 ('math_asciimathML','false','No'),
 ('enabled_asciisvg','true','Yes'),
 ('enabled_asciisvg','false','No'),
+('include_asciimathml_script','true','Yes'),
+('include_asciimathml_script','false','No'),
 ('youtube_for_students','true','Yes'),
 ('youtube_for_students','false','No'),
 ('block_copy_paste_for_students','true','Yes'),
@@ -2515,19 +2541,19 @@ CREATE TABLE course_request (
 );
 
 CREATE TABLE career (
-	id INT NOT NULL AUTO_INCREMENT,
-	name VARCHAR(255) NOT NULL ,
-	description TEXT NOT NULL,
-	PRIMARY KEY (id)
+    id INT NOT NULL AUTO_INCREMENT,
+    name VARCHAR(255) NOT NULL ,
+    description TEXT NOT NULL,
+    PRIMARY KEY (id)
 );
 
 
 
 CREATE TABLE promotion (
-	id INT NOT NULL AUTO_INCREMENT,
-	name VARCHAR(255) NOT NULL ,
-	description TEXT NOT NULL,
-	career_id INT NOT NULL,
-	PRIMARY KEY(id)
+    id INT NOT NULL AUTO_INCREMENT,
+    name VARCHAR(255) NOT NULL ,
+    description TEXT NOT NULL,
+    career_id INT NOT NULL,
+    PRIMARY KEY(id)
 );
 

+ 2 - 2
main/install/install.lib.php

@@ -1142,8 +1142,8 @@ function display_requirements($installType, $badUpdatePath, $updatePath = '', $u
             </tr>
             <tr>
                 <td class="requirements-item"><a href="http://www.php.net/manual/en/session.configuration.php#ini.session.cookie-httponly">Cookie HTTP Only</a></td>
-                <td class="requirements-recommended">1</td>
-                <td class="requirements-value">'.check_php_setting('session.cookie_httponly','1').'</td>
+                <td class="requirements-recommended">ON</td>
+                <td class="requirements-value">'.check_php_setting('session.cookie_httponly','ON').'</td>
             </tr>
             <tr>
                 <td class="requirements-item"><a href="http://php.net/manual/ini.core.php#ini.upload-max-filesize">Maximum upload file size</a></td>

+ 29 - 2
main/install/migrate-db-1.8.7-1.8.8-pre.sql

@@ -25,7 +25,6 @@ ALTER TABLE settings_options CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_
 ALTER TABLE user MODIFY COLUMN username VARCHAR(40) NOT NULL;
 
 UPDATE settings_current SET variable='chamilo_database_version' WHERE variable='dokeos_database_version';
-UPDATE settings_current SET selected_value = '1.8.8.13255' WHERE variable = 'chamilo_database_version';
 
 ALTER TABLE sys_announcement ADD COLUMN access_url_id INT  NOT NULL default 1;
 ALTER TABLE sys_calendar ADD COLUMN access_url_id INT  NOT NULL default 1;
@@ -53,6 +52,9 @@ INSERT INTO settings_options (variable, value, display_text) VALUES ('sso_authen
 INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext, access_url_changeable) VALUES ('enabled_asciisvg',NULL,'radio','Editor','false','AsciiSvgTitle','AsciiSvgComment',NULL,NULL, 0);
 INSERT INTO settings_options (variable, value, display_text) VALUES ('enabled_asciisvg', 'true', 'Yes');
 INSERT INTO settings_options (variable, value, display_text) VALUES ('enabled_asciisvg', 'false', 'No');
+INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext, access_url_changeable) VALUES ('include_asciimathml_script',NULL,'radio','Editor','false','IncludeAsciiMathMlTitle','IncludeAsciiMathMlComment',NULL,NULL, 0);
+INSERT INTO settings_options (variable, value, display_text) VALUES ('include_asciimathml_script', 'true', 'Yes');
+INSERT INTO settings_options (variable, value, display_text) VALUES ('include_asciimathml_script', 'false', 'No');
 INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext, access_url_changeable) VALUES ('enabled_wiris',NULL,'radio','Editor','false','EnabledWirisTitle','EnabledWirisComment',NULL,NULL, 0);
 INSERT INTO settings_options (variable, value, display_text) VALUES ('enabled_wiris', 'true', 'Yes');
 INSERT INTO settings_options (variable, value, display_text) VALUES ('enabled_wiris', 'false', 'No');
@@ -84,7 +86,6 @@ INSERT INTO settings_options (variable, value, display_text) VALUES ('pdf_export
 
 INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext, access_url_changeable) VALUES ('pdf_export_watermark_text',		NULL,'textfield',	'Platform',	'',		'PDFExportWatermarkTextTitle','PDFExportWatermarkTextComment','platform',NULL, 	1);
 
-
 ALTER TABLE personal_agenda ADD PRIMARY KEY (id);
 
 UPDATE settings_current SET selected_value='1' WHERE variable='more_buttons_maximized_mode';
@@ -116,6 +117,32 @@ INSERT INTO settings_current (variable, subkey, type, category, selected_value,
 INSERT INTO settings_options (variable, value, display_text) VALUES ('enabled_text2audio', 'true', 'Yes');
 INSERT INTO settings_options (variable, value, display_text) VALUES ('enabled_text2audio', 'false', 'No');
 
+INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext, access_url_changeable) VALUES ('course_hide_tools','course_description','checkbox','Tools','false','CourseHideToolsTitle','CourseHideToolsComment',NULL,'CourseDescription', 1);
+INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext, access_url_changeable) VALUES ('course_hide_tools','calendar_event','checkbox','Tools','false','CourseHideToolsTitle','CourseHideToolsComment',NULL,'Agenda', 1);
+INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext, access_url_changeable) VALUES ('course_hide_tools','document','checkbox','Tools','false','CourseHideToolsTitle','CourseHideToolsComment',NULL,'Documents', 1);
+INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext, access_url_changeable) VALUES ('course_hide_tools','learnpath','checkbox','Tools','false','CourseHideToolsTitle','CourseHideToolsComment',NULL,'LearningPath', 1);
+INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext, access_url_changeable) VALUES ('course_hide_tools','link','checkbox','Tools','false','CourseHideToolsTitle','CourseHideToolsComment',NULL,'Links', 1);
+INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext, access_url_changeable) VALUES ('course_hide_tools','announcement','checkbox','Tools','false','CourseHideToolsTitle','CourseHideToolsComment',NULL,'Announcements', 1);
+INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext, access_url_changeable) VALUES ('course_hide_tools','forum','checkbox','Tools','false','CourseHideToolsTitle','CourseHideToolsComment',NULL,'Forums', 1);
+INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext, access_url_changeable) VALUES ('course_hide_tools','dropbox','checkbox','Tools','false','CourseHideToolsTitle','CourseHideToolsComment',NULL,'Dropbox', 1);
+INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext, access_url_changeable) VALUES ('course_hide_tools','quiz','checkbox','Tools','false','CourseHideToolsTitle','CourseHideToolsComment',NULL,'Quiz', 1);
+INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext, access_url_changeable) VALUES ('course_hide_tools','user','checkbox','Tools','false','CourseHideToolsTitle','CourseHideToolsComment',NULL,'Users', 1);
+INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext, access_url_changeable) VALUES ('course_hide_tools','group','checkbox','Tools','false','CourseHideToolsTitle','CourseHideToolsComment',NULL,'Groups', 1);
+INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext, access_url_changeable) VALUES ('course_hide_tools','chat','checkbox','Tools','false','CourseHideToolsTitle','CourseHideToolsComment',NULL,'Chat', 1);
+INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext, access_url_changeable) VALUES ('course_hide_tools','student_publication','checkbox','Tools','false','CourseHideToolsTitle','CourseHideToolsComment',NULL,'StudentPublications', 1);
+INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext, access_url_changeable) VALUES ('course_hide_tools','wiki','checkbox','Tools','false','CourseHideToolsTitle','CourseHideToolsComment',NULL,'Wiki', 1);
+INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext, access_url_changeable) VALUES ('course_hide_tools','gradebook','checkbox','Tools','false','CourseHideToolsTitle','CourseHideToolsComment',NULL,'Gradebook', 1);
+INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext, access_url_changeable) VALUES ('course_hide_tools','survey','checkbox','Tools','false','CourseHideToolsTitle','CourseHideToolsComment',NULL,'Survey', 1);
+INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext, access_url_changeable) VALUES ('course_hide_tools','glossary','checkbox','Tools','false','CourseHideToolsTitle','CourseHideToolsComment',NULL,'Glossary', 1);
+INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext, access_url_changeable) VALUES ('course_hide_tools','notebook','checkbox','Tools','false','CourseHideToolsTitle','CourseHideToolsComment',NULL,'Notebook', 1);
+INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext, access_url_changeable) VALUES ('course_hide_tools','attendance','checkbox','Tools','false','CourseHideToolsTitle','CourseHideToolsComment',NULL,'Attendances', 1);
+INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext, access_url_changeable) VALUES ('course_hide_tools','course_progress','checkbox','Tools','false','CourseHideToolsTitle','CourseHideToolsComment',NULL,'CourseProgress', 1);
+INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext, access_url_changeable) VALUES ('course_hide_tools','blog_management','checkbox','Tools','false','CourseHideToolsTitle','CourseHideToolsComment',NULL,'Blog',1);
+INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext, access_url_changeable) VALUES ('course_hide_tools','tracking','checkbox','Tools','false','CourseHideToolsTitle','CourseHideToolsComment',NULL,'Stats',1);
+INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext, access_url_changeable) VALUES ('course_hide_tools','course_maintenance','checkbox','Tools','false','CourseHideToolsTitle','CourseHideToolsComment',NULL,'Maintenance',1);
+INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext, access_url_changeable) VALUES ('course_hide_tools','course_setting','checkbox','Tools','false','CourseHideToolsTitle','CourseHideToolsComment',NULL,'CourseSettings',1);
+
+UPDATE settings_current SET selected_value = '1.8.8.13330' WHERE variable = 'chamilo_database_version';
 
 -- xxSTATSxx
 ALTER TABLE track_e_exercices ADD COLUMN orig_lp_item_view_id INT NOT NULL DEFAULT 0;

+ 2 - 0
main/lang/bulgarian/admin.inc.php

@@ -1213,4 +1213,6 @@ $CourseValidationTermsAndConditionsLink = "Одобряване на новит
 $CourseValidationTermsAndConditionsLinkComment = "Това е URL на документа \"Условия за ползване\", който е валиден при подаване на заявка за нов курс. Ако адресът тук е зададен, преди потребителят да подаде заявката ще трябва да прочете и да се съгласи с условията за ползаване.<br />Ако активирате модула на Chamilo \"Условия за ползване\" и ако искате неговият URL да бъде използван - оставете в тази настройка празна стойност.";
 $AsciiSvgTitle = "Редактор на математически графики ASCIIsvg";
 $AsciiSvgComment = "Активиране на редактора на математически графики (ASCIIsvg).";
+$IncludeAsciiMathMlTitle = "Да се зарежда скрипта ASCIIMathML.js във всички страници на системата";
+$IncludeAsciiMathMlComment = "Активирайте тази настройка, ако искате математическите формули (ASCIIMathML) и математическите графики (ASCIIsvg) да могат да се показват не само в инструмента \"Документи\", а и във всички останали страници на системата.";
 ?>

+ 5 - 3
main/lang/english/admin.inc.php

@@ -1244,11 +1244,11 @@ $ThisSectionIsOnlyVisibleOnSourceInstalls = "This section is only visible on ins
 $UsersFillingReport = "Users filling report";
 $AllUsersAreAutomaticallyRegistered = "All users are automatically registered";
 $AssignCoach = "Assign coach";
-$chamilo = "chamilo";
-$php = "php";
+$chamilo = "Chamilo";
+$php = "PHP";
 $Off = "Off";
 $minimum = "minimum";
-$webserver = "web server";
+$webserver = "Web server";
 $mysql = "MySQL";
 $Social = "Social";
 $BackupCreated = "Backup created";
@@ -1324,4 +1324,6 @@ $EnabledStudentExport2PDFTitle = "Allow students to export web documents to PDF
 $EnabledStudentExport2PDFComment = "This feature is enabled by default, but in case of server overload abuse it, or specific learning environments, might want to disable it for all courses.";
 $EnabledInsertHtmlTitle = "Allow the insertion of widgets";
 $EnabledInsertHtmlComment = "This allows you to embed on your webpages your favorite videos and applications such as vimeo or slideshare and all sorts of widgets and gadgets";
+$IncludeAsciiMathMlTitle = "Load the file ASCIIMathML.js in all the system's pages";
+$IncludeAsciiMathMlComment = "Activate this setting if you want to show ASCIIMathML-based mathematical formulas and ASCIIsvg-based mathematical graphics not only in the \"Documents\" tool, but elsewhere in the system.";
 ?>

+ 3 - 0
main/tracking/course_session_report.php

@@ -55,6 +55,9 @@ $my_session_list = array();
 foreach($session_list as $sesion_item) {
 	$my_session_list[$sesion_item['id']] = $sesion_item['name'];
 }
+if (count($session_list) == 0) {
+	$my_session_list[0] = get_lang('None');
+}
 $form->addElement('select', 'session_id', get_lang('Sessions'), $my_session_list);
 $form->addElement('style_submit_button','submit',get_lang('Filter'));
 

+ 1 - 1
main/wiki/index.php

@@ -32,7 +32,7 @@ require_once 'wiki.inc.php';
 $htmlHeadXtra[] ='<link rel="stylesheet" type="text/css" href="'.api_get_path(WEB_CODE_PATH).'wiki/css/default.css"/>';
 
 // javascript for advanced parameters menu
-$htmlHeadXtra[] = '<script src="'.api_get_path(WEB_LIBRARY_PATH).'javascript/jquery.js" type="text/javascript" language="javascript"></script>'; //jQuery
+$htmlHeadXtra[] = '<script src="'.api_get_path(WEB_LIBRARY_PATH).'javascript/jquery-1.4.4.min.js" type="text/javascript" language="javascript"></script>'; //jQuery
 $htmlHeadXtra[] = '<script type="text/javascript" language="javascript">
 function advanced_parameters() {
 	if(document.getElementById(\'options\').style.display == \'none\') {

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 546 - 546
main/wiki/wiki.inc.php


Niektoré súbory nie sú zobrazené, pretože je v týchto rozdielových dátach zmenené mnoho súborov