Browse Source

Merge branch '1.9.x' of https://github.com/chamilo/chamilo-lms into 8986

Conflicts:
	main/install/configuration.dist.php
Angel Fernando Quiroz Campos 10 years ago
parent
commit
83bd1d6a06
100 changed files with 2276 additions and 7248 deletions
  1. 3 1
      composer.json
  2. 111 22
      composer.lock
  3. 9 5
      custompages/language.php
  4. 18 1
      documentation/changelog.html
  5. 3 1
      documentation/dependencies.html
  6. 0 3
      index.php
  7. 1 13
      main/admin/dashboard_add_courses_to_user.php
  8. 114 133
      main/admin/index.php
  9. 2 1
      main/announcements/announcements.php
  10. 3 1
      main/auth/inscription.php
  11. 23 0
      main/auth/sso/sso.Drupal.class.php
  12. 12 0
      main/auth/sso/sso.class.php
  13. 36 6
      main/calendar/agenda.lib.php
  14. 8 1
      main/calendar/agenda_js.php
  15. 36 7
      main/calendar/agenda_list.php
  16. 2 3
      main/chat/chat.php
  17. 9 8
      main/chat/chat_chat.php
  18. 127 0
      main/chat/chat_functions.lib.php
  19. 0 1
      main/chat/chat_hidden.php
  20. 93 252
      main/chat/chat_message.php
  21. 7 8
      main/chat/chat_whoisonline.php
  22. 97 1
      main/chat/header_frame.inc.php
  23. 57 49
      main/course_progress/index.php
  24. 29 21
      main/course_progress/thematic_controller.php
  25. 6 4
      main/coursecopy/copy_course.php
  26. 9 7
      main/coursecopy/copy_course_session.php
  27. 3 1
      main/coursecopy/create_backup.php
  28. 4 1
      main/coursecopy/import_backup.php
  29. 3 1
      main/coursecopy/recycle_course.php
  30. 27 20
      main/cron/cleanup.php
  31. 74 25
      main/cron/import_csv.php
  32. 0 1
      main/css/academica/default.css
  33. 3 410
      main/css/academica/scorm.css
  34. 0 1
      main/css/baby_orange/default.css
  35. 3 430
      main/css/baby_orange/scorm.css
  36. 324 10
      main/css/base.css
  37. 0 25
      main/css/blue_lagoon/default.css
  38. 3 404
      main/css/blue_lagoon/scorm.css
  39. 0 464
      main/css/chamilo/scorm.css
  40. 0 450
      main/css/chamilo_electric_blue/scorm.css
  41. 0 446
      main/css/chamilo_green/scorm.css
  42. 1 411
      main/css/chamilo_orange/scorm.css
  43. 0 411
      main/css/chamilo_red/scorm.css
  44. 2 381
      main/css/chamilo_sport_red/scorm.css
  45. 102 21
      main/css/chat.css
  46. 0 25
      main/css/cool_blue/default.css
  47. 1 417
      main/css/cool_blue/scorm.css
  48. 3 427
      main/css/corporate/scorm.css
  49. 0 1
      main/css/cosmic_campus/default.css
  50. 1 405
      main/css/cosmic_campus/scorm.css
  51. 1 1
      main/css/delicious_bordeaux/scorm.css
  52. 1 1
      main/css/empire_green/scorm.css
  53. 1 1
      main/css/fruity_orange/scorm.css
  54. 0 421
      main/css/journal/scorm.css
  55. 3 410
      main/css/kiddy/scorm.css
  56. 2 0
      main/css/markdown.css
  57. 1 1
      main/css/medical/scorm.css
  58. 2 2
      main/css/public_admin/scorm.css
  59. 1 1
      main/css/readable/scorm.css
  60. 2 2
      main/css/royal_purple/scorm.css
  61. 1 1
      main/css/silver_line/scorm.css
  62. 1 1
      main/css/simplex/scorm.css
  63. 1 1
      main/css/sober_brown/scorm.css
  64. 2 2
      main/css/spacelab/scorm.css
  65. 1 1
      main/css/steel_grey/scorm.css
  66. 1 1
      main/css/tasty_olive/scorm.css
  67. 1 8
      main/dashboard/block.class.php
  68. 6 11
      main/dashboard/dashboard_controller.php
  69. 3 7
      main/dashboard/index.php
  70. 3 8
      main/document/create_audio.php
  71. 84 34
      main/document/create_document.php
  72. 13 29
      main/document/create_draw.php
  73. 7 15
      main/document/create_paint.php
  74. 122 75
      main/document/document.inc.php
  75. 86 21
      main/document/document.php
  76. 4 6
      main/document/document_quota.php
  77. 2 2
      main/document/download.php
  78. 79 22
      main/document/downloadfolder.inc.php
  79. 48 19
      main/document/edit_document.php
  80. 9 14
      main/document/edit_draw.php
  81. 1 3
      main/document/edit_odf.php
  82. 24 27
      main/document/edit_paint.php
  83. 3 7
      main/document/exit_pixlr.php
  84. 1 3
      main/document/footerpage.php
  85. 0 3
      main/document/headerpage.php
  86. 17 22
      main/document/record_audio.php
  87. 0 5
      main/document/record_audio_wami.php
  88. 0 4
      main/document/show_content.php
  89. 132 104
      main/document/showinframes.php
  90. 45 70
      main/document/slideshow.php
  91. 20 21
      main/document/upload.php
  92. 22 27
      main/document/webcam_clip.php
  93. 9 9
      main/exercice/exercise.class.php
  94. 24 20
      main/exercice/exercise.lib.php
  95. 1 1
      main/exercice/exercise_result.php
  96. 5 1
      main/exercice/exercise_show.php
  97. 6 1
      main/exercice/exercise_submit.php
  98. 12 2
      main/exercice/hotpotatoes.php
  99. 61 46
      main/exercice/question_pool.php
  100. 36 17
      main/forum/download.php

+ 3 - 1
composer.json

@@ -3,6 +3,8 @@
         "php-ffmpeg/php-ffmpeg": "0.3.x-dev@dev",
         "sabre/vobject": "~3.1",
         "toin0u/digitalocean": "~1.4",
-        "twig/twig": "1.*"
+        "twig/twig": "1.*",
+        "michelf/php-markdown": "1.4.1",
+        "emojione/emojione": "1.3.0"
     }
 }

+ 111 - 22
composer.lock

@@ -4,7 +4,7 @@
         "Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
         "This file is @generated automatically"
     ],
-    "hash": "65894a3b6a22df32a403b1e0d6a7b742",
+    "hash": "3de2d83995130ea086a473db7a35a0a9",
     "packages": [
         {
             "name": "alchemy/binary-driver",
@@ -132,6 +132,44 @@
             ],
             "time": "2014-09-17 14:24:04"
         },
+        {
+            "name": "emojione/emojione",
+            "version": "v1.3.0",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/Ranks/emojione.git",
+                "reference": "2a34acf3771a219045e133063aa759035d4f842c"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/Ranks/emojione/zipball/2a34acf3771a219045e133063aa759035d4f842c",
+                "reference": "2a34acf3771a219045e133063aa759035d4f842c",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=5.3"
+            },
+            "type": "library",
+            "autoload": {
+                "psr-4": {
+                    "Emojione\\": "lib/php/src"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "description": "Emoji One is a complete set of emojis designed for the web. It includes libraries to easily convert unicode characters to shortnames (:smile:) and shortnames to our custom emoji images. PNG and SVG formats provided for the emoji images.",
+            "homepage": "http://www.emojione.com",
+            "keywords": [
+                "Emoji One",
+                "emoji",
+                "emojione",
+                "emojis",
+                "emoticons",
+                "smileys",
+                "smilies",
+                "unicode"
+            ],
+            "time": "2014-10-31 19:31:57"
+        },
         {
             "name": "evenement/evenement",
             "version": "v1.0.0",
@@ -172,6 +210,57 @@
             ],
             "time": "2012-05-30 15:01:08"
         },
+        {
+            "name": "michelf/php-markdown",
+            "version": "1.4.1",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/michelf/php-markdown.git",
+                "reference": "de9a19c7bf352d41cc99ed86c3c0ef17e87394b6"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/michelf/php-markdown/zipball/de9a19c7bf352d41cc99ed86c3c0ef17e87394b6",
+                "reference": "de9a19c7bf352d41cc99ed86c3c0ef17e87394b6",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=5.3.0"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-lib": "1.4.x-dev"
+                }
+            },
+            "autoload": {
+                "psr-0": {
+                    "Michelf": ""
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "BSD-3-Clause"
+            ],
+            "authors": [
+                {
+                    "name": "Michel Fortin",
+                    "email": "michel.fortin@michelf.ca",
+                    "homepage": "http://michelf.ca/",
+                    "role": "Developer"
+                },
+                {
+                    "name": "John Gruber",
+                    "homepage": "http://daringfireball.net/"
+                }
+            ],
+            "description": "PHP Markdown",
+            "homepage": "http://michelf.ca/projects/php-markdown/",
+            "keywords": [
+                "markdown"
+            ],
+            "time": "2014-05-05 02:43:50"
+        },
         {
             "name": "monolog/monolog",
             "version": "1.11.0",
@@ -459,17 +548,17 @@
         },
         {
             "name": "symfony/console",
-            "version": "v2.5.5",
+            "version": "v2.5.6",
             "target-dir": "Symfony/Component/Console",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/Console.git",
-                "reference": "ca053eaa031c93afb68a71e4eb1f4168dfd4a661"
+                "reference": "6f177fca24200a5b97aef5ce7a5c98124a0f0db0"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/Console/zipball/ca053eaa031c93afb68a71e4eb1f4168dfd4a661",
-                "reference": "ca053eaa031c93afb68a71e4eb1f4168dfd4a661",
+                "url": "https://api.github.com/repos/symfony/Console/zipball/6f177fca24200a5b97aef5ce7a5c98124a0f0db0",
+                "reference": "6f177fca24200a5b97aef5ce7a5c98124a0f0db0",
                 "shasum": ""
             },
             "require": {
@@ -510,11 +599,11 @@
             ],
             "description": "Symfony Console Component",
             "homepage": "http://symfony.com",
-            "time": "2014-09-25 09:53:56"
+            "time": "2014-10-05 13:57:04"
         },
         {
             "name": "symfony/filesystem",
-            "version": "v2.5.5",
+            "version": "v2.5.6",
             "target-dir": "Symfony/Component/Filesystem",
             "source": {
                 "type": "git",
@@ -561,17 +650,17 @@
         },
         {
             "name": "symfony/process",
-            "version": "v2.5.5",
+            "version": "v2.5.6",
             "target-dir": "Symfony/Component/Process",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/Process.git",
-                "reference": "8a1ec96c4e519cee0fb971ea48a1eb7369dda54b"
+                "reference": "9bbacbb3a7a27b17c0d51e2f126f59e0e588ad3a"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/Process/zipball/8a1ec96c4e519cee0fb971ea48a1eb7369dda54b",
-                "reference": "8a1ec96c4e519cee0fb971ea48a1eb7369dda54b",
+                "url": "https://api.github.com/repos/symfony/Process/zipball/9bbacbb3a7a27b17c0d51e2f126f59e0e588ad3a",
+                "reference": "9bbacbb3a7a27b17c0d51e2f126f59e0e588ad3a",
                 "shasum": ""
             },
             "require": {
@@ -604,21 +693,21 @@
             ],
             "description": "Symfony Process Component",
             "homepage": "http://symfony.com",
-            "time": "2014-09-23 05:25:11"
+            "time": "2014-10-01 05:50:18"
         },
         {
             "name": "symfony/yaml",
-            "version": "v2.5.5",
+            "version": "v2.5.6",
             "target-dir": "Symfony/Component/Yaml",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/Yaml.git",
-                "reference": "b1dbc53593b98c2d694ebf383660ac9134d30b96"
+                "reference": "2d9f527449cabfa8543dd7fa3a466d6ae83d6726"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/Yaml/zipball/b1dbc53593b98c2d694ebf383660ac9134d30b96",
-                "reference": "b1dbc53593b98c2d694ebf383660ac9134d30b96",
+                "url": "https://api.github.com/repos/symfony/Yaml/zipball/2d9f527449cabfa8543dd7fa3a466d6ae83d6726",
+                "reference": "2d9f527449cabfa8543dd7fa3a466d6ae83d6726",
                 "shasum": ""
             },
             "require": {
@@ -651,7 +740,7 @@
             ],
             "description": "Symfony Yaml Component",
             "homepage": "http://symfony.com",
-            "time": "2014-09-22 09:14:18"
+            "time": "2014-10-01 05:50:18"
         },
         {
             "name": "toin0u/digitalocean",
@@ -775,16 +864,16 @@
         },
         {
             "name": "twig/twig",
-            "version": "v1.16.1",
+            "version": "v1.16.2",
             "source": {
                 "type": "git",
                 "url": "https://github.com/fabpot/Twig.git",
-                "reference": "7c4c01dcf578523cfcddf383641a4f12790270ec"
+                "reference": "42f758d9fe2146d1f0470604fc05ee43580873fc"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/fabpot/Twig/zipball/7c4c01dcf578523cfcddf383641a4f12790270ec",
-                "reference": "7c4c01dcf578523cfcddf383641a4f12790270ec",
+                "url": "https://api.github.com/repos/fabpot/Twig/zipball/42f758d9fe2146d1f0470604fc05ee43580873fc",
+                "reference": "42f758d9fe2146d1f0470604fc05ee43580873fc",
                 "shasum": ""
             },
             "require": {
@@ -828,7 +917,7 @@
             "keywords": [
                 "templating"
             ],
-            "time": "2014-10-10 14:09:53"
+            "time": "2014-10-17 12:53:44"
         }
     ],
     "packages-dev": [],

+ 9 - 5
custompages/language.php

@@ -51,14 +51,18 @@ if (isset($_REQUEST['language']) && !empty($_REQUEST['language']) && in_array($_
 if (isset($_REQUEST['lang']) && !empty($_REQUEST['lang']) && in_array($_REQUEST['lang'], $available_langs)) {
 	$lang_match = $chamilo_langs[$_REQUEST['lang']];
 }
+
 global $_configuration;
-$defaultLanguage = api_get_interface_language();
 if (isset($_configuration['auto_detect_language_custom_pages']) &&
     $_configuration['auto_detect_language_custom_pages'] == true
 ) {
-    $defaultLanguage = $lang_match;
+    // Auto detect
+    $_user['language'] = $lang_match;
+    $_SESSION['user_language_choice'] = $lang_match;
+} else {
+    // Chamilo default platform.
+    $defaultLanguage = api_get_interface_language();
+    $_user['language'] = $defaultLanguage;
+    $_SESSION['user_language_choice'] = $defaultLanguage;
 }
-$_user['language'] = $defaultLanguage;
-
-$_SESSION['user_language_choice'] = $lang_match;
 

+ 18 - 1
documentation/changelog.html

@@ -122,7 +122,24 @@ All security issues are published and patches are attached on <a href="https://s
 
 <h3>Improvements (minor features) and debug</h3>
 <ul>
-
+  <li>(<a href="https://github.com/chamilo/chamilo-lms/commit/b83d51176db338399328b2b6d559bdee153c21e0">b83d5117</a> - <a href="https://support.chamilo.org/issues/7325">#7325</a>) Fix issue with the version number not being extracted correctly from version.chamilo.org/version.php by an fread() on a HTTP socket</li>
+  <li>(<a href="https://github.com/chamilo/chamilo-lms/commit/7d658aedf48ad8a3a540b417eb82766b2c78477c">7d658aed</a>) If course is not set then fire api_not_allowed() even if I'm admin.</li>
+  <li>(<a href="https://github.com/chamilo/chamilo-lms/commit/20f981bcb7bb80f41a165d75002cf981a0cd4c23">20f981bc</a>) Adding script that helps to synchronize exercise score with lp score</li>
+  <li>(<a href="https://github.com/chamilo/chamilo-lms/commit/0f7272708f4a194b8764a01d63e439a4bb31f0ca">0f727270</a>) Adding __session_id___group_id suffix when creating a document/folder</li>
+  <li>(<a href="https://github.com/chamilo/chamilo-lms/commit/74a7f4a35e1a993d3d560aa02e1bb3c5bd684a4a">74a7f4a3</a>) Format code , adding course ids.</li>
+  <li>(<a href="https://github.com/chamilo/chamilo-lms/commit/cd79277047dfd7588ea3ed950feba087ecbff07d">cd792770</a>) Do not rename work folder, this generates unlinked documents</li>
+  <li>(<a href="https://github.com/chamilo/chamilo-lms/commit/03f2fafaf88b2742a616afca9cce0e3436442ea8">03f2fafa</a> - <a href="https://support.chamilo.org/issues/7366">#7366</a>) Fix course select form from course copy tool</li>
+  <li>(<a href="https://github.com/chamilo/chamilo-lms/commit/dac4cabc6003182224b0b0ee5b1b5691589b823c">dac4cabc</a> - <a href="https://task.beeznest.com/issues/8989">BT#8989</a>) Fixing bug: in exercises included in a LP, lp_item_origin_id is not saved.</li>
+  <li>(<a href="https://github.com/chamilo/chamilo-lms/commit/1412344bb518c43490f405101cdcd392f4d15c06">1412344b</a> - <a href="https://task.beeznest.com/issues/8852">BT#8852</a>) Adding session id + group id suffix when uploading file</li>
+  <li>(<a href="https://github.com/chamilo/chamilo-lms/commit/4bc0810e2bfea9d637171b22f722292fe4157083">4bc0810e</a>) Fix relative path for Xhprof reporting link</li>
+  <li>(<a href="https://github.com/chamilo/chamilo-lms/commit/dd5aba4437cba60bd16bea15280d9dd085686bc2">dd5aba44</a> - <a href="https://task.beeznest.com/issues/6449">BT#6449</a>) Updating session title</li>
+  <li>(<a href="https://github.com/chamilo/chamilo-lms/commit/9a27d585dca28dda6bc338da0dce9a75135a0637">9a27d585</a> - <a href="https://task.beeznest.com/issues/8892">BT#8892</a>) Fixing possible error when updating works</li>
+  <li>(<a href="https://github.com/chamilo/chamilo-lms/commit/e344aae3f3bd08026632cd027b019303f0273ab0">e344aae3</a> - <a href="https://task.beeznest.com/issues/6613">BT#6613</a>) Deleting wav file if mp3 conversion succeeded</li>
+  <li>(<a href="https://github.com/chamilo/chamilo-lms/commit/d1a3b48df999929b1a5f81479e2f70dd447230ce">d1a3b48d</a> - <a href="https://support.chamilo.org/issues/7285">#7285</a>) Avoid exception if "until" date is set without time for repeated events</li>
+  <li>(<a href="https://github.com/chamilo/chamilo-lms/commit/3cc07708bad7d8226dec2e4410b62db264f03904">3cc07708</a> - <a href="https://support.chamilo.org/issues/7347">#7347</a>) Fix profile template</li>
+  <li>(<a href="https://github.com/chamilo/chamilo-lms/commit/6d4569d60ff5ef1d104402724e455b70ac2db067">6d4569d6</a> - <a href="https://task.beeznest.com/issues/8966">BT#8966</a>) Fixing error when saving big files</li>
+  <li>(<a href="https://github.com/chamilo/chamilo-lms/commit/9d1dbc356376eb9f67146c6336c3f48b6b081793">9d1dbc35</a> - <a href="https://task.beeznest.com/issues/8960">BT#8960</a>) Format code adding siteName in email title</li>
+  <li>(<a href="https://github.com/chamilo/chamilo-lms/commit/fa8f1b51f4342f2a26f1e0e251caf2e7c2ca6032">fa8f1b51</a> - <a href="https://task.beeznest.com/issues/8960">BT#8960</a>) Format code + fixing title and sender mail</li>
   <li>(<a href="https://github.com/chamilo/chamilo-lms/commit/7d5f7236ea45d8afab59f312853a63aa7c07e697">7d5f7236</a> - <a href="https://support.chamilo.org/issues/7323">#7323</a>) Remove main/install/ existence warning in admin page: risks have been removed</li>
   <li>(<a href="https://github.com/chamilo/chamilo-lms/commit/ee6b696af77289b031e4894ca8ed0611da89f2ec">ee6b696a</a> - <a href="https://support.chamilo.org/issues/7358">#7358</a>) Students can download their certificates in PDF file</li>
   <li>(<a href="https://github.com/chamilo/chamilo-lms/commit/4f3a08d7c7938b10f6c8d75c64e6b6946712b053">4f3a08d7</a>) Add script to list unused images</li>

+ 3 - 1
documentation/dependencies.html

@@ -117,9 +117,11 @@ ensure all components are installed by an expert in the field.<br />
       <ul>
         <li>libreoffice</li>
       </ul>
-    <li>Audio recording</li>
+    <li>Audio recording (generate mp3 from wav)</li>
       <ul>
         <li>libav-tools</li>
+        <li>libavcodec-extra-53</li>
+        <li>libmp3lame0</li>
       </ul>
     <li>BigBlueButton videoconference</li>
       <ul>

+ 0 - 3
index.php

@@ -18,9 +18,6 @@ require_once 'main/inc/global.inc.php';
 require_once api_get_path(LIBRARY_PATH).'userportal.lib.php';
 require_once 'main/chat/chat_functions.lib.php';
 
-// Set cookie for check if client browser are cookies enabled
-setcookie('TestCookie', 'cookies_yes', time()+3600*24*31*12);
-
 // The section (for the tabs).
 $this_section = SECTION_CAMPUS;
 

+ 1 - 13
main/admin/dashboard_add_courses_to_user.php

@@ -214,7 +214,7 @@ if (api_is_multiple_url_enabled()) {
 $result	= Database::query($sql);
 
 ?>
-<form name="formulaire" method="post" action="<?php echo api_get_self(); ?>?user=<?php echo $user_id ?>" style="margin:0px;" <?php if($ajax_search){echo ' onsubmit="valide();"';}?>>
+<form name="formulaire" method="post" action="<?php echo api_get_self(); ?>?user=<?php echo $user_id ?>" style="margin:0px;">
 <input type="hidden" name="formSent" value="1" />
 <?php
 if(!empty($msg)) {
@@ -268,21 +268,9 @@ if(!empty($msg)) {
   </td>
 
   <td width="10%" valign="middle" align="center">
-  <?php
-  if ($ajax_search) {
-  ?>
-  	<button class="arrowl" type="button" onclick="remove_item(document.getElementById('destination'))"></button>
-  <?php
-  }
-  else
-  {
-  ?>
   	<button class="arrowr" type="button" onclick="moveItem(document.getElementById('origin'), document.getElementById('destination'))" onclick="moveItem(document.getElementById('origin'), document.getElementById('destination'))"></button>
 	<br /><br />
 	<button class="arrowl" type="button" onclick="moveItem(document.getElementById('destination'), document.getElementById('origin'))" onclick="moveItem(document.getElementById('destination'), document.getElementById('origin'))"></button>
-  <?php
-  }
-  ?>
 	<br /><br /><br /><br /><br /><br />
 	<?php
 		echo '<button class="save" type="button" value="" onclick="valide()" >'.$tool_name.'</button>';

+ 114 - 133
main/admin/index.php

@@ -36,26 +36,27 @@ if (api_is_platform_admin()) {
     }
     */
     if (is_dir(api_get_path(SYS_ARCHIVE_PATH)) && !is_writable(api_get_path(SYS_ARCHIVE_PATH))) {
-        $message = Display::return_message(get_lang('ArchivesDirectoryNotWriteableContactAdmin'),'warning');
+        $message = Display::return_message(get_lang('ArchivesDirectoryNotWriteableContactAdmin'), 'warning');
     }
 
     /* ACTION HANDLING */
     if (!empty($_POST['Register'])) {
-        register_site();
-        $message = Display :: return_message(get_lang('VersionCheckEnabled'),'confirmation');
+        api_register_campus(!$_POST['donotlistcampus']);
+        $message = Display :: return_message(get_lang('VersionCheckEnabled'), 'confirmation');
     }
     $keyword_url = Security::remove_XSS((empty($_GET['keyword']) ? '' : $_GET['keyword']));
 }
 
 if (isset($_GET['msg']) && isset($_GET['type'])) {
-	if (in_array($_GET['msg'], array('ArchiveDirCleanupSucceeded', 'ArchiveDirCleanupFailed')))
-	switch($_GET['type']) {
-		case 'error':
-			$message = Display::return_message(get_lang($_GET['msg']), 'error');
-			break;
-		case 'confirmation':
-			$message = Display::return_message(get_lang($_GET['msg']), 'confirm');
-	}
+    if (in_array($_GET['msg'], array('ArchiveDirCleanupSucceeded', 'ArchiveDirCleanupFailed'))) {
+        switch ($_GET['type']) {
+            case 'error':
+                $message = Display::return_message(get_lang($_GET['msg']), 'error');
+                break;
+            case 'confirmation':
+                $message = Display::return_message(get_lang($_GET['msg']), 'confirm');
+        }
+    }
 }
 
 $blocks = array();
@@ -67,33 +68,34 @@ $blocks['users']['label'] = api_ucfirst(get_lang('Users'));
 $blocks['users']['class'] = 'block-admin-users';
 
 if (api_is_platform_admin()) {
-	$search_form = ' <form method="get" class="form-search" action="user_list.php">
-						<input class="span3" type="text" name="keyword" value="">
-						<button class="btn" type="submit">'.get_lang('Search').'</button>
-            		</form>';
-	$blocks['users']['search_form'] = $search_form;
-	$items = array(
-		array('url'=>'user_list.php', 	'label' => get_lang('UserList')),
-		array('url'=>'user_add.php', 	'label' => get_lang('AddUsers')),
-		array('url'=>'user_export.php', 'label' => get_lang('ExportUserListXMLCSV')),
-		array('url'=>'user_import.php', 'label' => get_lang('ImportUserListXMLCSV')),
-               array('url'=>'user_update_import.php', 'label' => get_lang('EditUserListCSV')),
-	);
-
-	if (api_get_setting('allow_social_tool') == 'true') {
-		$items[] = array('url'=>'group_add.php', 	'label' => get_lang('AddGroups'));
-		$items[] = array('url'=>'group_list.php', 	'label' => get_lang('GroupList'));
-	}
-	if (isset($extAuthSource) && isset($extAuthSource['ldap']) && count($extAuthSource['ldap']) > 0) {
-		$items[] = array('url'=>'ldap_users_list.php', 	'label' => get_lang('ImportLDAPUsersIntoPlatform'));
-	}
-	$items[] = array('url'=>'user_fields.php', 	'label' => get_lang('ManageUserFields'));
+    $search_form = '
+            <form method="get" class="form-search" action="user_list.php">
+                <input class="span3" type="text" name="keyword" value="">
+                <button class="btn" type="submit">'.get_lang('Search').'</button>
+            </form>';
+    $blocks['users']['search_form'] = $search_form;
+    $items = array(
+        array('url'=>'user_list.php', 	'label' => get_lang('UserList')),
+        array('url'=>'user_add.php', 	'label' => get_lang('AddUsers')),
+        array('url'=>'user_export.php', 'label' => get_lang('ExportUserListXMLCSV')),
+        array('url'=>'user_import.php', 'label' => get_lang('ImportUserListXMLCSV')),
+        array('url'=>'user_update_import.php', 'label' => get_lang('EditUserListCSV')),
+    );
+
+    if (api_get_setting('allow_social_tool') == 'true') {
+        $items[] = array('url'=>'group_add.php', 	'label' => get_lang('AddGroups'));
+        $items[] = array('url'=>'group_list.php', 	'label' => get_lang('GroupList'));
+    }
+    if (isset($extAuthSource) && isset($extAuthSource['ldap']) && count($extAuthSource['ldap']) > 0) {
+        $items[] = array('url'=>'ldap_users_list.php', 	'label' => get_lang('ImportLDAPUsersIntoPlatform'));
+    }
+    $items[] = array('url'=>'user_fields.php', 	'label' => get_lang('ManageUserFields'));
 } else {
- 	$items = array(
- 		array('url'=>'user_list.php', 	'label' => get_lang('UserList')),
- 		array('url'=>'user_add.php', 	'label' => get_lang('AddUsers')),
- 		array('url'=>'user_import.php', 'label' => get_lang('ImportUserListXMLCSV')),
- 	);
+    $items = array(
+        array('url'=>'user_list.php', 	'label' => get_lang('UserList')),
+        array('url'=>'user_add.php', 	'label' => get_lang('AddUsers')),
+        array('url'=>'user_import.php', 'label' => get_lang('ImportUserListXMLCSV')),
+    );
 }
 
 $items[] = array('url'=>'usergroups.php', 	'label' => get_lang('Classes'));
@@ -102,33 +104,33 @@ $blocks['users']['items'] = $items;
 $blocks['users']['extra'] = null;
 
 if (api_is_platform_admin()) {
-	/* Courses */
-	$blocks['courses']['icon']  = Display::return_icon('course.gif', get_lang('Courses'), array(), ICON_SIZE_MEDIUM, false);
-	$blocks['courses']['label'] = api_ucfirst(get_lang('Courses'));
+    /* Courses */
+    $blocks['courses']['icon']  = Display::return_icon('course.gif', get_lang('Courses'), array(), ICON_SIZE_MEDIUM, false);
+    $blocks['courses']['label'] = api_ucfirst(get_lang('Courses'));
     $blocks['courses']['class'] = 'block-admin-courses';
 
-	$search_form = ' <form method="get" class="form-search" action="course_list.php">
+    $search_form = ' <form method="get" class="form-search" action="course_list.php">
 							<input class="span3" type="text" name="keyword" value="">
 							<button class="btn" type="submit">'.get_lang('Search').'</button>
 	            		</form>';
-	$blocks['courses']['search_form'] = $search_form;
+    $blocks['courses']['search_form'] = $search_form;
 
-	$items = array();
-	$items[] = array('url'=>'course_list.php', 	'label' => get_lang('CourseList'));
-  $items[] = array('url'=>'course_add.php', 	'label' => get_lang('AddCourse'));
+    $items = array();
+    $items[] = array('url'=>'course_list.php', 	'label' => get_lang('CourseList'));
+    $items[] = array('url'=>'course_add.php', 	'label' => get_lang('AddCourse'));
 
-  if (api_get_setting('course_validation') == 'true') {
+    if (api_get_setting('course_validation') == 'true') {
 
-		$items[] = array('url'=>'course_request_review.php', 	'label' => get_lang('ReviewCourseRequests'));
-		$items[] = array('url'=>'course_request_accepted.php', 	'label' => get_lang('AcceptedCourseRequests'));
-		$items[] = array('url'=>'course_request_rejected.php', 	'label' => get_lang('RejectedCourseRequests'));
-	}
+        $items[] = array('url'=>'course_request_review.php', 	'label' => get_lang('ReviewCourseRequests'));
+        $items[] = array('url'=>'course_request_accepted.php', 	'label' => get_lang('AcceptedCourseRequests'));
+        $items[] = array('url'=>'course_request_rejected.php', 	'label' => get_lang('RejectedCourseRequests'));
+    }
 
-	$items[] = array('url'=>'course_export.php', 			'label' => get_lang('ExportCourses'));
-	$items[] = array('url'=>'course_import.php', 			'label' => get_lang('ImportCourses'));
-	$items[] = array('url'=>'course_category.php', 			'label' => get_lang('AdminCategories'));
-	$items[] = array('url'=>'subscribe_user2course.php', 	'label' => get_lang('AddUsersToACourse'));
-	$items[] = array('url'=>'course_user_import.php', 		'label' => get_lang('ImportUsersToACourse'));
+    $items[] = array('url'=>'course_export.php', 			'label' => get_lang('ExportCourses'));
+    $items[] = array('url'=>'course_import.php', 			'label' => get_lang('ImportCourses'));
+    $items[] = array('url'=>'course_category.php', 			'label' => get_lang('AdminCategories'));
+    $items[] = array('url'=>'subscribe_user2course.php', 	'label' => get_lang('AddUsersToACourse'));
+    $items[] = array('url'=>'course_user_import.php', 		'label' => get_lang('ImportUsersToACourse'));
     //$items[] = array('url'=>'course_intro_pdf_import.php', 	'label' => get_lang('ImportPDFIntroToCourses'));
 
     if (api_get_setting('gradebook_enable_grade_model') == 'true') {
@@ -173,18 +175,18 @@ if (api_is_platform_admin()) {
     }
 
     if (!empty($_configuration['multiple_access_urls'])) {
-		if (api_is_global_platform_admin()) {
-            	$items[] = array('url'=>'access_urls.php', 	'label' => get_lang('ConfigureMultipleAccessURLs'));
-            }
+        if (api_is_global_platform_admin()) {
+            $items[] = array('url'=>'access_urls.php', 	'label' => get_lang('ConfigureMultipleAccessURLs'));
+        }
     }
 
     if (api_get_setting('allow_reservation') == 'true') {
-    	$items[] = array('url'=>'../reservation/m_category.php', 	'label' => get_lang('BookingSystem'));
-	}
-	if (api_get_setting('allow_terms_conditions') == 'true') {
-    	$items[] = array('url'=>'legal_add.php', 	'label' => get_lang('TermsAndConditions'));
-	}
-	$blocks['platform']['items'] = $items;
+        $items[] = array('url'=>'../reservation/m_category.php', 	'label' => get_lang('BookingSystem'));
+    }
+    if (api_get_setting('allow_terms_conditions') == 'true') {
+        $items[] = array('url'=>'legal_add.php', 	'label' => get_lang('TermsAndConditions'));
+    }
+    $blocks['platform']['items'] = $items;
     $blocks['platform']['extra'] = null;
 }
 
@@ -225,21 +227,21 @@ $blocks['sessions']['extra'] = null;
 /* Settings */
 if (api_is_platform_admin()) {
 
-	$blocks['settings']['icon']  = Display::return_icon('settings.png', get_lang('System'), array(), ICON_SIZE_SMALL, false);
-	$blocks['settings']['label'] = api_ucfirst(get_lang('System'));
+    $blocks['settings']['icon']  = Display::return_icon('settings.png', get_lang('System'), array(), ICON_SIZE_SMALL, false);
+    $blocks['settings']['label'] = api_ucfirst(get_lang('System'));
     $blocks['settings']['class'] = 'block-admin-settings';
 
 
     $items = array();
-	$items[] = array('url'=>'special_exports.php', 	'label' => get_lang('SpecialExports'));
-	if (!empty($_configuration['db_admin_path'])) {
-		$items[] = array('url'=>$_configuration['db_admin_path'], 	'label' => get_lang('AdminDatabases').' ('.get_lang('DBManagementOnlyForServerAdmin').') ');
-	}
-	$items[] = array('url'=>'system_status.php', 	'label' => get_lang('SystemStatus'));
-	if (is_dir(api_get_path(SYS_TEST_PATH).'datafiller/')) {
-		$items[] = array('url'=>'filler.php', 	'label' => get_lang('DataFiller'));
-	}
-	$items[] = array('url'=>'archive_cleanup.php', 	'label' => get_lang('ArchiveDirCleanup'));
+    $items[] = array('url'=>'special_exports.php', 	'label' => get_lang('SpecialExports'));
+    if (!empty($_configuration['db_admin_path'])) {
+        $items[] = array('url'=>$_configuration['db_admin_path'], 	'label' => get_lang('AdminDatabases').' ('.get_lang('DBManagementOnlyForServerAdmin').') ');
+    }
+    $items[] = array('url'=>'system_status.php', 	'label' => get_lang('SystemStatus'));
+    if (is_dir(api_get_path(SYS_TEST_PATH).'datafiller/')) {
+        $items[] = array('url'=>'filler.php', 	'label' => get_lang('DataFiller'));
+    }
+    $items[] = array('url'=>'archive_cleanup.php', 	'label' => get_lang('ArchiveDirCleanup'));
     if (api_get_setting('server_type') === 'test') {
         $items[] = array('url'=>'system_management.php', 'label' => get_lang('SystemManagement'));
     }
@@ -255,26 +257,26 @@ if (api_is_platform_admin()) {
         $items[] = array('url'=>"db.php?username=$username&db=$databaseName&server=$host", 'label' => get_lang('Database Manager'));
     }
 
-	$blocks['settings']['items'] = $items;
+    $blocks['settings']['items'] = $items;
     $blocks['settings']['extra'] = null;
 
     $blocks['settings']['search_form'] = null;
 
-	/* Extensions */
-	/*
-	$blocks['extensions']['icon']  = Display::return_icon('visio_meeting.gif', get_lang('ConfigureExtensions'), array(), ICON_SIZE_SMALL, false);
-	$blocks['extensions']['label'] = api_ucfirst(get_lang('ConfigureExtensions'));
-	$blocks['extensions']['class'] = 'block-admin-extensions';
-
-
-	$items = array();
-	$items[] = array('url'=>'configure_extensions.php?display=visio', 	'label' => get_lang('Visioconf'));
-	$items[] = array('url'=>'configure_extensions.php?display=ppt2lp', 	'label' => get_lang('Ppt2lp'));
-	//$items[] = array('url'=>'configure_extensions.php?display=ephorus', 	'label' => get_lang('EphorusPlagiarismPrevention'));
-	$items[] = array('url'=>'configure_extensions.php?display=search', 	'label' => get_lang('SearchEngine'));
-	$items[] = array('url'=>'configure_extensions.php?display=serverstats', 	'label' => get_lang('ServerStatistics'));
-	$items[] = array('url'=>'configure_extensions.php?display=bandwidthstats', 	'label' => get_lang('BandWidthStatistics'));
-	$blocks['extensions']['items'] = $items;
+    /* Extensions */
+    /*
+    $blocks['extensions']['icon']  = Display::return_icon('visio_meeting.gif', get_lang('ConfigureExtensions'), array(), ICON_SIZE_SMALL, false);
+    $blocks['extensions']['label'] = api_ucfirst(get_lang('ConfigureExtensions'));
+    $blocks['extensions']['class'] = 'block-admin-extensions';
+
+
+    $items = array();
+    $items[] = array('url'=>'configure_extensions.php?display=visio', 	'label' => get_lang('Visioconf'));
+    $items[] = array('url'=>'configure_extensions.php?display=ppt2lp', 	'label' => get_lang('Ppt2lp'));
+    //$items[] = array('url'=>'configure_extensions.php?display=ephorus', 	'label' => get_lang('EphorusPlagiarismPrevention'));
+    $items[] = array('url'=>'configure_extensions.php?display=search', 	'label' => get_lang('SearchEngine'));
+    $items[] = array('url'=>'configure_extensions.php?display=serverstats', 	'label' => get_lang('ServerStatistics'));
+    $items[] = array('url'=>'configure_extensions.php?display=bandwidthstats', 	'label' => get_lang('BandWidthStatistics'));
+    $blocks['extensions']['items'] = $items;
     */
 
     //Skills
@@ -296,38 +298,38 @@ if (api_is_platform_admin()) {
         $blocks['skills']['search_form'] = null;
     }
 
-	/* Chamilo.org */
+    /* Chamilo.org */
 
-	$blocks['chamilo']['icon']  = Display::return_icon('logo.png', 'Chamilo.org', array(), ICON_SIZE_SMALL, false);
-	$blocks['chamilo']['label'] = 'Chamilo.org';
+    $blocks['chamilo']['icon']  = Display::return_icon('logo.png', 'Chamilo.org', array(), ICON_SIZE_SMALL, false);
+    $blocks['chamilo']['label'] = 'Chamilo.org';
     $blocks['chamilo']['class'] = 'block-admin-chamilo';
 
 
     $items = array();
-	$items[] = array('url'=>'http://www.chamilo.org/', 	'label' => get_lang('ChamiloHomepage'));
-	$items[] = array('url'=>'http://www.chamilo.org/forum', 	'label' => get_lang('ChamiloForum'));
-
-	$items[] = array('url'=>'../../documentation/installation_guide.html', 	'label' => get_lang('InstallationGuide'));
-	$items[] = array('url'=>'../../documentation/changelog.html', 	'label' => get_lang('ChangesInLastVersion'));
-	$items[] = array('url'=>'../../documentation/credits.html', 	'label' => get_lang('ContributorsList'));
-	$items[] = array('url'=>'../../documentation/security.html', 	'label' => get_lang('SecurityGuide'));
-	$items[] = array('url'=>'../../documentation/optimization.html', 	'label' => get_lang('OptimizationGuide'));
-	$items[] = array('url'=>'http://www.chamilo.org/extensions', 	'label' => get_lang('ChamiloExtensions'));
-	$items[] = array('url'=>'http://www.chamilo.org/en/providers', 	'label' => get_lang('ChamiloOfficialServicesProviders'));
-
-	$blocks['chamilo']['items'] = $items;
+    $items[] = array('url'=>'http://www.chamilo.org/', 	'label' => get_lang('ChamiloHomepage'));
+    $items[] = array('url'=>'http://www.chamilo.org/forum', 	'label' => get_lang('ChamiloForum'));
+
+    $items[] = array('url'=>'../../documentation/installation_guide.html', 	'label' => get_lang('InstallationGuide'));
+    $items[] = array('url'=>'../../documentation/changelog.html', 	'label' => get_lang('ChangesInLastVersion'));
+    $items[] = array('url'=>'../../documentation/credits.html', 	'label' => get_lang('ContributorsList'));
+    $items[] = array('url'=>'../../documentation/security.html', 	'label' => get_lang('SecurityGuide'));
+    $items[] = array('url'=>'../../documentation/optimization.html', 	'label' => get_lang('OptimizationGuide'));
+    $items[] = array('url'=>'http://www.chamilo.org/extensions', 	'label' => get_lang('ChamiloExtensions'));
+    $items[] = array('url'=>'http://www.chamilo.org/en/providers', 	'label' => get_lang('ChamiloOfficialServicesProviders'));
+
+    $blocks['chamilo']['items'] = $items;
     $blocks['chamilo']['extra'] = null;
     $blocks['chamilo']['search_form'] = null;
 
-	// Try to display a maximum before we check the chamilo version and all that.
-	//session_write_close(); //close session to avoid blocking concurrent access
-	//flush(); //send data to client as much as allowed by the web server
-	//ob_flush();
+    // Try to display a maximum before we check the chamilo version and all that.
+    //session_write_close(); //close session to avoid blocking concurrent access
+    //flush(); //send data to client as much as allowed by the web server
+    //ob_flush();
 
     //Version check
     $blocks['version_check']['icon']  = Display::return_icon('logo.png', 'Chamilo.org', array(), ICON_SIZE_SMALL, false);
-	$blocks['version_check']['label'] = get_lang('VersionCheck');
-	$blocks['version_check']['extra'] = '<div class="admin-block-version"></div>';
+    $blocks['version_check']['label'] = get_lang('VersionCheck');
+    $blocks['version_check']['extra'] = '<div class="admin-block-version"></div>';
     $blocks['version_check']['search_form'] = null;
     $blocks['version_check']['items'] = null;
     $blocks['version_check']['class'] = 'block-admin-version_check';
@@ -345,25 +347,4 @@ $tpl->assign('content', $content);
 $tpl->assign('message', $message);
 $tpl->display_one_col_template();
 
-/**
- * This setting changes the registration status for the campus
- *
- * @author Patrick Cool <patrick.cool@UGent.be>, Ghent University
- * @version August 2006
- *
- * @todo the $_settings should be reloaded here. => write api function for this and use this in global.inc.php also.
- */
-function register_site() {
-    $tbl_settings = Database :: get_main_table(TABLE_MAIN_SETTINGS_CURRENT);
-
-    $sql = "UPDATE $tbl_settings SET selected_value='true' WHERE variable='registered'";
-    Database::query($sql);
-
-    if ($_POST['donotlistcampus']) {
-        $sql = "UPDATE $tbl_settings SET selected_value='true' WHERE variable='donotlistcampus'";
-        Database::query($sql);
-    }
-    // Reload the settings.
-}
-
 // Note: version checking mechanism has now been moved to main/inc/ajax/admin.ajax.php

+ 2 - 1
main/announcements/announcements.php

@@ -270,9 +270,10 @@ if (api_is_allowed_to_edit(false,true) OR
 			$rs 	= Database::query($sql);
 			$myrow  = Database::fetch_array($rs);
 			$last_id = $id;
+            $userUpload = isset($_FILES['user_upload']) ? $_FILES['user_upload'] : null;
 			$edit_attachment = AnnouncementManager::edit_announcement_attachment_file(
                 $last_id,
-                $_FILES['user_upload'],
+                $userUpload,
                 $file_comment
             );
 

+ 3 - 1
main/auth/inscription.php

@@ -642,7 +642,9 @@ if ($form->validate()) {
                     );
 
                     $exercise_redirect = intval(Session::read('exercise_redirect'));
-                    $objExercise = new Exercise();
+                    // Specifiy course ID as the current context does not 
+                    // hold a global $_course array
+                    $objExercise = new Exercise($course_info['real_id']);
                     $result = $objExercise->read($exercise_redirect);
 
                     if (!empty($exercise_redirect) && !empty($result)) {

+ 23 - 0
main/auth/sso/sso.Drupal.class.php

@@ -225,4 +225,27 @@ class ssoDrupal {
     private function decode_cookie($cookie) {
         return unserialize(base64_decode($cookie));
     }
+
+    /**
+     * Generate the URL for profile editing
+     * @return string If the URL is obtained return the drupal_user_id. Otherwise return false 
+     */
+    public function generateProfileEditingURL()
+    {
+        $userId = api_get_user_id();
+
+        $userExtraFieldValue = new ExtraFieldValue('user');
+        $drupalUserIdData = $userExtraFieldValue->get_values_by_handler_and_field_variable($userId, 'drupal_user_id');
+
+        if ($drupalUserIdData === false) {
+            return false;
+        }
+
+        $drupalUserId = $drupalUserIdData['field_value'];
+
+        $url = "{$this->protocol}{$this->domain}/user/{$drupalUserId}/edit";
+
+        return $url;
+    }
+
 }

+ 12 - 0
main/auth/sso/sso.class.php

@@ -254,4 +254,16 @@ class sso {
     {
         return unserialize(base64_decode($cookie));
     }
+
+    /**
+     * Generate the URL for profile editing
+     * @return string The SSO URL
+     */
+    public function generateProfileEditingURL()
+    {
+        $url = api_get_path(WEB_CODE_PATH) . 'auth/profile.php';
+
+        return $url;
+    }
+
 }

+ 36 - 6
main/calendar/agenda.lib.php

@@ -393,6 +393,8 @@ class Agenda
 
         $typeList = array('daily', 'weekly', 'monthlyByDate', 'monthlyByDay', 'monthlyByDayR', 'yearly');
 
+        // The event has to repeat *in the future*. We don't allow repeated
+        // events in the past
         if ($end > $now && in_array($type, $typeList)) {
             $sql = "INSERT INTO $t_agenda_r (c_id, cal_id, cal_type, cal_end)
                     VALUES ($course_id, '$eventId', '$type', '$end')";
@@ -1090,12 +1092,23 @@ class Agenda
      */
     public function get_personal_events($start, $end)
     {
-        $start = api_get_utc_datetime(intval($start));
-        $end = api_get_utc_datetime(intval($end));
+        $start = intval($start);
+        $end = intval($end);
+        $startCondition = '';
+        $endCondition = '';
+
+        if ($start !== 0) {
+            $start = api_get_utc_datetime($start);
+            $startCondition = "AND date >= '".$start."'";
+        }
+        if ($start !== 0) {
+            $end = api_get_utc_datetime($end);
+            $endCondition = "AND (enddate <= '".$end."' OR enddate IS NULL)";
+        }
         $user_id = api_get_user_id();
 
         $sql = "SELECT * FROM ".$this->tbl_personal_agenda."
-                WHERE date >= '".$start."' AND (enddate <='".$end."' OR enddate IS NULL) AND user = $user_id";
+                WHERE user = $user_id $startCondition $endCondition";
 
         $result = Database::query($sql);
         $my_events = array();
@@ -1432,13 +1445,22 @@ class Agenda
         $start = intval($start);
         $end = intval($end);
 
-        $start = api_get_utc_datetime($start);
-        $end = api_get_utc_datetime($end);
+        $startCondition = '';
+        $endCondition = '';
+
+        if ($start !== 0) {
+            $start = api_get_utc_datetime($start);
+            $startCondition = "AND start_date >= '".$start."'";
+        }
+        if ($start !== 0) {
+            $end = api_get_utc_datetime($end);
+            $endCondition = "AND end_date <= '".$end."'";
+        }
 
         $access_url_id = api_get_current_access_url_id();
 
         $sql = "SELECT * FROM ".$this->tbl_global_agenda."
-               WHERE start_date >= '".$start."' AND end_date <= '".$end."' AND access_url_id = $access_url_id ";
+               WHERE access_url_id = $access_url_id $startCondition $endCondition";
 
         $result = Database::query($sql);
         $my_events = array();
@@ -2275,6 +2297,11 @@ class Agenda
                     $freq = $trans[$repeat['FREQ']];
 
                     if (isset($repeat['UNTIL']) && !empty($repeat['UNTIL'])) {
+                        // Check if datetime or just date (strlen == 8)
+                        if (strlen($repeat['UNTIL']) == 8) {
+                            // Fix the datetime format to avoid exception in the next step
+                            $repeat['UNTIL'] .= 'T000000';
+                        }
                         $until = Sabre\VObject\DateTimeParser::parseDateTime($repeat['UNTIL'], new DateTimeZone($currentTimeZone));
                         $until = $until->format('Y-m-d H:i');
                         //$res = agenda_add_repeat_item($courseInfo, $id, $freq, $until, $attendee);
@@ -2318,6 +2345,9 @@ class Agenda
 
         if (!empty($messages)) {
             $messages = implode('<br /> ', $messages);
+        } else {
+            $messages = get_lang('NoAgendaItems');
+                    
         }
 
         return $messages;

+ 8 - 1
main/calendar/agenda_js.php

@@ -41,7 +41,14 @@ if (api_is_platform_admin() && ($type == 'admin' || $type == 'platform')) {
 }
 
 if (isset($_REQUEST['cidReq']) && !empty($_REQUEST['cidReq'])) {
-    $type = 'course';
+    if ($_REQUEST['cidReq'] == -1) {
+        // When is out of the course tool (e.g My agenda)
+        header('Location: ' . api_get_self());
+        exit;
+    } else {
+        $type = 'course';
+        $this_section = SECTION_COURSES;
+    }
 }
 
 $agenda = new Agenda();

+ 36 - 7
main/calendar/agenda_list.php

@@ -14,12 +14,10 @@ require_once 'agenda.lib.php';
 require_once 'agenda.inc.php';
 
 $interbreadcrumb[] = array(
-    'url' => api_get_path(WEB_CODE_PATH)."calendar/agenda_js.php?".api_get_cidreq(),
+    'url' => api_get_path(WEB_CODE_PATH) . "calendar/agenda_js.php",
     'name' => get_lang('Agenda')
 );
 
-$tpl = new Template(get_lang('Events'));
-
 $agenda = new Agenda();
 $type = isset($_REQUEST['type']) ? $_REQUEST['type'] : null;
 $agenda->type = $type;
@@ -31,19 +29,50 @@ $events = $agenda->get_events(
     null,
     'array'
 );
-$url = api_get_path(WEB_CODE_PATH).'calendar/agenda_list.php?'.api_get_cidreq();
-$tpl->assign('url', $url);
+
+$this_section = SECTION_MYAGENDA;
+
+if (!empty($GLOBALS['_cid']) && $GLOBALS['_cid'] != -1) {
+    // Agenda is inside a course tool
+    $url = api_get_self() . '?' . api_get_cidreq();
+    $this_section = SECTION_COURSES;
+} else {
+    // Agenda is out of the course tool (e.g personal agenda)
+    $url = false;
+    foreach ($events as &$event) {
+        $event['url'] = api_get_self() . '?cid=' . $event['course_id'] .
+        '&type=' . $event['type'];
+    }
+}
+
+$tpl = new Template(get_lang('Events'));
+
 $tpl->assign('agenda_events', $events);
 
 $actions = $agenda->displayActions('list');
+$tpl->assign('url', $url);
 $tpl->assign('actions', $actions);
 $tpl->assign('is_allowed_to_edit', api_is_allowed_to_edit());
 
 if (api_is_allowed_to_edit()) {
     if (isset($_GET['action']) && $_GET['action'] == 'change_visibility') {
         $courseInfo = api_get_course_info();
-        $agenda->changeVisibility($_GET['id'], $_GET['visibility'], $courseInfo);
-        header('Location: '.$url);
+        if (empty($courseInfo)) {
+            // This happens when list agenda is not inside a course
+            if (
+                ($type == 'course' || $type == 'session') &&
+                isset($_GET['cid']) &&
+                intval($_GET['cid']) !== 0
+            ) {
+                // For course and session event types
+                // Just needs course ID
+                $courseInfo = array('real_id' => intval($_GET['cid']));
+                $agenda->changeVisibility($_GET['id'], $_GET['visibility'], $courseInfo);
+            } else {
+                // personal and admin do not have visibility property
+            }
+        }
+        header('Location: '. api_get_self());
         exit;
     }
 }

+ 2 - 3
main/chat/chat.php

@@ -1,5 +1,6 @@
 <?php
 /* For licensing terms, see /license.txt */
+
 /**
  * Chat tool
  * @package chamilo.chat
@@ -8,8 +9,6 @@
 $language_file = array('chat');
 require_once '../inc/global.inc.php';
 $current_course_tool  = TOOL_CHAT;
-
-require_once api_get_path(LIBRARY_PATH).'groupmanager.lib.php';
 $this_section = SECTION_COURSES;
 $nameTools = get_lang('ToolChat');
 
@@ -81,7 +80,7 @@ $url = api_get_path(WEB_CODE_PATH).'chat/';
 echo '<div class="page-chat">';
 echo '<iframe src="'.$url.'chat_whoisonline.php?cidReq='.$cidreq.'" name="chat_whoisonline" scrolling="no" style="height:500px; width:35%; border: 0px none; float:left"></iframe>';
 echo '<iframe src="'.$url.'chat_chat.php?origin='.$origin.'&target='.$target.'&amp;cidReq='.$cidreq.'" name="chat_chat" id="chat_chat" scrolling="auto" height="380" style="width:65%; border: 0px none; float:right"></iframe>';
-echo '<iframe src="'.$url.'chat_message.php?cidReq='.$cidreq.'" name="chat_message" scrolling="no" height="180" style="width:65%; border: 0px none; float:right"></iframe>';
+echo '<iframe src="'.$url.'chat_message.php?cidReq='.$cidreq.'" name="chat_message" scrolling="no" height="260px" style="width:65%; border: 0px none; float:right"></iframe>';
 echo '<iframe src="'.$url.'chat_hidden.php?cidReq='.$cidreq.'" name="chat_hidden" height="0" style="border: 0px none"></iframe>';
 echo '</div>';
 

+ 9 - 8
main/chat/chat_chat.php

@@ -14,7 +14,6 @@ $language_file = array('chat');
 require_once '../inc/global.inc.php';
 require_once api_get_path(LIBRARY_PATH).'document.lib.php';
 require_once api_get_path(LIBRARY_PATH).'fileUpload.lib.php';
-require_once api_get_path(LIBRARY_PATH).'groupmanager.lib.php';
 
 $course = $_GET['cidReq'];
 $session_id = api_get_session_id();
@@ -45,9 +44,7 @@ if (!empty($course)) {
         $basepath_chat = '/chat_files';
     }
     $chat_path = $document_path.$basepath_chat.'/';
-
     $TABLEITEMPROPERTY = Database::get_course_table(TABLE_ITEM_PROPERTY);
-
     $course_id = api_get_course_int_id();
 
     if (!is_dir($chat_path)) {
@@ -137,22 +134,26 @@ if (!empty($course)) {
 	if (isset($_GET['origin']) && $_GET['origin'] == 'whoisonlinejoin') {
 	    //the joiner (we have to delete the chat request to him when he joins the chat)
 		$track_user_table = Database::get_main_table(TABLE_MAIN_USER);
-		$sql = "UPDATE $track_user_table set chatcall_user_id = '', chatcall_date = '', chatcall_text=''
+		$sql = "UPDATE $track_user_table SET
+                    chatcall_user_id = '',
+                    chatcall_date = '',
+                    chatcall_text=''
 		        WHERE (user_id = ".$userId.")";
 		$result = Database::query($sql);
 	}
 
-	echo '<div id="content-chat">';
+	echo '<div id="content-chat markdown-body">';
 	foreach ($content as & $this_line) {
-		echo strip_tags(api_html_entity_decode($this_line), '<div> <br> <span> <b> <i> <img> <font>');
+		//echo strip_tags(api_html_entity_decode($this_line), '<div> <br> <span> <b> <i> <img> <font>');
+        echo $this_line;
 	}
 	echo '</div>';
 	echo '<a name="bottom" style="text-decoration:none;">&nbsp;</a>';
 	if ($isMaster || $is_courseCoach) {
 		$rand = mt_rand(1, 1000);
 		echo '<div id="clear-chat">';
-		echo '<a href="'.api_get_self().'?rand='.$rand.'&reset=1&'.api_get_cidreq().'#bottom" onclick="javascript: if(!confirm(\''.addslashes(api_htmlentities(get_lang('ConfirmReset'), ENT_QUOTES)).'\')) return false;">'.
-            Display::return_icon('delete.png', get_lang('ClearList')).' '.get_lang('ClearList').
+		echo '<a class="btn btn-danger btn-small " href="'.api_get_self().'?rand='.$rand.'&reset=1&'.api_get_cidreq().'#bottom" onclick="javascript: if(!confirm(\''.addslashes(api_htmlentities(get_lang('ConfirmReset'), ENT_QUOTES)).'\')) return false;">'.
+            get_lang('ClearList').
             '</a>';
 		echo '</div>';
 	}

+ 127 - 0
main/chat/chat_functions.lib.php

@@ -3,6 +3,8 @@
 /**
  *	@package chamilo.chat
  */
+use \Michelf\MarkdownExtra;
+use \Michelf\Markdown;
 
 /**
  * @author isaac flores paz
@@ -111,3 +113,128 @@ function users_list_in_chat()
  	}
  	return $list_users_in_chat;
 }
+
+/**
+ * @param string $message
+ * @param array $_course
+ * @param int $group_id
+ * @param int $session_id
+ * @param bool $preview
+ */
+function saveMessage($message, $userId, $_course, $session_id, $group_id, $preview = true)
+{
+    $userInfo = api_get_user_info($userId);
+    $fullName = $userInfo['complete_name'];
+    $isMaster = (bool)api_is_course_admin();
+
+    $document_path = api_get_path(SYS_COURSE_PATH).$_course['path'].'/document';
+    if (!empty($group_id)) {
+        $group_info = GroupManager :: get_group_properties($group_id);
+        $basepath_chat = $group_info['directory'].'/chat_files';
+    } else {
+        $basepath_chat = '/chat_files';
+    }
+    $chat_path = $document_path.$basepath_chat.'/';
+
+    if (!is_dir($chat_path)) {
+        if (is_file($chat_path)) {
+            @unlink($chat_path);
+        }
+    }
+
+    $date_now = date('Y-m-d');
+    $message = trim($message);
+    $timeNow = date('d/m/y H:i:s');
+
+    if (!empty($group_id)) {
+        $basename_chat = 'messages-'.$date_now.'_gid-'.$group_id;
+    } elseif (!empty($session_id)) {
+        $basename_chat = 'messages-'.$date_now.'_sid-'.$session_id;
+    } else {
+        $basename_chat = 'messages-'.$date_now;
+    }
+
+    if (!api_is_anonymous()) {
+        if (!empty($message)) {
+            Emojione\Emojione::$imagePathPNG = api_get_path(WEB_LIBRARY_PATH).'javascript/emojione/png/';
+            Emojione\Emojione::$imagePathSVG = api_get_path(WEB_LIBRARY_PATH).'javascript/emojione/svg/';
+            Emojione\Emojione::$ascii = true;
+
+            // Parsing emojis
+            $message = Emojione\Emojione::toImage($message);
+            // Parsing text to understand markdown (code highlight)
+            $message = MarkdownExtra::defaultTransform($message);
+            // Security XSS
+            $message = Security::remove_XSS($message);
+
+            if ($preview == true) {
+                return $message;
+            }
+
+            if (!file_exists($chat_path.$basename_chat.'.log.html')) {
+                $doc_id = add_document(
+                    $_course,
+                    $basepath_chat . '/' . $basename_chat . '.log.html',
+                    'file',
+                    0,
+                    $basename_chat . '.log.html'
+                );
+                api_item_property_update(
+                    $_course,
+                    TOOL_DOCUMENT,
+                    $doc_id,
+                    'DocumentAdded',
+                    $userId,
+                    $group_id,
+                    null,
+                    null,
+                    null,
+                    $session_id
+                );
+                api_item_property_update(
+                    $_course,
+                    TOOL_DOCUMENT,
+                    $doc_id,
+                    'invisible',
+                    $userId,
+                    $group_id,
+                    null,
+                    null,
+                    null,
+                    $session_id
+                );
+                item_property_update_on_folder(
+                    $_course,
+                    $basepath_chat,
+                    $userId
+                );
+            } else {
+                $doc_id = DocumentManager::get_document_id($_course, $basepath_chat.'/'.$basename_chat.'.log.html');
+            }
+
+            $fp = fopen($chat_path.$basename_chat.'.log.html', 'a');
+            // view user picture
+            $userImage = UserManager::get_user_picture_path_by_id($userId, 'web', false, true);
+
+            if (substr($userImage['file'],0,7) != 'unknown') {
+                $userPhoto = $userImage['dir'].'medium_'.$userImage['file'];
+            } else {
+                $userPhoto = $userImage['dir'].$userImage['file'];
+            }
+
+            $filePhoto = '<img class="chat-image" src="'.$userPhoto.'"/>';
+
+            if ($isMaster) {
+                fputs($fp, '<div class="message-teacher"><div class="content-message"><div class="chat-message-block-name">'.$fullName.'</div><div class="chat-message-block-content">'.$message.'</div><div class="message-date">'.$timeNow.'</div></div><div class="icon-message"></div>'.$filePhoto.'</div>'."\n");
+            } else {
+                fputs($fp, '<div class="message-student">'.$filePhoto.'<div class="icon-message"></div><div class="content-message"><div class="chat-message-block-name">'.$fullName.'</div><div class="chat-message-block-content">'.$message.'</div><div class="message-date">'.$timeNow.'</div></div></div>'."\n");
+            }
+            fclose($fp);
+
+            $chat_size = filesize($chat_path.$basename_chat.'.log.html');
+
+            update_existing_document($_course, $doc_id, $chat_size);
+            item_property_update_on_folder($_course, $basepath_chat, $userId);
+        }
+    }
+}

+ 0 - 1
main/chat/chat_hidden.php

@@ -13,7 +13,6 @@ define('FRAME', 'hidden');
 $language_file = array('chat');
 
 require_once '../inc/global.inc.php';
-require_once api_get_path(LIBRARY_PATH).'groupmanager.lib.php';
 require_once 'chat_functions.lib.php';
 
 $tbl_user = Database::get_main_table(TABLE_MAIN_USER);

+ 93 - 252
main/chat/chat_message.php

@@ -8,280 +8,121 @@
  * 	Modified by Alex Aragón (BeezNest)
  *	@package chamilo.chat
  */
-
 define('FRAME', 'message');
+
 $language_file = array('chat');
 require_once '../inc/global.inc.php';
+require_once api_get_path(SYS_PATH).'vendor/autoload.php';
+require_once api_get_path(SYS_CODE_PATH).'chat/chat_functions.lib.php';
+
 $userId = api_get_user_id();
 $userInfo = api_get_user_info();
 $course = api_get_course_id();
 $session_id = api_get_session_id();
-$group_id 	= api_get_group_id();
+$group_id = api_get_group_id();
+$_course = api_get_course_info();
 
 // Juan Carlos Raña inserted smileys and self-closing window.
 ?>
-<script >
-function insert_smile(text) {
-	if (text.createTextRange) {
-		text.smile = document.selection.createRange().duplicate();
-	}
-}
-
-function insert(text) {
-	var chat = document.formMessage.message;
-	if (chat.createTextRange && chat.smile) {
-		var smile = chat.smile;
-		smile.text = smile.text.charAt(smile.text.length - 1) == ' ' ? text + ' ' : text;
-	}
-	else chat.value += text;
-	chat.focus(smile)
-}
-
+<script>
 function close_chat_window() {
-	var chat_window = top.window.self;
-	chat_window.opener = top.window.self;
-	chat_window.top.close();
+    var chat_window = top.window.self;
+    chat_window.opener = top.window.self;
+    chat_window.top.close();
 }
-
 </script>
-
 <?php
 
 // Mode open in a new window: close the window when there isn't an user login
-
 if (empty($userId)) {
-	echo '<script languaje="javascript" type="text/javascript"> close_chat_window(); </script>';
+    echo '<script languaje="javascript" type="text/javascript"> close_chat_window(); </script>';
 } else {
-	api_protect_course_script();
+    api_protect_course_script();
 }
 
-// if we have the session set up
-if (!empty($course) && !empty($userId)) {
-	require_once api_get_path(LIBRARY_PATH).'document.lib.php';
-	require_once api_get_path(LIBRARY_PATH).'fileUpload.lib.php';
-
-	/*	Constants and variables */
-
-    $tbl_user	= Database::get_main_table(TABLE_MAIN_USER);
-    $sent 		= isset($_REQUEST['sent']) ? $_REQUEST['sent'] : null;
-
-    /*	MAIN CODE */
-
-    $query = "SELECT user_id, lastname, firstname, username, picture_uri
-              FROM $tbl_user WHERE user_id='".$userId."'";
-    $result = Database::query($query);
-
-    list($pseudo_user) = Database::fetch_row($result);
-
-    $isAllowed = !(empty($pseudo_user) || !$_cid);
-    $isMaster = (bool)api_is_course_admin();
-
-    $user_id = Database::result($result, 0, 'user_id');
-    $firstname = Database::result($result, 0, 'firstname');
-    $lastname  = Database::result($result, 0, 'lastname');
-    $picture  = Database::result($result, 0, 'picture_uri');
-    $fullName = api_get_person_name($firstname, $lastname);
-
-    $date_now = date('Y-m-d');
-
-    $basepath_chat = '';
-    $document_path = api_get_path(SYS_COURSE_PATH).$_course['path'].'/document';
-    if (!empty($group_id)) {
-        $group_info = GroupManager :: get_group_properties($group_id);
-        $basepath_chat = $group_info['directory'].'/chat_files';
-    } else {
-        $basepath_chat = '/chat_files';
-    }
-    $chat_path = $document_path.$basepath_chat.'/';
-
-    if (!is_dir($chat_path)) {
-        if (is_file($chat_path)) {
-            @unlink($chat_path);
-        }
-    }
-
-    require 'header_frame.inc.php';
-    $chat_size = 0;
-
-	// Define emoticons
-    $emoticon_text1 = ':-)';
-    $emoticon_img1  = '<img src="'.api_get_path(WEB_IMG_PATH).'emoticons/icon_smile.png" alt="'.get_lang('Smile').'" title="'.get_lang('Smile').'" />';
-    $emoticon_text2 = ':-D';
-    $emoticon_img2  = '<img src="'.api_get_path(WEB_IMG_PATH).'emoticons/icon_biggrin.png" alt="'.get_lang('BigGrin').'" title="'.get_lang('BigGrin').'" />';
-    $emoticon_text3 = ';-)';
-    $emoticon_img3  = '<img src="'.api_get_path(WEB_IMG_PATH).'emoticons/icon_wink.png" alt="'.get_lang('Wink').'" title="'.get_lang('Wink').'" />';
-    $emoticon_text4 = ':-P';
-    $emoticon_img4  = '<img src="'.api_get_path(WEB_IMG_PATH).'emoticons/icon_razz.png" alt="'.get_lang('Avid').'" title="'.get_lang('Avid').'" />';
-    $emoticon_text5 = '8-)';
-    $emoticon_img5  = '<img src="'.api_get_path(WEB_IMG_PATH).'emoticons/icon_cool.png" alt="'.get_lang('Cool').'" title="'.get_lang('Cool').'" />';
-    $emoticon_text6 = ':-o)';
-    $emoticon_img6  = '<img src="'.api_get_path(WEB_IMG_PATH).'emoticons/icon_surprised.png" alt="'.get_lang('Surprised').'" title="'.get_lang('Surprised').'" />';
-    $emoticon_text7 = '=;';
-    $emoticon_img7  = '<img src="'.api_get_path(WEB_IMG_PATH).'emoticons/icon_hand.png" alt="'.get_lang('Hand').'" title="'.get_lang('Hand').'" />';
-    $emoticon_text8 = '=8-o';
-    $emoticon_img8  = '<img src="'.api_get_path(WEB_IMG_PATH).'emoticons/icon_eek.png" alt="'.get_lang('Amazing').'" title="'.get_lang('Amazing').'" />';
-	$emoticon_text9 = ':-|)';
-	$emoticon_img9  = '<img src="'.api_get_path(WEB_IMG_PATH).'emoticons/icon_neutral.png" alt="'.get_lang('Neutral').'" title="'.get_lang('Neutral').'" />';
-	$emoticon_text10 = ':-k';
-	$emoticon_img10  = '<img src="'.api_get_path(WEB_IMG_PATH).'emoticons/icon_think.png" alt="'.get_lang('Think').'" title="'.get_lang('Think').'" />';
-	$emoticon_text11 = ':-?';
-	$emoticon_img11  = '<img src="'.api_get_path(WEB_IMG_PATH).'emoticons/icon_confused.png" alt="'.get_lang('Confused').'" title="'.get_lang('Confused').'" />';
-	$emoticon_text12 = ':-8';
-	$emoticon_img12  = '<img src="'.api_get_path(WEB_IMG_PATH).'emoticons/icon_redface.png" alt="'.get_lang('Redface').'" title="'.get_lang('Redface').'" />';
-	$emoticon_text13 = ':-L';
-	$emoticon_img13  = '<img src="'.api_get_path(WEB_IMG_PATH).'emoticons/icon_shhh.png" alt="'.get_lang('Silence').'" title="'.get_lang('Silence').'" />';
-	$emoticon_text14 = ':-#)';
-	$emoticon_img14  = '<img src="'.api_get_path(WEB_IMG_PATH).'emoticons/icon_silenced.png" alt="'.get_lang('Silenced').'" title="'.get_lang('Silenced').'" />';
-	$emoticon_text15 = ':-(';
-	$emoticon_img15  = '<img src="'.api_get_path(WEB_IMG_PATH).'emoticons/icon_sad.png" alt="'.get_lang('Sad').'" title="'.get_lang('Sad').'" />';
-	$emoticon_text16 = ';-(';
-	$emoticon_img16  = '<img src="'.api_get_path(WEB_IMG_PATH).'emoticons/icon_mourn.png" alt="'.get_lang('Weep').'" title="'.get_lang('Weep').'" />';
-	$emoticon_text17 = ':-[8';
-	$emoticon_img17  = '<img src="'.api_get_path(WEB_IMG_PATH).'emoticons/icon_angry.png" alt="'.get_lang('Angry').'" title="'.get_lang('Angry').'" />';
-	$emoticon_text18 = '--)';
-	$emoticon_img18  = '<img src="'.api_get_path(WEB_IMG_PATH).'emoticons/icon_arrow.png" alt="'.get_lang('Arrow').'" title="'.get_lang('Arrow').'" />';
-	$emoticon_text19 = ':!:';
-	$emoticon_img19  = '<img src="'.api_get_path(WEB_IMG_PATH).'emoticons/icon_exclaim.png" alt="'.get_lang('Exclamation').'" title="'.get_lang('Exclamation').'" />';
-	$emoticon_text20 = ':?:';
-	$emoticon_img20  = '<img src="'.api_get_path(WEB_IMG_PATH).'emoticons/icon_question.png" alt="'.get_lang('Question').'" title="'.get_lang('Question').'" />';
-	$emoticon_text21 = '0-';
-	$emoticon_img21  = '<img src="'.api_get_path(WEB_IMG_PATH).'emoticons/icon_idea.png" alt="'.get_lang('Idea').'" title="'.get_lang('Idea').'" />';
-
-	$emoticon_text201 = '*';
-	$emoticon_img201  = '<img src="'.api_get_path(WEB_IMG_PATH).'emoticons/waiting.png" alt="'.get_lang('AskPermissionSpeak').'" title="'.get_lang('AskPermissionSpeak').'" />';
-	$emoticon_text202 = ':speak:';
-	$emoticon_img202  = '<img src="'.api_get_path(WEB_IMG_PATH).'emoticons/flag_green_small.png" alt="'.get_lang('GiveTheFloorTo').'" title="'.get_lang('GiveTheFloorTo').'" />';
-	$emoticon_text203 = ':pause:';
-	$emoticon_img203  = '<img src="'.api_get_path(WEB_IMG_PATH).'emoticons/flag_yellow_small.png" alt="'.get_lang('Pause').'" title="'.get_lang('Pause').'" />';
-	$emoticon_text204 = ':stop:';
-	$emoticon_img204  = '<img src="'.api_get_path(WEB_IMG_PATH).'emoticons/flag_red_small.png" alt="'.get_lang('Stop').'" title="'.get_lang('Stop').'" />';
-
-	if ($sent) {
-		$message = Security::remove_XSS(trim(htmlspecialchars(stripslashes($_POST['message']), ENT_QUOTES, $charset)));
-		$message = str_replace($emoticon_text1, $emoticon_img1, $message);
-		$message = str_replace($emoticon_text2, $emoticon_img2, $message);
-		$message = str_replace($emoticon_text3, $emoticon_img3, $message);
-		$message = str_replace($emoticon_text4, $emoticon_img4, $message);
-		$message = str_replace($emoticon_text5, $emoticon_img5, $message);
-		$message = str_replace($emoticon_text6, $emoticon_img6, $message);
-		$message = str_replace($emoticon_text7, $emoticon_img7, $message);
-		$message = str_replace($emoticon_text8, $emoticon_img8, $message);
-		$message = str_replace($emoticon_text9, $emoticon_img9, $message);
-		$message = str_replace($emoticon_text10, $emoticon_img10, $message);
-		$message = str_replace($emoticon_text11, $emoticon_img11, $message);
-		$message = str_replace($emoticon_text12, $emoticon_img12, $message);
-		$message = str_replace($emoticon_text13, $emoticon_img13, $message);
-		$message = str_replace($emoticon_text14, $emoticon_img14, $message);
-		$message = str_replace($emoticon_text15, $emoticon_img15, $message);
-		$message = str_replace($emoticon_text16, $emoticon_img16, $message);
-		$message = str_replace($emoticon_text17, $emoticon_img17, $message);
-		$message = str_replace($emoticon_text18, $emoticon_img18, $message);
- 		$message = str_replace($emoticon_text19, $emoticon_img19, $message);
-		$message = str_replace($emoticon_text20, $emoticon_img20, $message);
-		$message = str_replace($emoticon_text21, $emoticon_img21, $message);
-		//
-		$message = str_replace($emoticon_text201, $emoticon_img201, $message);
-		$message = str_replace($emoticon_text202, $emoticon_img202, $message);
-		$message = str_replace($emoticon_text203, $emoticon_img203, $message);
-		$message = str_replace($emoticon_text204, $emoticon_img204, $message);
-
-		$timeNow = date('d/m/y H:i:s');
-
-		$basename_chat = '';
-		if (!empty($group_id)) {
-			$basename_chat = 'messages-'.$date_now.'_gid-'.$group_id;
-		} elseif (!empty($session_id)) {
-			$basename_chat = 'messages-'.$date_now.'_sid-'.$session_id;
-		} else {
-			$basename_chat = 'messages-'.$date_now;
-		}
-
-		if (!api_is_anonymous()) {
-			if (!empty($message)) {
-				//$message = make_clickable($message);
-                if (!file_exists($chat_path.$basename_chat.'.log.html')) {
-					$doc_id = add_document($_course, $basepath_chat.'/'.$basename_chat.'.log.html', 'file', 0, $basename_chat.'.log.html');
-
-					api_item_property_update($_course, TOOL_DOCUMENT, $doc_id, 'DocumentAdded', $userId, $group_id, null, null, null, $session_id);
-					api_item_property_update($_course, TOOL_DOCUMENT, $doc_id, 'invisible', $userId, $group_id, null, null, null, $session_id);
-					item_property_update_on_folder($_course, $basepath_chat, $userId);
-				} else {
-					$doc_id = DocumentManager::get_document_id($_course, $basepath_chat.'/'.$basename_chat.'.log.html');
-				}
-
-				$fp = fopen($chat_path.$basename_chat.'.log.html', 'a');
-                // view user picture
-                $userImage = UserManager::get_user_picture_path_by_id($userId, 'web', false, true);
-
-                if (substr($userImage['file'],0,7) != 'unknown') {
-                    $userPhoto = $userImage['dir'].'medium_'.$userImage['file'];
-                } else {
-                    $userPhoto = $userImage['dir'].$userImage['file'];
-                }
-
-                $filePhoto = '<img class="chat-image" src="'.$userPhoto.'"/>';
-				if ($isMaster) {
-					fputs($fp, '<div class="message-teacher"><div class="content-message"><div class="chat-message-block-name">'.$fullName.'</div><div>'.$message.'</div><div class="message-date">'.$timeNow.'</div></div><div class="icon-message"></div>'.$filePhoto.'</div>'."\n");
-				} else {
-					fputs($fp, '<div class="message-student">'.$filePhoto.'<div class="icon-message"></div><div class="content-message"><div class="chat-message-block-name">'.$fullName.'</div><div>'.$message.'</div><div class="message-date">'.$timeNow.'</div></div></div>'."\n");
-				}
-				fclose($fp);
-
-				$chat_size = filesize($chat_path.$basename_chat.'.log.html');
+if (empty($course) || empty($userId)) {
+    exit;
+}
 
-				update_existing_document($_course, $doc_id, $chat_size);
-				item_property_update_on_folder($_course, $basepath_chat, $userId);
-			}
-		}
-	}
-	?>
-	<form name="formMessage" method="post" action="<?php echo api_get_self().'?'.api_get_cidreq(); ?>" onsubmit="javascript: if(document.formMessage.message.value == '') { alert('<?php echo addslashes(api_htmlentities(get_lang('TypeMessage'), ENT_QUOTES)); ?>'); document.formMessage.message.focus(); return false; }" autocomplete="off">
-	<input type="hidden" name="sent" value="1">
-	<div class="message-form-chat">
-	<table border="0" cellpadding="5" cellspacing="0" width="100%">
-	<tr>
-        <td width="320" valign="middle">
-		<?php $talkboxsize=(api_get_course_setting('allow_open_chat_window')) ? 'width: 350px; height: 80px' : 'width: 450px; height: 35px'; ?>
-        <textarea id="message" class="message-text" name="message" style=" <?php echo $talkboxsize; ?>" onkeydown="send_message(event);" onclick="javascript: insert_smile(this);"></textarea>
-        </td>
-        <td>
-        <button id="send" type="submit" value="<?php echo get_lang('Send'); ?>" class="btn-send"><?php echo get_lang('Send'); ?></button>
-        </td>
-	</tr>
-	</table>
-        <?php
-        echo  '<div class="emoticons-chat">';
-		echo  "<a href=\"javascript:insert('".$emoticon_text1."')\">".$emoticon_img1."</a>";
-		echo  "<a href=\"javascript:insert('".$emoticon_text2."')\">".$emoticon_img2."</a>";
-		echo  "<a href=\"javascript:insert('".$emoticon_text3."')\">".$emoticon_img3."</a>";
-		echo  "<a href=\"javascript:insert('".$emoticon_text4."')\">".$emoticon_img4."</a>";
-		echo  "<a href=\"javascript:insert('".$emoticon_text5."')\">".$emoticon_img5."</a>";
-		echo  "<a href=\"javascript:insert('".$emoticon_text6."')\">".$emoticon_img6."</a>";
-		echo  "<a href=\"javascript:insert('".$emoticon_text7."')\">".$emoticon_img7."</a>";
-		echo  "<a href=\"javascript:insert('".$emoticon_text8."')\">".$emoticon_img8."</a>";
-		echo  "<a href=\"javascript:insert('".$emoticon_text9."')\">".$emoticon_img9."</a>";
-		echo  "<a href=\"javascript:insert('".$emoticon_text10."')\">".$emoticon_img10."</a>";
-		echo  "<a href=\"javascript:insert('".$emoticon_text11."')\">".$emoticon_img11."</a>";
-		echo  "<a href=\"javascript:insert('".$emoticon_text12."')\">".$emoticon_img12."</a>";
-		echo  "<a href=\"javascript:insert('".$emoticon_text13."')\">".$emoticon_img13."</a>";
-		echo  "<a href=\"javascript:insert('".$emoticon_text14."')\">".$emoticon_img14."</a>";
-		echo  "<a href=\"javascript:insert('".$emoticon_text15."')\">".$emoticon_img15."</a>";
-		echo  "<a href=\"javascript:insert('".$emoticon_text16."')\">".$emoticon_img16."</a>";
-		echo  "<a href=\"javascript:insert('".$emoticon_text17."')\">".$emoticon_img17."</a>";
-		echo  "<a href=\"javascript:insert('".$emoticon_text18."')\">".$emoticon_img18."</a>";
-		echo  "<a href=\"javascript:insert('".$emoticon_text19."')\">".$emoticon_img19."</a>";
-		echo  "<a href=\"javascript:insert('".$emoticon_text20."')\">".$emoticon_img20."</a>";
-		echo  "<a href=\"javascript:insert('".$emoticon_text21."')\">".$emoticon_img21."</a>";
-		?>
-        <?php
-		echo  "<a href=\"javascript:insert('".$emoticon_text201."')\">".$emoticon_img201."</a>";
-		echo  "<a href=\"javascript:insert('".$emoticon_text202."')\">".$emoticon_img202."</a>";
-		echo  "<a href=\"javascript:insert('".$emoticon_text203."')\">".$emoticon_img203."</a>";
-		echo  "<a href=\"javascript:insert('".$emoticon_text204."')\">".$emoticon_img204."</a>";
-		echo '</div>';
-		?>
+require_once api_get_path(LIBRARY_PATH).'document.lib.php';
+require_once api_get_path(LIBRARY_PATH).'fileUpload.lib.php';
+
+/*	Constants and variables */
+$tbl_user = Database::get_main_table(TABLE_MAIN_USER);
+$sent = isset($_REQUEST['sent']) ? $_REQUEST['sent'] : null;
+
+require 'header_frame.inc.php';
+$chat_size = 0;
+
+if ($sent) {
+    saveMessage(
+        $_POST['message'],
+        $userId,
+        $_course,
+        $session_id,
+        $group_id,
+        false
+    );
+}
+?>
+<form
+    id="formMessage"
+    name="formMessage"
+    method="post"
+    action="<?php echo api_get_self().'?'.api_get_cidreq(); ?>" onsubmit="javascript: if(document.formMessage.message.value == '') { alert('<?php echo addslashes(api_htmlentities(get_lang('TypeMessage'), ENT_QUOTES)); ?>'); document.formMessage.message.focus(); return false; }"
+    autocomplete="off"
+>
+    <input type="hidden" name="sent" value="1">
+    <div class="message-form-chat">
+        <div class="tabbable">
+            <ul class="nav nav-tabs">
+                <li class="active">
+                    <a href="#tab1" data-toggle="tab"><?php echo get_lang('Write'); ?></a>
+                </li>
+                <li>
+                    <a href="#tab2" id="preview" data-toggle="tab"><?php echo get_lang('Preview'); ?></a>
+                </li>
+                <li>
+                    <a href="#tab3" id="emojis" data-toggle="tab"><?php echo get_lang('Emojis'); ?></a>
+                </li>
+            </ul>
+            <div class="tab-content">
+                <div class="tab-pane active" id="tab1">
+                    <table border="0" cellpadding="5" cellspacing="0" width="100%">
+                        <tr>
+                            <td width="320" valign="middle">
+                                <?php
+                                $talkboxsize=(api_get_course_setting('allow_open_chat_window')) ? 'width: 350px; height: 80px' : 'width: 450px; height: 35px';
+                                //onkeydown="send_message(event);"
+                                ?>
+                                <textarea id="message" class="message-text" name="message" style=" <?php echo $talkboxsize; ?>"></textarea>
+                            </td>
+                        </tr>
+                        <tr>
+                            <td>
+                                <div class="btn-group">
+                                    <button id="send" type="submit" value="<?php echo get_lang('Send'); ?>" class="btn btn-primary">
+                                        <?php echo get_lang('Send'); ?>
+                                    </button>
+                                </div>
+                            </td>
+                        </tr>
+                    </table>
+                </div>
+                <div class="tab-pane" id="tab2">
+                    <table border="0" cellpadding="5" cellspacing="0" width="100%">
+                        <tr>
+                            <td width="320" valign="middle">
+                                <div id="html-preview" class="emoji-wysiwyg-editor-preview">
+                                </div>
+                            </td>
+                        </tr>
+                    </table>
+                </div>
+            </div>
+        </div>
     </div>
     </form>
 <?php
-}
+
 require 'footer_frame.inc.php';

+ 7 - 8
main/chat/chat_whoisonline.php

@@ -15,6 +15,7 @@ require_once '../inc/global.inc.php';
 $course = api_get_course_id();
 $group_id = api_get_group_id();
 $session_id = api_get_session_id();
+$user_id = api_get_user_id();
 $session_condition = api_get_session_condition($session_id);
 $group_condition = " AND to_group_id = '$group_id'";
 
@@ -25,16 +26,14 @@ if (!empty($group_id)) {
     $extra_condition = $session_condition;
 }
 
-$user_id = api_get_user_id();
-
 if (!empty($course)) {
     $showPic = isset($_GET['showPic']) ? intval($_GET['showPic']) : null;
-    $tbl_course_user			= Database::get_main_table(TABLE_MAIN_COURSE_USER);
-    $tbl_session_course_user	= Database::get_main_table(TABLE_MAIN_SESSION_COURSE_USER);
-    $tbl_session				= Database::get_main_table(TABLE_MAIN_SESSION);
-    $tbl_session_course			= Database::get_main_table(TABLE_MAIN_SESSION_COURSE);
-    $tbl_user					= Database::get_main_table(TABLE_MAIN_USER);
-    $tbl_chat_connected			= Database::get_course_table(TABLE_CHAT_CONNECTED);
+    $tbl_course_user = Database::get_main_table(TABLE_MAIN_COURSE_USER);
+    $tbl_session_course_user = Database::get_main_table(TABLE_MAIN_SESSION_COURSE_USER);
+    $tbl_session = Database::get_main_table(TABLE_MAIN_SESSION);
+    $tbl_session_course = Database::get_main_table(TABLE_MAIN_SESSION_COURSE);
+    $tbl_user = Database::get_main_table(TABLE_MAIN_USER);
+    $tbl_chat_connected = Database::get_course_table(TABLE_CHAT_CONNECTED);
 
     $query = "SELECT username FROM $tbl_user WHERE user_id='".$user_id."'";
     $result = Database::query($query);

File diff suppressed because it is too large
+ 97 - 1
main/chat/header_frame.inc.php


+ 57 - 49
main/course_progress/index.php

@@ -1,16 +1,14 @@
 <?php
 /* For licensing terms, see /license.txt */
 /**
-* Template (front controller in MVC pattern) used for distpaching to the controllers depend on the current action
-* @author Christian Fasanando <christian1827@gmail.com>
-* @author Julio Montoya <gugli100@gmail.com> Bugfixes session support
-* @package chamilo.course_progress
-*/
-/**
- * Code
+ * Template (front controller in MVC pattern) used for distpaching to the controllers depend on the current action
+ * @author Christian Fasanando <christian1827@gmail.com>
+ * @author Julio Montoya <gugli100@gmail.com> Bugfixes session support
+ * @package chamilo.course_progress
  */
+
 // name of the language file that needs to be included
-$language_file = array ('course_description', 'userInfo', 'admin');
+$language_file = array('course_description', 'userInfo', 'admin');
 
 // including files
 require_once '../inc/global.inc.php';
@@ -33,36 +31,54 @@ api_protect_course_script(true);
 define('ADD_THEMATIC_PLAN', 6);
 
 // get actions
-$actions = array('thematic_details', 'thematic_list', 'thematic_add', 'thematic_edit', 'thematic_copy', 'thematic_delete', 'moveup', 'movedown',
-                'thematic_import_select', 'thematic_import', 'thematic_export', 'thematic_export_pdf',
-				 'thematic_plan_list', 'thematic_plan_add', 'thematic_plan_edit', 'thematic_plan_delete',
-				 'thematic_advance_list', 'thematic_advance_add', 'thematic_advance_edit', 'thematic_advance_delete');
+$actions = array(
+    'thematic_details',
+    'thematic_list',
+    'thematic_add',
+    'thematic_edit',
+    'thematic_copy',
+    'thematic_delete',
+    'moveup',
+    'movedown',
+    'thematic_import_select',
+    'thematic_import',
+    'thematic_export',
+    'thematic_export_pdf',
+    'thematic_plan_list',
+    'thematic_plan_add',
+    'thematic_plan_edit',
+    'thematic_plan_delete',
+    'thematic_advance_list',
+    'thematic_advance_add',
+    'thematic_advance_edit',
+    'thematic_advance_delete'
+);
 
 $action  = 'thematic_details';
 if (isset($_GET['action']) && in_array($_GET['action'],$actions)) {
-	$action = $_GET['action'];
+    $action = $_GET['action'];
 }
 
 if (isset($_POST['action']) && $_POST['action'] == 'thematic_delete_select') {
-	$action = 'thematic_delete_select';
+    $action = 'thematic_delete_select';
 }
 
 if (isset($_GET['isStudentView']) && $_GET['isStudentView'] == 'true') {
-	$action = 'thematic_details';
+    $action = 'thematic_details';
 }
 
 if ($action == 'thematic_details' || $action == 'thematic_list') {
-	$_SESSION['thematic_control'] = $action;
+    $_SESSION['thematic_control'] = $action;
 }
 
 // get thematic id
 if (isset($_GET['thematic_id'])) {
-	$thematic_id = intval($_GET['thematic_id']);
+    $thematic_id = intval($_GET['thematic_id']);
 }
 
 // get thematic plan description type
 if (isset($_GET['description_type'])) {
-	$description_type = intval($_GET['description_type']);
+    $description_type = intval($_GET['description_type']);
 }
 
 // instance thematic object for using like library here
@@ -72,8 +88,8 @@ $thematic = new Thematic();
 $thematic_controller = new ThematicController();
 
 if (!empty($thematic_id)) {
-	// thematic data by id
-	$thematic_data = $thematic->get_thematic_list($thematic_id);
+    // thematic data by id
+    $thematic_data = $thematic->get_thematic_list($thematic_id);
 }
 
 // get default thematic plan title
@@ -82,9 +98,7 @@ $default_thematic_plan_title = $thematic->get_default_thematic_plan_title();
 // Only when I see the 3 columns. Avoids double or triple click binding for onclick event
 
 $htmlHeadXtra[] = '<script type="text/javascript">
-
 $(document).ready(function() {
-
 	//Second col
      /*
     $("#thematic_plan_add").live("submit", function() {
@@ -149,7 +163,6 @@ $(document).ready(function() {
         return false;
 	});*/
 
-
     $(".thematic_advance_actions, .thematic_tools ").hide();
 
 	$(".thematic_content").mouseover(function() {
@@ -185,11 +198,9 @@ $(document).ready(function() {
 });
 </script>';
 
-
 $htmlHeadXtra[] = '<script type="text/javascript">
 
 function datetime_by_attendance(attendance_id, thematic_advance_id) {
-
 	$.ajax({
 		contentType: "application/x-www-form-urlencoded",
 		beforeSend: function(objeto) {},
@@ -218,7 +229,6 @@ function update_done_thematic_advance(selected_value) {
 	});
 
 	// clean all radios
-
 	for (var i=0; i< $(".done_thematic").length;i++) {
 		var id_radio_thematic = $(".done_thematic").get(i).id;
 		$("#td_"+id_radio_thematic).css({"background-color":"#FFF"});
@@ -253,45 +263,43 @@ function check_per_custom_date(obj) {
         $("#div_datetime_by_attendance").show();
 	}
 }
-
 </script>';
 
 if ($action == 'thematic_list') {
-	$interbreadcrumb[] = array ('url' => '#', 'name' => get_lang('ThematicControl'));
+    $interbreadcrumb[] = array ('url' => '#', 'name' => get_lang('ThematicControl'));
 }
 if ($action == 'thematic_add') {
-	$interbreadcrumb[] = array ('url' => 'index.php?'.api_get_cidreq().'&action='.$_SESSION['thematic_control'], 'name' => get_lang('ThematicControl'));
-	$interbreadcrumb[] = array ('url' => '#', 'name' => get_lang('NewThematicSection'));
+    $interbreadcrumb[] = array ('url' => 'index.php?'.api_get_cidreq().'&action='.$_SESSION['thematic_control'], 'name' => get_lang('ThematicControl'));
+    $interbreadcrumb[] = array ('url' => '#', 'name' => get_lang('NewThematicSection'));
 }
 if ($action == 'thematic_edit') {
-	$interbreadcrumb[] = array ('url' => 'index.php?'.api_get_cidreq().'&action='.$_SESSION['thematic_control'], 'name' => get_lang('ThematicControl'));
-	$interbreadcrumb[] = array ('url' => '#', 'name' => get_lang('EditThematicSection'));
+    $interbreadcrumb[] = array ('url' => 'index.php?'.api_get_cidreq().'&action='.$_SESSION['thematic_control'], 'name' => get_lang('ThematicControl'));
+    $interbreadcrumb[] = array ('url' => '#', 'name' => get_lang('EditThematicSection'));
 }
 if ($action == 'thematic_details') {
-	$interbreadcrumb[] = array ('url' => '#', 'name' => get_lang('ThematicControl'));
+    $interbreadcrumb[] = array ('url' => '#', 'name' => get_lang('ThematicControl'));
 }
 if ($action == 'thematic_plan_list' || $action == 'thematic_plan_delete') {
-	$interbreadcrumb[] = array ('url' => 'index.php?'.api_get_cidreq().'&action='.$_SESSION['thematic_control'], 'name' => get_lang('ThematicControl'));
-	$interbreadcrumb[] = array ('url' => '#', 'name' => get_lang('ThematicPlan').' ('.$thematic_data['title'].') ');
+    $interbreadcrumb[] = array ('url' => 'index.php?'.api_get_cidreq().'&action='.$_SESSION['thematic_control'], 'name' => get_lang('ThematicControl'));
+    $interbreadcrumb[] = array ('url' => '#', 'name' => get_lang('ThematicPlan').' ('.$thematic_data['title'].') ');
 }
 if ($action == 'thematic_plan_add' || $action == 'thematic_plan_edit') {
-	$interbreadcrumb[] = array ('url' => 'index.php?'.api_get_cidreq().'&action='.$_SESSION['thematic_control'], 'name' => get_lang('ThematicControl'));
-	$interbreadcrumb[] = array ('url' => 'index.php?'.api_get_cidreq().'&action=thematic_plan_list&thematic_id='.$thematic_id, 'name' => get_lang('ThematicPlan').' ('.$thematic_data['title'].')');
-	if ($description_type >= ADD_THEMATIC_PLAN) {
-		$interbreadcrumb[] = array ('url' => '#', 'name' => get_lang('NewBloc'));
-	} else {
-		$interbreadcrumb[] = array ('url' => '#', 'name' => $default_thematic_plan_title[$description_type]);
-	}
+    $interbreadcrumb[] = array ('url' => 'index.php?'.api_get_cidreq().'&action='.$_SESSION['thematic_control'], 'name' => get_lang('ThematicControl'));
+    $interbreadcrumb[] = array ('url' => 'index.php?'.api_get_cidreq().'&action=thematic_plan_list&thematic_id='.$thematic_id, 'name' => get_lang('ThematicPlan').' ('.$thematic_data['title'].')');
+    if ($description_type >= ADD_THEMATIC_PLAN) {
+        $interbreadcrumb[] = array ('url' => '#', 'name' => get_lang('NewBloc'));
+    } else {
+        $interbreadcrumb[] = array ('url' => '#', 'name' => $default_thematic_plan_title[$description_type]);
+    }
 }
 if ($action == 'thematic_advance_list' || $action == 'thematic_advance_delete') {
-	$interbreadcrumb[] = array ('url' => 'index.php?'.api_get_cidreq().'&action='.$_SESSION['thematic_control'], 'name' => get_lang('ThematicControl'));
-	$interbreadcrumb[] = array ('url' => '#', 'name' => get_lang('ThematicAdvance').' ('.$thematic_data['title'].')');
-
+    $interbreadcrumb[] = array ('url' => 'index.php?'.api_get_cidreq().'&action='.$_SESSION['thematic_control'], 'name' => get_lang('ThematicControl'));
+    $interbreadcrumb[] = array ('url' => '#', 'name' => get_lang('ThematicAdvance').' ('.$thematic_data['title'].')');
 }
 if ($action == 'thematic_advance_add' || $action == 'thematic_advance_edit') {
-	$interbreadcrumb[] = array ('url' => 'index.php?'.api_get_cidreq().'&action='.$_SESSION['thematic_control'], 'name' => get_lang('ThematicControl'));
-	$interbreadcrumb[] = array ('url' => 'index.php?'.api_get_cidreq().'&action=thematic_advance_list&thematic_id='.$thematic_id, 'name' => get_lang('ThematicAdvance').' ('.$thematic_data['title'].')');
-	$interbreadcrumb[] = array ('url' => '#', 'name' => get_lang('NewThematicAdvance'));
+    $interbreadcrumb[] = array ('url' => 'index.php?'.api_get_cidreq().'&action='.$_SESSION['thematic_control'], 'name' => get_lang('ThematicControl'));
+    $interbreadcrumb[] = array ('url' => 'index.php?'.api_get_cidreq().'&action=thematic_advance_list&thematic_id='.$thematic_id, 'name' => get_lang('ThematicAdvance').' ('.$thematic_data['title'].')');
+    $interbreadcrumb[] = array ('url' => '#', 'name' => get_lang('NewThematicAdvance'));
 }
 
 // Distpacher actions to controller
@@ -306,7 +314,7 @@ switch ($action) {
     case 'moveup':
     case 'movedown':
         if (!api_is_allowed_to_edit(null,true)) {
-                api_not_allowed();
+            api_not_allowed();
         }
     case 'thematic_list':
     case 'thematic_export':

+ 29 - 21
main/course_progress/thematic_controller.php

@@ -4,9 +4,9 @@
 
 /**
  * This file contains class used like controller for thematic, it should be included inside a dispatcher file (e.g: index.php)
- * 
+ *
  * !!! WARNING !!! : ALL DATES IN THIS MODULE ARE STORED IN UTC ! DO NOT CONVERT DURING THE TRANSITION FROM CHAMILO 1.8.x TO 2.0
- * 
+ *
  * @author Christian Fasanando <christian1827@gmail.com>
  * @author Julio Montoya <gugli100@gmail.com> token support improving UI
  * @package chamilo.course_progress
@@ -15,7 +15,7 @@
 /**
  * Thematic Controller script. Prepares the common background variables to give to the scripts corresponding to
  * the requested action
- * @package chamilo.course_progress 
+ * @package chamilo.course_progress
  */
 class ThematicController
 {
@@ -34,7 +34,7 @@ class ThematicController
      * @param 	string	Action
      * render to thematic.php
      */
-    public function thematic($action) 
+    public function thematic($action)
     {
         $thematic = new Thematic();
         $data = array();
@@ -44,12 +44,12 @@ class ThematicController
         $check = Security::check_token('request');
         $thematic_id = isset($_REQUEST['thematic_id']) ? intval($_REQUEST['thematic_id']) : null;
         $displayHeader = (!empty($_REQUEST['display']) && $_REQUEST['display'] === 'no_header') ? false : true;
- 
+
         if ($check) {
             switch ($action) {
                 case 'thematic_add':
                 case 'thematic_edit':
-                    // insert or update a thematic		
+                    // insert or update a thematic
                     if (strtoupper($_SERVER['REQUEST_METHOD']) == "POST") {
                         if (trim($_POST['title']) !== '') {
                             if (api_is_allowed_to_edit(null, true)) {
@@ -250,7 +250,7 @@ class ThematicController
 
         $data['action'] = $action;
         $layoutName = $displayHeader ? 'layout' : 'layout_no_header';
-       
+
         // render to the view
         $this->view->set_data($data);
         $this->view->set_layout($layoutName);
@@ -286,7 +286,7 @@ class ThematicController
                             }
                             unset($_SESSION['thematic_plan_token']);
                             $data['message'] = 'ok';
-                            
+
                             $saveRedirect = api_get_path(WEB_PATH) . 'main/course_progress/index.php?';
                             $saveRedirect.= api_get_cidreq() . '&';
                             $saveRedirect.= 'thematic_plan_save_message=ok';
@@ -360,7 +360,7 @@ class ThematicController
 
     /**
      * This method is used for thematic advance control (update, insert or listing)
-     * @param 	string	Action
+     * @param 	string	$action
      * render to thematic_advance.php
      */
     public function thematic_advance($action)
@@ -368,20 +368,19 @@ class ThematicController
         $thematic = new Thematic();
         $attendance = new Attendance();
         $data = array();
-        
+
         $displayHeader = (!empty($_REQUEST['display']) && $_REQUEST['display'] === 'no_header') ? false : true;
-  
-        // get data for attendance input select		
+
+        // get data for attendance input select
         $attendance_list = $attendance->get_attendances_list();
         $attendance_select = array();
         $attendance_select[0] = get_lang('SelectAnAttendance');
         foreach ($attendance_list as $attendance_id => $attendance_data) {
             $attendance_select[$attendance_id] = $attendance_data['name'];
         }
-       
+
         $thematic_id = intval($_REQUEST['thematic_id']);
         $thematic_advance_id = intval($_REQUEST['thematic_advance_id']);
-
         $thematic_advance_data = array();
 
         switch ($action) {
@@ -421,8 +420,9 @@ class ThematicController
                         $data['thematic_advance_data'] = $thematic_advance_data;
                     }
                 } else {
-                    if ($_REQUEST['thematic_advance_token'] == $_SESSION['thematic_advance_token'] && api_is_allowed_to_edit(null, true)) {
-
+                    if ($_REQUEST['thematic_advance_token'] == $_SESSION['thematic_advance_token'] &&
+                        api_is_allowed_to_edit(null, true)
+                    ) {
                         $thematic_advance_id = $_REQUEST['thematic_advance_id'];
                         $thematic_id = $_REQUEST['thematic_id'];
                         $content = $_REQUEST['content'];
@@ -434,14 +434,23 @@ class ThematicController
                             $start_date = $_REQUEST['start_date_by_attendance'];
                             $attendance_id = $_REQUEST['attendance_select'];
                         }
-                        $thematic->set_thematic_advance_attributes($thematic_advance_id, $thematic_id, $attendance_id, $content, $start_date, $duration);
+                        $thematic->set_thematic_advance_attributes(
+                            $thematic_advance_id,
+                            $thematic_id,
+                            $attendance_id,
+                            $content,
+                            $start_date,
+                            $duration
+                        );
+
                         $affected_rows = $thematic->thematic_advance_save();
+
                         if ($affected_rows) {
                             // get last done thematic advance before move thematic list
                             $last_done_thematic_advance = $thematic->get_last_done_thematic_advance();
                             // update done advances with de current thematic list
                             if (!empty($last_done_thematic_advance)) {
-                                $update_done_advances = $thematic->update_done_thematic_advances($last_done_thematic_advance);
+                                $thematic->update_done_thematic_advances($last_done_thematic_advance);
                             }
                         }
                     }
@@ -452,7 +461,6 @@ class ThematicController
                 break;
         }
 
-
         // get calendar select by attendance id
         $calendar_select = array();
         if (!empty($thematic_advance_data)) {
@@ -473,7 +481,7 @@ class ThematicController
         $data['thematic_advance_data'] = $thematic_advance_data;
         $data['calendar_select'] = $calendar_select;
         $layoutName = $displayHeader ? 'layout' : 'layout_no_header';
-        
+
         // render to the view
         $this->view->set_data($data);
         $this->view->set_layout($layoutName);
@@ -481,4 +489,4 @@ class ThematicController
         $this->view->render();
     }
 
-}
+}

+ 6 - 4
main/coursecopy/copy_course.php

@@ -76,10 +76,12 @@ if (Security::check_token('post') && (
 
     $cb = new CourseBuilder();
     $course = $cb->build();
-    $hidden_fields = array();
-    $hidden_fields['same_file_name_option'] = $_POST['same_file_name_option'];
-    $hidden_fields['destination_course']    = $_POST['destination_course'];
-    CourseSelectForm::display_form($course, $hidden_fields, true);
+    $hiddenFields = array();
+    $hiddenFields['same_file_name_option'] = $_POST['same_file_name_option'];
+    $hiddenFields['destination_course']    = $_POST['destination_course'];
+    // Add token to Course select form
+    $hiddenFields['sec_token'] = Security::get_token();
+    CourseSelectForm::display_form($course, $hiddenFields, true);
 } else {
     $table_c = Database :: get_main_table(TABLE_MAIN_COURSE);
     $table_cu = Database :: get_main_table(TABLE_MAIN_COURSE_USER);

+ 9 - 7
main/coursecopy/copy_course_session.php

@@ -386,13 +386,15 @@ if (Security::check_token('post') && (
         $course_origin = api_get_course_info($arr_course_origin[0]);
         $cb = new CourseBuilder('', $course_origin);
         $course = $cb->build($origin_session, $arr_course_origin[0], $with_base_content);
-        //$hidden_fields['same_file_name_option'] = $_POST['same_file_name_option'];
-        $hidden_fields['destination_course'] 	= $arr_course_destination[0];
-        $hidden_fields['origin_course'] 		= $arr_course_origin[0];
-        $hidden_fields['destination_session'] 	= $destination_session;
-        $hidden_fields['origin_session'] 		= $origin_session;
-
-        CourseSelectForm :: display_form($course, $hidden_fields, true);
+        //$hiddenFields['same_file_name_option'] = $_POST['same_file_name_option'];
+        $hiddenFields['destination_course'] 	= $arr_course_destination[0];
+        $hiddenFields['origin_course'] 		= $arr_course_origin[0];
+        $hiddenFields['destination_session'] 	= $destination_session;
+        $hiddenFields['origin_session'] 		= $origin_session;
+        // Add token to Course select form
+        $hiddenFields['sec_token'] = Security::get_token();
+
+        CourseSelectForm :: display_form($course, $hiddenFields, true);
         echo '<div style="float:right"><a href="javascript:window.back();">'.
             Display::return_icon(
                 'back.png',

+ 3 - 1
main/coursecopy/create_backup.php

@@ -91,7 +91,9 @@ if (Security::check_token('post') && (
 
     $cb = new CourseBuilder('partial');
     $course = $cb->build();
-    CourseSelectForm::display_form($course);
+    // Add token to Course select form
+    $hiddenFields['sec_token'] = Security::get_token();
+    CourseSelectForm::display_form($course, $hiddenFields);
 
 } else {
     $cb = new CourseBuilder();

+ 4 - 1
main/coursecopy/import_backup.php

@@ -135,7 +135,10 @@ if (Security::check_token('post') && (
     $course = CourseArchiver::read_course($filename, $delete_file);
 
     if ($course->has_resources() && ($filename !== false)) {
-        CourseSelectForm::display_form($course, array('same_file_name_option' => $_POST['same_file_name_option']));
+        $hiddenFields['same_file_name_option'] = $_POST['same_file_name_option'];
+        // Add token to Course select form
+        $hiddenFields['sec_token'] = Security::get_token();
+        CourseSelectForm::display_form($course, $hiddenFields);
     } elseif ($filename === false) {
         Display::display_error_message(get_lang('ArchivesDirectoryNotWriteableContactAdmin'));
         echo '<a class="btn" href="import_backup.php?' . api_get_cidreq() . '">' . get_lang('TryAgain') . '</a>';

+ 3 - 1
main/coursecopy/recycle_course.php

@@ -85,7 +85,9 @@ if (Security::check_token('post') && (
 
     $cb = new CourseBuilder();
     $course = $cb->build();
-    CourseSelectForm::display_form($course);
+    // Add token to Course select form
+    $hiddenFields['sec_token'] = Security::get_token();
+    CourseSelectForm::display_form($course, $hiddenFields);
 } else {
     $cb = new CourseBuilder();
     $course = $cb->build();

+ 27 - 20
main/cron/cleanup.php

@@ -1,40 +1,47 @@
 <?php
 /**
- * Automatic cleanup procedure
+ * Automatic cleanup procedure. Cleans the archive directory of anything
+ * older than 7 days
  * @package chamilo.cron
  * @author Yannick Warnier <yannick.warnier@beeznest.com>
  */
 /**
  * Initialization
  */
-if (php_sapi_name() != 'cli') { exit; } //do not run from browser
+if (php_sapi_name() != 'cli') { 
+    exit; //do not run from browser
+}
 $dir = dirname(__FILE__);
 $a_dir = realpath($dir.'/../../archive/');
 $list = scandir($a_dir);
+// calculate 7 days
 $t = time()-(86400*7);
-foreach($list as $item) {
-	if (substr($item,0,1) == '.') { continue; }
-	$stat = @stat($a_dir.'/'.$item);
-	if ($stat === false) { error_log('Cron task cannot stat '.$a_dir.'/'.$item); continue; }
-	if ($stat['mtime'] > $t) { //if the file is older than one week, delete
-		recursive_delete($a_dir.'/'.$item);
-	}
+foreach ($list as $item) {
+    if (substr($item,0,1) == '.') {
+        continue;
+    }
+    $stat = @stat($a_dir.'/'.$item);
+    if ($stat === false) {
+        error_log('Cron task cannot stat '.$a_dir.'/'.$item);
+        continue;
+    }
+    if ($stat['mtime'] > $t) { //if the file is older than one week, delete
+        recursive_delete($a_dir.'/'.$item);
+    }
 }
 
 /**
  * Delete a file or recursively delete a directory
- *
  * @param string $str Path to file or directory
  */
 function recursive_delete($str){
-	if(is_file($str)){
-		return @unlink($str);
-	}
-	elseif(is_dir($str)){
-		$scan = glob(rtrim($str,'/').'/*');
-		foreach($scan as $index=>$path){
-			recursive_delete($path);
-		}
-		return @rmdir($str);
-	}
+    if (is_file($str)) {
+        return @unlink($str);
+    } elseif (is_dir($str)) {
+        $scan = glob(rtrim($str,'/').'/*');
+        foreach ($scan as $index=>$path) {
+            recursive_delete($path);
+        }
+        return @rmdir($str);
+    }
 }

+ 74 - 25
main/cron/import_csv.php

@@ -135,7 +135,13 @@ class ImportCsv
 
             $this->prepareImport();
 
-            $sections = array('students', 'teachers', 'courses', 'sessions', 'unsubscribe-static');
+            $sections = array(
+                'students',
+                'teachers',
+                'courses',
+                'sessions',
+                'unsubscribe-static'
+            );
             foreach ($sections as $section) {
                 $this->logger->addInfo("-- Import $section --");
 
@@ -152,11 +158,19 @@ class ImportCsv
                 }
             }
 
-            $sections = array('students-static', 'teachers-static', 'courses-static', 'sessions-static', 'calendar-static');
+            $sections = array(
+                'students-static',
+                'teachers-static',
+                'courses-static',
+                'sessions-static',
+                'calendar-static'
+            );
             foreach ($sections as $section) {
                 $this->logger->addInfo("-- Import static files $section --");
 
-                if (isset($fileToProcessStatic[$section]) && !empty($fileToProcessStatic[$section])) {
+                if (isset($fileToProcessStatic[$section]) &&
+                    !empty($fileToProcessStatic[$section])
+                ) {
                     $files = $fileToProcessStatic[$section];
                     foreach ($files as $fileInfo) {
                         $method = $fileInfo['method'];
@@ -176,11 +190,24 @@ class ImportCsv
     private function prepareImport()
     {
         // Create user extra field: extra_external_user_id
-        UserManager::create_extra_field($this->extraFieldIdNameList['user'], 1, 'External user id', null);
+        UserManager::create_extra_field(
+            $this->extraFieldIdNameList['user'],
+            1,
+            'External user id',
+            null
+        );
         // Create course extra field: extra_external_course_id
-        CourseManager::create_course_extra_field($this->extraFieldIdNameList['course'], 1, 'External course id');
+        CourseManager::create_course_extra_field(
+            $this->extraFieldIdNameList['course'],
+            1,
+            'External course id'
+        );
         // Create session extra field extra_external_session_id
-        SessionManager::create_session_extra_field($this->extraFieldIdNameList['session'], 1, 'External session id');
+        SessionManager::create_session_extra_field(
+            $this->extraFieldIdNameList['session'],
+            1,
+            'External session id'
+        );
     }
 
     /**
@@ -232,6 +259,7 @@ class ImportCsv
 
     /**
      * @param array $row
+     *
      * @return array
      */
     private function cleanCourseRow($row)
@@ -296,13 +324,15 @@ class ImportCsv
             foreach ($data as $row) {
                 $row = $this->cleanUserRow($row);
 
-                $user_id = UserManager::get_user_id_from_original_id($row['extra_'.$this->extraFieldIdNameList['user']], $this->extraFieldIdNameList['user']);
+                $user_id = UserManager::get_user_id_from_original_id(
+                    $row['extra_' . $this->extraFieldIdNameList['user']],
+                    $this->extraFieldIdNameList['user']
+                );
                 $userInfo  = array();
                 $userInfoByOfficialCode  = null;
 
                 if (!empty($user_id)) {
                     $userInfo = api_get_user_info($user_id);
-                    //$userInfo = api_get_user_info_from_username($row['username']);
                     $userInfoByOfficialCode = api_get_user_info_from_official_code($row['official_code']);
                 }
 
@@ -332,7 +362,8 @@ class ImportCsv
 
                     if ($userId) {
                         foreach ($row as $key => $value) {
-                            if (substr($key, 0, 6) == 'extra_') { //an extra field
+                            if (substr($key, 0, 6) == 'extra_') {
+                                //an extra field
                                 UserManager::update_extra_field_value($userId, substr($key, 6), $value);
                             }
                         }
@@ -374,8 +405,13 @@ class ImportCsv
 
                     if ($result) {
                         foreach ($row as $key => $value) {
-                            if (substr($key, 0, 6) == 'extra_') { //an extra field
-                                UserManager::update_extra_field_value($userInfo['user_id'], substr($key, 6), $value);
+                            if (substr($key, 0, 6) == 'extra_') {
+                                //an extra field
+                                UserManager::update_extra_field_value(
+                                    $userInfo['user_id'],
+                                    substr($key, 6),
+                                    $value
+                                );
                             }
                         }
                         $this->logger->addInfo("Teachers - User updated: ".$row['username']);
@@ -461,7 +497,8 @@ class ImportCsv
 
                     if ($result) {
                         foreach ($row as $key => $value) {
-                            if (substr($key, 0, 6) == 'extra_') { //an extra field
+                            if (substr($key, 0, 6) == 'extra_') {
+                                //an extra field
                                 UserManager::update_extra_field_value($result, substr($key, 6), $value);
                             }
                         }
@@ -488,7 +525,9 @@ class ImportCsv
                     // Conditions that disables the update of password and email:
 
                     if (isset($this->conditions['importStudents'])) {
-                        if (isset($this->conditions['importStudents']['update']) && isset($this->conditions['importStudents']['update']['avoid'])) {
+                        if (isset($this->conditions['importStudents']['update']) &&
+                            isset($this->conditions['importStudents']['update']['avoid'])
+                        ) {
                             // Blocking email update -
                             // 1. Condition
                             $avoidUsersWithEmail = $this->conditions['importStudents']['update']['avoid']['email'];
@@ -550,8 +589,13 @@ class ImportCsv
                             $this->logger->addInfo("Students - Username was changes from '".$userInfo['username']."' to '".$row['username']."' ");
                         }
                         foreach ($row as $key => $value) {
-                            if (substr($key, 0, 6) == 'extra_') { //an extra field
-                                UserManager::update_extra_field_value($userInfo['user_id'], substr($key, 6), $value);
+                            if (substr($key, 0, 6) == 'extra_') {
+                                //an extra field
+                                UserManager::update_extra_field_value(
+                                    $userInfo['user_id'],
+                                    substr($key, 6),
+                                    $value
+                                );
                             }
                         }
 
@@ -576,6 +620,10 @@ class ImportCsv
         $this->importCourses($file, false);
     }
 
+    /**
+     * @param string $file
+     * @param bool $moveFile
+     */
     private function importCalendarStatic($file, $moveFile = true)
     {
         $data = Import::csv_to_array($file);
@@ -743,12 +791,12 @@ class ImportCsv
                 if (empty($courseInfo)) {
                     // Create
                     $params = array();
-                    $params['title']                = $row['title'];
-                    $params['exemplary_content']    = false;
-                    $params['wanted_code']          = $row['course_code'];
-                    $params['course_category']      = $row['course_category'];
-                    $params['course_language']      = $row['language'];
-                    $params['teachers']             = $row['teachers'];
+                    $params['title'] = $row['title'];
+                    $params['exemplary_content'] = false;
+                    $params['wanted_code'] = $row['course_code'];
+                    $params['course_category'] = $row['course_category'];
+                    $params['course_language'] = $row['language'];
+                    $params['teachers'] = $row['teachers'];
 
                     $courseInfo = CourseManager::create_course($params);
 
@@ -793,7 +841,6 @@ class ImportCsv
         }
     }
 
-
     /**
      * @param string $file
      */
@@ -894,7 +941,9 @@ class ImportCsv
     private function importSessions($file, $moveFile = true)
     {
         $avoid =  null;
-        if (isset($this->conditions['importSessions']) && isset($this->conditions['importSessions']['update'])) {
+        if (isset($this->conditions['importSessions']) &&
+            isset($this->conditions['importSessions']['update'])
+        ) {
             $avoid = $this->conditions['importSessions']['update'];
         }
         $result = SessionManager::importCSV(
@@ -973,8 +1022,8 @@ class ImportCsv
         // User
         $table = Database::get_main_table(TABLE_MAIN_USER);
         $tableAdmin = Database::get_main_table(TABLE_MAIN_ADMIN);
-        //$sql = "DELETE FROM $table WHERE username NOT IN ('admin') AND lastname <> 'Anonymous' ";
-        $sql = "DELETE FROM $table WHERE user_id not in (select user_id from $tableAdmin) and status <> ".ANONYMOUS;
+        $sql = "DELETE FROM $table
+                WHERE user_id not in (select user_id from $tableAdmin) and status <> ".ANONYMOUS;
         Database::query($sql);
         echo $sql.PHP_EOL;
 

+ 0 - 1
main/css/academica/default.css

@@ -258,7 +258,6 @@ text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.17);
 }
 .btn{
   display: inline-block;
-  padding: 3px 25px;
   margin-bottom: 0;
   font-size: 14px;
   font-weight: normal;

+ 3 - 410
main/css/academica/scorm.css

@@ -1,233 +1,4 @@
 /* copy of default_scorm.css */
-
-.inner_lp_toc {
-    overflow: auto;
-    background-color: white;
-    height: 210px;
-}
-
-.inner_lp_toc .scorm_item_1 a,
-.inner_lp_toc .scorm_item_2 a {
-    font-size: 13px;
-    margin-right: 1px;
-    padding-bottom: 2px;
-    text-decoration: none;
-    color: #2F3E46;
-}
-
-.inner_lp_toc .scorm_item_1 a.chapter_module,
-.inner_lp_toc .scorm_item_2 a.chapter_module {
-    font-weight: normal;
-    margin-right: 10px;
-}
-.inner_lp_toc .scorm_item_highlight {
-    font-weight:bold;
-    border:1px solid #00aad4;
-    background-color: #00aad4;
-    background-image:none;
-    margin-right: 0px;
-    padding: 10px 0px 10px 0px;
-    text-decoration: none;
-}
-.inner_lp_toc .scorm_item_highlight a {
-    color:#fff;
-    margin-right: 1px;
-    text-decoration: none;
-}
-
-.inner_lp_toc .scorm_item_section .scorm_item:before
-{
-    content : url('../lp_section.png');  /* from main/newscorm/lp_controller.php file */
-    vertical-align: text-top;
-    margin-right : 5px;
-}
-
-.scorm_section_level_0 {
-    padding : 0 0 0 0;
-}
-
-.scorm_section_level_1 {
-    padding : 0 0.5em 0 2em;
-}
-
-.scorm_section_level_2 {
-    padding : 0 0.5em 0 4em;
-}
-
-.scorm_section_level_3 {
-    padding : 0 0.5em 0 6em;
-}
-
-.scorm_section_level_4 {
-    padding : 0 0.5em 0 8em;
-}
-
-.scorm_section_level_5 {
-    padding : 0 0.5em 0 10em;
-}
-
-.scorm_item_level_0 {
-    padding : 0 0 0 0;
-}
-
-.scorm_item_level_1 {
-    padding : 0 1.5em 0 1.5em;
-}
-
-.scorm_item_level_2 {
-    padding : 0 1.5em 0 3em;
-}
-.scorm_item_level_3 {
-    padding : 0 1.5em 0 4.5em;
-}
-
-.scorm_item_level_4 {
-    padding : 0 1.5em 0 6em;
-}
-
-.scorm_item_level_5 {
-    padding : 0 1.5em 0 7.5em;
-}
-
-.scorm_item.scorm_item_level_2 > a, .scorm_item.scorm_item_level_3 > a, .scorm_item.scorm_item_level_4 > a, .scorm_item.scorm_item_level_5 > a{
-    font-weight: normal;
-}
-/* end of copy of default_scorm.css */
-
-
-.scormpage {
-    height: 100%;
-}
-.scormpage .menu {
-    width: 180px;
-    float: left;
-    margin: 1px;
-    padding: 0px;
-    margin-top: 0px;
-    padding-top: 0px;
-}
-.lp_toc {
-    background-color: white;
-    height: 380px;
-    width: 99%;
-    border-right: 1px none;
-}
-
-.inner_lp_toc {
-    overflow: auto;
-    background-color: #D7EEF4;
-    height: 210px;
-    /*padding: 10px;*/   
-}
-.inner_lp_toc .scorm_item_section {
-    border:none;
-    background:#333;
-    font-weight:normal;
-    color:#fff;
-    text-shadow:none;
-    background: #505f6b; /* Old browsers */
-    background: -moz-linear-gradient(top, #505f6b 0%, #3e4f5c 100%); /* FF3.6+ */
-    background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#505f6b), color-stop(100%,#3e4f5c)); /* Chrome,Safari4+ */
-    background: -webkit-linear-gradient(top, #505f6b 0%,#3e4f5c 100%); /* Chrome10+,Safari5.1+ */
-    background: -o-linear-gradient(top, #505f6b 0%,#3e4f5c 100%); /* Opera 11.10+ */
-    background: -ms-linear-gradient(top, #505f6b 0%,#3e4f5c 100%); /* IE10+ */
-    background: linear-gradient(to bottom, #505f6b 0%,#3e4f5c 100%); /* W3C */
-    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#505f6b', endColorstr='#3e4f5c',GradientType=0 ); /* IE6-9 */
-    padding: 10px 0px 10px 0px;
-    text-decoration: none;
-}
-
-.inner_lp_toc .scorm_item {
-    font-size: 13px;
-    margin-left: 10px;
-    margin-right:10px;
-    text-decoration: none;
-    border-color: rgba(255, 255, 255, 0.3); 
-    
-}
-.inner_lp_toc .scorm_item.scorm_item_level_1{
-    background: url(../img/archive.png) no-repeat;
-}
-
-
-.inner_lp_toc .scorm_title {
-    font-weight: bold;
-    background:#ccc;
-    font-size: 14px;
-    color: #444;
-}
-.inner_lp_toc .scorm_title_text {
-    margin-left: 10px;
-}
-.inner_lp_toc .scorm_status_img {
-    margin:0px;
-    margin-left: -10px;
-    width:10px;
-}
-.lp_navigation {
-    overflow: auto;
-    background-color: white;
-    height: 44px;
-    width:180px;
-    padding-top: 4px;
-    padding-bottom:0px;
-    border: none;
-    margin-top: -18px;
-    border-top: 1px dotted black;
-    border-bottom: 1px dotted black;
-}
-.lp_navigation_elem {
-    padding-left: 15px;
-    padding-top: 0px;
-}
-/*.scormpage .menu */
-.lp_navigation_elem .progresstext {
-    margin-top: -20px;
-}
-/*.scormpage .menu */
-.lp_navigation_elem .buttons {
-    margin-left: 0px;
-    margin-right: 0em;
-    margin-top: 0.4em;
-}
-.scormpage .menu .notification {
-    background-color: white;
-    height: 50px;
-}
-.scormpage .menu .notification .message {
-    background-color: white;
-    height: 50px;
-    width: 180px;
-    border: none;
-}
-.scormpage .content {
-    /*float: left;
-    width: 60%;*/
-    margin-top: 0px;
-    padding-top: 0px;
-    padding-left: 180px;
-    background-color: white;
-}
-.iframe {
-    border: 0px solid black;
-    height: 100%;
-    width: 95%;
-    margin: 0px;
-    padding-right: 0px;
-    overflow: auto;
-    vertical-align: top;
-}
-.scormpage .footer {
-    clear: both;
-}
-#image_preview {
-    padding-left: 17px;
-}
-#msg_div_id {
-    padding-left: 17px;
-    padding-top: 4px;
-}
-
 #learning_path_breadcrumb_zone .breadcrumb{
     background: #505f6b; /* Old browsers */
     background: -moz-linear-gradient(top, #505f6b 0%, #3e4f5c 100%); /* FF3.6+ */
@@ -257,184 +28,6 @@
     font-size: 20px;
     background-image: none;
     color: #0088aa;
-    padding-top: 15px;
-    padding-bottom: 15px;
-}
-#learning_path_main #control {
-  opacity: 1;
-}
-.buttons a img:hover{
-opacity: 0.7;
-}
-#author_image{
-    background-color: #d7eef4;
-    -webkit-border-radius: 10px;
-    -moz-border-radius: 10px;
-    border-radius: 10px;
-    border: 1px solid  #b4cbff;
-    margin-top: 10px;
-}
-#author_icon img{
-    background-color: #fff;
-    padding: 5px;
-    -webkit-border-radius: 10px;
-    -moz-border-radius: 10px;
-    border-radius: 10px;
-}
-#author_image .progresstext{
-    font-size: 20px;
-    color: #0088AA;
-    font-weight: bold;
-}
-#learning_path_left_zone #header {
-  font-size: 18px;
-  margin-top: 10px;
-}
-#learning_path_left_zone .no-border{
-    background: none;
-    color: #0088AA;
-}
-.progress {
-  height: 18px;
-  margin-bottom: 18px;
-  overflow: hidden;
-  background-color: #f7f7f7;
-  background-image: -moz-linear-gradient(top, #f5f5f5, #f9f9f9);
-  background-image: -ms-linear-gradient(top, #f5f5f5, #f9f9f9);
-  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#f5f5f5), to(#f9f9f9));
-  background-image: -webkit-linear-gradient(top, #f5f5f5, #f9f9f9);
-  background-image: -o-linear-gradient(top, #f5f5f5, #f9f9f9);
-  background-image: linear-gradient(top, #f5f5f5, #f9f9f9);
-  background-repeat: repeat-x;
-  -webkit-border-radius: 4px;
-     -moz-border-radius: 4px;
-          border-radius: 4px;
-  filter: progid:dximagetransform.microsoft.gradient(startColorstr='#f5f5f5', endColorstr='#f9f9f9', GradientType=0);
-  -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
-     -moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
-          box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
-}
-.progress-striped .bar {
-  background-color: #F39C12;
-  background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
-  background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
-    -webkit-animation: progress-bar-stripes 2s linear infinite;
-    animation: progress-bar-stripes 2s linear infinite;
-}
-
-/* STYLES PROCESS LESSION */
-.inner_lp_toc .scorm_item a {
-    font-size: 14px;
-    margin-right: 1px;
-    padding-bottom: 2px;
-    text-decoration: none;
-}
-
-.inner_lp_toc .scorm_item a.chapter_module {
-    font-weight: normal;
-    margin-right: 10px;
-}
-
-.scorm_item_1,
-.scorm_item_2 {
-    font-size: 16px;
-    margin-left: 0;
-    margin-right:10px;
-    text-decoration: none;
-}
-.scorm_item_1 {
-    border-bottom: 1px solid #CCCCCC;
-    color:#444;
-    text-shadow:0 1px 1px #f6f6f6;
-    background: none;
-    margin-right: 1px;
-    padding: 10px 0px 10px 0px;
-}
-.scorm_item_2 {
-    border-bottom: 1px solid #CCCCCC;
-    color: #444444;
-    margin-right: 1px;
-    padding: 10px 0px 10px 0px;
-    background-image:none;
-}
-.scorm_item_1.scorm_item_highlight.scorm_completed,
-.scorm_item_2.scorm_item_highlight.scorm_completed {
-    background-image: url("images/white_arrow.png") !important;
-    background-position: 270px center !important;
-    background-repeat: no-repeat;
-    color: white;
-}
-.scorm_item_1.scorm_item_normal.scorm_completed,
-.scorm_item_2.scorm_item_normal.scorm_completed {
-    background-image: url("images/blue_arrow.png")  !important;
-    background-position: 270px center !important;
-    background-repeat: no-repeat;
-}
-#learning_path_main #control {
-  background-image: none;
-  background-color: #d7eef4;
-  bottom: 0;
-  height: 34px;
-  margin-bottom: auto;
-  margin-left: auto;
-  margin-right: auto;
-  margin-top: auto;
-  padding-bottom: 8px;
-  padding-left: 0;
-  padding-right: 0;
-  padding-top: 8px;
-  position: absolute;
-  text-align: center;
-  width: 100%;
-  border-top:1px solid #00AAD4;
-}
-
-#author_name {
-  color: #666666;
-  float: left;
-  font-size: 13px;
-  margin-top: 2px;
-  text-align: center;
-  width: 100%;
-  padding-top: 10px;
-  padding-bottom: 5px;
-}
-.mejs-container{
-    background: none;
-    -webkit-border-radius: 5px;
-    -moz-border-radius: 5px;
-    border-radius: 5px;
-}
-.mejs-container .mejs-controls{
-    -webkit-border-radius: 5px;
-    -moz-border-radius: 5px;
-    border-radius: 5px;
-    background: #45484d; /* Old browsers */
-background: -moz-linear-gradient(top, #45484d 0%, #000000 100%); /* FF3.6+ */
-background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#45484d), color-stop(100%,#000000)); /* Chrome,Safari4+ */
-background: -webkit-linear-gradient(top, #45484d 0%,#000000 100%); /* Chrome10+,Safari5.1+ */
-background: -o-linear-gradient(top, #45484d 0%,#000000 100%); /* Opera 11.10+ */
-background: -ms-linear-gradient(top, #45484d 0%,#000000 100%); /* IE10+ */
-background: linear-gradient(to bottom, #45484d 0%,#000000 100%); /* W3C */
-filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#45484d', endColorstr='#000000',GradientType=0 ); /* IE6-9 */
-}
-.mejs-controls .mejs-time-rail .mejs-time-loaded{
-    background: #333;
-    background: rgba(50,50,50,0.8);
-    background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(rgba(30,30,30,0.8)), to(rgba(60,60,60,0.8)));
-    background: -webkit-linear-gradient(top, rgba(30,30,30,0.8), rgba(60,60,60,0.8)); 
-    background: -moz-linear-gradient(top, rgba(30,30,30,0.8), rgba(60,60,60,0.8));
-    background: -o-linear-gradient(top, rgba(30,30,30,0.8), rgba(60,60,60,0.8));
-    background: -ms-linear-gradient(top, rgba(30,30,30,0.8), rgba(60,60,60,0.8));
-    background: linear-gradient(rgba(30,30,30,0.8), rgba(60,60,60,0.8));
-}
-.mejs-controls .mejs-time-rail .mejs-time-current{
-    background: #a9e4f7; /* Old browsers */
-    background: -moz-linear-gradient(top, #a9e4f7 0%, #0fb4e7 100%); /* FF3.6+ */
-    background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#a9e4f7), color-stop(100%,#0fb4e7)); /* Chrome,Safari4+ */
-    background: -webkit-linear-gradient(top, #a9e4f7 0%,#0fb4e7 100%); /* Chrome10+,Safari5.1+ */
-    background: -o-linear-gradient(top, #a9e4f7 0%,#0fb4e7 100%); /* Opera 11.10+ */
-    background: -ms-linear-gradient(top, #a9e4f7 0%,#0fb4e7 100%); /* IE10+ */
-    background: linear-gradient(to bottom, #a9e4f7 0%,#0fb4e7 100%); /* W3C */
-    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#a9e4f7', endColorstr='#0fb4e7',GradientType=0 ); /* IE6-9 */
-}
+    padding-top: 5px;
+    padding-bottom: 5px;
+}

+ 0 - 1
main/css/baby_orange/default.css

@@ -227,7 +227,6 @@ text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.17);
 }
 .btn{
   display: inline-block;
-  padding: 3px 25px;
   margin-bottom: 0;
   font-size: 14px;
   font-weight: normal;

+ 3 - 430
main/css/baby_orange/scorm.css

@@ -1,438 +1,11 @@
 /* copy of default_scorm.css */
 
-.inner_lp_toc {
-    overflow: auto;
-    background-color: #E0DFD8;
-    height: 210px;
-}
-
-.inner_lp_toc .scorm_item_1 a,
-.inner_lp_toc .scorm_item_2 a {
-    font-size: 13px;
-    margin-right: 1px;
-    padding-bottom: 2px;
-    text-decoration: none;
-    color: #2F3E46;
-}
-
-.inner_lp_toc .scorm_item_1 a.chapter_module,
-.inner_lp_toc .scorm_item_2 a.chapter_module {
-    font-weight: normal;
-    margin-right: 10px;
-}
-.inner_lp_toc .scorm_item_highlight {
-    font-weight:bold;
-    border:1px solid #f26c58;
-    background-color: #ec5923;
-    background-image:none;
-    margin-right: 0px;
-    padding: 10px 0px 10px 0px;
-    text-decoration: none;
-}
-.inner_lp_toc .scorm_item_highlight a {
-    color:#fff;
-    margin-right: 1px;
-    text-decoration: none;
-}
-
-.inner_lp_toc .scorm_item_section {
-    border:1px solid #222;
-    background:#333;
-    font-weight:bold;
-    color:#fff;
-    text-shadow:0 -1px 1px #000;
-    background-image:-webkit-gradient(linear,left top,left bottom,from(#555),to(#333));
-    background-image:-webkit-linear-gradient(top,#555,#333);
-    background-image:-moz-linear-gradient(top,#555,#333);
-    background-image:-ms-linear-gradient(top,#555,#333);
-    background-image:-o-linear-gradient(top,#555,#333);
-    background-image:linear-gradient(top,#555,#333);
-    margin-right: 1px;
-    padding: 10px 0px 10px 0px;
-    text-decoration: none;
-}
-
-.inner_lp_toc .scorm_item_section .scorm_item:before
-{
-    content : url('../lp_section.png');  /* from main/newscorm/lp_controller.php file */
-    vertical-align: text-top;
-    margin-right : 5px;
-}
-
-.scorm_section_level_0 {
-    padding : 0 0 0 0;
-}
-
-.scorm_section_level_1 {
-    padding : 0 0.5em 0 2em;
-}
-
-.scorm_section_level_2 {
-    padding : 0 0.5em 0 4em;
-}
-
-.scorm_section_level_3 {
-    padding : 0 0.5em 0 6em;
-}
-
-.scorm_section_level_4 {
-    padding : 0 0.5em 0 8em;
-}
-
-.scorm_section_level_5 {
-    padding : 0 0.5em 0 10em;
-}
-
-.scorm_item_level_0 {
-    padding : 0 0 0 0;
-}
-
-.scorm_item_level_1 {
-    padding : 0 1.5em 0 1.5em;
-}
-
-.scorm_item_level_2 {
-    padding : 0 1.5em 0 3em;
-}
-.scorm_item_level_3 {
-    padding : 0 1.5em 0 4.5em;
-}
-
-.scorm_item_level_4 {
-    padding : 0 1.5em 0 6em;
-}
-
-.scorm_item_level_5 {
-    padding : 0 1.5em 0 7.5em;
-}
-
-.scorm_item.scorm_item_level_2 > a, .scorm_item.scorm_item_level_3 > a, .scorm_item.scorm_item_level_4 > a, .scorm_item.scorm_item_level_5 > a{
-    font-weight: normal;
-}
-/* end of copy of default_scorm.css */
-
-
-.scormpage {
-    height: 100%;
-}
-.scormpage .menu {
-    width: 180px;
-    float: left;
-    margin: 1px;
-    padding: 0px;
-    margin-top: 0px;
-    padding-top: 0px;
-}
-.lp_toc {
-    background-color: white;
-    height: 380px;
-    width: 99%;
-    border-right: 1px none;
-}
-
-.inner_lp_toc {
-    overflow: auto;
-    background-color: #D7EEF4;
-    height: 210px;
-    /*padding: 10px;*/   
-}
-.inner_lp_toc .scorm_item {
-    font-size: 13px;
-    margin-left: 10px;
-    margin-right:10px;
-    text-decoration: none;
-    border-color: rgba(255, 255, 255, 0.3); 
-    
-}
-.inner_lp_toc .scorm_item.scorm_item_level_1{
-    background: url(../img/archive.png) no-repeat;
-}
-
-
-.inner_lp_toc .scorm_title {
-    font-weight: bold;
-    background:#ccc;
-    font-size: 14px;
-    color: #444;
-}
-.inner_lp_toc .scorm_title_text {
-    margin-left: 10px;
-}
-.inner_lp_toc .scorm_status_img {
-    margin:0px;
-    margin-left: -10px;
-    width:10px;
-}
-.lp_navigation {
-    overflow: auto;
-    background-color: white;
-    height: 44px;
-    width:180px;
-    padding-top: 4px;
-    padding-bottom:0px;
-    border: none;
-    margin-top: -18px;
-    border-top: 1px dotted black;
-    border-bottom: 1px dotted black;
-}
-.lp_navigation_elem {
-    padding-left: 15px;
-    padding-top: 0px;
-}
-/*.scormpage .menu */
-.lp_navigation_elem .progresstext {
-    margin-top: -20px;
-}
-/*.scormpage .menu */
-.lp_navigation_elem .buttons {
-    margin-left: 0px;
-    margin-right: 0em;
-    margin-top: 0.4em;
-}
-.scormpage .menu .notification {
-    background-color: white;
-    height: 50px;
-}
-.scormpage .menu .notification .message {
-    background-color: white;
-    height: 50px;
-    width: 180px;
-    border: none;
-}
-.scormpage .content {
-    /*float: left;
-    width: 60%;*/
-    margin-top: 0px;
-    padding-top: 0px;
-    padding-left: 180px;
-    background-color: white;
-}
-.iframe {
-    border: 0px solid black;
-    height: 100%;
-    width: 95%;
-    margin: 0px;
-    padding-right: 0px;
-    overflow: auto;
-    vertical-align: top;
-}
-.scormpage .footer {
-    clear: both;
-}
-#image_preview {
-    padding-left: 17px;
-}
-#msg_div_id {
-    padding-left: 17px;
-    padding-top: 4px;
-}
-
-#learning_path_breadcrumb_zone .breadcrumb{
-    background: #fff; /* Old browsers */
-    background: -moz-linear-gradient(top, #fff 0%, #e5e5e5 100%); /* FF3.6+ */
-    background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#fff), color-stop(100%,#e5e5e5)); /* Chrome,Safari4+ */
-    background: -webkit-linear-gradient(top, #fff 0%,#e5e5e5 100%); /* Chrome10+,Safari5.1+ */
-    background: -o-linear-gradient(top, #fff 0%,#e5e5e5 100%); /* Opera 11.10+ */
-    background: -ms-linear-gradient(top, #fff 0%,#e5e5e5 100%); /* IE10+ */
-    background: linear-gradient(to bottom, #fff 0%,#e5e5e5 100%); /* W3C */
-    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#fff', endColorstr='#e5e5e5',GradientType=0 ); /* IE6-9 */
-    color: #fff;
-    text-transform: capitalize;
-    border:none;
-    -webkit-border-radius: 1px;
-    -moz-border-radius: 1px;
-    border-radius: 1px;
-}
-#learning_path_breadcrumb_zone .breadcrumb a{
-    color: #666;
-}
-#learning_path_breadcrumb_zone .breadcrumb a:hover{
-    text-decoration: none;
-    opacity: 0.8;
-}
 #scorm_title {
     font-weight: bold;
     background:none;
     font-size: 20px;
     background-image: none;
     color: #0088aa;
-    padding-top: 15px;
-    padding-bottom: 15px;
-}
-#learning_path_main #control {
-  opacity: 1;
-}
-.buttons a img:hover{
-opacity: 0.7;
-}
-#author_image{
-    background-color: #e0dfd8;
-    -webkit-border-radius: 10px;
-    -moz-border-radius: 10px;
-    border-radius: 10px;
-    border: 1px solid  #d9d9ce;
-    margin-top: 10px;
-}
-#author_icon img{
-    background-color: #fff;
-    padding: 5px;
-    -webkit-border-radius: 10px;
-    -moz-border-radius: 10px;
-    border-radius: 10px;
-}
-#author_image .progresstext{
-    font-size: 20px;
-    color: #0088AA;
-    font-weight: bold;
-}
-#learning_path_left_zone #header {
-  font-size: 18px;
-  margin-top: 10px;
-}
-#learning_path_left_zone .no-border{
-    background: none;
-    color: #0088AA;
-}
-.progress {
-  height: 18px;
-  margin-bottom: 18px;
-  overflow: hidden;
-  background-color: #f7f7f7;
-  background-image: -moz-linear-gradient(top, #f5f5f5, #f9f9f9);
-  background-image: -ms-linear-gradient(top, #f5f5f5, #f9f9f9);
-  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#f5f5f5), to(#f9f9f9));
-  background-image: -webkit-linear-gradient(top, #f5f5f5, #f9f9f9);
-  background-image: -o-linear-gradient(top, #f5f5f5, #f9f9f9);
-  background-image: linear-gradient(top, #f5f5f5, #f9f9f9);
-  background-repeat: repeat-x;
-  -webkit-border-radius: 4px;
-     -moz-border-radius: 4px;
-          border-radius: 4px;
-  filter: progid:dximagetransform.microsoft.gradient(startColorstr='#f5f5f5', endColorstr='#f9f9f9', GradientType=0);
-  -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
-     -moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
-          box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
-}
-.progress-striped .bar {
-  background-color: #ec5923;
-  background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
-  background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
-    -webkit-animation: progress-bar-stripes 2s linear infinite;
-    animation: progress-bar-stripes 2s linear infinite;
-}
-
-/*STYLES PROCESS LESSION*/
-.inner_lp_toc .scorm_item a {
-    margin-right: 1px;
-    padding-bottom: 2px;
-    text-decoration: none;
-}
-
-.inner_lp_toc .scorm_item a.chapter_module {
-    font-weight: normal;
-    margin-right: 10px;
-}
-
-.scorm_item_1,
-.scorm_item_2 {
-    font-size: 16px;
-    margin-left: 0;
-    margin-right:10px;
-    text-decoration: none;
-}
-.scorm_item_1 {
-    border-bottom: 1px solid #CCCCCC;
-    color:#444;
-    text-shadow:0 1px 1px #f6f6f6;
-    background: none;
-    margin-right: 1px;
-    padding: 10px 0px 10px 0px;
-}
-.scorm_item_2 {
-    border-bottom: 1px solid #CCCCCC;
-    color: #444444;
-    margin-right: 1px;
-    padding: 10px 0px 10px 0px;
-    background-image:none;
-}
-.scorm_item_1.scorm_item_highlight.scorm_completed,
-.scorm_item_2.scorm_item_highlight.scorm_completed {
-    background-image: url("images/white_arrow.png") !important;
-    background-position: 270px center !important;
-    background-repeat: no-repeat;
-    color: white;
-}
-.scorm_item_1.scorm_item_normal.scorm_completed,
-.scorm_item_2.scorm_item_normal.scorm_completed {
-    background-image: url("images/blue_arrow.png")  !important;
-    background-position: 270px center !important;
-    background-repeat: no-repeat;
-}
-#learning_path_main #control {
-  background-image: none;
-  background-color: #d7eef4;
-  bottom: 0;
-  height: 34px;
-  margin-bottom: auto;
-  margin-left: auto;
-  margin-right: auto;
-  margin-top: auto;
-  padding-bottom: 8px;
-  padding-left: 0;
-  padding-right: 0;
-  padding-top: 8px;
-  position: absolute;
-  text-align: center;
-  width: 100%;
-  border-top:1px solid #00AAD4;
-}
-
-#author_name {
-  color: #666666;
-  float: left;
-  font-size: 13px;
-  margin-top: 2px;
-  text-align: center;
-  width: 100%;
-  padding-top: 10px;
-  padding-bottom: 5px;
-}
-.mejs-container{
-    background: none;
-    -webkit-border-radius: 5px;
-    -moz-border-radius: 5px;
-    border-radius: 5px;
-}
-.mejs-container .mejs-controls{
-    -webkit-border-radius: 5px;
-    -moz-border-radius: 5px;
-    border-radius: 5px;
-    background: #45484d; /* Old browsers */
-background: -moz-linear-gradient(top, #45484d 0%, #000000 100%); /* FF3.6+ */
-background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#45484d), color-stop(100%,#000000)); /* Chrome,Safari4+ */
-background: -webkit-linear-gradient(top, #45484d 0%,#000000 100%); /* Chrome10+,Safari5.1+ */
-background: -o-linear-gradient(top, #45484d 0%,#000000 100%); /* Opera 11.10+ */
-background: -ms-linear-gradient(top, #45484d 0%,#000000 100%); /* IE10+ */
-background: linear-gradient(to bottom, #45484d 0%,#000000 100%); /* W3C */
-filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#45484d', endColorstr='#000000',GradientType=0 ); /* IE6-9 */
-}
-.mejs-controls .mejs-time-rail .mejs-time-loaded{
-    background: #333;
-    background: rgba(50,50,50,0.8);
-    background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(rgba(30,30,30,0.8)), to(rgba(60,60,60,0.8)));
-    background: -webkit-linear-gradient(top, rgba(30,30,30,0.8), rgba(60,60,60,0.8)); 
-    background: -moz-linear-gradient(top, rgba(30,30,30,0.8), rgba(60,60,60,0.8));
-    background: -o-linear-gradient(top, rgba(30,30,30,0.8), rgba(60,60,60,0.8));
-    background: -ms-linear-gradient(top, rgba(30,30,30,0.8), rgba(60,60,60,0.8));
-    background: linear-gradient(rgba(30,30,30,0.8), rgba(60,60,60,0.8));
-}
-.mejs-controls .mejs-time-rail .mejs-time-current{
-    background: #a9e4f7; /* Old browsers */
-    background: -moz-linear-gradient(top, #a9e4f7 0%, #0fb4e7 100%); /* FF3.6+ */
-    background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#a9e4f7), color-stop(100%,#0fb4e7)); /* Chrome,Safari4+ */
-    background: -webkit-linear-gradient(top, #a9e4f7 0%,#0fb4e7 100%); /* Chrome10+,Safari5.1+ */
-    background: -o-linear-gradient(top, #a9e4f7 0%,#0fb4e7 100%); /* Opera 11.10+ */
-    background: -ms-linear-gradient(top, #a9e4f7 0%,#0fb4e7 100%); /* IE10+ */
-    background: linear-gradient(to bottom, #a9e4f7 0%,#0fb4e7 100%); /* W3C */
-    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#a9e4f7', endColorstr='#0fb4e7',GradientType=0 ); /* IE6-9 */
-}
+    padding-top: 5px;
+    padding-bottom: 5px;
+}

+ 324 - 10
main/css/base.css

@@ -3334,6 +3334,330 @@ form .formw .freeze {
 }
 
 /* jsPlumb */
+/* ****************************************************
+                     CSS SKILL
+ **************************************************** */
+.skill-options .legend{
+  border: 1px dashed #cccccc;
+  padding: 1em;
+  -webkit-border-radius: 10px;
+  -moz-border-radius: 10px;
+  border-radius: 10px;
+  margin-bottom: 1em;
+  margin-top: 1em;
+  background-color: #FFFFFF;
+}
+.skill-options .legend .title-skill,
+.skill-options .saved_profiles .title-skill
+{
+  color: #666655;
+  padding-bottom: 1em;
+  font-size: 16px;
+}
+.skill-options .skill-profile .title-skill{
+  color: #666655;
+  padding-bottom: .5em;
+  font-size: 18px;
+}
+.skill-options .skill-home{
+  margin-top: 1em;
+}
+.skill-options .btn-block {
+  box-sizing: border-box;
+  display: block;
+  padding-left: 0;
+  padding-right: 0;
+  width: 100%;
+}
+.skill-options .accordion-heading {
+  border-bottom: 0px none;
+  background: #3FA5C3;
+}
+.skill-options .accordion-heading a{
+  color: #FFFFFF;
+}
+.skill-options .button-skill{
+  margin-top: 1em;
+}
+.skill-options .form-search .holder{
+  border: 1px solid #cccccc;
+  padding-left: .5em;
+  padding-right: .5em;
+}
+.skill-options .accordion-inner {
+  padding: 9px 15px;
+  /*border: 1px solid #dadada;*/
+  background-color: #FFFFFF;
+}
+.skill-options .items_save{
+  margin-top: .5em;
+  margin-bottom: .5em;
+  display: inline-block;
+  height: auto !important;
+  clear: both;
+  width: 100%;
+}
+.skill-options .accordion-group {
+  margin-bottom: 2px;
+  border: 1px solid #3FA5C3;
+  border-radius: 4px;
+}
+.skill-options .accordion-inner {
+  padding: 9px 15px;
+  border-top: 1px solid #3FA5C3;
+}
+.skill-options .load_wheel{
+  -moz-border-radius:6px;
+  -webkit-border-radius:6px;
+  border-radius:6px;
+  border:1px solid #C09853;
+  background:#FCF8E3;
+  padding:1px 5px 2px;
+  color:#333;
+}
+.skill-options .skill-items{
+  padding-bottom: 1em;
+  margin-bottom: .5em;
+  margin-top: .5em;
+}
+.skill-options .skill-winner{
+  list-style: none;
+  margin: 0;
+  padding: 0;
+}
+.skill-options .skill-winner li{
+  float: left;
+  margin-right: 1em;
+  padding-bottom: 1em;
+}
+.skill-options .skill-winner li a{
+  background: url("../img/icons/16/winner.png") no-repeat;
+  padding-left: 1.5em;
+  padding-bottom: 1em;
+}
+.skill-options .skill-profile{
+  width: 100%;
+  display: block;
+  border: 1px solid #CCC;
+  border-radius: 10px;
+  -moz-border-radius: 10px;
+  -webkit-border-radius: 10px;
+  margin-top: 1em;
+  background-color: #FFFFFF;
+  padding-top: .5em;
+  padding-bottom: .5em;
+}
+.skill-options .section-info-skill{
+  display: inline-block;
+  padding-top: .5em;
+  padding-bottom: .5em;
+  width: 100%;
+  clear: both;
+}
+.skill-options .skill-profile .avatar{
+  display: block;
+  width: auto;
+  text-align: center;
+}
+.skill-options .skill-profile .info-user{
+  display: block;
+  width: auto;
+  margin-left: 1em;
+  padding: 1em;
+}
+.skill-options .button-skill{
+  margin-bottom: .5em;
+}
+.page-items-profile{
+  padding-top: 2em;
+  padding-bottom: 2em;
+  padding-left: 1em;
+  padding-right: 1em;
+}
+.page-items-profile .title-skill{
+  margin-bottom: 1em;
+  font-size: 18px;
+  color: #333333;
+  margin-top: 1em;
+}
+.page-items-profile .block-items{
+  display: block;
+  width: 22.5%;
+  margin:10px;
+  float: left;
+}
+.page-items-profile .award-items{
+  list-style: none;
+  margin: 0;
+  padding: 0;
+}
+.page-items-profile .number-skill{
+  background-color: #FFFFFF;
+  padding-top: .5em;
+  padding-bottom: .5em;
+  padding-left: .5em;
+  margin-bottom: 1em;
+  border: 1px solid #cccccc;
+  -webkit-border-radius: 10px;
+  -moz-border-radius: 10px;
+  border-radius: 10px;
+}
+.page-items-profile .block-items .border-items{
+  background-color: #EFEFEF;
+  -webkit-border-radius: 10px;
+  -moz-border-radius: 10px;
+  border-radius: 10px;
+  border: 1px solid #cccccc;
+}
+.page-items-profile .items-info{
+  padding:1em;
+}
+.page-items-profile .info-profile{
+  margin-top: 1em;
+  margin-bottom: .5em;
+}
+.page-items-profile .items-info .avatar-profile{
+  text-align: center;
+  background: #FFFFFF;
+  -webkit-border-radius: 5px;
+  -moz-border-radius: 5px;
+  border-radius: 5px;
+  padding-bottom: 5px;
+  padding-top: 5px;
+  border: 1px solid #cccccc;
+}
+.skill_partition {
+  cursor: pointer;
+  stroke: #000000;
+  stroke-width: 0.5px;
+}
+
+#skill_holder li {
+  float:left;
+  padding-right: 10px;
+  margin-bottom: .5em;
+}
+
+
+/* ****************************************************
+                     END SKILL
+ **************************************************** */
+/*SCORM CSS BASE */
+#learning_path_left_zone .home{
+  display: inline-block;
+  width: 94%;
+  margin-bottom: .5em;
+  margin-top: .5em;
+  font-size: 12px;
+}
+#lp_navigation_elem {
+  float: left;
+}
+#lp_navigation_elem {
+  padding-left: 15px;
+  width: 160px;
+}
+#lp_navigation_elem .buttons {
+  margin-bottom: .5em;
+  text-align: center;
+}
+#author_image {
+  border: 2px solid #B9C9FF;
+  float: left;
+  margin-bottom: .5em;
+  padding: 8px;
+  position: relative;
+  background-color: #f0f1fa;
+  width: 94%;
+  -webkit-border-radius: 10px;
+  -moz-border-radius: 10px;
+  border-radius: 10px;
+}
+#author_image #author_icon{
+  border: 2px solid #FFFFFF;
+}
+#learning_path_left_zone .scorm_title{
+  font-size: 20px;
+  color: #666;
+  margin-bottom: .5em;
+  margin-top: .5em;
+}
+/* for section */
+.scorm_item_section.scorm_completed{
+  background:url("../img/icon_completed_section.png")no-repeat 280px center #606c88;
+  padding-right: 1.5em;
+}
+.scorm_item_section{
+  background: #606c88; /* Old browsers */
+  background: -moz-linear-gradient(top, #606c88 0%, #3f4c6b 100%); /* FF3.6+ */
+  background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#606c88), color-stop(100%,#3f4c6b)); /* Chrome,Safari4+ */
+  background: -webkit-linear-gradient(top, #606c88 0%,#3f4c6b 100%); /* Chrome10+,Safari5.1+ */
+  background: -o-linear-gradient(top, #606c88 0%,#3f4c6b 100%); /* Opera 11.10+ */
+  background: -ms-linear-gradient(top, #606c88 0%,#3f4c6b 100%); /* IE10+ */
+  background: linear-gradient(to bottom, #606c88 0%,#3f4c6b 100%); /* W3C */
+  filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#606c88', endColorstr='#3f4c6b',GradientType=0 ); /* IE6-9 */
+  color: #FFFFFF;
+  padding-top: 10px;
+  padding-bottom: 10px;
+  font-size: 12px;
+}
+.scorm_item_section .scorm_section_level_0{
+  padding-left: .5em;
+  padding-right: .5em;
+}
+.scorm_item_section .scorm_section_level_1{
+  padding-left: 1.5em;
+  padding-right: .5em;
+}
+.scorm_item_section .scorm_section_level_2{
+  padding-left: 2.5em;
+  padding-right: .5em;
+}
+.scorm_item_section .scorm_section_level_3{
+  padding-left: 3.5em;
+  padding-right: .5em;
+}
+/* items scorm*/
+.scorm_item_normal.scorm_completed {
+  background:url("../img/icon_completed.png") no-repeat 280px center;
+}
+.scorm_item_normal.scorm_failed{
+  background:url("../img/icon_failed.png") no-repeat 280px center;
+}
+.scorm_item_normal .scorm_item_level_0{
+  padding-left: .5em;
+  padding-right: 1.5em;
+  padding-top: 10px;
+  padding-bottom: 10px;
+}
+.scorm_item_normal .scorm_item_level_1{
+  padding-left: 1.8em;
+  padding-right: 1.5em;
+  background:url("../img/level_one.png") no-repeat 0 top;
+  padding-top: 10px;
+  padding-bottom: 10px;
+}
+.scorm_item_normal .scorm_item_level_2{
+  padding-left: 2.5em;
+  padding-right: 1.5em;
+  background:url("../img/level_two.png") no-repeat 0 top;
+  padding-top: 10px;
+  padding-bottom: 10px;
+}
+.scorm_item_normal .scorm_item_level_3{
+  padding-left: 3.5em;
+  padding-right: 1.5em;
+  background:url("../img/level_tree.png") no-repeat 0 top;
+  padding-top: 10px;
+  padding-bottom: 10px;
+}
+.scorm_highlight a{
+  color: #000;
+  font-weight: bold;
+  background-color: #fffdd1;
+}
+
+/* END SCORM CSS BASE*/
 
 .skill_root {
     box-shadow: 2px 2px 19px #aaa;
@@ -4839,16 +5163,6 @@ i.size-32.icon-new-work{
 }
 
 /* Default skill partition colors */
-.skill_partition {
-    cursor: pointer;
-    stroke: #000000;
-    stroke-width: 1.5;
-}
-
-#skill_holder li {
-    float:left;
-    /*width: 120px;*/
-}
 
 #filepaths input{
     margin-bottom:5px;

+ 0 - 25
main/css/blue_lagoon/default.css

@@ -115,32 +115,7 @@ a:active {
     color: #FFFFFF;
 
 }
-.btn{
-    background: #ffffff; /* Old browsers */
-    background: -moz-linear-gradient(top, #ffffff 0%, #e5e5e5 100%); /* FF3.6+ */
-    background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ffffff), color-stop(100%,#e5e5e5)); /* Chrome,Safari4+ */
-    background: -webkit-linear-gradient(top, #ffffff 0%,#e5e5e5 100%); /* Chrome10+,Safari5.1+ */
-    background: -o-linear-gradient(top, #ffffff 0%,#e5e5e5 100%); /* Opera 11.10+ */
-    background: -ms-linear-gradient(top, #ffffff 0%,#e5e5e5 100%); /* IE10+ */
-    background: linear-gradient(to bottom, #ffffff 0%,#e5e5e5 100%); /* W3C */
-    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#e5e5e5',GradientType=0 ); /* IE6-9 */
-    border-radius: 4px;
-    border:1px solid rgba(0, 0, 0, 0.15);
-    text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.17);
-    padding: 6px 25px;
 
-}
-.btn:hover{
-    background: #f7f7f7; /* Old browsers */
-    background: -moz-linear-gradient(top, #f7f7f7 0%, #e5e5e5 100%); /* FF3.6+ */
-    background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#f7f7f7), color-stop(100%,#e5e5e5)); /* Chrome,Safari4+ */
-    background: -webkit-linear-gradient(top, #f7f7f7 0%,#e5e5e5 100%); /* Chrome10+,Safari5.1+ */
-    background: -o-linear-gradient(top, #f7f7f7 0%,#e5e5e5 100%); /* Opera 11.10+ */
-    background: -ms-linear-gradient(top, #f7f7f7 0%,#e5e5e5 100%); /* IE10+ */
-    background: linear-gradient(to bottom, #f7f7f7 0%,#e5e5e5 100%); /* W3C */
-    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f7f7f7', endColorstr='#e5e5e5',GradientType=0 ); /* IE6-9 */
-    text-decoration: none;
-}
 .btn-primary{
     background: #ff7b00; /* Old browsers */
     background: -moz-linear-gradient(top, #ff7b00 0%, #fd6600 100%); /* FF3.6+ */

+ 3 - 404
main/css/blue_lagoon/scorm.css

@@ -1,232 +1,5 @@
 /* copy of default_scorm.css */
 
-.inner_lp_toc {
-    overflow: auto;
-    background-color: #efefef;
-    height: 210px;
-}
-
-.inner_lp_toc .scorm_item_1 a,
-.inner_lp_toc .scorm_item_2 a {
-    font-size: 13px;
-    margin-right: 1px;
-    padding-bottom: 2px;
-    text-decoration: none;
-    color: #2F3E46;
-}
-
-.inner_lp_toc .scorm_item_1 a.chapter_module,
-.inner_lp_toc .scorm_item_2 a.chapter_module {
-    font-weight: normal;
-    margin-right: 10px;
-}
-.inner_lp_toc .scorm_item_highlight {
-    background-color: #abaaa7;
-    background-image:none;
-    margin-right: 0px;
-    padding: 10px 0px 10px 0px;
-    text-decoration: none;
-}
-.inner_lp_toc .scorm_item_highlight a {
-    color:#fff;
-    margin-right: 1px;
-    text-decoration: none;
-}
-
-.inner_lp_toc .scorm_item_section .scorm_item:before
-{
-    content : url('../lp_section.png');  /* from main/newscorm/lp_controller.php file */
-    vertical-align: text-top;
-    margin-right : 5px;
-}
-
-.scorm_section_level_0 {
-    padding : 0 0 0 0;
-}
-
-.scorm_section_level_1 {
-    padding : 0 0.5em 0 2em;
-}
-
-.scorm_section_level_2 {
-    padding : 0 0.5em 0 4em;
-}
-
-.scorm_section_level_3 {
-    padding : 0 0.5em 0 6em;
-}
-
-.scorm_section_level_4 {
-    padding : 0 0.5em 0 8em;
-}
-
-.scorm_section_level_5 {
-    padding : 0 0.5em 0 10em;
-}
-
-.scorm_item_level_0 {
-    padding : 0 0 0 0;
-}
-
-.scorm_item_level_1 {
-    padding : 0 1.5em 0 1.5em;
-}
-
-.scorm_item_level_2 {
-    padding : 0 1.5em 0 3em;
-}
-.scorm_item_level_3 {
-    padding : 0 1.5em 0 4.5em;
-}
-
-.scorm_item_level_4 {
-    padding : 0 1.5em 0 6em;
-}
-
-.scorm_item_level_5 {
-    padding : 0 1.5em 0 7.5em;
-}
-
-.scorm_item.scorm_item_level_2 > a, .scorm_item.scorm_item_level_3 > a, .scorm_item.scorm_item_level_4 > a, .scorm_item.scorm_item_level_5 > a{
-    font-weight: normal;
-}
-/* end of copy of default_scorm.css */
-
-
-.scormpage {
-    height: 100%;
-}
-.scormpage .menu {
-    width: 180px;
-    float: left;
-    margin: 1px;
-    padding: 0px;
-    margin-top: 0px;
-    padding-top: 0px;
-}
-.lp_toc {
-    background-color: white;
-    height: 380px;
-    width: 99%;
-    border-right: 1px none;
-}
-
-.inner_lp_toc {
-    overflow: auto;
-    background-color: #D7EEF4;
-    height: 210px;
-    /*padding: 10px;*/   
-}
-.inner_lp_toc .scorm_item_section {
-    border:none;
-    background:#333;
-    font-weight:normal;
-    color:#fff;
-    text-shadow:none;
-    background: #2e75a3; /* Old browsers */
-    background: -moz-linear-gradient(top, #2e75a3 0%, #2e75a3 100%); /* FF3.6+ */
-    background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#2e75a3), color-stop(100%,#2e75a3)); /* Chrome,Safari4+ */
-    background: -webkit-linear-gradient(top, #2e75a3 0%,#2e75a3 100%); /* Chrome10+,Safari5.1+ */
-    background: -o-linear-gradient(top, #2e75a3 0%,#2e75a3 100%); /* Opera 11.10+ */
-    background: -ms-linear-gradient(top, #2e75a3 0%,#2e75a3 100%); /* IE10+ */
-    background: linear-gradient(to bottom, #2e75a3 0%,#2e75a3 100%); /* W3C */
-    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#2e75a3', endColorstr='#2e75a3',GradientType=0 ); /* IE6-9 */
-    margin-right: 1px;
-    padding: 10px 0px 10px 0px;
-    text-decoration: none;s
-}
-
-.inner_lp_toc .scorm_item {
-    font-size: 13px;
-    margin-left: 10px;
-    margin-right:10px;
-    text-decoration: none;
-    border-color: rgba(255, 255, 255, 0.3); 
-    
-}
-.inner_lp_toc .scorm_item.scorm_item_level_1{
-    background: url(../img/archive.png) no-repeat;
-}
-
-
-.inner_lp_toc .scorm_title {
-    font-weight: bold;
-    background:#ccc;
-    font-size: 14px;
-    color: #444;
-}
-.inner_lp_toc .scorm_title_text {
-    margin-left: 10px;
-}
-.inner_lp_toc .scorm_status_img {
-    margin:0px;
-    margin-left: -10px;
-    width:10px;
-}
-.lp_navigation {
-    overflow: auto;
-    background-color: white;
-    height: 44px;
-    width:180px;
-    padding-top: 4px;
-    padding-bottom:0px;
-    border: none;
-    margin-top: -18px;
-    border-top: 1px dotted black;
-    border-bottom: 1px dotted black;
-}
-.lp_navigation_elem {
-    padding-left: 15px;
-    padding-top: 0px;
-}
-/*.scormpage .menu */
-.lp_navigation_elem .progresstext {
-    margin-top: -20px;
-}
-/*.scormpage .menu */
-.lp_navigation_elem .buttons {
-    margin-left: 0px;
-    margin-right: 0em;
-    margin-top: 0.4em;
-}
-.scormpage .menu .notification {
-    background-color: white;
-    height: 50px;
-}
-.scormpage .menu .notification .message {
-    background-color: white;
-    height: 50px;
-    width: 180px;
-    border: none;
-}
-.scormpage .content {
-    /*float: left;
-    width: 60%;*/
-    margin-top: 0px;
-    padding-top: 0px;
-    padding-left: 180px;
-    background-color: white;
-}
-.iframe {
-    border: 0px solid black;
-    height: 100%;
-    width: 95%;
-    margin: 0px;
-    padding-right: 0px;
-    overflow: auto;
-    vertical-align: top;
-}
-.scormpage .footer {
-    clear: both;
-}
-#image_preview {
-    padding-left: 17px;
-}
-#msg_div_id {
-    padding-left: 17px;
-    padding-top: 4px;
-}
-
 #learning_path_breadcrumb_zone .breadcrumb{
     background: #2e75a3; /* Old browsers */
     background: -moz-linear-gradient(top, #2e75a3 0%, #2c678b 100%); /* FF3.6+ */
@@ -256,183 +29,9 @@
     font-size: 20px;
     background-image: none;
     color: #0088aa;
-    padding-top: 15px;
-    padding-bottom: 15px;
+    padding-top: 5px;
+    padding-bottom: 5px;
 }
 #learning_path_main #control {
   opacity: 1;
-}
-.buttons a img:hover{
-opacity: 0.7;
-}
-#author_image{
-    background-color: #efefef;
-    -webkit-border-radius: 10px;
-    -moz-border-radius: 10px;
-    border-radius: 10px;
-    border: 1px solid  #ccc;
-    margin-top: 10px;
-}
-#author_icon img{
-    background-color: #fff;
-    padding: 5px;
-    -webkit-border-radius: 10px;
-    -moz-border-radius: 10px;
-    border-radius: 10px;
-}
-#author_image .progresstext{
-    font-size: 20px;
-    color: #0088AA;
-    font-weight: bold;
-}
-#learning_path_left_zone #header {
-  font-size: 18px;
-  margin-top: 10px;
-}
-#learning_path_left_zone .no-border{
-    background: none;
-    color: #0088AA;
-}
-.progress {
-  height: 18px;
-  margin-bottom: 18px;
-  overflow: hidden;
-  background-color: #f7f7f7;
-  background-image: -moz-linear-gradient(top, #f5f5f5, #f9f9f9);
-  background-image: -ms-linear-gradient(top, #f5f5f5, #f9f9f9);
-  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#f5f5f5), to(#f9f9f9));
-  background-image: -webkit-linear-gradient(top, #f5f5f5, #f9f9f9);
-  background-image: -o-linear-gradient(top, #f5f5f5, #f9f9f9);
-  background-image: linear-gradient(top, #f5f5f5, #f9f9f9);
-  background-repeat: repeat-x;
-  -webkit-border-radius: 4px;
-     -moz-border-radius: 4px;
-          border-radius: 4px;
-  filter: progid:dximagetransform.microsoft.gradient(startColorstr='#f5f5f5', endColorstr='#f9f9f9', GradientType=0);
-  -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
-     -moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
-          box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
-}
-.progress-striped .bar {
-  background-color: #00AAD4;
-  background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
-  background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
-    -webkit-animation: progress-bar-stripes 2s linear infinite;
-    animation: progress-bar-stripes 2s linear infinite;
-}
-
-/*STYLES PROCESS LESSION*/
-.inner_lp_toc .scorm_item a {
-    margin-right: 1px;
-    padding-bottom: 2px;
-    text-decoration: none;
-}
-
-.inner_lp_toc .scorm_item a.chapter_module {
-    font-weight: normal;
-    margin-right: 10px;
-}
-
-.scorm_item_1,
-.scorm_item_2 {
-    font-size: 16px;
-    margin-left: 0;
-    margin-right:10px;
-    text-decoration: none;
-}
-.scorm_item_1 {
-    border-bottom: 1px solid #CCCCCC;
-    color:#444;
-    text-shadow:0 1px 1px #f6f6f6;
-    background: none;
-    margin-right: 1px;
-    padding: 10px 0px 10px 0px;
-}
-.scorm_item_2 {
-    border-bottom: 1px solid #CCCCCC;
-    color: #444444;
-    margin-right: 1px;
-    padding: 10px 0px 10px 0px;
-    background-image:none;
-}
-.scorm_item_1.scorm_item_highlight.scorm_completed,
-.scorm_item_2.scorm_item_highlight.scorm_completed {
-    background-image: url("images/white_arrow.png") !important;
-    background-position: 270px center !important;
-    background-repeat: no-repeat;
-    color: white;
-}
-.scorm_item_1.scorm_item_normal.scorm_completed,
-.scorm_item_2.scorm_item_normal.scorm_completed {
-    background-image: url("images/blue_arrow.png")  !important;
-    background-position: 270px center !important;
-    background-repeat: no-repeat;
-}
-#learning_path_main #control {
-  background-image: none;
-  background-color: #d7eef4;
-  bottom: 0;
-  height: 34px;
-  margin-bottom: auto;
-  margin-left: auto;
-  margin-right: auto;
-  margin-top: auto;
-  padding-bottom: 8px;
-  padding-left: 0;
-  padding-right: 0;
-  padding-top: 8px;
-  position: absolute;
-  text-align: center;
-  width: 100%;
-  border-top:1px solid #00AAD4;
-}
-
-#author_name {
-  color: #666666;
-  float: left;
-  font-size: 13px;
-  margin-top: 2px;
-  text-align: center;
-  width: 100%;
-  padding-top: 10px;
-  padding-bottom: 5px;
-}
-.mejs-container{
-    background: none;
-    -webkit-border-radius: 5px;
-    -moz-border-radius: 5px;
-    border-radius: 5px;
-}
-.mejs-container .mejs-controls{
-    -webkit-border-radius: 5px;
-    -moz-border-radius: 5px;
-    border-radius: 5px;
-    background: #45484d; /* Old browsers */
-background: -moz-linear-gradient(top, #45484d 0%, #000000 100%); /* FF3.6+ */
-background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#45484d), color-stop(100%,#000000)); /* Chrome,Safari4+ */
-background: -webkit-linear-gradient(top, #45484d 0%,#000000 100%); /* Chrome10+,Safari5.1+ */
-background: -o-linear-gradient(top, #45484d 0%,#000000 100%); /* Opera 11.10+ */
-background: -ms-linear-gradient(top, #45484d 0%,#000000 100%); /* IE10+ */
-background: linear-gradient(to bottom, #45484d 0%,#000000 100%); /* W3C */
-filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#45484d', endColorstr='#000000',GradientType=0 ); /* IE6-9 */
-}
-.mejs-controls .mejs-time-rail .mejs-time-loaded{
-    background: #333;
-    background: rgba(50,50,50,0.8);
-    background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(rgba(30,30,30,0.8)), to(rgba(60,60,60,0.8)));
-    background: -webkit-linear-gradient(top, rgba(30,30,30,0.8), rgba(60,60,60,0.8)); 
-    background: -moz-linear-gradient(top, rgba(30,30,30,0.8), rgba(60,60,60,0.8));
-    background: -o-linear-gradient(top, rgba(30,30,30,0.8), rgba(60,60,60,0.8));
-    background: -ms-linear-gradient(top, rgba(30,30,30,0.8), rgba(60,60,60,0.8));
-    background: linear-gradient(rgba(30,30,30,0.8), rgba(60,60,60,0.8));
-}
-.mejs-controls .mejs-time-rail .mejs-time-current{
-    background: #a9e4f7; /* Old browsers */
-    background: -moz-linear-gradient(top, #a9e4f7 0%, #0fb4e7 100%); /* FF3.6+ */
-    background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#a9e4f7), color-stop(100%,#0fb4e7)); /* Chrome,Safari4+ */
-    background: -webkit-linear-gradient(top, #a9e4f7 0%,#0fb4e7 100%); /* Chrome10+,Safari5.1+ */
-    background: -o-linear-gradient(top, #a9e4f7 0%,#0fb4e7 100%); /* Opera 11.10+ */
-    background: -ms-linear-gradient(top, #a9e4f7 0%,#0fb4e7 100%); /* IE10+ */
-    background: linear-gradient(to bottom, #a9e4f7 0%,#0fb4e7 100%); /* W3C */
-    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#a9e4f7', endColorstr='#0fb4e7',GradientType=0 ); /* IE6-9 */
-}
+}

+ 0 - 464
main/css/chamilo/scorm.css

@@ -1,464 +0,0 @@
-/* copy of default_scorm.css */
-
-.inner_lp_toc {
-    overflow: auto;
-    background-color: white;
-    height: 210px;
-}
-
-.inner_lp_toc .scorm_item_1 a,
-.inner_lp_toc .scorm_item_2 a {
-    font-size: 13px;
-    margin-right: 1px;
-    padding-bottom: 2px;
-    text-decoration: none;
-    color: #2F3E46;
-}
-
-.inner_lp_toc .scorm_item_1 a.chapter_module,
-.inner_lp_toc .scorm_item_2 a.chapter_module {
-    font-weight: normal;
-    margin-right: 10px;
-}
-.inner_lp_toc .scorm_item_highlight {
-    font-weight:bold;
-    background-color: #00aad4;
-    background-image:none;
-    margin-right: 0px;
-    padding: 10px 0px 10px 0px;
-    text-decoration: none;
-}
-.inner_lp_toc .scorm_item_highlight a {
-    color:#fff;
-    margin-right: 1px;
-    text-decoration: none;
-}
-
-.inner_lp_toc .scorm_item_section {
-    border:1px solid #222;
-    background:#333;
-    font-weight:bold;
-    color:#fff;
-    text-shadow:0 -1px 1px #000;
-    background-image:-webkit-gradient(linear,left top,left bottom,from(#555),to(#333));
-    background-image:-webkit-linear-gradient(top,#555,#333);
-    background-image:-moz-linear-gradient(top,#555,#333);
-    background-image:-ms-linear-gradient(top,#555,#333);
-    background-image:-o-linear-gradient(top,#555,#333);
-    background-image:linear-gradient(top,#555,#333);
-    margin-right: 1px;
-    padding: 10px 0px 10px 0px;
-    text-decoration: none;
-}
-
-.inner_lp_toc .scorm_item_section .scorm_item:before
-{
-    content : url('../lp_section.png');  /* from main/newscorm/lp_controller.php file */
-    vertical-align: text-top;
-    margin-right : 5px;
-}
-
-.scorm_section_level_0 {
-    padding : 0 0 0 0;
-}
-
-.scorm_section_level_1 {
-    padding : 0 0.5em 0 2em;
-}
-
-.scorm_section_level_2 {
-    padding : 0 0.5em 0 4em;
-}
-
-.scorm_section_level_3 {
-    padding : 0 0.5em 0 6em;
-}
-
-.scorm_section_level_4 {
-    padding : 0 0.5em 0 8em;
-}
-
-.scorm_section_level_5 {
-    padding : 0 0.5em 0 10em;
-}
-
-.scorm_item_level_0 {
-    padding : 0 0 0 0;
-}
-
-.scorm_item_level_1 {
-    padding : 0 1.5em 0 1.5em;
-}
-
-.scorm_item_level_2 {
-    padding : 0 1.5em 0 3em;
-}
-.scorm_item_level_3 {
-    padding : 0 1.5em 0 4.5em;
-}
-
-.scorm_item_level_4 {
-    padding : 0 1.5em 0 6em;
-}
-
-.scorm_item_level_5 {
-    padding : 0 1.5em 0 7.5em;
-}
-
-.scorm_item.scorm_item_level_2 > a,
-.scorm_item.scorm_item_level_3 > a,
-.scorm_item.scorm_item_level_4 > a,
-.scorm_item.scorm_item_level_5 > a {
-    font-weight: normal;
-}
-/* end of copy of default_scorm.css */
-
-
-.scormpage {
-    height: 100%;
-}
-.scormpage .menu {
-    width: 180px;
-    float: left;
-    margin: 1px;
-    padding: 0px;
-    margin-top: 0px;
-    padding-top: 0px;
-}
-.lp_toc {
-    background-color: white;
-    height: 380px;
-    width: 99%;
-    border-right: 1px none;
-}
-
-.inner_lp_toc {
-    overflow: auto;
-    background-color: #D7EEF4;
-    height: 210px;
-    /*padding: 10px;*/
-}
-.inner_lp_toc .scorm_item_section {
-    border:none;
-    font-weight:normal;
-    color:#fff;
-    text-shadow:none;
-    margin-right: 1px;
-    padding: 10px 0px 10px 0px;
-    text-decoration: none;
-}
-
-.inner_lp_toc .scorm_item {
-    font-size: 13px;
-    margin-left: 10px;
-    margin-right:10px;
-    text-decoration: none;
-    border-color: rgba(255, 255, 255, 0.3);
-}
-
-.inner_lp_toc .scorm_item.scorm_item_level_1{
-    background: url(../img/archive.png) no-repeat;
-}
-
-.inner_lp_toc .scorm_title {
-    font-weight: bold;
-    background:#ccc;
-    font-size: 14px;
-    color: #444;
-}
-.inner_lp_toc .scorm_title_text {
-    margin-left: 10px;
-}
-.inner_lp_toc .scorm_status_img {
-    margin:0px;
-    margin-left: -10px;
-    width:10px;
-}
-.lp_navigation {
-    overflow: auto;
-    background-color: white;
-    height: 44px;
-    width:180px;
-    padding-top: 4px;
-    padding-bottom:0px;
-    border: none;
-    margin-top: -18px;
-    border-top: 1px dotted black;
-    border-bottom: 1px dotted black;
-}
-.lp_navigation_elem {
-    padding-left: 15px;
-    padding-top: 0px;
-}
-/*.scormpage .menu */
-.lp_navigation_elem .progresstext {
-    margin-top: -20px;
-}
-/*.scormpage .menu */
-.lp_navigation_elem .buttons {
-    margin-left: 0px;
-    margin-right: 0em;
-    margin-top: 0.4em;
-}
-.scormpage .menu .notification {
-    background-color: white;
-    height: 50px;
-}
-.scormpage .menu .notification .message {
-    background-color: white;
-    height: 50px;
-    width: 180px;
-    border: none;
-}
-.scormpage .content {
-    /*float: left;
-    width: 60%;*/
-    margin-top: 0px;
-    padding-top: 0px;
-    padding-left: 180px;
-    background-color: white;
-}
-.iframe {
-    border: 0px solid black;
-    height: 100%;
-    width: 95%;
-    margin: 0px;
-    padding-right: 0px;
-    overflow: auto;
-    vertical-align: top;
-}
-.scormpage .footer {
-    clear: both;
-}
-#image_preview {
-    padding-left: 17px;
-}
-#msg_div_id {
-    padding-left: 17px;
-    padding-top: 4px;
-}
-
-#learning_path_breadcrumb_zone .breadcrumb{
-    background: #05abe0; /* Old browsers */
-    background: -moz-linear-gradient(top, #05abe0 0%, #2e75a3 100%); /* FF3.6+ */
-    background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#05abe0), color-stop(100%,#2e75a3)); /* Chrome,Safari4+ */
-    background: -webkit-linear-gradient(top, #05abe0 0%,#2e75a3 100%); /* Chrome10+,Safari5.1+ */
-    background: -o-linear-gradient(top, #05abe0 0%,#2e75a3 100%); /* Opera 11.10+ */
-    background: -ms-linear-gradient(top, #05abe0 0%,#2e75a3 100%); /* IE10+ */
-    background: linear-gradient(to bottom, #05abe0 0%,#2e75a3 100%); /* W3C */
-    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#05abe0', endColorstr='#2e75a3',GradientType=0 ); /* IE6-9 */
-    color: #fff;
-    text-transform: capitalize;
-    border:none;
-    -webkit-border-radius: 1px;
-    -moz-border-radius: 1px;
-    border-radius: 1px;
-}
-#learning_path_breadcrumb_zone .breadcrumb a{
-    color: #FFF;
-}
-#learning_path_breadcrumb_zone .breadcrumb a:hover{
-    text-decoration: none;
-    opacity: 0.8;
-}
-#scorm_title {
-    font-weight: bold;
-    background:none;
-    font-size: 20px;
-    background-image: none;
-    color: #0088aa;
-    padding-top: 15px;
-    padding-bottom: 15px;
-}
-#learning_path_main #control {
-    opacity: 1;
-}
-.buttons a img:hover{
-    opacity: 0.7;
-}
-#author_image{
-    background-color: #d7eef4;
-    -webkit-border-radius: 10px;
-    -moz-border-radius: 10px;
-    border-radius: 10px;
-    border: 1px solid  #b4cbff;
-    margin-top: 10px;
-}
-#author_icon img{
-    background-color: #fff;
-    padding: 5px;
-    -webkit-border-radius: 10px;
-    -moz-border-radius: 10px;
-    border-radius: 10px;
-}
-#author_image .progresstext{
-    font-size: 20px;
-    color: #0088AA;
-    font-weight: bold;
-}
-#learning_path_left_zone #header {
-  font-size: 18px;
-  margin-top: 10px;
-}
-#learning_path_left_zone .no-border{
-    background: none;
-    color: #0088AA;
-}
-.progress {
-    height: 18px;
-    margin-bottom: 18px;
-    overflow: hidden;
-    background-color: #f7f7f7;
-    background-image: -moz-linear-gradient(top, #f5f5f5, #f9f9f9);
-    background-image: -ms-linear-gradient(top, #f5f5f5, #f9f9f9);
-    background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#f5f5f5), to(#f9f9f9));
-    background-image: -webkit-linear-gradient(top, #f5f5f5, #f9f9f9);
-    background-image: -o-linear-gradient(top, #f5f5f5, #f9f9f9);
-    background-image: linear-gradient(top, #f5f5f5, #f9f9f9);
-    background-repeat: repeat-x;
-    -webkit-border-radius: 4px;
-     -moz-border-radius: 4px;
-          border-radius: 4px;
-    filter: progid:dximagetransform.microsoft.gradient(startColorstr='#f5f5f5', endColorstr='#f9f9f9', GradientType=0);
-    -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
-     -moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
-          box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
-}
-.progress-striped .bar {
-    background-color: #149BDF;
-    background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
-    background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
-    -webkit-animation: progress-bar-stripes 2s linear infinite;
-    animation: progress-bar-stripes 2s linear infinite;
-}
-
-/*STYLES PROCESS LESSION*/
-.inner_lp_toc .scorm_item a {
-    margin-right: 1px;
-    padding-bottom: 2px;
-    text-decoration: none;
-    text-shadow: none;
-    font-weight: normal;
-}
-
-.inner_lp_toc .scorm_item a.chapter_module {
-    font-weight: normal;
-    margin-right: 10px;
-}
-
-.scorm_item_1,
-.scorm_item_2 {
-    font-size: 16px;
-    margin-left: 0;
-    margin-right:10px;
-    text-decoration: none;
-}
-.scorm_item_1 {
-    border-bottom: 1px solid #CCCCCC;
-    color:#444;
-    text-shadow:0 1px 1px #f6f6f6;
-    background: none;
-    margin-right: 1px;
-    padding: 10px 0px 10px 0px;
-}
-.scorm_item_2 {
-    border-bottom: 1px solid #00AAD4;
-    color: #444444;
-    text-shadow: none;
-    margin-right: 1px;
-    padding: 10px 0px 10px 0px;
-    background-image:none;
-}
-.scorm_item_1.scorm_item_highlight.scorm_completed,
-.scorm_item_2.scorm_item_highlight.scorm_completed {
-    background-image: url("images/white_arrow.png") !important;
-    background-position: 270px center !important;
-    background-repeat: no-repeat;
-    color: white;
-}
-.scorm_item_1.scorm_item_normal.scorm_completed,
-.scorm_item_2.scorm_item_normal.scorm_completed {
-    background-image: url("images/blue_arrow.png")  !important;
-    background-position: 270px center !important;
-    background-repeat: no-repeat;
-}
-
-.scorm_item_section.scorm_item_normal.scorm_completed {
-    background-image: url("images/blue_arrow.png") !important;
-    background-position: 270px center !important;
-    background-repeat: no-repeat;
-    background-color: #05abe0;
-}
-
-.scorm_item_section.scorm_item_normal.scorm_not_attempted {
-    background-color: #333;
-}
-
-#learning_path_main #control {
-    background-image: none;
-    background-color: #d7eef4;
-    bottom: 0;
-    height: 34px;
-    margin-bottom: auto;
-    margin-left: auto;
-    margin-right: auto;
-    margin-top: auto;
-    padding-bottom: 8px;
-    padding-left: 0;
-    padding-right: 0;
-    padding-top: 8px;
-    position: absolute;
-    text-align: center;
-    width: 100%;
-    border-top:1px solid #00AAD4;
-}
-
-#author_name {
-    color: #666666;
-    float: left;
-    font-size: 13px;
-    margin-top: 2px;
-    text-align: center;
-    width: 100%;
-    padding-top: 10px;
-    padding-bottom: 5px;
-}
-.mejs-container{
-    background: none;
-    -webkit-border-radius: 5px;
-    -moz-border-radius: 5px;
-    border-radius: 5px;
-}
-.mejs-container .mejs-controls{
-    -webkit-border-radius: 5px;
-    -moz-border-radius: 5px;
-    border-radius: 5px;
-    background: #45484d; /* Old browsers */
-    background: -moz-linear-gradient(top, #45484d 0%, #000000 100%); /* FF3.6+ */
-    background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#45484d), color-stop(100%,#000000)); /* Chrome,Safari4+ */
-    background: -webkit-linear-gradient(top, #45484d 0%,#000000 100%); /* Chrome10+,Safari5.1+ */
-    background: -o-linear-gradient(top, #45484d 0%,#000000 100%); /* Opera 11.10+ */
-    background: -ms-linear-gradient(top, #45484d 0%,#000000 100%); /* IE10+ */
-    background: linear-gradient(to bottom, #45484d 0%,#000000 100%); /* W3C */
-    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#45484d', endColorstr='#000000',GradientType=0 ); /* IE6-9 */
-}
-.mejs-controls .mejs-time-rail .mejs-time-loaded{
-    background: #333;
-    background: rgba(50,50,50,0.8);
-    background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(rgba(30,30,30,0.8)), to(rgba(60,60,60,0.8)));
-    background: -webkit-linear-gradient(top, rgba(30,30,30,0.8), rgba(60,60,60,0.8));
-    background: -moz-linear-gradient(top, rgba(30,30,30,0.8), rgba(60,60,60,0.8));
-    background: -o-linear-gradient(top, rgba(30,30,30,0.8), rgba(60,60,60,0.8));
-    background: -ms-linear-gradient(top, rgba(30,30,30,0.8), rgba(60,60,60,0.8));
-    background: linear-gradient(rgba(30,30,30,0.8), rgba(60,60,60,0.8));
-}
-.mejs-controls .mejs-time-rail .mejs-time-current{
-    background: #a9e4f7; /* Old browsers */
-    background: -moz-linear-gradient(top, #a9e4f7 0%, #0fb4e7 100%); /* FF3.6+ */
-    background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#a9e4f7), color-stop(100%,#0fb4e7)); /* Chrome,Safari4+ */
-    background: -webkit-linear-gradient(top, #a9e4f7 0%,#0fb4e7 100%); /* Chrome10+,Safari5.1+ */
-    background: -o-linear-gradient(top, #a9e4f7 0%,#0fb4e7 100%); /* Opera 11.10+ */
-    background: -ms-linear-gradient(top, #a9e4f7 0%,#0fb4e7 100%); /* IE10+ */
-    background: linear-gradient(to bottom, #a9e4f7 0%,#0fb4e7 100%); /* W3C */
-    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#a9e4f7', endColorstr='#0fb4e7',GradientType=0 ); /* IE6-9 */
-}

+ 0 - 450
main/css/chamilo_electric_blue/scorm.css

@@ -1,450 +0,0 @@
-/* copy of default_scorm.css */
-
-.inner_lp_toc {
-    overflow: auto;
-    background-color: white;
-    height: 210px;
-}
-
-.inner_lp_toc .scorm_item_1 a,
-.inner_lp_toc .scorm_item_2 a {
-    font-size: 13px;
-    margin-right: 1px;
-    padding-bottom: 2px;
-    text-decoration: none;
-    color: #2F3E46;
-}
-
-.inner_lp_toc .scorm_item_1 a.chapter_module,
-.inner_lp_toc .scorm_item_2 a.chapter_module {
-    font-weight: normal;
-    margin-right: 10px;
-}
-.inner_lp_toc .scorm_item_highlight {
-    font-weight:bold;
-    border:1px solid #ccc;
-    background-color: #eee;
-    background-image:none;
-    margin-right: 0px;
-    padding: 10px 0px 10px 0px;
-    text-decoration: none;
-}
-.inner_lp_toc .scorm_item_highlight a {
-    color:#666;
-    margin-right: 1px;
-    text-decoration: none;
-}
-
-.inner_lp_toc .scorm_item_section {
-    border:1px solid #222;
-    background:#333;
-    font-weight:bold;
-    color:#fff;
-    text-shadow:0 -1px 1px #000;
-    background-image:-webkit-gradient(linear,left top,left bottom,from(#555),to(#333));
-    background-image:-webkit-linear-gradient(top,#555,#333);
-    background-image:-moz-linear-gradient(top,#555,#333);
-    background-image:-ms-linear-gradient(top,#555,#333);
-    background-image:-o-linear-gradient(top,#555,#333);
-    background-image:linear-gradient(top,#555,#333);
-    margin-right: 1px;
-    padding: 10px 0px 10px 0px;
-    text-decoration: none;
-}
-
-.inner_lp_toc .scorm_item_section .scorm_item:before
-{
-    content : url('../lp_section.png');  /* from main/newscorm/lp_controller.php file */
-    vertical-align: text-top;
-    margin-right : 5px;
-}
-
-.scorm_section_level_0 {
-    padding : 0 0 0 0;
-}
-
-.scorm_section_level_1 {
-    padding : 0 0.5em 0 2em;
-}
-
-.scorm_section_level_2 {
-    padding : 0 0.5em 0 4em;
-}
-
-.scorm_section_level_3 {
-    padding : 0 0.5em 0 6em;
-}
-
-.scorm_section_level_4 {
-    padding : 0 0.5em 0 8em;
-}
-
-.scorm_section_level_5 {
-    padding : 0 0.5em 0 10em;
-}
-
-.scorm_item_level_0 {
-    padding : 0 0 0 0;
-}
-
-.scorm_item_level_1 {
-    padding : 0 1.5em 0 1.5em;
-}
-
-.scorm_item_level_2 {
-    padding : 0 1.5em 0 3em;
-}
-.scorm_item_level_3 {
-    padding : 0 1.5em 0 4.5em;
-}
-
-.scorm_item_level_4 {
-    padding : 0 1.5em 0 6em;
-}
-
-.scorm_item_level_5 {
-    padding : 0 1.5em 0 7.5em;
-}
-
-.scorm_item.scorm_item_level_2 > a, .scorm_item.scorm_item_level_3 > a, .scorm_item.scorm_item_level_4 > a, .scorm_item.scorm_item_level_5 > a{
-    font-weight: normal;
-}
-/* end of copy of default_scorm.css */
-
-
-.scormpage {
-    height: 100%;
-}
-.scormpage .menu {
-    width: 180px;
-    float: left;
-    margin: 1px;
-    padding: 0px;
-    margin-top: 0px;
-    padding-top: 0px;
-}
-.lp_toc {
-    background-color: white;
-    height: 380px;
-    width: 99%;
-    border-right: 1px none;
-}
-
-.inner_lp_toc {
-    overflow: auto;
-    background-color: #D7EEF4;
-    height: 210px;
-    /*padding: 10px;*/   
-}
-.inner_lp_toc .scorm_item_section {
-    border:none;
-    background:#333;
-    font-weight:normal;
-    color:#fff;
-    text-shadow:none;
-    padding: 10px 0px 10px 0px;
-    text-decoration: none;
-}
-
-.inner_lp_toc .scorm_item {
-    font-size: 13px;
-    margin-left: 10px;
-    margin-right:10px;
-    text-decoration: none;
-    border-color: rgba(255, 255, 255, 0.3); 
-    
-}
-.inner_lp_toc .scorm_item.scorm_item_level_1{
-    background: url(../img/archive.png) no-repeat;
-}
-
-
-.inner_lp_toc .scorm_title {
-    font-weight: bold;
-    background:#ccc;
-    font-size: 14px;
-    color: #444;
-}
-.inner_lp_toc .scorm_title_text {
-    margin-left: 10px;
-}
-.inner_lp_toc .scorm_status_img {
-    margin:0px;
-    margin-left: -10px;
-    width:10px;
-}
-.lp_navigation {
-    overflow: auto;
-    background-color: white;
-    height: 44px;
-    width:180px;
-    padding-top: 4px;
-    padding-bottom:0px;
-    border: none;
-    margin-top: -18px;
-    border-top: 1px dotted black;
-    border-bottom: 1px dotted black;
-}
-.lp_navigation_elem {
-    padding-left: 15px;
-    padding-top: 0px;
-}
-/*.scormpage .menu */
-.lp_navigation_elem .progresstext {
-    margin-top: -20px;
-}
-/*.scormpage .menu */
-.lp_navigation_elem .buttons {
-    margin-left: 0px;
-    margin-right: 0em;
-    margin-top: 0.4em;
-}
-.scormpage .menu .notification {
-    background-color: white;
-    height: 50px;
-}
-.scormpage .menu .notification .message {
-    background-color: white;
-    height: 50px;
-    width: 180px;
-    border: none;
-}
-.scormpage .content {
-    /*float: left;
-    width: 60%;*/
-    margin-top: 0px;
-    padding-top: 0px;
-    padding-left: 180px;
-    background-color: white;
-}
-.iframe {
-    border: 0px solid black;
-    height: 100%;
-    width: 95%;
-    margin: 0px;
-    padding-right: 0px;
-    overflow: auto;
-    vertical-align: top;
-}
-.scormpage .footer {
-    clear: both;
-}
-#image_preview {
-    padding-left: 17px;
-}
-#msg_div_id {
-    padding-left: 17px;
-    padding-top: 4px;
-}
-
-#learning_path_breadcrumb_zone .breadcrumb{
-    background: #175ae2; /* Old browsers */
-    background: -moz-linear-gradient(top, #175ae2 0%, #133aac 100%); /* FF3.6+ */
-    background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#175ae2), color-stop(100%,#133aac)); /* Chrome,Safari4+ */
-    background: -webkit-linear-gradient(top, #175ae2 0%,#133aac 100%); /* Chrome10+,Safari5.1+ */
-    background: -o-linear-gradient(top, #175ae2 0%,#133aac 100%); /* Opera 11.10+ */
-    background: -ms-linear-gradient(top, #175ae2 0%,#133aac 100%); /* IE10+ */
-    background: linear-gradient(to bottom, #175ae2 0%,#133aac 100%); /* W3C */
-    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#175ae2', endColorstr='#133aac',GradientType=0 ); /* IE6-9 */
-    color: #fff;
-    text-transform: capitalize;
-    border:none;
-    -webkit-border-radius: 1px;
-    -moz-border-radius: 1px;
-    border-radius: 1px;
-}
-#learning_path_breadcrumb_zone .breadcrumb a{
-    color: #FFF;
-}
-#learning_path_breadcrumb_zone .breadcrumb a:hover{
-    text-decoration: none;
-    opacity: 0.8;
-}
-#scorm_title {
-    font-weight: bold;
-    background:none;
-    font-size: 20px;
-    background-image: none;
-    color: #666;
-    padding-top: 15px;
-    padding-bottom: 15px;
-}
-#learning_path_main #control {
-  opacity: 1;
-}
-.buttons a img:hover{
-opacity: 0.7;
-}
-#author_image{
-    background-color: #fff;
-    -webkit-border-radius: 10px;
-    -moz-border-radius: 10px;
-    border-radius: 10px;
-    border: 1px solid  #ccc;
-    margin-top: 10px;
-}
-#author_icon img{
-    background-color: #fff;
-    padding: 5px;
-    -webkit-border-radius: 10px;
-    -moz-border-radius: 10px;
-    border-radius: 10px;
-}
-#author_image .progresstext{
-    font-size: 20px;
-    color: #666;
-    font-weight: bold;
-}
-#learning_path_left_zone #header {
-  font-size: 18px;
-  margin-top: 10px;
-}
-#learning_path_left_zone .no-border{
-    background: none;
-    color: #666;
-}
-.progress {
-  height: 18px;
-  margin-bottom: 18px;
-  overflow: hidden;
-  background-color: #f7f7f7;
-  background-image: -moz-linear-gradient(top, #f5f5f5, #f9f9f9);
-  background-image: -ms-linear-gradient(top, #f5f5f5, #f9f9f9);
-  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#f5f5f5), to(#f9f9f9));
-  background-image: -webkit-linear-gradient(top, #f5f5f5, #f9f9f9);
-  background-image: -o-linear-gradient(top, #f5f5f5, #f9f9f9);
-  background-image: linear-gradient(top, #f5f5f5, #f9f9f9);
-  background-repeat: repeat-x;
-  -webkit-border-radius: 4px;
-     -moz-border-radius: 4px;
-          border-radius: 4px;
-  filter: progid:dximagetransform.microsoft.gradient(startColorstr='#f5f5f5', endColorstr='#f9f9f9', GradientType=0);
-  -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
-     -moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
-          box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
-}
-.progress-striped .bar {
-  background-color: #154dcd;
-  background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
-  background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
-    -webkit-animation: progress-bar-stripes 2s linear infinite;
-    animation: progress-bar-stripes 2s linear infinite;
-}
-
-/*STYLES PROCESS LESSION*/
-.inner_lp_toc .scorm_item a {
-    margin-right: 1px;
-    padding-bottom: 2px;
-    text-decoration: none;
-    color: #2F3E46;
-}
-
-.inner_lp_toc .scorm_item a.chapter_module {
-    font-weight: normal;
-    margin-right: 10px;
-}
-
-.scorm_item_1,
-.scorm_item_2 {
-    font-size: 16px;
-    margin-left: 0;
-    margin-right:10px;
-    text-decoration: none;
-    border-color: rgba(255, 255, 255, 0.3);
-}
-.scorm_item_1 {
-    border-bottom: 1px solid #CCCCCC;
-    color:#444;
-    text-shadow:0 1px 1px #f6f6f6;
-    background: none;
-    margin-right: 1px;
-    padding: 10px 0px 10px 0px;
-}
-.scorm_item_2 {
-    color: #444444;
-    text-shadow: 0 1px 1px #F6F6F6;
-    margin-right: 1px;
-    padding: 10px 0px 10px 0px;
-    background-image:none;
-}
-.scorm_item_1.scorm_item_highlight.scorm_completed,
-.scorm_item_2.scorm_item_highlight.scorm_completed {
-    background-image: url("images/white_arrow.png") !important;
-    background-position: 270px center !important;
-    background-repeat: no-repeat;
-    color: white;
-}
-.scorm_item_1.scorm_item_normal.scorm_completed,
-.scorm_item_2.scorm_item_normal.scorm_completed {
-    background-image: url("images/blue_arrow.png")  !important;
-    background-position: 270px center !important;
-    background-repeat: no-repeat;
-}
-#learning_path_main #control {
-  background-image: none;
-  background-color: #d7eef4;
-  bottom: 0;
-  height: 34px;
-  margin-bottom: auto;
-  margin-left: auto;
-  margin-right: auto;
-  margin-top: auto;
-  padding-bottom: 8px;
-  padding-left: 0;
-  padding-right: 0;
-  padding-top: 8px;
-  position: absolute;
-  text-align: center;
-  width: 100%;
-  border-top:1px solid #00AAD4;
-}
-
-#author_name {
-  color: #666666;
-  float: left;
-  font-size: 13px;
-  margin-top: 2px;
-  text-align: center;
-  width: 100%;
-  padding-top: 10px;
-  padding-bottom: 5px;
-}
-.mejs-container{
-    background: none;
-    -webkit-border-radius: 5px;
-    -moz-border-radius: 5px;
-    border-radius: 5px;
-}
-.mejs-container .mejs-controls{
-    -webkit-border-radius: 5px;
-    -moz-border-radius: 5px;
-    border-radius: 5px;
-    background: #45484d; /* Old browsers */
-background: -moz-linear-gradient(top, #45484d 0%, #000000 100%); /* FF3.6+ */
-background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#45484d), color-stop(100%,#000000)); /* Chrome,Safari4+ */
-background: -webkit-linear-gradient(top, #45484d 0%,#000000 100%); /* Chrome10+,Safari5.1+ */
-background: -o-linear-gradient(top, #45484d 0%,#000000 100%); /* Opera 11.10+ */
-background: -ms-linear-gradient(top, #45484d 0%,#000000 100%); /* IE10+ */
-background: linear-gradient(to bottom, #45484d 0%,#000000 100%); /* W3C */
-filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#45484d', endColorstr='#000000',GradientType=0 ); /* IE6-9 */
-}
-.mejs-controls .mejs-time-rail .mejs-time-loaded{
-    background: #333;
-    background: rgba(50,50,50,0.8);
-    background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(rgba(30,30,30,0.8)), to(rgba(60,60,60,0.8)));
-    background: -webkit-linear-gradient(top, rgba(30,30,30,0.8), rgba(60,60,60,0.8)); 
-    background: -moz-linear-gradient(top, rgba(30,30,30,0.8), rgba(60,60,60,0.8));
-    background: -o-linear-gradient(top, rgba(30,30,30,0.8), rgba(60,60,60,0.8));
-    background: -ms-linear-gradient(top, rgba(30,30,30,0.8), rgba(60,60,60,0.8));
-    background: linear-gradient(rgba(30,30,30,0.8), rgba(60,60,60,0.8));
-}
-.mejs-controls .mejs-time-rail .mejs-time-current{
-    background: #a9e4f7; /* Old browsers */
-    background: -moz-linear-gradient(top, #a9e4f7 0%, #0fb4e7 100%); /* FF3.6+ */
-    background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#a9e4f7), color-stop(100%,#0fb4e7)); /* Chrome,Safari4+ */
-    background: -webkit-linear-gradient(top, #a9e4f7 0%,#0fb4e7 100%); /* Chrome10+,Safari5.1+ */
-    background: -o-linear-gradient(top, #a9e4f7 0%,#0fb4e7 100%); /* Opera 11.10+ */
-    background: -ms-linear-gradient(top, #a9e4f7 0%,#0fb4e7 100%); /* IE10+ */
-    background: linear-gradient(to bottom, #a9e4f7 0%,#0fb4e7 100%); /* W3C */
-    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#a9e4f7', endColorstr='#0fb4e7',GradientType=0 ); /* IE6-9 */
-}

+ 0 - 446
main/css/chamilo_green/scorm.css

@@ -1,449 +1,3 @@
 /* copy of default_scorm.css */
 
-.inner_lp_toc {
-    overflow: auto;
-    background-color: #fafafa;
-    height: 210px;
-}
-
-.inner_lp_toc .scorm_item_1 a,
-.inner_lp_toc .scorm_item_2 a {
-    font-size: 13px;
-    margin-right: 1px;
-    padding-bottom: 2px;
-    text-decoration: none;
-    color: #2F3E46;
-}
-
-.inner_lp_toc .scorm_item_1 a.chapter_module,
-.inner_lp_toc .scorm_item_2 a.chapter_module {
-    font-weight: normal;
-    margin-right: 10px;
-}
-.inner_lp_toc .scorm_item_highlight {
-    font-weight:bold;
-    border:1px solid #87b000;
-    background-color: #87b000;
-    background-image:none;
-    margin-right: 0px;
-    padding: 10px 0px 10px 0px;
-    text-decoration: none;
-}
-.inner_lp_toc .scorm_item_highlight a {
-    color: #666;
-    margin-right: 1px;
-    text-decoration: none;
-}
-
-.inner_lp_toc .scorm_item_section {
-    border:1px solid #222;
-    background:#333;
-    font-weight:bold;
-    color:#fff;
-    text-shadow: none;
-    background-image:-webkit-gradient(linear,left top,left bottom,from(#555),to(#333));
-    background-image:-webkit-linear-gradient(top,#555,#333);
-    background-image:-moz-linear-gradient(top,#555,#333);
-    background-image:-ms-linear-gradient(top,#555,#333);
-    background-image:-o-linear-gradient(top,#555,#333);
-    background-image:linear-gradient(top,#555,#333);
-    margin-right: 1px;
-    padding: 10px 0px 10px 0px;
-    text-decoration: none;
-}
-
-.inner_lp_toc .scorm_item_section .scorm_item:before
-{
-    content : url('../lp_section.png');  /* from main/newscorm/lp_controller.php file */
-    vertical-align: text-top;
-    margin-right : 5px;
-}
-
-.scorm_section_level_0 {
-    padding : 0 0 0 0;
-}
-
-.scorm_section_level_1 {
-    padding : 0 0.5em 0 2em;
-}
-
-.scorm_section_level_2 {
-    padding : 0 0.5em 0 4em;
-}
-
-.scorm_section_level_3 {
-    padding : 0 0.5em 0 6em;
-}
-
-.scorm_section_level_4 {
-    padding : 0 0.5em 0 8em;
-}
-
-.scorm_section_level_5 {
-    padding : 0 0.5em 0 10em;
-}
-
-.scorm_item_level_0 {
-    padding : 0 0 0 0;
-}
-
-.scorm_item_level_1 {
-    padding : 0 1.5em 0 1.5em;
-}
-
-.scorm_item_level_2 {
-    padding : 0 1.5em 0 3em;
-}
-.scorm_item_level_3 {
-    padding : 0 1.5em 0 4.5em;
-}
-
-.scorm_item_level_4 {
-    padding : 0 1.5em 0 6em;
-}
-
-.scorm_item_level_5 {
-    padding : 0 1.5em 0 7.5em;
-}
-
-.scorm_item.scorm_item_level_2 > a, .scorm_item.scorm_item_level_3 > a, .scorm_item.scorm_item_level_4 > a, .scorm_item.scorm_item_level_5 > a{
-    font-weight: normal;
-}
-/* end of copy of default_scorm.css */
-
-
-.scormpage {
-    height: 100%;
-}
-.scormpage .menu {
-    width: 180px;
-    float: left;
-    margin: 1px;
-    padding: 0px;
-    margin-top: 0px;
-    padding-top: 0px;
-}
-.lp_toc {
-    background-color: white;
-    height: 380px;
-    width: 99%;
-    border-right: 1px none;
-}
-
-.inner_lp_toc {
-    overflow: auto;
-    background-color: #D7EEF4;
-    height: 210px;
-    /*padding: 10px;*/   
-}
-.inner_lp_toc .scorm_item_section {
-    border:none;
-    background:#333;
-    font-weight:normal;
-    color:#fff;
-    text-shadow:none;
-    padding: 10px 0px 10px 0px;
-    text-decoration: none;
-}
-
-.inner_lp_toc .scorm_item {
-    font-size: 13px;
-    margin-left: 10px;
-    margin-right:10px;
-    text-decoration: none;
-    border-color: rgba(255, 255, 255, 0.3); 
-    
-}
-.inner_lp_toc .scorm_item.scorm_item_level_1{
-    background: url(../img/archive.png) no-repeat;
-}
-
-
-.inner_lp_toc .scorm_title {
-    font-weight: bold;
-    background:#ccc;
-    font-size: 14px;
-    color: #444;
-}
-.inner_lp_toc .scorm_title_text {
-    margin-left: 10px;
-}
-.inner_lp_toc .scorm_status_img {
-    margin:0px;
-    margin-left: -10px;
-    width:10px;
-}
-.lp_navigation {
-    overflow: auto;
-    background-color: white;
-    height: 44px;
-    width:180px;
-    padding-top: 4px;
-    padding-bottom:0px;
-    border: none;
-    margin-top: -18px;
-    border-top: 1px dotted black;
-    border-bottom: 1px dotted black;
-}
-.lp_navigation_elem {
-    padding-left: 15px;
-    padding-top: 0px;
-}
-/*.scormpage .menu */
-.lp_navigation_elem .progresstext {
-    margin-top: -20px;
-}
-/*.scormpage .menu */
-.lp_navigation_elem .buttons {
-    margin-left: 0px;
-    margin-right: 0em;
-    margin-top: 0.4em;
-}
-.scormpage .menu .notification {
-    background-color: white;
-    height: 50px;
-}
-.scormpage .menu .notification .message {
-    background-color: white;
-    height: 50px;
-    width: 180px;
-    border: none;
-}
-.scormpage .content {
-    /*float: left;
-    width: 60%;*/
-    margin-top: 0px;
-    padding-top: 0px;
-    padding-left: 180px;
-    background-color: white;
-}
-.iframe {
-    border: 0px solid black;
-    height: 100%;
-    width: 95%;
-    margin: 0px;
-    padding-right: 0px;
-    overflow: auto;
-    vertical-align: top;
-}
-.scormpage .footer {
-    clear: both;
-}
-#image_preview {
-    padding-left: 17px;
-}
-#msg_div_id {
-    padding-left: 17px;
-    padding-top: 4px;
-}
-
-#learning_path_breadcrumb_zone .breadcrumb{
-    background: #a0c400; /* Old browsers */
-    background: -moz-linear-gradient(top, #a0c400 0%, #73a000 100%); /* FF3.6+ */
-    background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#a0c400), color-stop(100%,#73a000)); /* Chrome,Safari4+ */
-    background: -webkit-linear-gradient(top, #a0c400 0%,#73a000 100%); /* Chrome10+,Safari5.1+ */
-    background: -o-linear-gradient(top, #a0c400 0%,#73a000 100%); /* Opera 11.10+ */
-    background: -ms-linear-gradient(top, #a0c400 0%,#73a000 100%); /* IE10+ */
-    background: linear-gradient(to bottom, #a0c400 0%,#73a000 100%); /* W3C */
-    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#a0c400', endColorstr='#73a000',GradientType=0 ); /* IE6-9 */
-    color: #fff;
-    text-transform: capitalize;
-    border:none;
-    -webkit-border-radius: 1px;
-    -moz-border-radius: 1px;
-    border-radius: 1px;
-}
-#learning_path_breadcrumb_zone .breadcrumb a{
-    color: #FFF;
-}
-#learning_path_breadcrumb_zone .breadcrumb a:hover{
-    text-decoration: none;
-    opacity: 0.8;
-}
-#scorm_title {
-    font-weight: bold;
-    background:none;
-    font-size: 20px;
-    background-image: none;
-    color: #75a200;
-    padding-top: 15px;
-    padding-bottom: 15px;
-}
-#learning_path_main #control {
-  opacity: 1;
-}
-.buttons a img:hover{
-opacity: 0.7;
-}
-#author_image{
-    background-color: #fafafa;
-    -webkit-border-radius: 10px;
-    -moz-border-radius: 10px;
-    border-radius: 10px;
-    border: 1px solid  #d9d9ce;
-    margin-top: 10px;
-}
-#author_icon img{
-    background-color: #fff;
-    padding: 5px;
-    -webkit-border-radius: 10px;
-    -moz-border-radius: 10px;
-    border-radius: 10px;
-}
-#author_image .progresstext{
-    font-size: 20px;
-    color: #75a200;
-    font-weight: bold;
-}
-#learning_path_left_zone #header {
-  font-size: 18px;
-  margin-top: 10px;
-}
-#learning_path_left_zone .no-border{
-    background: none;
-    color: #75a200;
-}
-.progress {
-  height: 18px;
-  margin-bottom: 18px;
-  overflow: hidden;
-  background-color: #f7f7f7;
-  background-image: -moz-linear-gradient(top, #f5f5f5, #f9f9f9);
-  background-image: -ms-linear-gradient(top, #f5f5f5, #f9f9f9);
-  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#f5f5f5), to(#f9f9f9));
-  background-image: -webkit-linear-gradient(top, #f5f5f5, #f9f9f9);
-  background-image: -o-linear-gradient(top, #f5f5f5, #f9f9f9);
-  background-image: linear-gradient(top, #f5f5f5, #f9f9f9);
-  background-repeat: repeat-x;
-  -webkit-border-radius: 4px;
-     -moz-border-radius: 4px;
-          border-radius: 4px;
-  filter: progid:dximagetransform.microsoft.gradient(startColorstr='#f5f5f5', endColorstr='#f9f9f9', GradientType=0);
-  -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
-     -moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
-          box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
-}
-.progress-striped .bar {
-  background-color: 75a2000;
-  background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
-  background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
-    -webkit-animation: progress-bar-stripes 2s linear infinite;
-    animation: progress-bar-stripes 2s linear infinite;
-}
-
 /*STYLES PROCESS LESSION*/
-.inner_lp_toc .scorm_item a {
-    margin-right: 1px;
-    padding-bottom: 2px;
-    text-decoration: none;
-    color: #2F3E46;
-}
-
-.inner_lp_toc .scorm_item a.chapter_module {
-    font-weight: normal;
-    margin-right: 10px;
-}
-
-.scorm_item_1,
-.scorm_item_2 {
-    font-size: 16px;
-    margin-left: 0;
-    margin-right:10px;
-    text-decoration: none;
-    border-color: rgba(255, 255, 255, 0.3);
-}
-.scorm_item_1 {
-    border-bottom: 1px solid #CCCCCC;
-    color:#444;
-    background: none;
-    margin-right: 1px;
-    padding: 10px 0px 10px 0px;
-}
-.scorm_item_2 {
-    border-bottom: 1px solid #CCCCCC;
-    color: #444444;
-    margin-right: 1px;
-    padding: 10px 0px 10px 0px;
-    background-image:none;
-}
-.scorm_item_1.scorm_item_highlight.scorm_completed,
-.scorm_item_2.scorm_item_highlight.scorm_completed {
-    background-image: url("images/white_arrow.png") !important;
-    background-position: 270px center !important;
-    background-repeat: no-repeat;
-    color: white;
-}
-.scorm_item_1.scorm_item_normal.scorm_completed,
-.scorm_item_2.scorm_item_normal.scorm_completed {
-    background-image: url("images/blue_arrow.png")  !important;
-    background-position: 270px center !important;
-    background-repeat: no-repeat;
-}
-#learning_path_main #control {
-  background-image: none;
-  background-color: #d7eef4;
-  bottom: 0;
-  height: 34px;
-  margin-bottom: auto;
-  margin-left: auto;
-  margin-right: auto;
-  margin-top: auto;
-  padding-bottom: 8px;
-  padding-left: 0;
-  padding-right: 0;
-  padding-top: 8px;
-  position: absolute;
-  text-align: center;
-  width: 100%;
-  border-top:1px solid #00AAD4;
-}
-
-#author_name {
-  color: #666666;
-  float: left;
-  font-size: 13px;
-  margin-top: 2px;
-  text-align: center;
-  width: 100%;
-  padding-top: 10px;
-  padding-bottom: 5px;
-}
-.mejs-container{
-    background: none;
-    -webkit-border-radius: 5px;
-    -moz-border-radius: 5px;
-    border-radius: 5px;
-}
-.mejs-container .mejs-controls{
-    -webkit-border-radius: 5px;
-    -moz-border-radius: 5px;
-    border-radius: 5px;
-    background: #45484d; /* Old browsers */
-background: -moz-linear-gradient(top, #45484d 0%, #000000 100%); /* FF3.6+ */
-background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#45484d), color-stop(100%,#000000)); /* Chrome,Safari4+ */
-background: -webkit-linear-gradient(top, #45484d 0%,#000000 100%); /* Chrome10+,Safari5.1+ */
-background: -o-linear-gradient(top, #45484d 0%,#000000 100%); /* Opera 11.10+ */
-background: -ms-linear-gradient(top, #45484d 0%,#000000 100%); /* IE10+ */
-background: linear-gradient(to bottom, #45484d 0%,#000000 100%); /* W3C */
-filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#45484d', endColorstr='#000000',GradientType=0 ); /* IE6-9 */
-}
-.mejs-controls .mejs-time-rail .mejs-time-loaded{
-    background: #333;
-    background: rgba(50,50,50,0.8);
-    background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(rgba(30,30,30,0.8)), to(rgba(60,60,60,0.8)));
-    background: -webkit-linear-gradient(top, rgba(30,30,30,0.8), rgba(60,60,60,0.8)); 
-    background: -moz-linear-gradient(top, rgba(30,30,30,0.8), rgba(60,60,60,0.8));
-    background: -o-linear-gradient(top, rgba(30,30,30,0.8), rgba(60,60,60,0.8));
-    background: -ms-linear-gradient(top, rgba(30,30,30,0.8), rgba(60,60,60,0.8));
-    background: linear-gradient(rgba(30,30,30,0.8), rgba(60,60,60,0.8));
-}
-.mejs-controls .mejs-time-rail .mejs-time-current{
-    background: #a9e4f7; /* Old browsers */
-    background: -moz-linear-gradient(top, #a9e4f7 0%, #0fb4e7 100%); /* FF3.6+ */
-    background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#a9e4f7), color-stop(100%,#0fb4e7)); /* Chrome,Safari4+ */
-    background: -webkit-linear-gradient(top, #a9e4f7 0%,#0fb4e7 100%); /* Chrome10+,Safari5.1+ */
-    background: -o-linear-gradient(top, #a9e4f7 0%,#0fb4e7 100%); /* Opera 11.10+ */
-    background: -ms-linear-gradient(top, #a9e4f7 0%,#0fb4e7 100%); /* IE10+ */
-    background: linear-gradient(to bottom, #a9e4f7 0%,#0fb4e7 100%); /* W3C */
-    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#a9e4f7', endColorstr='#0fb4e7',GradientType=0 ); /* IE6-9 */
-}

+ 1 - 411
main/css/chamilo_orange/scorm.css

@@ -1,253 +1,5 @@
 /* copy of default_scorm.css */
 
-.inner_lp_toc {
-    overflow: auto;
-    background-color: white;
-    height: 210px;
-}
-
-.inner_lp_toc .scorm_item_1 a,
-.inner_lp_toc .scorm_item_2 a {
-    font-size: 13px;
-    margin-right: 1px;
-    padding-bottom: 2px;
-    text-decoration: none;
-    color: #2F3E46;
-}
-
-.inner_lp_toc .scorm_item_1 a.chapter_module,
-.inner_lp_toc .scorm_item_2 a.chapter_module {
-    font-weight: normal;
-    margin-right: 10px;
-}
-.inner_lp_toc .scorm_item_highlight {
-    font-weight:bold;
-    border:1px solid #f97e26;
-    background-color: #f97e26;
-    background-image:none;
-    margin-right: 0px;
-    padding: 10px 0px 10px 0px;
-    text-decoration: none;
-}
-.inner_lp_toc .scorm_item_highlight a {
-    color: #ffffff;
-}
-.inner_lp_toc .scorm_item_highlight a {
-    color:#fff;
-    margin-right: 1px;
-    text-decoration: none;
-}
-
-.inner_lp_toc .scorm_item_section {
-    border:1px solid #222;
-    background:#333;
-    font-weight:bold;
-    color:#fff;
-    text-shadow:0 -1px 1px #000;
-    background-image:-webkit-gradient(linear,left top,left bottom,from(#555),to(#333));
-    background-image:-webkit-linear-gradient(top,#555,#333);
-    background-image:-moz-linear-gradient(top,#555,#333);
-    background-image:-ms-linear-gradient(top,#555,#333);
-    background-image:-o-linear-gradient(top,#555,#333);
-    background-image:linear-gradient(top,#555,#333);
-    margin-right: 1px;
-    padding: 10px 0px 10px 0px;
-    text-decoration: none;
-}
-
-.inner_lp_toc .scorm_item_section .scorm_item:before
-{
-    content : url('../lp_section.png');  /* from main/newscorm/lp_controller.php file */
-    vertical-align: text-top;
-    margin-right : 5px;
-}
-
-.scorm_section_level_0 {
-    padding : 0 0 0 0;
-}
-
-.scorm_section_level_1 {
-    padding : 0 0.5em 0 2em;
-}
-
-.scorm_section_level_2 {
-    padding : 0 0.5em 0 4em;
-}
-
-.scorm_section_level_3 {
-    padding : 0 0.5em 0 6em;
-}
-
-.scorm_section_level_4 {
-    padding : 0 0.5em 0 8em;
-}
-
-.scorm_section_level_5 {
-    padding : 0 0.5em 0 10em;
-}
-
-.scorm_item_level_0 {
-    padding : 0 0 0 0;
-}
-
-.scorm_item_level_1 {
-    padding : 0 1.5em 0 1.5em;
-}
-
-.scorm_item_level_2 {
-    padding : 0 1.5em 0 3em;
-}
-.scorm_item_level_3 {
-    padding : 0 1.5em 0 4.5em;
-}
-
-.scorm_item_level_4 {
-    padding : 0 1.5em 0 6em;
-}
-
-.scorm_item_level_5 {
-    padding : 0 1.5em 0 7.5em;
-}
-
-.scorm_item.scorm_item_level_2 > a, .scorm_item.scorm_item_level_3 > a, .scorm_item.scorm_item_level_4 > a, .scorm_item.scorm_item_level_5 > a{
-    font-weight: normal;
-}
-/* end of copy of default_scorm.css */
-
-
-.scormpage {
-    height: 100%;
-}
-.scormpage .menu {
-    width: 180px;
-    float: left;
-    margin: 1px;
-    padding: 0px;
-    margin-top: 0px;
-    padding-top: 0px;
-}
-.lp_toc {
-    background-color: white;
-    height: 380px;
-    width: 99%;
-    border-right: 1px none;
-}
-
-.inner_lp_toc {
-    overflow: auto;
-    background-color: #D7EEF4;
-    height: 210px;
-    /*padding: 10px;*/   
-}
-.inner_lp_toc .scorm_item_section {
-    border:none;
-    background:#333;
-    font-weight:normal;
-    color:#fff;
-    text-shadow:none;
-    background: #ff7400; /* Old browsers */
-    background: -moz-linear-gradient(top, #ff7400 0%, #df3a01 100%); /* FF3.6+ */
-    background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ff7400), color-stop(100%,#df3a01)); /* Chrome,Safari4+ */
-    background: -webkit-linear-gradient(top, #ff7400 0%,#df3a01 100%); /* Chrome10+,Safari5.1+ */
-    background: -o-linear-gradient(top, #ff7400 0%,#df3a01 100%); /* Opera 11.10+ */
-    background: -ms-linear-gradient(top, #ff7400 0%,#df3a01 100%); /* IE10+ */
-    background: linear-gradient(to bottom, #ff7400 0%,#df3a01 100%); /* W3C */
-    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ff7400', endColorstr='#df3a01',GradientType=0 ); /* IE6-9 */
-    margin-right: 1px;
-    padding: 10px 0px 10px 0px;
-}
-
-.inner_lp_toc .scorm_item {
-    font-size: 13px;
-    margin-left: 10px;
-    margin-right:10px;
-    text-decoration: none;
-    border-color: rgba(255, 255, 255, 0.3); 
-    
-}
-.inner_lp_toc .scorm_item.scorm_item_level_1{
-    background: url(../img/archive.png) no-repeat;
-}
-
-
-.inner_lp_toc .scorm_title {
-    font-weight: bold;
-    background:#ccc;
-    font-size: 14px;
-    color: #444;
-}
-.inner_lp_toc .scorm_title_text {
-    margin-left: 10px;
-}
-.inner_lp_toc .scorm_status_img {
-    margin:0px;
-    margin-left: -10px;
-    width:10px;
-}
-.lp_navigation {
-    overflow: auto;
-    background-color: white;
-    height: 44px;
-    width:180px;
-    padding-top: 4px;
-    padding-bottom:0px;
-    border: none;
-    margin-top: -18px;
-    border-top: 1px dotted black;
-    border-bottom: 1px dotted black;
-}
-.lp_navigation_elem {
-    padding-left: 15px;
-    padding-top: 0px;
-}
-/*.scormpage .menu */
-.lp_navigation_elem .progresstext {
-    margin-top: -20px;
-}
-/*.scormpage .menu */
-.lp_navigation_elem .buttons {
-    margin-left: 0px;
-    margin-right: 0em;
-    margin-top: 0.4em;
-}
-.scormpage .menu .notification {
-    background-color: white;
-    height: 50px;
-}
-.scormpage .menu .notification .message {
-    background-color: white;
-    height: 50px;
-    width: 180px;
-    border: none;
-}
-.scormpage .content {
-    /*float: left;
-    width: 60%;*/
-    margin-top: 0px;
-    padding-top: 0px;
-    padding-left: 180px;
-    background-color: white;
-}
-.iframe {
-    border: 0px solid black;
-    height: 100%;
-    width: 95%;
-    margin: 0px;
-    padding-right: 0px;
-    overflow: auto;
-    vertical-align: top;
-}
-.scormpage .footer {
-    clear: both;
-}
-#image_preview {
-    padding-left: 17px;
-}
-#msg_div_id {
-    padding-left: 17px;
-    padding-top: 4px;
-}
-
 #learning_path_breadcrumb_zone .breadcrumb{
     background: #ff7400; /* Old browsers */
     background: -moz-linear-gradient(top, #ff7400 0%, #df3a01 100%); /* FF3.6+ */
@@ -293,166 +45,4 @@ opacity: 0.7;
     border-radius: 10px;
     border: 1px solid  #b4cbff;
     margin-top: 10px;
-}
-#author_icon img{
-    background-color: #fff;
-    padding: 5px;
-    -webkit-border-radius: 10px;
-    -moz-border-radius: 10px;
-    border-radius: 10px;
-}
-#author_image .progresstext{
-    font-size: 20px;
-    color: #f86700;
-    font-weight: bold;
-}
-#learning_path_left_zone #header {
-  font-size: 18px;
-  margin-top: 10px;
-}
-#learning_path_left_zone .no-border{
-    background: none;
-    color: e342000;
-}
-.progress {
-  height: 18px;
-  margin-bottom: 18px;
-  overflow: hidden;
-  background-color: #f7f7f7;
-  background-image: -moz-linear-gradient(top, #ff7400, #df3a01);
-  background-image: -ms-linear-gradient(top, #ff7400, #df3a01);
-  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ff7400), to(#df3a01));
-  background-image: -webkit-linear-gradient(top, #ff7400, #df3a01);
-  background-image: -o-linear-gradient(top, #ff7400, #df3a01);
-  background-image: linear-gradient(top, #ff7400, #df3a01);
-  background-repeat: repeat-x;
-  -webkit-border-radius: 4px;
-     -moz-border-radius: 4px;
-          border-radius: 4px;
-  filter: progid:dximagetransform.microsoft.gradient(startColorstr='#ff7400', endColorstr='#df3a01', GradientType=0);
-  -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
-     -moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
-          box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
-}
-.progress-striped .bar {
-  background-color: #149BDF;
-  background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
-  background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
-    -webkit-animation: progress-bar-stripes 2s linear infinite;
-    animation: progress-bar-stripes 2s linear infinite;
-}
-
-/*STYLES PROCESS LESSION*/
-.inner_lp_toc .scorm_item a {
-    margin-right: 1px;
-    padding-bottom: 2px;
-    text-decoration: none;
-}
-
-.inner_lp_toc .scorm_item a.chapter_module {
-    font-weight: normal;
-    margin-right: 10px;
-}
-
-.scorm_item_1,
-.scorm_item_2 {
-    font-size: 16px;
-    margin-left: 0;
-    margin-right:10px;
-    text-decoration: none;
-}
-.scorm_item_1 {
-    border-bottom: 1px solid #CCCCCC;
-    color:#444;
-    background: none;
-    margin-right: 1px;
-    padding: 10px 0px 10px 0px;
-}
-.scorm_item_2 {
-    border-bottom: 1px solid #CCCCCC;
-    color: #444444;
-    margin-right: 1px;
-    padding: 10px 0px 10px 0px;
-    background-image:none;
-}
-.scorm_item_1.scorm_item_highlight.scorm_completed,
-.scorm_item_2.scorm_item_highlight.scorm_completed {
-    background-image: url("images/white_arrow.png") !important;
-    background-position: 270px center !important;
-    background-repeat: no-repeat;
-    color: white;
-}
-.scorm_item_1.scorm_item_normal.scorm_completed,
-.scorm_item_2.scorm_item_normal.scorm_completed {
-    background-image: url("images/blue_arrow.png")  !important;
-    background-position: 270px center !important;
-    background-repeat: no-repeat;
-}
-#learning_path_main #control {
-  background-image: none;
-  background-color: #d7eef4;
-  bottom: 0;
-  height: 34px;
-  margin-bottom: auto;
-  margin-left: auto;
-  margin-right: auto;
-  margin-top: auto;
-  padding-bottom: 8px;
-  padding-left: 0;
-  padding-right: 0;
-  padding-top: 8px;
-  position: absolute;
-  text-align: center;
-  width: 100%;
-  border-top:1px solid #00AAD4;
-}
-
-#author_name {
-  color: #666666;
-  float: left;
-  font-size: 13px;
-  margin-top: 2px;
-  text-align: center;
-  width: 100%;
-  padding-top: 10px;
-  padding-bottom: 5px;
-}
-.mejs-container{
-    background: none;
-    -webkit-border-radius: 5px;
-    -moz-border-radius: 5px;
-    border-radius: 5px;
-}
-.mejs-container .mejs-controls{
-    -webkit-border-radius: 5px;
-    -moz-border-radius: 5px;
-    border-radius: 5px;
-    background: #45484d; /* Old browsers */
-background: -moz-linear-gradient(top, #45484d 0%, #000000 100%); /* FF3.6+ */
-background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#45484d), color-stop(100%,#000000)); /* Chrome,Safari4+ */
-background: -webkit-linear-gradient(top, #45484d 0%,#000000 100%); /* Chrome10+,Safari5.1+ */
-background: -o-linear-gradient(top, #45484d 0%,#000000 100%); /* Opera 11.10+ */
-background: -ms-linear-gradient(top, #45484d 0%,#000000 100%); /* IE10+ */
-background: linear-gradient(to bottom, #45484d 0%,#000000 100%); /* W3C */
-filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#45484d', endColorstr='#000000',GradientType=0 ); /* IE6-9 */
-}
-.mejs-controls .mejs-time-rail .mejs-time-loaded{
-    background: #333;
-    background: rgba(50,50,50,0.8);
-    background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(rgba(30,30,30,0.8)), to(rgba(60,60,60,0.8)));
-    background: -webkit-linear-gradient(top, rgba(30,30,30,0.8), rgba(60,60,60,0.8)); 
-    background: -moz-linear-gradient(top, rgba(30,30,30,0.8), rgba(60,60,60,0.8));
-    background: -o-linear-gradient(top, rgba(30,30,30,0.8), rgba(60,60,60,0.8));
-    background: -ms-linear-gradient(top, rgba(30,30,30,0.8), rgba(60,60,60,0.8));
-    background: linear-gradient(rgba(30,30,30,0.8), rgba(60,60,60,0.8));
-}
-.mejs-controls .mejs-time-rail .mejs-time-current{
-    background: #a9e4f7; /* Old browsers */
-    background: -moz-linear-gradient(top, #a9e4f7 0%, #0fb4e7 100%); /* FF3.6+ */
-    background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#a9e4f7), color-stop(100%,#0fb4e7)); /* Chrome,Safari4+ */
-    background: -webkit-linear-gradient(top, #a9e4f7 0%,#0fb4e7 100%); /* Chrome10+,Safari5.1+ */
-    background: -o-linear-gradient(top, #a9e4f7 0%,#0fb4e7 100%); /* Opera 11.10+ */
-    background: -ms-linear-gradient(top, #a9e4f7 0%,#0fb4e7 100%); /* IE10+ */
-    background: linear-gradient(to bottom, #a9e4f7 0%,#0fb4e7 100%); /* W3C */
-    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#a9e4f7', endColorstr='#0fb4e7',GradientType=0 ); /* IE6-9 */
-}
+}

+ 0 - 411
main/css/chamilo_red/scorm.css

@@ -1,239 +1,3 @@
-/* copy of default_scorm.css */
-
-.inner_lp_toc {
-    overflow: auto;
-    background-color: white;
-    height: 210px;
-}
-
-.inner_lp_toc .scorm_item_1 a,
-.inner_lp_toc .scorm_item_2 a {
-    font-size: 13px;
-    margin-right: 1px;
-    padding-bottom: 2px;
-    text-decoration: none;
-    color: #2F3E46;
-}
-
-.inner_lp_toc .scorm_item_1 a.chapter_module,
-.inner_lp_toc .scorm_item_2 a.chapter_module {
-    font-weight: normal;
-    margin-right: 10px;
-}
-.inner_lp_toc .scorm_item_highlight {
-    font-weight:bold;
-    background-color: #cf0404;
-    background-image:none;
-    margin-right: 0px;
-    padding: 10px 0px 10px 0px;
-    text-decoration: none;
-}
-.inner_lp_toc .scorm_item_highlight a {
-    color:#fff;
-    margin-right: 1px;
-    text-decoration: none;
-}
-
-.inner_lp_toc .scorm_item_section {
-    border:1px solid #222;
-    background:#333;
-    font-weight:bold;
-    color:#fff;
-    text-shadow:0 -1px 1px #000;
-    background-image:-webkit-gradient(linear,left top,left bottom,from(#555),to(#333));
-    background-image:-webkit-linear-gradient(top,#555,#333);
-    background-image:-moz-linear-gradient(top,#555,#333);
-    background-image:-ms-linear-gradient(top,#555,#333);
-    background-image:-o-linear-gradient(top,#555,#333);
-    background-image:linear-gradient(top,#555,#333);
-    margin-right: 1px;
-    padding: 10px 0px 10px 0px;
-    text-decoration: none;
-}
-
-.inner_lp_toc .scorm_item_section .scorm_item:before
-{
-    content : url('../lp_section.png');  /* from main/newscorm/lp_controller.php file */
-    vertical-align: text-top;
-    margin-right : 5px;
-}
-
-.scorm_section_level_0 {
-    padding : 0 0 0 0;
-}
-
-.scorm_section_level_1 {
-    padding : 0 0.5em 0 2em;
-}
-
-.scorm_section_level_2 {
-    padding : 0 0.5em 0 4em;
-}
-
-.scorm_section_level_3 {
-    padding : 0 0.5em 0 6em;
-}
-
-.scorm_section_level_4 {
-    padding : 0 0.5em 0 8em;
-}
-
-.scorm_section_level_5 {
-    padding : 0 0.5em 0 10em;
-}
-
-.scorm_item_level_0 {
-    padding : 0 0 0 0;
-}
-
-.scorm_item_level_1 {
-    padding : 0 1.5em 0 1.5em;
-}
-
-.scorm_item_level_2 {
-    padding : 0 1.5em 0 3em;
-}
-.scorm_item_level_3 {
-    padding : 0 1.5em 0 4.5em;
-}
-
-.scorm_item_level_4 {
-    padding : 0 1.5em 0 6em;
-}
-
-.scorm_item_level_5 {
-    padding : 0 1.5em 0 7.5em;
-}
-
-.scorm_item.scorm_item_level_2 > a, .scorm_item.scorm_item_level_3 > a, .scorm_item.scorm_item_level_4 > a, .scorm_item.scorm_item_level_5 > a{
-    font-weight: normal;
-}
-/* end of copy of default_scorm.css */
-
-
-.scormpage {
-    height: 100%;
-}
-.scormpage .menu {
-    width: 180px;
-    float: left;
-    margin: 1px;
-    padding: 0px;
-    margin-top: 0px;
-    padding-top: 0px;
-}
-.lp_toc {
-    background-color: white;
-    height: 380px;
-    width: 99%;
-    border-right: 1px none;
-}
-
-.inner_lp_toc {
-    overflow: auto;
-    background-color: #D7EEF4;
-    height: 210px;
-    /*padding: 10px;*/   
-}
-.inner_lp_toc .scorm_item_section {
-    border:none;
-    background:#333;
-    font-weight:normal;
-    color:#fff;
-    text-shadow:none;
-}
-
-.inner_lp_toc .scorm_item {
-    font-size: 13px;
-    margin-left: 10px;
-    margin-right:10px;
-    text-decoration: none;
-    border-color: rgba(255, 255, 255, 0.3); 
-    
-}
-.inner_lp_toc .scorm_item.scorm_item_level_1{
-    background: url(../img/archive.png) no-repeat;
-}
-
-
-.inner_lp_toc .scorm_title {
-    font-weight: bold;
-    background:#ccc;
-    font-size: 14px;
-    color: #444;
-}
-.inner_lp_toc .scorm_title_text {
-    margin-left: 10px;
-}
-.inner_lp_toc .scorm_status_img {
-    margin:0px;
-    margin-left: -10px;
-    width:10px;
-}
-.lp_navigation {
-    overflow: auto;
-    background-color: white;
-    height: 44px;
-    width:180px;
-    padding-top: 4px;
-    padding-bottom:0px;
-    border: none;
-    margin-top: -18px;
-    border-top: 1px dotted black;
-    border-bottom: 1px dotted black;
-}
-.lp_navigation_elem {
-    padding-left: 15px;
-    padding-top: 0px;
-}
-/*.scormpage .menu */
-.lp_navigation_elem .progresstext {
-    margin-top: -20px;
-}
-/*.scormpage .menu */
-.lp_navigation_elem .buttons {
-    margin-left: 0px;
-    margin-right: 0em;
-    margin-top: 0.4em;
-}
-.scormpage .menu .notification {
-    background-color: white;
-    height: 50px;
-}
-.scormpage .menu .notification .message {
-    background-color: white;
-    height: 50px;
-    width: 180px;
-    border: none;
-}
-.scormpage .content {
-    /*float: left;
-    width: 60%;*/
-    margin-top: 0px;
-    padding-top: 0px;
-    padding-left: 180px;
-    background-color: white;
-}
-.iframe {
-    border: 0px solid black;
-    height: 100%;
-    width: 95%;
-    margin: 0px;
-    padding-right: 0px;
-    overflow: auto;
-    vertical-align: top;
-}
-.scormpage .footer {
-    clear: both;
-}
-#image_preview {
-    padding-left: 17px;
-}
-#msg_div_id {
-    padding-left: 17px;
-    padding-top: 4px;
-}
-
 #learning_path_breadcrumb_zone .breadcrumb{
     background: #ff3019; /* Old browsers */
     background: -moz-linear-gradient(top, #ff3019 0%, #cf0404 100%); /* FF3.6+ */
@@ -266,180 +30,5 @@
     padding-top: 15px;
     padding-bottom: 15px;
 }
-#learning_path_main #control {
-  opacity: 1;
-}
-.buttons a img:hover{
-opacity: 0.7;
-}
-#author_image{
-    background-color: #d7eef4;
-    -webkit-border-radius: 10px;
-    -moz-border-radius: 10px;
-    border-radius: 10px;
-    border: 1px solid  #b4cbff;
-    margin-top: 10px;
-}
-#author_icon img{
-    background-color: #fff;
-    padding: 5px;
-    -webkit-border-radius: 10px;
-    -moz-border-radius: 10px;
-    border-radius: 10px;
-}
-#author_image .progresstext{
-    font-size: 20px;
-    color: #cd0404;
-    font-weight: bold;
-}
-#learning_path_left_zone #header {
-  font-size: 18px;
-  margin-top: 10px;
-}
-#learning_path_left_zone .no-border{
-    background: none;
-    color: #cf0404;
-}
-.progress {
-  height: 18px;
-  margin-bottom: 18px;
-  overflow: hidden;
-  background-color: #f7f7f7;
-  background-image: -moz-linear-gradient(top, #f5f5f5, #f9f9f9);
-  background-image: -ms-linear-gradient(top, #f5f5f5, #f9f9f9);
-  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#f5f5f5), to(#f9f9f9));
-  background-image: -webkit-linear-gradient(top, #f5f5f5, #f9f9f9);
-  background-image: -o-linear-gradient(top, #f5f5f5, #f9f9f9);
-  background-image: linear-gradient(top, #f5f5f5, #f9f9f9);
-  background-repeat: repeat-x;
-  -webkit-border-radius: 4px;
-     -moz-border-radius: 4px;
-          border-radius: 4px;
-  filter: progid:dximagetransform.microsoft.gradient(startColorstr='#f5f5f5', endColorstr='#f9f9f9', GradientType=0);
-  -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
-     -moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
-          box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
-}
-.progress-striped .bar {
-  background-color: #149BDF;
-  background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
-  background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
-    -webkit-animation: progress-bar-stripes 2s linear infinite;
-    animation: progress-bar-stripes 2s linear infinite;
-}
-
-/*STYLES PROCESS LESSION*/
-.inner_lp_toc .scorm_item a {
-    margin-right: 1px;
-    padding-bottom: 2px;
-    text-decoration: none;
-}
-
-.inner_lp_toc .scorm_item a.chapter_module {
-    font-weight: normal;
-    margin-right: 10px;
-}
 
-.scorm_item_1,
-.scorm_item_2 {
-    font-size: 16px;
-    margin-left: 0;
-    margin-right:10px;
-    text-decoration: none;
-}
-.scorm_item_1 {
-    border-bottom: 1px solid #CCCCCC;
-    color:#444;
-    text-shadow:0 1px 1px #f6f6f6;
-    background: none;
-    margin-right: 1px;
-    padding: 10px 0px 10px 0px;
-}
-.scorm_item_2 {
-    border-bottom: 1px solid #CCCCCC;
-    color: #444444;
-    margin-right: 1px;
-    padding: 10px 0px 10px 0px;
-    background-image:none;
-}
-.scorm_item_1.scorm_item_highlight.scorm_completed,
-.scorm_item_2.scorm_item_highlight.scorm_completed {
-    background-image: url("images/white_arrow.png") !important;
-    background-position: 270px center !important;
-    background-repeat: no-repeat;
-    color: white;
-}
-.scorm_item_1.scorm_item_normal.scorm_completed,
-.scorm_item_2.scorm_item_normal.scorm_completed {
-    background-image: url("images/blue_arrow.png")  !important;
-    background-position: 270px center !important;
-    background-repeat: no-repeat;
-}
-#learning_path_main #control {
-  background-image: none;
-  background-color: #d7eef4;
-  bottom: 0;
-  height: 34px;
-  margin-bottom: auto;
-  margin-left: auto;
-  margin-right: auto;
-  margin-top: auto;
-  padding-bottom: 8px;
-  padding-left: 0;
-  padding-right: 0;
-  padding-top: 8px;
-  position: absolute;
-  text-align: center;
-  width: 100%;
-  border-top:1px solid #00AAD4;
-}
-
-#author_name {
-  color: #666666;
-  float: left;
-  font-size: 13px;
-  margin-top: 2px;
-  text-align: center;
-  width: 100%;
-  padding-top: 10px;
-  padding-bottom: 5px;
-}
-.mejs-container{
-    background: none;
-    -webkit-border-radius: 5px;
-    -moz-border-radius: 5px;
-    border-radius: 5px;
-}
-.mejs-container .mejs-controls{
-    -webkit-border-radius: 5px;
-    -moz-border-radius: 5px;
-    border-radius: 5px;
-    background: #45484d; /* Old browsers */
-background: -moz-linear-gradient(top, #45484d 0%, #000000 100%); /* FF3.6+ */
-background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#45484d), color-stop(100%,#000000)); /* Chrome,Safari4+ */
-background: -webkit-linear-gradient(top, #45484d 0%,#000000 100%); /* Chrome10+,Safari5.1+ */
-background: -o-linear-gradient(top, #45484d 0%,#000000 100%); /* Opera 11.10+ */
-background: -ms-linear-gradient(top, #45484d 0%,#000000 100%); /* IE10+ */
-background: linear-gradient(to bottom, #45484d 0%,#000000 100%); /* W3C */
-filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#45484d', endColorstr='#000000',GradientType=0 ); /* IE6-9 */
-}
-.mejs-controls .mejs-time-rail .mejs-time-loaded{
-    background: #333;
-    background: rgba(50,50,50,0.8);
-    background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(rgba(30,30,30,0.8)), to(rgba(60,60,60,0.8)));
-    background: -webkit-linear-gradient(top, rgba(30,30,30,0.8), rgba(60,60,60,0.8)); 
-    background: -moz-linear-gradient(top, rgba(30,30,30,0.8), rgba(60,60,60,0.8));
-    background: -o-linear-gradient(top, rgba(30,30,30,0.8), rgba(60,60,60,0.8));
-    background: -ms-linear-gradient(top, rgba(30,30,30,0.8), rgba(60,60,60,0.8));
-    background: linear-gradient(rgba(30,30,30,0.8), rgba(60,60,60,0.8));
-}
-.mejs-controls .mejs-time-rail .mejs-time-current{
-    background: #a9e4f7; /* Old browsers */
-    background: -moz-linear-gradient(top, #a9e4f7 0%, #0fb4e7 100%); /* FF3.6+ */
-    background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#a9e4f7), color-stop(100%,#0fb4e7)); /* Chrome,Safari4+ */
-    background: -webkit-linear-gradient(top, #a9e4f7 0%,#0fb4e7 100%); /* Chrome10+,Safari5.1+ */
-    background: -o-linear-gradient(top, #a9e4f7 0%,#0fb4e7 100%); /* Opera 11.10+ */
-    background: -ms-linear-gradient(top, #a9e4f7 0%,#0fb4e7 100%); /* IE10+ */
-    background: linear-gradient(to bottom, #a9e4f7 0%,#0fb4e7 100%); /* W3C */
-    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#a9e4f7', endColorstr='#0fb4e7',GradientType=0 ); /* IE6-9 */
 }

+ 2 - 381
main/css/chamilo_sport_red/scorm.css

@@ -1,241 +1,5 @@
 /* copy of default_scorm.css */
 
-.inner_lp_toc {
-    overflow: auto;
-    background-color: white;
-    height: 210px;
-}
-
-.inner_lp_toc .scorm_item_1 a,
-.inner_lp_toc .scorm_item_2 a {
-    font-size: 13px;
-    margin-right: 1px;
-    padding-bottom: 2px;
-    text-decoration: none;
-    color: #2F3E46;
-}
-
-.inner_lp_toc .scorm_item_1 a.chapter_module,
-.inner_lp_toc .scorm_item_2 a.chapter_module {
-    font-weight: normal;
-    margin-right: 10px;
-}
-.inner_lp_toc .scorm_item_highlight {
-    font-weight:bold;
-    border:1px solid #333;
-    background-color: #333;
-    background-image:none;
-    margin-right: 0px;
-    padding: 10px 0px 10px 0px;
-    text-decoration: none;
-}
-.inner_lp_toc .scorm_item_highlight a {
-    color:#fff;
-    margin-right: 1px;
-    text-decoration: none;
-}
-
-.inner_lp_toc .scorm_item_section {
-    border:1px solid #222;
-    background:#333;
-    font-weight:bold;
-    color:#fff;
-    text-shadow:0 -1px 1px #000;
-    background-image:-webkit-gradient(linear,left top,left bottom,from(#555),to(#333));
-    background-image:-webkit-linear-gradient(top,#555,#333);
-    background-image:-moz-linear-gradient(top,#555,#333);
-    background-image:-ms-linear-gradient(top,#555,#333);
-    background-image:-o-linear-gradient(top,#555,#333);
-    background-image:linear-gradient(top,#555,#333);
-    margin-right: 1px;
-    padding: 10px 0px 10px 0px;
-    text-decoration: none;
-}
-
-.inner_lp_toc .scorm_item_section .scorm_item:before
-{
-    content : url('../lp_section.png');  /* from main/newscorm/lp_controller.php file */
-    vertical-align: text-top;
-    margin-right : 5px;
-}
-
-.scorm_section_level_0 {
-    padding : 0 0 0 0;
-}
-
-.scorm_section_level_1 {
-    padding : 0 0.5em 0 2em;
-}
-
-.scorm_section_level_2 {
-    padding : 0 0.5em 0 4em;
-}
-
-.scorm_section_level_3 {
-    padding : 0 0.5em 0 6em;
-}
-
-.scorm_section_level_4 {
-    padding : 0 0.5em 0 8em;
-}
-
-.scorm_section_level_5 {
-    padding : 0 0.5em 0 10em;
-}
-
-.scorm_item_level_0 {
-    padding : 0 0 0 0;
-}
-
-.scorm_item_level_1 {
-    padding : 0 1.5em 0 1.5em;
-}
-
-.scorm_item_level_2 {
-    padding : 0 1.5em 0 3em;
-}
-.scorm_item_level_3 {
-    padding : 0 1.5em 0 4.5em;
-}
-
-.scorm_item_level_4 {
-    padding : 0 1.5em 0 6em;
-}
-
-.scorm_item_level_5 {
-    padding : 0 1.5em 0 7.5em;
-}
-
-.scorm_item.scorm_item_level_2 > a, .scorm_item.scorm_item_level_3 > a, .scorm_item.scorm_item_level_4 > a, .scorm_item.scorm_item_level_5 > a{
-    font-weight: normal;
-}
-/* end of copy of default_scorm.css */
-
-
-.scormpage {
-    height: 100%;
-}
-.scormpage .menu {
-    width: 180px;
-    float: left;
-    margin: 1px;
-    padding: 0px;
-    margin-top: 0px;
-    padding-top: 0px;
-}
-.lp_toc {
-    background-color: white;
-    height: 380px;
-    width: 99%;
-    border-right: 1px none;
-}
-
-.inner_lp_toc {
-    overflow: auto;
-    background-color: #f2f2ef;
-    height: 210px;
-    /*padding: 10px;*/   
-}
-
-.inner_lp_toc .scorm_item {
-    font-size: 13px;
-    margin-left: 10px;
-    margin-right:10px;
-    text-decoration: none;
-    border-color: rgba(255, 255, 255, 0.3); 
-    
-}
-.inner_lp_toc .scorm_item.scorm_item_level_1{
-    background: url(../img/archive.png) no-repeat;
-}
-
-
-.inner_lp_toc .scorm_title {
-    font-weight: bold;
-    background:#ccc;
-    font-size: 14px;
-    color: #444;
-}
-.inner_lp_toc .scorm_title_text {
-    margin-left: 10px;
-}
-.inner_lp_toc .scorm_status_img {
-    margin:0px;
-    margin-left: -10px;
-    width:10px;
-}
-.lp_navigation {
-    overflow: auto;
-    background-color: white;
-    height: 44px;
-    width:180px;
-    padding-top: 4px;
-    padding-bottom:0px;
-    border: none;
-    margin-top: -18px;
-    border-top: 1px dotted black;
-    border-bottom: 1px dotted black;
-}
-.lp_navigation_elem {
-    padding-left: 15px;
-    padding-top: 0px;
-}
-/*.scormpage .menu */
-.lp_navigation_elem .progresstext {
-    margin-top: -20px;
-}
-/*.scormpage .menu */
-.lp_navigation_elem .buttons {
-    margin-left: 0px;
-    margin-right: 0em;
-    margin-top: 0.4em;
-}
-.scormpage .menu .notification {
-    background-color: white;
-    height: 50px;
-}
-.scormpage .menu .notification .message {
-    background-color: white;
-    height: 50px;
-    width: 180px;
-    border: none;
-}
-.scormpage .content {
-    /*float: left;
-    width: 60%;*/
-    margin-top: 0px;
-    padding-top: 0px;
-    padding-left: 180px;
-    background-color: white;
-}
-.iframe {
-    border: 0px solid black;
-    height: 100%;
-    width: 95%;
-    margin: 0px;
-    padding-right: 0px;
-    overflow: auto;
-    vertical-align: top;
-}
-.scormpage .footer {
-    clear: both;
-}
-#image_preview {
-    padding-left: 17px;
-}
-#msg_div_id {
-    padding-left: 17px;
-    padding-top: 4px;
-}
-
-.breadcrumb .divider {
-    color: #ffcc00;
-    padding-bottom: 0;
-    padding-left: 5px;
-    padding-right: 5px;
-    padding-top: 0;
-}
-
 #learning_path_breadcrumb_zone .breadcrumb{
     background: #ff7400; /* Old browsers */
     background: url(images/bg-header.png) repeat-x 0 -32px;
@@ -268,34 +32,7 @@
 .buttons a img:hover{
 opacity: 0.7;
 }
-#author_image{
-    background-color: #f2f2ef;
-    -webkit-border-radius: 10px;
-    -moz-border-radius: 10px;
-    border-radius: 10px;
-    border: 1px solid  #ccc;
-    margin-top: 10px;
-}
-#author_icon img{
-    background-color: #fff;
-    padding: 5px;
-    -webkit-border-radius: 10px;
-    -moz-border-radius: 10px;
-    border-radius: 10px;
-}
-#author_image .progresstext{
-    font-size: 20px;
-    color: #980000;
-    font-weight: bold;
-}
-#learning_path_left_zone #header {
-  font-size: 18px;
-  margin-top: 10px;
-}
-#learning_path_left_zone .no-border{
-    background: none;
-    color: #980000;
-}
+
 .progress {
   height: 18px;
   margin-bottom: 18px;
@@ -322,120 +59,4 @@ opacity: 0.7;
   background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
     -webkit-animation: progress-bar-stripes 2s linear infinite;
     animation: progress-bar-stripes 2s linear infinite;
-}
-
-/*STYLES PROCESS LESSION*/
-.inner_lp_toc .scorm_item a {
-    margin-right: 1px;
-    padding-bottom: 2px;
-    text-decoration: none;
-}
-
-.inner_lp_toc .scorm_item a.chapter_module {
-    font-weight: normal;
-    margin-right: 10px;
-}
-
-.scorm_item_1,
-.scorm_item_2 {
-    font-size: 16px;
-    margin-left: 0;
-    margin-right:10px;
-    text-decoration: none;
-}
-.scorm_item_1 {
-    border-bottom: 1px solid #CCCCCC;
-    color:#444;
-    text-shadow:0 1px 1px #f6f6f6;
-    background: none;
-    margin-right: 1px;
-    padding: 10px 0px 10px 0px;
-}
-.scorm_item_2 {
-    border-bottom: 1px solid #CCCCCC;
-    color: #444444;
-    margin-right: 1px;
-    padding: 10px 0px 10px 0px;
-    background-image:none;
-}
-.scorm_item_1.scorm_item_highlight.scorm_completed,
-.scorm_item_2.scorm_item_highlight.scorm_completed {
-    background-image: url("images/white_arrow.png") !important;
-    background-position: 270px center !important;
-    background-repeat: no-repeat;
-    color: white;
-}
-.scorm_item_1.scorm_item_normal.scorm_completed,
-.scorm_item_2.scorm_item_normal.scorm_completed {
-    background-image: url("images/blue_arrow.png")  !important;
-    background-position: 270px center !important;
-    background-repeat: no-repeat;
-}
-#learning_path_main #control {
-  background-image: none;
-  background-color: #d7eef4;
-  bottom: 0;
-  height: 34px;
-  margin-bottom: auto;
-  margin-left: auto;
-  margin-right: auto;
-  margin-top: auto;
-  padding-bottom: 8px;
-  padding-left: 0;
-  padding-right: 0;
-  padding-top: 8px;
-  position: absolute;
-  text-align: center;
-  width: 100%;
-  border-top:1px solid #00AAD4;
-}
-
-#author_name {
-  color: #666666;
-  float: left;
-  font-size: 13px;
-  margin-top: 2px;
-  text-align: center;
-  width: 100%;
-  padding-top: 10px;
-  padding-bottom: 5px;
-}
-.mejs-container{
-    background: none;
-    -webkit-border-radius: 5px;
-    -moz-border-radius: 5px;
-    border-radius: 5px;
-}
-.mejs-container .mejs-controls{
-    -webkit-border-radius: 5px;
-    -moz-border-radius: 5px;
-    border-radius: 5px;
-    background: #45484d; /* Old browsers */
-background: -moz-linear-gradient(top, #45484d 0%, #000000 100%); /* FF3.6+ */
-background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#45484d), color-stop(100%,#000000)); /* Chrome,Safari4+ */
-background: -webkit-linear-gradient(top, #45484d 0%,#000000 100%); /* Chrome10+,Safari5.1+ */
-background: -o-linear-gradient(top, #45484d 0%,#000000 100%); /* Opera 11.10+ */
-background: -ms-linear-gradient(top, #45484d 0%,#000000 100%); /* IE10+ */
-background: linear-gradient(to bottom, #45484d 0%,#000000 100%); /* W3C */
-filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#45484d', endColorstr='#000000',GradientType=0 ); /* IE6-9 */
-}
-.mejs-controls .mejs-time-rail .mejs-time-loaded{
-    background: #333;
-    background: rgba(50,50,50,0.8);
-    background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(rgba(30,30,30,0.8)), to(rgba(60,60,60,0.8)));
-    background: -webkit-linear-gradient(top, rgba(30,30,30,0.8), rgba(60,60,60,0.8)); 
-    background: -moz-linear-gradient(top, rgba(30,30,30,0.8), rgba(60,60,60,0.8));
-    background: -o-linear-gradient(top, rgba(30,30,30,0.8), rgba(60,60,60,0.8));
-    background: -ms-linear-gradient(top, rgba(30,30,30,0.8), rgba(60,60,60,0.8));
-    background: linear-gradient(rgba(30,30,30,0.8), rgba(60,60,60,0.8));
-}
-.mejs-controls .mejs-time-rail .mejs-time-current{
-    background: #a9e4f7; /* Old browsers */
-    background: -moz-linear-gradient(top, #a9e4f7 0%, #0fb4e7 100%); /* FF3.6+ */
-    background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#a9e4f7), color-stop(100%,#0fb4e7)); /* Chrome,Safari4+ */
-    background: -webkit-linear-gradient(top, #a9e4f7 0%,#0fb4e7 100%); /* Chrome10+,Safari5.1+ */
-    background: -o-linear-gradient(top, #a9e4f7 0%,#0fb4e7 100%); /* Opera 11.10+ */
-    background: -ms-linear-gradient(top, #a9e4f7 0%,#0fb4e7 100%); /* IE10+ */
-    background: linear-gradient(to bottom, #a9e4f7 0%,#0fb4e7 100%); /* W3C */
-    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#a9e4f7', endColorstr='#0fb4e7',GradientType=0 ); /* IE6-9 */
-}
+}

+ 102 - 21
main/css/chat.css

@@ -19,8 +19,9 @@ body{
 }
 #clear-chat{
 	width:140px;
-    padding: 5px;
+    padding: 13px;
     font-size: 14px;
+    float:right;
 }
 #clear-chat img{
 	width: 20px;
@@ -28,8 +29,8 @@ body{
 	margin-right: 5px;
 }
 #clear-chat a{
-	color: #0088AA;
 	text-decoration: none;
+
 }
 #clear-chat a:hover{
 	opacity: 0.7;
@@ -41,14 +42,15 @@ body{
 	-moz-border-radius: 10px;
 	border-radius: 10px;
 }
+
 textarea {
-	width: 52%; 
+	width: 52%;
 	padding: 3%;
 	height: 100px;
 	float: left;
 	border: 0;
-	background-color: #ffffff; 
-	font-size: 0.75em;
+	background-color: #ffffff;
+
 	font-family: Helvetica, arial, sans-serif;
 	-webkit-border-radius: 10px;
 	-moz-border-radius: 10px;
@@ -67,7 +69,7 @@ textarea {
 	-moz-border-radius: 10px;
 	border-radius: 10px;
 	border:2px solid #fff;
-	box-shadow: 1px 1px 2px rgba(0,0,0,0.2); 
+	box-shadow: 1px 1px 2px rgba(0,0,0,0.2);
  }
 .message-student .content-message{
 	background-color: #F9F2E0;
@@ -90,8 +92,8 @@ textarea {
 	display: inline-block;
 	margin-left: -6px;
 	margin-top: 10px;
-	width: 0; 
-	height: 0; 
+	width: 0;
+	height: 0;
 	border-top: 0px solid transparent;
 	border-bottom: 15px solid transparent;
 	border-left: 15px solid #EBEFF3;
@@ -100,8 +102,8 @@ textarea {
 	display: inline-block;
 	margin-right: -6px;
 	margin-top: 10px;
-	width: 0; 
-	height: 0; 
+	width: 0;
+	height: 0;
 	border-top: 0px solid transparent;
 	border-bottom: 15px solid transparent;
 	border-right: 15px solid #F9F2E0;
@@ -120,7 +122,7 @@ textarea {
 	font-size: 13px;
 	padding: 15px;
 	vertical-align: top;
-	width: 320px;
+	width: 360px;
 }
 .message-teacher .message-date{
 	color: #666;
@@ -206,14 +208,69 @@ li.list-group-item:hover a{
 	float: left;
 	margin-right: 5px;
 }
-#user-online-scroll .viewport { width: 260px; height: 450px; overflow: hidden; position: relative; }
-#user-online-scroll .overview { list-style: none; position: relative; left: 0; top: 0; padding: 0; margin: 0; }
-#user-online-scroll .scrollbar{ background: transparent url(bg-scrollbar-track-y.png) no-repeat 0 0; position: relative; background-position: 0 0; float: right; width: 15px; }
-#user-online-scroll .track { background: transparent url(bg-scrollbar-trackend-y.png) no-repeat 0 100%; height: 100%; width:13px; position: relative; padding: 0 1px; }
-#user-online-scroll .thumb { background: transparent url(bg-scrollbar-thumb-y.png) no-repeat 50% 100%; height: 20px; width: 25px; cursor: pointer; overflow: hidden; position: absolute; top: 0; left: -5px; }
-#user-online-scroll .thumb .end { background: transparent url(bg-scrollbar-thumb-y.png) no-repeat 50% 0; overflow: hidden; height: 5px; width: 25px; }
-#user-online-scroll .disable { display: none; }
-.noSelect { user-select: none; -o-user-select: none; -moz-user-select: none; -khtml-user-select: none; -webkit-user-select: none; }
+
+#user-online-scroll .viewport {
+    width: 260px;
+    height: 450px;
+    overflow: hidden;
+    position: relative;
+    padding-left: 8px;
+}
+
+#user-online-scroll .overview {
+    list-style: none;
+    position: relative;
+    left: 0;
+    top: 0;
+    padding: 0;
+    margin: 0;
+}
+
+#user-online-scroll .scrollbar {
+    background: transparent url(bg-scrollbar-track-y.png) no-repeat 0 0;
+    position: relative;
+    background-position: 0 0;
+    float: right;
+    width: 15px;
+}
+
+#user-online-scroll .track {
+    background: transparent url(bg-scrollbar-trackend-y.png) no-repeat 0 100%;
+    height: 100%;
+    width: 13px;
+    position: relative;
+    padding: 0 1px;
+}
+
+#user-online-scroll .thumb {
+    background: transparent url(bg-scrollbar-thumb-y.png) no-repeat 50% 100%;
+    height: 20px;
+    width: 25px;
+    cursor: pointer;
+    overflow: hidden;
+    position: absolute;
+    top: 0;
+    left: -5px;
+}
+
+#user-online-scroll .thumb .end {
+    background: transparent url(bg-scrollbar-thumb-y.png) no-repeat 50% 0;
+    overflow: hidden;
+    height: 5px;
+    width: 25px;
+}
+
+#user-online-scroll .disable {
+    display: none;
+}
+
+.noSelect {
+    user-select: none;
+    -o-user-select: none;
+    -moz-user-select: none;
+    -khtml-user-select: none;
+    -webkit-user-select: none;
+}
 
 .btn-send {
 	background: #87e0fd; /* Old browsers */
@@ -253,10 +310,34 @@ li.list-group-item:hover a{
   	border: none;
 }
 .message-form-chat{
-	margin-top: 20px;
-	padding: 10px;
+	margin-top: 10px;
+	padding: 5px;
 	-webkit-border-radius: 10px;
 	-moz-border-radius: 10px;
 	border-radius: 10px;
 	background: #EEEEEE;
 }
+
+.emoji-menu {
+    margin-left: 0px;
+    width:468px;
+    left: 11px !important;
+}
+
+.emoji-wysiwyg-editor-preview,
+.emoji-wysiwyg-editor {
+    width: 454px;
+    padding: 3%;
+    height: 100px;
+    float: left;
+    border: 0;
+    background-color: #ffffff;
+
+    font-family: Helvetica, arial, sans-serif;
+    -webkit-border-radius: 10px;
+    -moz-border-radius: 10px;
+    border-radius: 10px;
+    border: 1px solid #EEEEEE;
+    color: #666;
+    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35) inset;
+}

+ 0 - 25
main/css/cool_blue/default.css

@@ -140,32 +140,7 @@ a:active {
     color: #FFFFFF;
 
 }
-.btn{
-    background: #ffffff; /* Old browsers */
-    background: -moz-linear-gradient(top, #ffffff 0%, #e5e5e5 100%); /* FF3.6+ */
-    background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ffffff), color-stop(100%,#e5e5e5)); /* Chrome,Safari4+ */
-    background: -webkit-linear-gradient(top, #ffffff 0%,#e5e5e5 100%); /* Chrome10+,Safari5.1+ */
-    background: -o-linear-gradient(top, #ffffff 0%,#e5e5e5 100%); /* Opera 11.10+ */
-    background: -ms-linear-gradient(top, #ffffff 0%,#e5e5e5 100%); /* IE10+ */
-    background: linear-gradient(to bottom, #ffffff 0%,#e5e5e5 100%); /* W3C */
-    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#e5e5e5',GradientType=0 ); /* IE6-9 */
-    border-radius: 4px;
-    border:1px solid rgba(0, 0, 0, 0.15);
-    text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.17);
-    padding: 6px 25px;
 
-}
-.btn:hover{
-    background: #f7f7f7; /* Old browsers */
-    background: -moz-linear-gradient(top, #f7f7f7 0%, #e5e5e5 100%); /* FF3.6+ */
-    background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#f7f7f7), color-stop(100%,#e5e5e5)); /* Chrome,Safari4+ */
-    background: -webkit-linear-gradient(top, #f7f7f7 0%,#e5e5e5 100%); /* Chrome10+,Safari5.1+ */
-    background: -o-linear-gradient(top, #f7f7f7 0%,#e5e5e5 100%); /* Opera 11.10+ */
-    background: -ms-linear-gradient(top, #f7f7f7 0%,#e5e5e5 100%); /* IE10+ */
-    background: linear-gradient(to bottom, #f7f7f7 0%,#e5e5e5 100%); /* W3C */
-    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f7f7f7', endColorstr='#e5e5e5',GradientType=0 ); /* IE6-9 */
-    text-decoration: none;
-}
 .btn-primary{
     background: #ff7b00; /* Old browsers */
     background: -moz-linear-gradient(top, #ff7b00 0%, #fd6600 100%); /* FF3.6+ */

+ 1 - 417
main/css/cool_blue/scorm.css

@@ -1,232 +1,4 @@
 /* copy of default_scorm.css */
-
-.inner_lp_toc {
-    overflow: auto;
-    background-color: white;
-    height: 210px;
-}
-
-.inner_lp_toc .scorm_item_1 a,
-.inner_lp_toc .scorm_item_2 a {
-    font-size: 13px;
-    margin-right: 1px;
-    padding-bottom: 2px;
-    text-decoration: none;
-    color: #2F3E46;
-}
-
-.inner_lp_toc .scorm_item_1 a.chapter_module,
-.inner_lp_toc .scorm_item_2 a.chapter_module {
-    font-weight: normal;
-    margin-right: 10px;
-}
-.inner_lp_toc .scorm_item_highlight {
-    font-weight:bold;
-    background-color: #04698E;
-    background-image:none;
-    margin-right: 0px;
-    padding: 10px 0px 10px 0px;
-    text-decoration: none;
-}
-.inner_lp_toc .scorm_item_highlight a {
-    color:#fff;
-    margin-right: 1px;
-    text-decoration: none;
-}
-
-.inner_lp_toc .scorm_item_section {
-    border:1px solid #222;
-    background:#333;
-    font-weight:bold;
-    color:#fff;
-    text-shadow:0 -1px 1px #000;
-    background-image:-webkit-gradient(linear,left top,left bottom,from(#555),to(#333));
-    background-image:-webkit-linear-gradient(top,#555,#333);
-    background-image:-moz-linear-gradient(top,#555,#333);
-    background-image:-ms-linear-gradient(top,#555,#333);
-    background-image:-o-linear-gradient(top,#555,#333);
-    background-image:linear-gradient(top,#555,#333);
-    margin-right: 1px;
-    padding: 10px 0px 10px 0px;
-    text-decoration: none;
-}
-
-.inner_lp_toc .scorm_item_section .scorm_item:before
-{
-    content : url('../lp_section.png');  /* from main/newscorm/lp_controller.php file */
-    vertical-align: text-top;
-    margin-right : 5px;
-}
-
-.scorm_section_level_0 {
-    padding : 0 0 0 0;
-}
-
-.scorm_section_level_1 {
-    padding : 0 0.5em 0 2em;
-}
-
-.scorm_section_level_2 {
-    padding : 0 0.5em 0 4em;
-}
-
-.scorm_section_level_3 {
-    padding : 0 0.5em 0 6em;
-}
-
-.scorm_section_level_4 {
-    padding : 0 0.5em 0 8em;
-}
-
-.scorm_section_level_5 {
-    padding : 0 0.5em 0 10em;
-}
-
-.scorm_item_level_0 {
-    padding : 0 0 0 0;
-}
-
-.scorm_item_level_1 {
-    padding : 0 1.5em 0 1.5em;
-}
-
-.scorm_item_level_2 {
-    padding : 0 1.5em 0 3em;
-}
-.scorm_item_level_3 {
-    padding : 0 1.5em 0 4.5em;
-}
-
-.scorm_item_level_4 {
-    padding : 0 1.5em 0 6em;
-}
-
-.scorm_item_level_5 {
-    padding : 0 1.5em 0 7.5em;
-}
-
-.scorm_item.scorm_item_level_2 > a, .scorm_item.scorm_item_level_3 > a, .scorm_item.scorm_item_level_4 > a, .scorm_item.scorm_item_level_5 > a{
-    font-weight: normal;
-}
-/* end of copy of default_scorm.css */
-
-
-.scormpage {
-    height: 100%;
-}
-.scormpage .menu {
-    width: 180px;
-    float: left;
-    margin: 1px;
-    padding: 0px;
-    margin-top: 0px;
-    padding-top: 0px;
-}
-.lp_toc {
-    background-color: white;
-    height: 380px;
-    width: 99%;
-    border-right: 1px none;
-}
-
-.inner_lp_toc {
-    overflow: auto;
-    background-color: #d7eef4;
-    height: 210px;
-    /*padding: 10px;*/   
-}
-
-.inner_lp_toc .scorm_item {
-    font-size: 13px;
-    margin-left: 10px;
-    margin-right:10px;
-    text-decoration: none;
-    border-color: rgba(255, 255, 255, 0.3); 
-    
-}
-.inner_lp_toc .scorm_item.scorm_item_level_1{
-    background: url(../img/archive.png) no-repeat;
-}
-
-
-.inner_lp_toc .scorm_title {
-    font-weight: bold;
-    background:#ccc;
-    font-size: 14px;
-    color: #444;
-}
-.inner_lp_toc .scorm_title_text {
-    margin-left: 10px;
-}
-.inner_lp_toc .scorm_status_img {
-    margin:0px;
-    margin-left: -10px;
-    width:10px;
-}
-.lp_navigation {
-    overflow: auto;
-    background-color: white;
-    height: 44px;
-    width:180px;
-    padding-top: 4px;
-    padding-bottom:0px;
-    border: none;
-    margin-top: -18px;
-    border-top: 1px dotted black;
-    border-bottom: 1px dotted black;
-}
-.lp_navigation_elem {
-    padding-left: 15px;
-    padding-top: 0px;
-}
-/*.scormpage .menu */
-.lp_navigation_elem .progresstext {
-    margin-top: -20px;
-}
-/*.scormpage .menu */
-.lp_navigation_elem .buttons {
-    margin-left: 0px;
-    margin-right: 0em;
-    margin-top: 0.4em;
-}
-.scormpage .menu .notification {
-    background-color: white;
-    height: 50px;
-}
-.scormpage .menu .notification .message {
-    background-color: white;
-    height: 50px;
-    width: 180px;
-    border: none;
-}
-.scormpage .content {
-    /*float: left;
-    width: 60%;*/
-    margin-top: 0px;
-    padding-top: 0px;
-    padding-left: 180px;
-    background-color: white;
-}
-.iframe {
-    border: 0px solid black;
-    height: 100%;
-    width: 95%;
-    margin: 0px;
-    padding-right: 0px;
-    overflow: auto;
-    vertical-align: top;
-}
-.scormpage .footer {
-    clear: both;
-}
-#image_preview {
-    padding-left: 17px;
-}
-#msg_div_id {
-    padding-left: 17px;
-    padding-top: 4px;
-}
-
 #learning_path_breadcrumb_zone .breadcrumb{
     background: rgb(4,105,142); /* Old browsers */
     color: #fff;
@@ -242,192 +14,4 @@
 #learning_path_breadcrumb_zone .breadcrumb a:hover{
     text-decoration: none;
     opacity: 0.8;
-}
-#scorm_title {
-    font-weight: bold;
-    background:none;
-    font-size: 20px;
-    background-image: none;
-    color: #044a7a;
-    padding-top: 15px;
-    padding-bottom: 15px;
-}
-#learning_path_main #control {
-  opacity: 1;
-}
-.buttons a img:hover{
-opacity: 0.7;
-}
-#author_image{
-    background-color: #044878;
-    -webkit-border-radius: 10px;
-    -moz-border-radius: 10px;
-    border-radius: 10px;
-    border: 1px solid  #00aad4;
-    margin-top: 10px;
-}
-#author_icon img{
-    background-color: #fff;
-    padding: 5px;
-    -webkit-border-radius: 10px;
-    -moz-border-radius: 10px;
-    border-radius: 10px;
-}
-#author_image .progresstext{
-    font-size: 20px;
-    color: #fff;
-    font-weight: bold;
-}
-#learning_path_left_zone #header {
-  font-size: 18px;
-  margin-top: 10px;
-}
-#learning_path_left_zone .no-border{
-    background: none;
-    color: #044a7a;
-}
-.progress {
-  height: 18px;
-  margin-bottom: 18px;
-  overflow: hidden;
-  background-color: #f7f7f7;
-  background-image: -moz-linear-gradient(top, #f5f5f5, #f9f9f9);
-  background-image: -ms-linear-gradient(top, #f5f5f5, #f9f9f9);
-  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#f5f5f5), to(#f9f9f9));
-  background-image: -webkit-linear-gradient(top, #f5f5f5, #f9f9f9);
-  background-image: -o-linear-gradient(top, #f5f5f5, #f9f9f9);
-  background-image: linear-gradient(top, #f5f5f5, #f9f9f9);
-  background-repeat: repeat-x;
-  -webkit-border-radius: 4px;
-     -moz-border-radius: 4px;
-          border-radius: 4px;
-  filter: progid:dximagetransform.microsoft.gradient(startColorstr='#f5f5f5', endColorstr='#f9f9f9', GradientType=0);
-  -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
-     -moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
-          box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
-}
-.progress-striped .bar {
-  background-color: #149bdf;
-  background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
-  background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
-    -webkit-animation: progress-bar-stripes 2s linear infinite;
-    animation: progress-bar-stripes 2s linear infinite;
-}
-
-/*STYLES PROCESS LESSION*/
-.inner_lp_toc .scorm_item a {
-    margin-right: 1px;
-    padding-bottom: 2px;
-    text-decoration: none;
-    text-shadow: none;
-}
-
-.inner_lp_toc .scorm_item a.chapter_module {
-    font-weight: normal;
-    margin-right: 10px;
-}
-
-.scorm_item_1,
-.scorm_item_2 {
-    font-size: 16px;
-    margin-left: 0;
-    margin-right:10px;
-    text-decoration: none;
-}
-.scorm_item_1 {
-    border-bottom: 1px solid #CCCCCC;
-    color:#444;
-    text-shadow:0 1px 1px #f6f6f6;
-    background: none;
-    margin-right: 1px;
-    padding: 10px 0px 10px 0px;
-}
-.scorm_item_2 {
-    border-bottom: 1px solid #CCCCCC;
-    color: #444444;
-    text-shadow: 0 1px 1px #F6F6F6;
-    margin-right: 1px;
-    padding: 10px 0px 10px 0px;
-    background-image:none;
-}
-.scorm_item_1.scorm_item_highlight.scorm_completed,
-.scorm_item_2.scorm_item_highlight.scorm_completed {
-    background-image: url("images/white_arrow.png") !important;
-    background-position: 270px center !important;
-    background-repeat: no-repeat;
-    color: white;
-}
-.scorm_item_1.scorm_item_normal.scorm_completed,
-.scorm_item_2.scorm_item_normal.scorm_completed {
-    background-image: url("images/blue_arrow.png")  !important;
-    background-position: 270px center !important;
-    background-repeat: no-repeat;
-}
-#learning_path_main #control {
-  background-image: none;
-  background-color: #d7eef4;
-  bottom: 0;
-  height: 34px;
-  margin-bottom: auto;
-  margin-left: auto;
-  margin-right: auto;
-  margin-top: auto;
-  padding-bottom: 8px;
-  padding-left: 0;
-  padding-right: 0;
-  padding-top: 8px;
-  position: absolute;
-  text-align: center;
-  width: 100%;
-  border-top:1px solid #00AAD4;
-}
-
-#author_name {
-  color: #666666;
-  float: left;
-  font-size: 13px;
-  margin-top: 2px;
-  text-align: center;
-  width: 100%;
-  padding-top: 10px;
-  padding-bottom: 5px;
-}
-.mejs-container{
-    background: none;
-    -webkit-border-radius: 5px;
-    -moz-border-radius: 5px;
-    border-radius: 5px;
-}
-.mejs-container .mejs-controls{
-    -webkit-border-radius: 5px;
-    -moz-border-radius: 5px;
-    border-radius: 5px;
-    background: #45484d; /* Old browsers */
-background: -moz-linear-gradient(top, #45484d 0%, #000000 100%); /* FF3.6+ */
-background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#45484d), color-stop(100%,#000000)); /* Chrome,Safari4+ */
-background: -webkit-linear-gradient(top, #45484d 0%,#000000 100%); /* Chrome10+,Safari5.1+ */
-background: -o-linear-gradient(top, #45484d 0%,#000000 100%); /* Opera 11.10+ */
-background: -ms-linear-gradient(top, #45484d 0%,#000000 100%); /* IE10+ */
-background: linear-gradient(to bottom, #45484d 0%,#000000 100%); /* W3C */
-filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#45484d', endColorstr='#000000',GradientType=0 ); /* IE6-9 */
-}
-.mejs-controls .mejs-time-rail .mejs-time-loaded{
-    background: #333;
-    background: rgba(50,50,50,0.8);
-    background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(rgba(30,30,30,0.8)), to(rgba(60,60,60,0.8)));
-    background: -webkit-linear-gradient(top, rgba(30,30,30,0.8), rgba(60,60,60,0.8)); 
-    background: -moz-linear-gradient(top, rgba(30,30,30,0.8), rgba(60,60,60,0.8));
-    background: -o-linear-gradient(top, rgba(30,30,30,0.8), rgba(60,60,60,0.8));
-    background: -ms-linear-gradient(top, rgba(30,30,30,0.8), rgba(60,60,60,0.8));
-    background: linear-gradient(rgba(30,30,30,0.8), rgba(60,60,60,0.8));
-}
-.mejs-controls .mejs-time-rail .mejs-time-current{
-    background: #a9e4f7; /* Old browsers */
-    background: -moz-linear-gradient(top, #a9e4f7 0%, #0fb4e7 100%); /* FF3.6+ */
-    background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#a9e4f7), color-stop(100%,#0fb4e7)); /* Chrome,Safari4+ */
-    background: -webkit-linear-gradient(top, #a9e4f7 0%,#0fb4e7 100%); /* Chrome10+,Safari5.1+ */
-    background: -o-linear-gradient(top, #a9e4f7 0%,#0fb4e7 100%); /* Opera 11.10+ */
-    background: -ms-linear-gradient(top, #a9e4f7 0%,#0fb4e7 100%); /* IE10+ */
-    background: linear-gradient(to bottom, #a9e4f7 0%,#0fb4e7 100%); /* W3C */
-    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#a9e4f7', endColorstr='#0fb4e7',GradientType=0 ); /* IE6-9 */
-}
+}

+ 3 - 427
main/css/corporate/scorm.css

@@ -1,250 +1,4 @@
 /* copy of default_scorm.css */
-
-.inner_lp_toc {
-    overflow: auto;
-    background-color: #d7eef4;
-    height: 210px;
-}
-
-.inner_lp_toc .scorm_item_1 a,
-.inner_lp_toc .scorm_item_2 a {
-    font-size: 13px;
-    margin-right: 1px;
-    padding-bottom: 2px;
-    text-decoration: none;
-    color: #2F3E46;
-}
-
-.inner_lp_toc .scorm_item_1 a.chapter_module,
-.inner_lp_toc .scorm_item_2 a.chapter_module {
-    font-weight: normal;
-    margin-right: 10px;
-}
-.inner_lp_toc .scorm_item_highlight {
-    border:1px solid #fe9a2e;
-    background-color: #fe9a2e;
-    background-image:none;
-    margin-right: 0px;
-    padding: 10px 0px 10px 0px;
-    text-decoration: none;
-}
-.inner_lp_toc .scorm_item_highlight a {
-    color:#fff;
-    margin-right: 1px;
-    text-decoration: none;
-}
-
-.inner_lp_toc .scorm_item_section {
-    border:1px solid #222;
-    background:#333;
-    font-weight:bold;
-    color:#fff;
-    text-shadow:0 -1px 1px #000;
-    background-image:-webkit-gradient(linear,left top,left bottom,from(#555),to(#333));
-    background-image:-webkit-linear-gradient(top,#555,#333);
-    background-image:-moz-linear-gradient(top,#555,#333);
-    background-image:-ms-linear-gradient(top,#555,#333);
-    background-image:-o-linear-gradient(top,#555,#333);
-    background-image:linear-gradient(top,#555,#333);
-    margin-right: 1px;
-    padding: 10px 0px 10px 0px;
-    text-decoration: none;
-}
-
-.inner_lp_toc .scorm_item_section .scorm_item:before
-{
-    content : url('../lp_section.png');  /* from main/newscorm/lp_controller.php file */
-    vertical-align: text-top;
-    margin-right : 5px;
-}
-
-.scorm_section_level_0 {
-    padding : 0 0 0 0;
-}
-
-.scorm_section_level_1 {
-    padding : 0 0.5em 0 2em;
-}
-
-.scorm_section_level_2 {
-    padding : 0 0.5em 0 4em;
-}
-
-.scorm_section_level_3 {
-    padding : 0 0.5em 0 6em;
-}
-
-.scorm_section_level_4 {
-    padding : 0 0.5em 0 8em;
-}
-
-.scorm_section_level_5 {
-    padding : 0 0.5em 0 10em;
-}
-
-.scorm_item_level_0 {
-    padding : 0 0 0 0;
-}
-
-.scorm_item_level_1 {
-    padding : 0 1.5em 0 1.5em;
-}
-
-.scorm_item_level_2 {
-    padding : 0 1.5em 0 3em;
-}
-.scorm_item_level_3 {
-    padding : 0 1.5em 0 4.5em;
-}
-
-.scorm_item_level_4 {
-    padding : 0 1.5em 0 6em;
-}
-
-.scorm_item_level_5 {
-    padding : 0 1.5em 0 7.5em;
-}
-
-.scorm_item.scorm_item_level_2 > a, .scorm_item.scorm_item_level_3 > a, .scorm_item.scorm_item_level_4 > a, .scorm_item.scorm_item_level_5 > a{
-    font-weight: normal;
-}
-/* end of copy of default_scorm.css */
-
-
-.scormpage {
-    height: 100%;
-}
-.scormpage .menu {
-    width: 180px;
-    float: left;
-    margin: 1px;
-    padding: 0px;
-    margin-top: 0px;
-    padding-top: 0px;
-}
-.lp_toc {
-    background-color: white;
-    height: 380px;
-    width: 99%;
-    border-right: 1px none;
-}
-
-.inner_lp_toc {
-    overflow: auto;
-    background-color: #D7EEF4;
-    height: 210px;
-    /*padding: 10px;*/   
-}
-.inner_lp_toc .scorm_item_section {
-    border:none;
-    background:#333;
-    font-weight:normal;
-    color:#fff;
-    text-shadow:none;
-    background: #3bafba; /* Old browsers */
-    background: -moz-linear-gradient(top, #3bafba 0%, #00aaba 100%); /* FF3.6+ */
-    background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#3bafba), color-stop(100%,#00aaba)); /* Chrome,Safari4+ */
-    background: -webkit-linear-gradient(top, #3bafba 0%,#00aaba 100%); /* Chrome10+,Safari5.1+ */
-    background: -o-linear-gradient(top, #3bafba 0%,#00aaba 100%); /* Opera 11.10+ */
-    background: -ms-linear-gradient(top, #3bafba 0%,#00aaba 100%); /* IE10+ */
-    background: linear-gradient(to bottom, #3bafba 0%,#00aaba 100%); /* W3C */
-    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#3bafba', endColorstr='#00aaba',GradientType=0 ); /* IE6-9 */
-    margin-right: 1px;
-    padding: 10px 0px 10px 0px;
-    text-decoration: none;
-}
-
-.inner_lp_toc .scorm_item {
-    font-size: 13px;
-    margin-left: 10px;
-    margin-right:10px;
-    text-decoration: none;
-    border-color: rgba(255, 255, 255, 0.3); 
-    
-}
-.inner_lp_toc .scorm_item.scorm_item_level_1{
-    background: url(../img/archive.png) no-repeat;
-}
-
-
-.inner_lp_toc .scorm_title {
-    font-weight: bold;
-    background:#ccc;
-    font-size: 14px;
-    color: #444;
-}
-.inner_lp_toc .scorm_title_text {
-    margin-left: 10px;
-}
-.inner_lp_toc .scorm_status_img {
-    margin:0px;
-    margin-left: -10px;
-    width:10px;
-}
-.lp_navigation {
-    overflow: auto;
-    background-color: white;
-    height: 44px;
-    width:180px;
-    padding-top: 4px;
-    padding-bottom:0px;
-    border: none;
-    margin-top: -18px;
-    border-top: 1px dotted black;
-    border-bottom: 1px dotted black;
-}
-.lp_navigation_elem {
-    padding-left: 15px;
-    padding-top: 0px;
-}
-/*.scormpage .menu */
-.lp_navigation_elem .progresstext {
-    margin-top: -20px;
-}
-/*.scormpage .menu */
-.lp_navigation_elem .buttons {
-    margin-left: 0px;
-    margin-right: 0em;
-    margin-top: 0.4em;
-}
-.scormpage .menu .notification {
-    background-color: white;
-    height: 50px;
-}
-.scormpage .menu .notification .message {
-    background-color: white;
-    height: 50px;
-    width: 180px;
-    border: none;
-}
-.scormpage .content {
-    /*float: left;
-    width: 60%;*/
-    margin-top: 0px;
-    padding-top: 0px;
-    padding-left: 180px;
-    background-color: white;
-}
-.iframe {
-    border: 0px solid black;
-    height: 100%;
-    width: 95%;
-    margin: 0px;
-    padding-right: 0px;
-    overflow: auto;
-    vertical-align: top;
-}
-.scormpage .footer {
-    clear: both;
-}
-#image_preview {
-    padding-left: 17px;
-}
-#msg_div_id {
-    padding-left: 17px;
-    padding-top: 4px;
-}
-
 #learning_path_breadcrumb_zone .breadcrumb{
     background: #3bafba; /* Old browsers */
     background: -moz-linear-gradient(top, #3bafba 0%, #00aaba 100%); /* FF3.6+ */
@@ -274,184 +28,6 @@
     font-size: 20px;
     background-image: none;
     color: #505457;
-    padding-top: 15px;
-    padding-bottom: 15px;
-}
-#learning_path_main #control {
-  opacity: 1;
-}
-.buttons a img:hover{
-opacity: 0.7;
-}
-#author_image{
-    background-color: #e1e1e0;
-    -webkit-border-radius: 10px;
-    -moz-border-radius: 10px;
-    border-radius: 10px;
-    border: 1px solid  #ccc;
-    margin-top: 10px;
-}
-#author_icon img{
-    background-color: #fff;
-    padding: 5px;
-    -webkit-border-radius: 10px;
-    -moz-border-radius: 10px;
-    border-radius: 10px;
-}
-#author_image .progresstext{
-    font-size: 20px;
-    color: #505457;
-    font-weight: bold;
-}
-#learning_path_left_zone #header {
-  font-size: 18px;
-  margin-top: 10px;
-}
-#learning_path_left_zone .no-border{
-    background: none;
-    color: #505457;
-}
-.progress {
-  height: 18px;
-  margin-bottom: 18px;
-  overflow: hidden;
-  background-color: #f7f7f7;
-  background-image: -moz-linear-gradient(top, #f5f5f5, #f9f9f9);
-  background-image: -ms-linear-gradient(top, #f5f5f5, #f9f9f9);
-  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#f5f5f5), to(#f9f9f9));
-  background-image: -webkit-linear-gradient(top, #f5f5f5, #f9f9f9);
-  background-image: -o-linear-gradient(top, #f5f5f5, #f9f9f9);
-  background-image: linear-gradient(top, #f5f5f5, #f9f9f9);
-  background-repeat: repeat-x;
-  -webkit-border-radius: 4px;
-     -moz-border-radius: 4px;
-          border-radius: 4px;
-  filter: progid:dximagetransform.microsoft.gradient(startColorstr='#f5f5f5', endColorstr='#f9f9f9', GradientType=0);
-  -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
-     -moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
-          box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
-}
-.progress-striped .bar {
-  background-color: #149BDF;
-  background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
-  background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
-    -webkit-animation: progress-bar-stripes 2s linear infinite;
-    animation: progress-bar-stripes 2s linear infinite;
-}
-
-/*STYLES PROCESS LESSION*/
-.inner_lp_toc .scorm_item a {
-    margin-right: 1px;
-    padding-bottom: 2px;
-    text-decoration: none;
-    color: #2F3E46;
-}
-
-.inner_lp_toc .scorm_item a.chapter_module {
-    font-weight: normal;
-    margin-right: 10px;
-}
-
-.scorm_item_1,
-.scorm_item_2 {
-    font-size: 16px;
-    margin-left: 0;
-    margin-right:10px;
-    text-decoration: none;
-}
-.scorm_item_1 {
-    border-bottom: 1px solid #CCCCCC;
-    color:#444;
-    text-shadow:0 1px 1px #f6f6f6;
-    background: none;
-    margin-right: 1px;
-    padding: 10px 0px 10px 0px;
-}
-.scorm_item_2 {
-    border-bottom: 1px solid #CCCCCC;
-    color: #444444;
-    margin-right: 1px;
-    padding: 10px 0px 10px 0px;
-    background-image:none;
-}
-.scorm_item_1.scorm_item_highlight.scorm_completed,
-.scorm_item_2.scorm_item_highlight.scorm_completed {
-    background-image: url("images/white_arrow.png") !important;
-    background-position: 270px center !important;
-    background-repeat: no-repeat;
-    color: white;
-}
-.scorm_item_1.scorm_item_normal.scorm_completed,
-.scorm_item_2.scorm_item_normal.scorm_completed {
-    background-image: url("images/blue_arrow.png")  !important;
-    background-position: 270px center !important;
-    background-repeat: no-repeat;
-}
-#learning_path_main #control {
-  background-image: none;
-  background-color: #d7eef4;
-  bottom: 0;
-  height: 34px;
-  margin-bottom: auto;
-  margin-left: auto;
-  margin-right: auto;
-  margin-top: auto;
-  padding-bottom: 8px;
-  padding-left: 0;
-  padding-right: 0;
-  padding-top: 8px;
-  position: absolute;
-  text-align: center;
-  width: 100%;
-  border-top:1px solid #00AAD4;
-}
-
-#author_name {
-  color: #666666;
-  float: left;
-  font-size: 13px;
-  margin-top: 2px;
-  text-align: center;
-  width: 100%;
-  padding-top: 10px;
-  padding-bottom: 5px;
-}
-.mejs-container{
-    background: none;
-    -webkit-border-radius: 5px;
-    -moz-border-radius: 5px;
-    border-radius: 5px;
-}
-.mejs-container .mejs-controls{
-    -webkit-border-radius: 5px;
-    -moz-border-radius: 5px;
-    border-radius: 5px;
-    background: #45484d; /* Old browsers */
-background: -moz-linear-gradient(top, #45484d 0%, #000000 100%); /* FF3.6+ */
-background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#45484d), color-stop(100%,#000000)); /* Chrome,Safari4+ */
-background: -webkit-linear-gradient(top, #45484d 0%,#000000 100%); /* Chrome10+,Safari5.1+ */
-background: -o-linear-gradient(top, #45484d 0%,#000000 100%); /* Opera 11.10+ */
-background: -ms-linear-gradient(top, #45484d 0%,#000000 100%); /* IE10+ */
-background: linear-gradient(to bottom, #45484d 0%,#000000 100%); /* W3C */
-filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#45484d', endColorstr='#000000',GradientType=0 ); /* IE6-9 */
-}
-.mejs-controls .mejs-time-rail .mejs-time-loaded{
-    background: #333;
-    background: rgba(50,50,50,0.8);
-    background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(rgba(30,30,30,0.8)), to(rgba(60,60,60,0.8)));
-    background: -webkit-linear-gradient(top, rgba(30,30,30,0.8), rgba(60,60,60,0.8)); 
-    background: -moz-linear-gradient(top, rgba(30,30,30,0.8), rgba(60,60,60,0.8));
-    background: -o-linear-gradient(top, rgba(30,30,30,0.8), rgba(60,60,60,0.8));
-    background: -ms-linear-gradient(top, rgba(30,30,30,0.8), rgba(60,60,60,0.8));
-    background: linear-gradient(rgba(30,30,30,0.8), rgba(60,60,60,0.8));
-}
-.mejs-controls .mejs-time-rail .mejs-time-current{
-    background: #a9e4f7; /* Old browsers */
-    background: -moz-linear-gradient(top, #a9e4f7 0%, #0fb4e7 100%); /* FF3.6+ */
-    background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#a9e4f7), color-stop(100%,#0fb4e7)); /* Chrome,Safari4+ */
-    background: -webkit-linear-gradient(top, #a9e4f7 0%,#0fb4e7 100%); /* Chrome10+,Safari5.1+ */
-    background: -o-linear-gradient(top, #a9e4f7 0%,#0fb4e7 100%); /* Opera 11.10+ */
-    background: -ms-linear-gradient(top, #a9e4f7 0%,#0fb4e7 100%); /* IE10+ */
-    background: linear-gradient(to bottom, #a9e4f7 0%,#0fb4e7 100%); /* W3C */
-    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#a9e4f7', endColorstr='#0fb4e7',GradientType=0 ); /* IE6-9 */
-}
+    padding-top: 5px;
+    padding-bottom: 5px;
+}

+ 0 - 1
main/css/cosmic_campus/default.css

@@ -224,7 +224,6 @@ text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.17);
 }
 .btn{
   display: inline-block;
-  padding: 3px 25px;
   margin-bottom: 0;
   font-size: 14px;
   font-weight: normal;

+ 1 - 405
main/css/cosmic_campus/scorm.css

@@ -1,141 +1,4 @@
 /* copy of default_scorm.css */
-
-.inner_lp_toc {
-    overflow: auto;
-    background-color: white;
-    height: 210px;
-}
-
-.inner_lp_toc .scorm_item_1 a,
-.inner_lp_toc .scorm_item_2 a {
-    font-size: 13px;
-    margin-right: 1px;
-    padding-bottom: 2px;
-    text-decoration: none;
-    color: #2F3E46;
-}
-
-.inner_lp_toc .scorm_item_1 a.chapter_module,
-.inner_lp_toc .scorm_item_2 a.chapter_module {
-    font-weight: normal;
-    margin-right: 10px;
-}
-.inner_lp_toc .scorm_item_highlight {
-    font-weight:bold;
-    border:1px solid #00aad4;
-    background-color: #00aad4;
-    background-image:none;
-    margin-right: 0px;
-    padding: 10px 0px 10px 0px;
-    text-decoration: none;
-}
-.inner_lp_toc .scorm_item_highlight a {
-    color:#fff;
-    margin-right: 1px;
-    text-decoration: none;
-}
-
-.inner_lp_toc .scorm_item_section {
-    border:1px solid #222;
-    background:#333;
-    font-weight:bold;
-    color:#fff;
-    text-shadow:0 -1px 1px #000;
-    background-image:-webkit-gradient(linear,left top,left bottom,from(#555),to(#333));
-    background-image:-webkit-linear-gradient(top,#555,#333);
-    background-image:-moz-linear-gradient(top,#555,#333);
-    background-image:-ms-linear-gradient(top,#555,#333);
-    background-image:-o-linear-gradient(top,#555,#333);
-    background-image:linear-gradient(top,#555,#333);
-    margin-right: 1px;
-    padding: 10px 0px 10px 0px;
-    text-decoration: none;
-}
-
-.inner_lp_toc .scorm_item_section .scorm_item:before
-{
-    content : url('../lp_section.png');  /* from main/newscorm/lp_controller.php file */
-    vertical-align: text-top;
-    margin-right : 5px;
-}
-
-.scorm_section_level_0 {
-    padding : 0 0 0 0;
-}
-
-.scorm_section_level_1 {
-    padding : 0 0.5em 0 2em;
-}
-
-.scorm_section_level_2 {
-    padding : 0 0.5em 0 4em;
-}
-
-.scorm_section_level_3 {
-    padding : 0 0.5em 0 6em;
-}
-
-.scorm_section_level_4 {
-    padding : 0 0.5em 0 8em;
-}
-
-.scorm_section_level_5 {
-    padding : 0 0.5em 0 10em;
-}
-
-.scorm_item_level_0 {
-    padding : 0 0 0 0;
-}
-
-.scorm_item_level_1 {
-    padding : 0 1.5em 0 1.5em;
-}
-
-.scorm_item_level_2 {
-    padding : 0 1.5em 0 3em;
-}
-.scorm_item_level_3 {
-    padding : 0 1.5em 0 4.5em;
-}
-
-.scorm_item_level_4 {
-    padding : 0 1.5em 0 6em;
-}
-
-.scorm_item_level_5 {
-    padding : 0 1.5em 0 7.5em;
-}
-
-.scorm_item.scorm_item_level_2 > a, .scorm_item.scorm_item_level_3 > a, .scorm_item.scorm_item_level_4 > a, .scorm_item.scorm_item_level_5 > a{
-    font-weight: normal;
-}
-/* end of copy of default_scorm.css */
-
-
-.scormpage {
-    height: 100%;
-}
-.scormpage .menu {
-    width: 180px;
-    float: left;
-    margin: 1px;
-    padding: 0px;
-    margin-top: 0px;
-    padding-top: 0px;
-}
-.lp_toc {
-    background-color: white;
-    height: 380px;
-    width: 99%;
-    border-right: 1px none;
-}
-
-.inner_lp_toc {
-    overflow: auto;
-    background-color: #D7EEF4;
-    height: 210px;
-    /*padding: 10px;*/   
-}
 .inner_lp_toc .scorm_item_section {
     border:none;
     background:#333;
@@ -155,95 +18,6 @@
     text-decoration: none;
 }
 
-.inner_lp_toc .scorm_item {
-    font-size: 13px;
-    margin-left: 10px;
-    margin-right:10px;
-    text-decoration: none;
-}
-.inner_lp_toc .scorm_item.scorm_item_level_1{
-    background: url(../img/archive.png) no-repeat;
-}
-
-
-.inner_lp_toc .scorm_title {
-    font-weight: bold;
-    background:#ccc;
-    font-size: 14px;
-    color: #444;
-}
-.inner_lp_toc .scorm_title_text {
-    margin-left: 10px;
-}
-.inner_lp_toc .scorm_status_img {
-    margin:0px;
-    margin-left: -10px;
-    width:10px;
-}
-.lp_navigation {
-    overflow: auto;
-    background-color: white;
-    height: 44px;
-    width:180px;
-    padding-top: 4px;
-    padding-bottom:0px;
-    border: none;
-    margin-top: -18px;
-    border-top: 1px dotted black;
-    border-bottom: 1px dotted black;
-}
-.lp_navigation_elem {
-    padding-left: 15px;
-    padding-top: 0px;
-}
-/*.scormpage .menu */
-.lp_navigation_elem .progresstext {
-    margin-top: -20px;
-}
-/*.scormpage .menu */
-.lp_navigation_elem .buttons {
-    margin-left: 0px;
-    margin-right: 0em;
-    margin-top: 0.4em;
-}
-.scormpage .menu .notification {
-    background-color: white;
-    height: 50px;
-}
-.scormpage .menu .notification .message {
-    background-color: white;
-    height: 50px;
-    width: 180px;
-    border: none;
-}
-.scormpage .content {
-    /*float: left;
-    width: 60%;*/
-    margin-top: 0px;
-    padding-top: 0px;
-    padding-left: 180px;
-    background-color: white;
-}
-.iframe {
-    border: 0px solid black;
-    height: 100%;
-    width: 95%;
-    margin: 0px;
-    padding-right: 0px;
-    overflow: auto;
-    vertical-align: top;
-}
-.scormpage .footer {
-    clear: both;
-}
-#image_preview {
-    padding-left: 17px;
-}
-#msg_div_id {
-    padding-left: 17px;
-    padding-top: 4px;
-}
-
 #learning_path_breadcrumb_zone .breadcrumb{
     background: #e23828; /* Old browsers */
     background: -moz-linear-gradient(top, #e23828 0%, b52d20 100%); /* FF3.6+ */
@@ -275,182 +49,4 @@
     color: #666666;
     padding-top: 15px;
     padding-bottom: 15px;
-}
-#learning_path_main #control {
-  opacity: 1;
-}
-.buttons a img:hover{
-opacity: 0.7;
-}
-#author_image{
-    background-color: #fff;
-    -webkit-border-radius: 10px;
-    -moz-border-radius: 10px;
-    border-radius: 10px;
-    border: 1px solid  #ccc;
-    margin-top: 10px;
-}
-#author_icon img{
-    background-color: #fff;
-    padding: 5px;
-    -webkit-border-radius: 10px;
-    -moz-border-radius: 10px;
-    border-radius: 10px;
-}
-#author_image .progresstext{
-    font-size: 20px;
-    color: #666;
-    font-weight: bold;
-}
-#learning_path_left_zone #header {
-  font-size: 18px;
-  margin-top: 10px;
-}
-#learning_path_left_zone .no-border{
-    background: none;
-    color: #666;
-}
-.progress {
-  height: 18px;
-  margin-bottom: 18px;
-  overflow: hidden;
-  background-color: #f7f7f7;
-  background-image: -moz-linear-gradient(top, #f5f5f5, #f9f9f9);
-  background-image: -ms-linear-gradient(top, #f5f5f5, #f9f9f9);
-  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#f5f5f5), to(#f9f9f9));
-  background-image: -webkit-linear-gradient(top, #f5f5f5, #f9f9f9);
-  background-image: -o-linear-gradient(top, #f5f5f5, #f9f9f9);
-  background-image: linear-gradient(top, #f5f5f5, #f9f9f9);
-  background-repeat: repeat-x;
-  -webkit-border-radius: 4px;
-     -moz-border-radius: 4px;
-          border-radius: 4px;
-  filter: progid:dximagetransform.microsoft.gradient(startColorstr='#f5f5f5', endColorstr='#f9f9f9', GradientType=0);
-  -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
-     -moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
-          box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
-}
-.progress-striped .bar {
-  background-color: #d9d9ce;
-  background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
-  background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
-    -webkit-animation: progress-bar-stripes 2s linear infinite;
-    animation: progress-bar-stripes 2s linear infinite;
-}
-
-/*STYLES PROCESS LESSION*/
-.inner_lp_toc .scorm_item a {
-    margin-right: 1px;
-    padding-bottom: 2px;
-    text-decoration: none;
-    text-shadow: none;
-}
-
-.inner_lp_toc .scorm_item a.chapter_module {
-    font-weight: normal;
-    margin-right: 10px;
-}
-
-.scorm_item_1,
-.scorm_item_2 {
-    font-size: 16px;
-    margin-left: 0;
-    margin-right:10px;
-    text-decoration: none;
-}
-.scorm_item_1 {
-    border-bottom: 1px solid #CCCCCC;
-    color:#444;
-    text-shadow:0 1px 1px #f6f6f6;
-    background: none;
-    margin-right: 1px;
-    padding: 10px 0px 10px 0px;
-}
-.scorm_item_2 {
-    border-bottom: 1px solid #CCCCCC;
-    color: #444444;
-    margin-right: 1px;
-    padding: 10px 0px 10px 0px;
-    background-image:none;
-}
-.scorm_item_1.scorm_item_highlight.scorm_completed,
-.scorm_item_2.scorm_item_highlight.scorm_completed {
-    background-image: url("images/white_arrow.png") !important;
-    background-position: 270px center !important;
-    background-repeat: no-repeat;
-    color: white;
-}
-.scorm_item_1.scorm_item_normal.scorm_completed,
-.scorm_item_2.scorm_item_normal.scorm_completed {
-    background-image: url("images/blue_arrow.png")  !important;
-    background-position: 270px center !important;
-    background-repeat: no-repeat;
-}
-#learning_path_main #control {
-  background-image: none;
-  background-color: #d7eef4;
-  bottom: 0;
-  height: 34px;
-  margin-bottom: auto;
-  margin-left: auto;
-  margin-right: auto;
-  margin-top: auto;
-  padding-bottom: 8px;
-  padding-left: 0;
-  padding-right: 0;
-  padding-top: 8px;
-  position: absolute;
-  text-align: center;
-  width: 100%;
-  border-top:1px solid #00AAD4;
-}
-
-#author_name {
-  color: #666666;
-  float: left;
-  font-size: 13px;
-  margin-top: 2px;
-  text-align: center;
-  width: 100%;
-  padding-top: 10px;
-  padding-bottom: 5px;
-}
-.mejs-container{
-    background: none;
-    -webkit-border-radius: 5px;
-    -moz-border-radius: 5px;
-    border-radius: 5px;
-}
-.mejs-container .mejs-controls{
-    -webkit-border-radius: 5px;
-    -moz-border-radius: 5px;
-    border-radius: 5px;
-    background: #45484d; /* Old browsers */
-background: -moz-linear-gradient(top, #45484d 0%, #000000 100%); /* FF3.6+ */
-background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#45484d), color-stop(100%,#000000)); /* Chrome,Safari4+ */
-background: -webkit-linear-gradient(top, #45484d 0%,#000000 100%); /* Chrome10+,Safari5.1+ */
-background: -o-linear-gradient(top, #45484d 0%,#000000 100%); /* Opera 11.10+ */
-background: -ms-linear-gradient(top, #45484d 0%,#000000 100%); /* IE10+ */
-background: linear-gradient(to bottom, #45484d 0%,#000000 100%); /* W3C */
-filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#45484d', endColorstr='#000000',GradientType=0 ); /* IE6-9 */
-}
-.mejs-controls .mejs-time-rail .mejs-time-loaded{
-    background: #333;
-    background: rgba(50,50,50,0.8);
-    background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(rgba(30,30,30,0.8)), to(rgba(60,60,60,0.8)));
-    background: -webkit-linear-gradient(top, rgba(30,30,30,0.8), rgba(60,60,60,0.8)); 
-    background: -moz-linear-gradient(top, rgba(30,30,30,0.8), rgba(60,60,60,0.8));
-    background: -o-linear-gradient(top, rgba(30,30,30,0.8), rgba(60,60,60,0.8));
-    background: -ms-linear-gradient(top, rgba(30,30,30,0.8), rgba(60,60,60,0.8));
-    background: linear-gradient(rgba(30,30,30,0.8), rgba(60,60,60,0.8));
-}
-.mejs-controls .mejs-time-rail .mejs-time-current{
-    background: #a9e4f7; /* Old browsers */
-    background: -moz-linear-gradient(top, #a9e4f7 0%, #0fb4e7 100%); /* FF3.6+ */
-    background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#a9e4f7), color-stop(100%,#0fb4e7)); /* Chrome,Safari4+ */
-    background: -webkit-linear-gradient(top, #a9e4f7 0%,#0fb4e7 100%); /* Chrome10+,Safari5.1+ */
-    background: -o-linear-gradient(top, #a9e4f7 0%,#0fb4e7 100%); /* Opera 11.10+ */
-    background: -ms-linear-gradient(top, #a9e4f7 0%,#0fb4e7 100%); /* IE10+ */
-    background: linear-gradient(to bottom, #a9e4f7 0%,#0fb4e7 100%); /* W3C */
-    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#a9e4f7', endColorstr='#0fb4e7',GradientType=0 ); /* IE6-9 */
-}
+}

+ 1 - 1
main/css/delicious_bordeaux/scorm.css

@@ -171,7 +171,7 @@
     
 }
 .inner_lp_toc .scorm_item.scorm_item_level_1{
-    background: url(../img/archive.png) no-repeat;
+    background: url(../../img/archive.png) no-repeat;
 }
 
 

+ 1 - 1
main/css/empire_green/scorm.css

@@ -171,7 +171,7 @@
     
 }
 .inner_lp_toc .scorm_item.scorm_item_level_1{
-    background: url(../img/archive.png) no-repeat;
+    background: url(../../img/archive.png) no-repeat;
 }
 
 

+ 1 - 1
main/css/fruity_orange/scorm.css

@@ -171,7 +171,7 @@
     
 }
 .inner_lp_toc .scorm_item.scorm_item_level_1{
-    background: url(../img/archive.png) no-repeat;
+    background: url(../../img/archive.png) no-repeat;
 }
 
 

+ 0 - 421
main/css/journal/scorm.css

@@ -1,307 +1,4 @@
 /* copy of default_scorm.css */
-
-.inner_lp_toc {
-    overflow: auto;
-    background-color: #e6e6e6;
-    height: 210px;
-}
-
-.inner_lp_toc .scorm_item_1 a,
-.inner_lp_toc .scorm_item_2 a {
-    font-size: 13px;
-    margin-right: 1px;
-    padding-bottom: 2px;
-    text-decoration: none;
-    color: #2F3E46;
-}
-
-.inner_lp_toc .scorm_item_1 a.chapter_module,
-.inner_lp_toc .scorm_item_2 a.chapter_module {
-    font-weight: normal;
-    margin-right: 10px;
-}
-.inner_lp_toc .scorm_item_highlight {
-    font-weight:bold;
-    border:1px solid #999;
-    background-color: #999;
-    background-image:none;
-    margin-right: 0px;
-    padding: 10px 0px 10px 0px;
-    text-decoration: none;
-}
-.inner_lp_toc .scorm_item_highlight a {
-    color:#fff;
-    margin-right: 1px;
-    text-decoration: none;
-    font-weight: bold;
-}
-
-.inner_lp_toc .scorm_item_section {
-    border:1px solid #222;
-    background:#333;
-    font-weight:bold;
-    color:#fff;
-    text-shadow:0 -1px 1px #000;
-    background-image:-webkit-gradient(linear,left top,left bottom,from(#555),to(#333));
-    background-image:-webkit-linear-gradient(top,#555,#333);
-    background-image:-moz-linear-gradient(top,#555,#333);
-    background-image:-ms-linear-gradient(top,#555,#333);
-    background-image:-o-linear-gradient(top,#555,#333);
-    background-image:linear-gradient(top,#555,#333);
-    margin-right: 1px;
-    padding: 10px 0px 10px 0px;
-    text-decoration: none;
-}
-
-.inner_lp_toc .scorm_item_section .scorm_item:before
-{
-    content : url('../lp_section.png');  /* from main/newscorm/lp_controller.php file */
-    vertical-align: text-top;
-    margin-right : 5px;
-}
-
-.scorm_section_level_0 {
-    padding : 0 0 0 0;
-}
-
-.scorm_section_level_1 {
-    padding : 0 0.5em 0 2em;
-}
-
-.scorm_section_level_2 {
-    padding : 0 0.5em 0 4em;
-}
-
-.scorm_section_level_3 {
-    padding : 0 0.5em 0 6em;
-}
-
-.scorm_section_level_4 {
-    padding : 0 0.5em 0 8em;
-}
-
-.scorm_section_level_5 {
-    padding : 0 0.5em 0 10em;
-}
-
-.scorm_item_level_0 {
-    padding : 0 0 0 0;
-}
-
-.scorm_item_level_1 {
-    padding : 0 1.5em 0 1.5em;
-}
-
-.scorm_item_level_2 {
-    padding : 0 1.5em 0 3em;
-}
-.scorm_item_level_3 {
-    padding : 0 1.5em 0 4.5em;
-}
-
-.scorm_item_level_4 {
-    padding : 0 1.5em 0 6em;
-}
-
-.scorm_item_level_5 {
-    padding : 0 1.5em 0 7.5em;
-}
-
-.scorm_item.scorm_item_level_2 > a, .scorm_item.scorm_item_level_3 > a, .scorm_item.scorm_item_level_4 > a, .scorm_item.scorm_item_level_5 > a{
-    font-weight: normal;
-}
-/* end of copy of default_scorm.css */
-
-
-.scormpage {
-    height: 100%;
-}
-.scormpage .menu {
-    width: 180px;
-    float: left;
-    margin: 1px;
-    padding: 0px;
-    margin-top: 0px;
-    padding-top: 0px;
-}
-.lp_toc {
-    background-color: white;
-    height: 380px;
-    width: 99%;
-    border-right: 1px none;
-}
-
-.inner_lp_toc {
-    overflow: auto;
-    background-color: #D7EEF4;
-    height: 210px;
-    /*padding: 10px;*/   
-}
-.inner_lp_toc .scorm_item_section {
-    border:none;
-    background:#333;
-    font-weight:normal;
-    color:#fff;
-    text-shadow:none;
-}
-
-.inner_lp_toc .scorm_item {
-    font-size: 13px;
-    margin-left: 10px;
-    margin-right:10px;
-    text-decoration: none;
-    border-color: rgba(255, 255, 255, 0.3); 
-    
-}
-.inner_lp_toc .scorm_item.scorm_item_level_1{
-    background: url(../img/archive.png) no-repeat;
-}
-
-
-.inner_lp_toc .scorm_title {
-    font-weight: bold;
-    background:#ccc;
-    font-size: 14px;
-    color: #444;
-}
-.inner_lp_toc .scorm_title_text {
-    margin-left: 10px;
-}
-.inner_lp_toc .scorm_status_img {
-    margin:0px;
-    margin-left: -10px;
-    width:10px;
-}
-.lp_navigation {
-    overflow: auto;
-    background-color: white;
-    height: 44px;
-    width:180px;
-    padding-top: 4px;
-    padding-bottom:0px;
-    border: none;
-    margin-top: -18px;
-    border-top: 1px dotted black;
-    border-bottom: 1px dotted black;
-}
-.lp_navigation_elem {
-    padding-left: 15px;
-    padding-top: 0px;
-}
-/*.scormpage .menu */
-.lp_navigation_elem .progresstext {
-    margin-top: -20px;
-}
-/*.scormpage .menu */
-.lp_navigation_elem .buttons {
-    margin-left: 0px;
-    margin-right: 0em;
-    margin-top: 0.4em;
-}
-.scormpage .menu .notification {
-    background-color: white;
-    height: 50px;
-}
-.scormpage .menu .notification .message {
-    background-color: white;
-    height: 50px;
-    width: 180px;
-    border: none;
-}
-.scormpage .content {
-    /*float: left;
-    width: 60%;*/
-    margin-top: 0px;
-    padding-top: 0px;
-    padding-left: 180px;
-    background-color: white;
-}
-.iframe {
-    border: 0px solid black;
-    height: 100%;
-    width: 95%;
-    margin: 0px;
-    padding-right: 0px;
-    overflow: auto;
-    vertical-align: top;
-}
-.scormpage .footer {
-    clear: both;
-}
-#image_preview {
-    padding-left: 17px;
-}
-#msg_div_id {
-    padding-left: 17px;
-    padding-top: 4px;
-}
-
-#learning_path_breadcrumb_zone .breadcrumb{
-    background: #555; /* Old browsers */
-    background: -moz-linear-gradient(top, #555 0%, #333 100%); /* FF3.6+ */
-    background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#555), color-stop(100%,#333)); /* Chrome,Safari4+ */
-    background: -webkit-linear-gradient(top, #555 0%,#333 100%); /* Chrome10+,Safari5.1+ */
-    background: -o-linear-gradient(top, #555 0%,#333 100%); /* Opera 11.10+ */
-    background: -ms-linear-gradient(top, #555 0%,#333 100%); /* IE10+ */
-    background: linear-gradient(to bottom, #555 0%,#333 100%); /* W3C */
-    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#555', endColorstr='#333',GradientType=0 ); /* IE6-9 */
-    color: #fff;
-    text-transform: capitalize;
-    border:none;
-    -webkit-border-radius: 1px;
-    -moz-border-radius: 1px;
-    border-radius: 1px;
-}
-#learning_path_breadcrumb_zone .breadcrumb a{
-    color: #FFF;
-}
-#learning_path_breadcrumb_zone .breadcrumb a:hover{
-    text-decoration: none;
-    opacity: 0.8;
-}
-#scorm_title {
-    font-weight: bold;
-    background:none;
-    font-size: 20px;
-    background-image: none;
-    color: #666666;
-    padding-top: 15px;
-    padding-bottom: 15px;
-}
-#learning_path_main #control {
-  opacity: 1;
-}
-.buttons a img:hover{
-opacity: 0.7;
-}
-#author_image{
-    background-color: #fcfcfc;
-    -webkit-border-radius: 10px;
-    -moz-border-radius: 10px;
-    border-radius: 10px;
-    border: 1px solid  #ccc;
-    margin-top: 10px;
-}
-#author_icon img{
-    background-color: #fff;
-    padding: 5px;
-    -webkit-border-radius: 10px;
-    -moz-border-radius: 10px;
-    border-radius: 10px;
-}
-#author_image .progresstext{
-    font-size: 20px;
-    color: #666;
-    font-weight: bold;
-}
-#learning_path_left_zone #header {
-  font-size: 18px;
-  margin-top: 10px;
-}
-#learning_path_left_zone .no-border{
-    background: none;
-    color: #666;
-}
 .progress {
   height: 18px;
   margin-bottom: 18px;
@@ -329,121 +26,3 @@ opacity: 0.7;
     -webkit-animation: progress-bar-stripes 2s linear infinite;
     animation: progress-bar-stripes 2s linear infinite;
 }
-
-/*STYLES PROCESS LESSION*/
-.inner_lp_toc .scorm_item a {
-    margin-right: 1px;
-    padding-bottom: 2px;
-    text-decoration: none;
-    text-shadow: none;
-}
-
-.inner_lp_toc .scorm_item a.chapter_module {
-    font-weight: normal;
-    margin-right: 10px;
-}
-
-.scorm_item_1,
-.scorm_item_2 {
-    font-size: 16px;
-    margin-left: 0;
-    margin-right:10px;
-    text-decoration: none;
-}
-.scorm_item_1 {
-    border-bottom: 1px solid #CCCCCC;
-    color:#444;
-    text-shadow:0 1px 1px #f6f6f6;
-    background: none;
-    margin-right: 1px;
-    padding: 10px 0px 10px 0px;
-}
-.scorm_item_2 {
-    border-bottom: 1px solid #CCCCCC;
-    color: #444444;
-    text-shadow: 0 1px 1px #F6F6F6;
-    margin-right: 1px;
-    padding: 10px 0px 10px 0px;
-    background-image:none;
-}
-.scorm_item_1.scorm_item_highlight.scorm_completed,
-.scorm_item_2.scorm_item_highlight.scorm_completed {
-    background-image: url("images/white_arrow.png") !important;
-    background-position: 270px center !important;
-    background-repeat: no-repeat;
-    color: white;
-}
-.scorm_item_1.scorm_item_normal.scorm_completed,
-.scorm_item_2.scorm_item_normal.scorm_completed {
-    background-image: url("images/blue_arrow.png")  !important;
-    background-position: 270px center !important;
-    background-repeat: no-repeat;
-}
-#learning_path_main #control {
-  background-image: none;
-  background-color: #d7eef4;
-  bottom: 0;
-  height: 34px;
-  margin-bottom: auto;
-  margin-left: auto;
-  margin-right: auto;
-  margin-top: auto;
-  padding-bottom: 8px;
-  padding-left: 0;
-  padding-right: 0;
-  padding-top: 8px;
-  position: absolute;
-  text-align: center;
-  width: 100%;
-  border-top:1px solid #00AAD4;
-}
-
-#author_name {
-  color: #666666;
-  float: left;
-  font-size: 13px;
-  margin-top: 2px;
-  text-align: center;
-  width: 100%;
-  padding-top: 10px;
-  padding-bottom: 5px;
-}
-.mejs-container{
-    background: none;
-    -webkit-border-radius: 5px;
-    -moz-border-radius: 5px;
-    border-radius: 5px;
-}
-.mejs-container .mejs-controls{
-    -webkit-border-radius: 5px;
-    -moz-border-radius: 5px;
-    border-radius: 5px;
-    background: #45484d; /* Old browsers */
-background: -moz-linear-gradient(top, #45484d 0%, #000000 100%); /* FF3.6+ */
-background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#45484d), color-stop(100%,#000000)); /* Chrome,Safari4+ */
-background: -webkit-linear-gradient(top, #45484d 0%,#000000 100%); /* Chrome10+,Safari5.1+ */
-background: -o-linear-gradient(top, #45484d 0%,#000000 100%); /* Opera 11.10+ */
-background: -ms-linear-gradient(top, #45484d 0%,#000000 100%); /* IE10+ */
-background: linear-gradient(to bottom, #45484d 0%,#000000 100%); /* W3C */
-filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#45484d', endColorstr='#000000',GradientType=0 ); /* IE6-9 */
-}
-.mejs-controls .mejs-time-rail .mejs-time-loaded{
-    background: #333;
-    background: rgba(50,50,50,0.8);
-    background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(rgba(30,30,30,0.8)), to(rgba(60,60,60,0.8)));
-    background: -webkit-linear-gradient(top, rgba(30,30,30,0.8), rgba(60,60,60,0.8)); 
-    background: -moz-linear-gradient(top, rgba(30,30,30,0.8), rgba(60,60,60,0.8));
-    background: -o-linear-gradient(top, rgba(30,30,30,0.8), rgba(60,60,60,0.8));
-    background: -ms-linear-gradient(top, rgba(30,30,30,0.8), rgba(60,60,60,0.8));
-    background: linear-gradient(rgba(30,30,30,0.8), rgba(60,60,60,0.8));
-}
-.mejs-controls .mejs-time-rail .mejs-time-current{
-    background: #a9e4f7; /* Old browsers */
-    background: -moz-linear-gradient(top, #a9e4f7 0%, #0fb4e7 100%); /* FF3.6+ */
-    background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#a9e4f7), color-stop(100%,#0fb4e7)); /* Chrome,Safari4+ */
-    background: -webkit-linear-gradient(top, #a9e4f7 0%,#0fb4e7 100%); /* Chrome10+,Safari5.1+ */
-    background: -o-linear-gradient(top, #a9e4f7 0%,#0fb4e7 100%); /* Opera 11.10+ */
-    background: -ms-linear-gradient(top, #a9e4f7 0%,#0fb4e7 100%); /* IE10+ */
-    background: linear-gradient(to bottom, #a9e4f7 0%,#0fb4e7 100%); /* W3C */
-    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#a9e4f7', endColorstr='#0fb4e7',GradientType=0 ); /* IE6-9 */
-}

+ 3 - 410
main/css/kiddy/scorm.css

@@ -1,233 +1,4 @@
 /* copy of default_scorm.css */
-
-.inner_lp_toc {
-    overflow: auto;
-    background-color: #d7eef4;
-    height: 210px;
-}
-
-.inner_lp_toc .scorm_item_1 a,
-.inner_lp_toc .scorm_item_2 a {
-    font-size: 13px;
-    margin-right: 1px;
-    padding-bottom: 2px;
-    text-decoration: none;
-    color: #444;
-}
-
-.inner_lp_toc .scorm_item_1 a.chapter_module,
-.inner_lp_toc .scorm_item_2 a.chapter_module {
-    font-weight: normal;
-    margin-right: 10px;
-}
-.inner_lp_toc .scorm_item_highlight {
-    font-weight:bold;
-    border:1px solid #00aad4;
-    background-color: #00aad4;
-    background-image:none;
-    margin-right: 0px;
-    padding: 10px 0px 10px 0px;
-    text-decoration: none;
-}
-.inner_lp_toc .scorm_item_highlight a {
-    color:#fff;
-    margin-right: 1px;
-    text-decoration: none;
-}
-
-.inner_lp_toc .scorm_item_section {
-    border:1px solid #222;
-    background:#333;
-    font-weight:bold;
-    color:#fff;
-    text-shadow:0 -1px 1px #000;
-    background-image:-webkit-gradient(linear,left top,left bottom,from(#555),to(#333));
-    background-image:-webkit-linear-gradient(top,#555,#333);
-    background-image:-moz-linear-gradient(top,#555,#333);
-    background-image:-ms-linear-gradient(top,#555,#333);
-    background-image:-o-linear-gradient(top,#555,#333);
-    background-image:linear-gradient(top,#555,#333);
-    margin-right: 1px;
-    padding: 10px 0px 10px 0px;
-    text-decoration: none;
-}
-
-.inner_lp_toc .scorm_item_section .scorm_item:before
-{
-    content : url('../lp_section.png');  /* from main/newscorm/lp_controller.php file */
-    vertical-align: text-top;
-    margin-right : 5px;
-}
-
-.scorm_section_level_0 {
-    padding : 0 0 0 0;
-}
-
-.scorm_section_level_1 {
-    padding : 0 0.5em 0 2em;
-}
-
-.scorm_section_level_2 {
-    padding : 0 0.5em 0 4em;
-}
-
-.scorm_section_level_3 {
-    padding : 0 0.5em 0 6em;
-}
-
-.scorm_section_level_4 {
-    padding : 0 0.5em 0 8em;
-}
-
-.scorm_section_level_5 {
-    padding : 0 0.5em 0 10em;
-}
-
-.scorm_item_level_0 {
-    padding : 0 0 0 0;
-}
-
-.scorm_item_level_1 {
-    padding : 0 1.5em 0 1.5em;
-}
-
-.scorm_item_level_2 {
-    padding : 0 1.5em 0 3em;
-}
-.scorm_item_level_3 {
-    padding : 0 1.5em 0 4.5em;
-}
-
-.scorm_item_level_4 {
-    padding : 0 1.5em 0 6em;
-}
-
-.scorm_item_level_5 {
-    padding : 0 1.5em 0 7.5em;
-}
-
-.scorm_item.scorm_item_level_2 > a, .scorm_item.scorm_item_level_3 > a, .scorm_item.scorm_item_level_4 > a, .scorm_item.scorm_item_level_5 > a{
-    font-weight: normal;
-}
-/* end of copy of default_scorm.css */
-
-
-.scormpage {
-    height: 100%;
-}
-.scormpage .menu {
-    width: 180px;
-    float: left;
-    margin: 1px;
-    padding: 0px;
-    margin-top: 0px;
-    padding-top: 0px;
-}
-.lp_toc {
-    background-color: white;
-    height: 380px;
-    width: 99%;
-    border-right: 1px none;
-}
-
-.inner_lp_toc {
-    overflow: auto;
-    background-color: #D7EEF4;
-    height: 210px;
-    /*padding: 10px;*/   
-}
-
-.inner_lp_toc .scorm_item {
-    font-size: 13px;
-    margin-left: 10px;
-    margin-right:10px;
-    text-decoration: none;
-    border-color: rgba(255, 255, 255, 0.3); 
-    
-}
-.inner_lp_toc .scorm_item.scorm_item_level_1{
-    background: url(../img/archive.png) no-repeat;
-}
-
-
-.inner_lp_toc .scorm_title {
-    font-weight: bold;
-    background:#ccc;
-    font-size: 14px;
-    color: #444;
-}
-.inner_lp_toc .scorm_title_text {
-    margin-left: 10px;
-}
-.inner_lp_toc .scorm_status_img {
-    margin:0px;
-    margin-left: -10px;
-    width:10px;
-}
-.lp_navigation {
-    overflow: auto;
-    background-color: white;
-    height: 44px;
-    width:180px;
-    padding-top: 4px;
-    padding-bottom:0px;
-    border: none;
-    margin-top: -18px;
-    border-top: 1px dotted black;
-    border-bottom: 1px dotted black;
-}
-.lp_navigation_elem {
-    padding-left: 15px;
-    padding-top: 0px;
-}
-/*.scormpage .menu */
-.lp_navigation_elem .progresstext {
-    margin-top: -20px;
-}
-/*.scormpage .menu */
-.lp_navigation_elem .buttons {
-    margin-left: 0px;
-    margin-right: 0em;
-    margin-top: 0.4em;
-}
-.scormpage .menu .notification {
-    background-color: white;
-    height: 50px;
-}
-.scormpage .menu .notification .message {
-    background-color: white;
-    height: 50px;
-    width: 180px;
-    border: none;
-}
-.scormpage .content {
-    /*float: left;
-    width: 60%;*/
-    margin-top: 0px;
-    padding-top: 0px;
-    padding-left: 180px;
-    background-color: white;
-}
-.iframe {
-    border: 0px solid black;
-    height: 100%;
-    width: 95%;
-    margin: 0px;
-    padding-right: 0px;
-    overflow: auto;
-    vertical-align: top;
-}
-.scormpage .footer {
-    clear: both;
-}
-#image_preview {
-    padding-left: 17px;
-}
-#msg_div_id {
-    padding-left: 17px;
-    padding-top: 4px;
-}
-
 #learning_path_breadcrumb_zone .breadcrumb{
     background: #05abe0; /* Old browsers */
     background: -moz-linear-gradient(top, #05abe0 0%, #2e75a3 100%); /* FF3.6+ */
@@ -254,186 +25,8 @@
 #scorm_title {
     font-weight: bold;
     background:none;
-    font-size: 20px;
     background-image: none;
     color: #0088aa;
-    padding-top: 15px;
-    padding-bottom: 15px;
-}
-#learning_path_main #control {
-  opacity: 1;
-}
-.buttons a img:hover{
-opacity: 0.7;
-}
-#author_image{
-    background-color: #d7eef4;
-    -webkit-border-radius: 10px;
-    -moz-border-radius: 10px;
-    border-radius: 10px;
-    border: 1px solid  #b4cbff;
-    margin-top: 10px;
-}
-#author_icon img{
-    background-color: #fff;
-    padding: 5px;
-    -webkit-border-radius: 10px;
-    -moz-border-radius: 10px;
-    border-radius: 10px;
-}
-#author_image .progresstext{
-    font-size: 20px;
-    color: #0088AA;
-    font-weight: bold;
-}
-#learning_path_left_zone #header {
-  font-size: 18px;
-  margin-top: 10px;
-}
-#learning_path_left_zone .no-border{
-    background: none;
-    color: #0088AA;
-}
-.progress {
-  height: 18px;
-  margin-bottom: 18px;
-  overflow: hidden;
-  background-color: #f7f7f7;
-  background-image: -moz-linear-gradient(top, #f5f5f5, #f9f9f9);
-  background-image: -ms-linear-gradient(top, #f5f5f5, #f9f9f9);
-  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#f5f5f5), to(#f9f9f9));
-  background-image: -webkit-linear-gradient(top, #f5f5f5, #f9f9f9);
-  background-image: -o-linear-gradient(top, #f5f5f5, #f9f9f9);
-  background-image: linear-gradient(top, #f5f5f5, #f9f9f9);
-  background-repeat: repeat-x;
-  -webkit-border-radius: 4px;
-     -moz-border-radius: 4px;
-          border-radius: 4px;
-  filter: progid:dximagetransform.microsoft.gradient(startColorstr='#f5f5f5', endColorstr='#f9f9f9', GradientType=0);
-  -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
-     -moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
-          box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
-}
-.progress-striped .bar {
-  background-color: #149BDF;
-  background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
-  background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
-    -webkit-animation: progress-bar-stripes 2s linear infinite;
-    animation: progress-bar-stripes 2s linear infinite;
-}
-
-/*STYLES PROCESS LESSION*/
-.inner_lp_toc .scorm_item a {
-    margin-right: 1px;
-    padding-bottom: 2px;
-    text-decoration: none;
-}
-
-.inner_lp_toc .scorm_item a.chapter_module {
-    font-weight: normal;
-    margin-right: 10px;
-}
-
-.scorm_item_1,
-.scorm_item_2 {
-    font-size: 16px;
-    margin-left: 0;
-    margin-right:10px;
-    text-decoration: none;
-}
-.scorm_item_1 {
-    border-bottom: 1px solid #CCCCCC;
-    color:#444;
-    text-shadow:0 1px 1px #f6f6f6;
-    background: none;
-    margin-right: 1px;
-    padding: 10px 0px 10px 0px;
-}
-.scorm_item_2 {
-    border-bottom: 1px solid #CCCCCC;
-    color: #444444;
-    margin-right: 1px;
-    padding: 10px 0px 10px 0px;
-    background-image:none;
-}
-.scorm_item_1.scorm_item_highlight.scorm_completed,
-.scorm_item_2.scorm_item_highlight.scorm_completed {
-    background-image: url("images/white_arrow.png") !important;
-    background-position: 270px center !important;
-    background-repeat: no-repeat;
-    color: white;
-}
-.scorm_item_1.scorm_item_normal.scorm_completed,
-.scorm_item_2.scorm_item_normal.scorm_completed {
-    background-image: url("images/blue_arrow.png")  !important;
-    background-position: 270px center !important;
-    background-repeat: no-repeat;
-}
-#learning_path_main #control {
-  background-image: none;
-  background-color: #d7eef4;
-  bottom: 0;
-  height: 34px;
-  margin-bottom: auto;
-  margin-left: auto;
-  margin-right: auto;
-  margin-top: auto;
-  padding-bottom: 8px;
-  padding-left: 0;
-  padding-right: 0;
-  padding-top: 8px;
-  position: absolute;
-  text-align: center;
-  width: 100%;
-  border-top:1px solid #00AAD4;
-}
-
-#author_name {
-  color: #666666;
-  float: left;
-  font-size: 13px;
-  margin-top: 2px;
-  text-align: center;
-  width: 100%;
-  padding-top: 10px;
-  padding-bottom: 5px;
-}
-.mejs-container{
-    background: none;
-    -webkit-border-radius: 5px;
-    -moz-border-radius: 5px;
-    border-radius: 5px;
-}
-.mejs-container .mejs-controls{
-    -webkit-border-radius: 5px;
-    -moz-border-radius: 5px;
-    border-radius: 5px;
-    background: #45484d; /* Old browsers */
-background: -moz-linear-gradient(top, #45484d 0%, #000000 100%); /* FF3.6+ */
-background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#45484d), color-stop(100%,#000000)); /* Chrome,Safari4+ */
-background: -webkit-linear-gradient(top, #45484d 0%,#000000 100%); /* Chrome10+,Safari5.1+ */
-background: -o-linear-gradient(top, #45484d 0%,#000000 100%); /* Opera 11.10+ */
-background: -ms-linear-gradient(top, #45484d 0%,#000000 100%); /* IE10+ */
-background: linear-gradient(to bottom, #45484d 0%,#000000 100%); /* W3C */
-filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#45484d', endColorstr='#000000',GradientType=0 ); /* IE6-9 */
-}
-.mejs-controls .mejs-time-rail .mejs-time-loaded{
-    background: #333;
-    background: rgba(50,50,50,0.8);
-    background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(rgba(30,30,30,0.8)), to(rgba(60,60,60,0.8)));
-    background: -webkit-linear-gradient(top, rgba(30,30,30,0.8), rgba(60,60,60,0.8)); 
-    background: -moz-linear-gradient(top, rgba(30,30,30,0.8), rgba(60,60,60,0.8));
-    background: -o-linear-gradient(top, rgba(30,30,30,0.8), rgba(60,60,60,0.8));
-    background: -ms-linear-gradient(top, rgba(30,30,30,0.8), rgba(60,60,60,0.8));
-    background: linear-gradient(rgba(30,30,30,0.8), rgba(60,60,60,0.8));
-}
-.mejs-controls .mejs-time-rail .mejs-time-current{
-    background: #a9e4f7; /* Old browsers */
-    background: -moz-linear-gradient(top, #a9e4f7 0%, #0fb4e7 100%); /* FF3.6+ */
-    background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#a9e4f7), color-stop(100%,#0fb4e7)); /* Chrome,Safari4+ */
-    background: -webkit-linear-gradient(top, #a9e4f7 0%,#0fb4e7 100%); /* Chrome10+,Safari5.1+ */
-    background: -o-linear-gradient(top, #a9e4f7 0%,#0fb4e7 100%); /* Opera 11.10+ */
-    background: -ms-linear-gradient(top, #a9e4f7 0%,#0fb4e7 100%); /* IE10+ */
-    background: linear-gradient(to bottom, #a9e4f7 0%,#0fb4e7 100%); /* W3C */
-    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#a9e4f7', endColorstr='#0fb4e7',GradientType=0 ); /* IE6-9 */
-}
+    padding-top: 5px;
+    padding-bottom: 5px;
+}

File diff suppressed because it is too large
+ 2 - 0
main/css/markdown.css


+ 1 - 1
main/css/medical/scorm.css

@@ -170,7 +170,7 @@
     
 }
 .inner_lp_toc .scorm_item.scorm_item_level_1{
-    background: url(../img/archive.png) no-repeat;
+    background: url(../../img/archive.png) no-repeat;
 }
 
 

+ 2 - 2
main/css/public_admin/scorm.css

@@ -170,7 +170,7 @@
     
 }
 .inner_lp_toc .scorm_item.scorm_item_level_1{
-    background: url(../img/archive.png) no-repeat;
+    background: url(../../img/archive.png) no-repeat;
 }
 
 
@@ -463,4 +463,4 @@ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#45484d', end
     background: -ms-linear-gradient(top, #a9e4f7 0%,#0fb4e7 100%); /* IE10+ */
     background: linear-gradient(to bottom, #a9e4f7 0%,#0fb4e7 100%); /* W3C */
     filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#a9e4f7', endColorstr='#0fb4e7',GradientType=0 ); /* IE6-9 */
-}
+}

+ 1 - 1
main/css/readable/scorm.css

@@ -171,7 +171,7 @@
     
 }
 .inner_lp_toc .scorm_item.scorm_item_level_1{
-    background: url(../img/archive.png) no-repeat;
+    background: url(../../img/archive.png) no-repeat;
 }
 
 

+ 2 - 2
main/css/royal_purple/scorm.css

@@ -170,7 +170,7 @@
     
 }
 .inner_lp_toc .scorm_item.scorm_item_level_1{
-    background: url(../img/archive.png) no-repeat;
+    background: url(../../img/archive.png) no-repeat;
 }
 
 
@@ -463,4 +463,4 @@ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#45484d', end
     background: -ms-linear-gradient(top, #a9e4f7 0%,#0fb4e7 100%); /* IE10+ */
     background: linear-gradient(to bottom, #a9e4f7 0%,#0fb4e7 100%); /* W3C */
     filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#a9e4f7', endColorstr='#0fb4e7',GradientType=0 ); /* IE6-9 */
-}
+}

+ 1 - 1
main/css/silver_line/scorm.css

@@ -171,7 +171,7 @@
     
 }
 .inner_lp_toc .scorm_item.scorm_item_level_1{
-    background: url(../img/archive.png) no-repeat;
+    background: url(../../img/archive.png) no-repeat;
 }
 
 

+ 1 - 1
main/css/simplex/scorm.css

@@ -171,7 +171,7 @@
     
 }
 .inner_lp_toc .scorm_item.scorm_item_level_1{
-    background: url(../img/archive.png) no-repeat;
+    background: url(../../img/archive.png) no-repeat;
 }
 
 

+ 1 - 1
main/css/sober_brown/scorm.css

@@ -171,7 +171,7 @@
     
 }
 .inner_lp_toc .scorm_item.scorm_item_level_1{
-    background: url(../img/archive.png) no-repeat;
+    background: url(../../img/archive.png) no-repeat;
 }
 
 

+ 2 - 2
main/css/spacelab/scorm.css

@@ -170,7 +170,7 @@
     
 }
 .inner_lp_toc .scorm_item.scorm_item_level_1{
-    background: url(../img/archive.png) no-repeat;
+    background: url(../../img/archive.png) no-repeat;
 }
 
 
@@ -463,4 +463,4 @@ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#45484d', end
     background: -ms-linear-gradient(top, #a9e4f7 0%,#0fb4e7 100%); /* IE10+ */
     background: linear-gradient(to bottom, #a9e4f7 0%,#0fb4e7 100%); /* W3C */
     filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#a9e4f7', endColorstr='#0fb4e7',GradientType=0 ); /* IE6-9 */
-}
+}

+ 1 - 1
main/css/steel_grey/scorm.css

@@ -171,7 +171,7 @@
     
 }
 .inner_lp_toc .scorm_item.scorm_item_level_1{
-    background: url(../img/archive.png) no-repeat;
+    background: url(../../img/archive.png) no-repeat;
 }
 
 

+ 1 - 1
main/css/tasty_olive/scorm.css

@@ -171,7 +171,7 @@
     
 }
 .inner_lp_toc .scorm_item.scorm_item_level_1{
-    background: url(../img/archive.png) no-repeat;
+    background: url(../../img/archive.png) no-repeat;
 }
 
 

+ 1 - 8
main/dashboard/block.class.php

@@ -3,15 +3,10 @@
 
 /**
  * This file contains class used parent class for blocks plugins
- * @author Christian Fasanando <christian1827@gmail.com>
- * @package chamilo.dashboard
- */
-
-/**
  * Parent class for controller Blocks from dashboard plugin
+ * @author Christian Fasanando <christian1827@gmail.com>
  * @package chamilo.dashboard
  */
-
 class Block
 {
 	/**
@@ -45,5 +40,3 @@ class Block
         return $result;
     }
 }
-
-?>

+ 6 - 11
main/dashboard/dashboard_controller.php

@@ -2,18 +2,15 @@
 /* For licensing terms, see /license.txt */
 
 /**
+ * Controller script. Prepares the common background variables to give to the scripts corresponding to
+ * the requested action
  * This file contains class used like controller, it should be included inside a dispatcher file (e.g: index.php)
  * @author Christian Fasanando <christian1827@gmail.com>
  * @package chamilo.dashboard
  */
-
-/**
- * Controller script. Prepares the common background variables to give to the scripts corresponding to
- * the requested action
- */
-class DashboardController { // extends Controller {
-
-	private $toolname;
+class DashboardController
+{
+ 	private $toolname;
 	private $view;
 	private $user_id;
 
@@ -42,7 +39,7 @@ class DashboardController { // extends Controller {
 		$user_blocks_id = array_keys($user_block_data);
 
         $data_block = null;
-        
+
 		if (!empty($dashboard_blocks)) {
 			foreach ($dashboard_blocks as $block) {
 
@@ -119,6 +116,4 @@ class DashboardController { // extends Controller {
 		$result = DashboardManager::close_user_block($user_id, $path);
 		$this->display($result);
 	}
-
 }
-?>

+ 3 - 7
main/dashboard/index.php

@@ -1,18 +1,15 @@
 <?php
 /* For licensing terms, see /license.txt */
 /**
-* Template (front controller in MVC pattern) used for distpaching to the controllers depend on the current action  
+* Template (front controller in MVC pattern) used for distpaching to the controllers depend on the current action
 * @author Christian Fasanando <christian1827@gmail.com>
 * @package chamilo.dashboard
 */
-/**
- * Init
- */
 // name of the language file that needs to be included
-$language_file = array ('index', 'tracking', 'userInfo', 'admin', 'gradebook');
+$language_file = array('index', 'tracking', 'userInfo', 'admin', 'gradebook');
 $cidReset = true;
 
-// including files 
+// including files
 require_once '../inc/global.inc.php';
 require_once api_get_path(LIBRARY_PATH).'dashboard.lib.php';
 require_once api_get_path(LIBRARY_PATH).'app_view.php';
@@ -45,7 +42,6 @@ $htmlHeadXtra[] = $dashboar_plugin_styles;
 // course description controller object
 $dashboard_controller = new DashboardController();
 
-
 if (isset($_GET['path'])) {
 	$path = $_GET['path'];
 }

+ 3 - 8
main/document/create_audio.php

@@ -125,13 +125,9 @@ if (isset ($group)) {
 Display :: display_header($nameTools, 'Doc');
 
 echo '<div class="actions">';
-		echo '<a href="document.php?id='.$document_id.'">'.Display::return_icon('back.png',get_lang('BackTo').' '.get_lang('DocumentsOverview'),'',ICON_SIZE_MEDIUM).'</a>';
-
-		echo '<a href="create_audio.php?'.api_get_cidreq().'&amp;id='.$document_id.'&amp;dt2a=google">'.Display::return_icon('google.png',get_lang('GoogleAudio'),'',ICON_SIZE_MEDIUM).'</a>';
-
-		echo '<a href="create_audio.php?'.api_get_cidreq().'&amp;id='.$document_id.'&amp;dt2a=pediaphon">'.Display::return_icon('pediaphon.png', get_lang('Pediaphon'),'',ICON_SIZE_MEDIUM).'</a>';
-
-
+echo '<a href="document.php?id='.$document_id.'">'.Display::return_icon('back.png',get_lang('BackTo').' '.get_lang('DocumentsOverview'),'',ICON_SIZE_MEDIUM).'</a>';
+echo '<a href="create_audio.php?'.api_get_cidreq().'&amp;id='.$document_id.'&amp;dt2a=google">'.Display::return_icon('google.png',get_lang('GoogleAudio'),'',ICON_SIZE_MEDIUM).'</a>';
+echo '<a href="create_audio.php?'.api_get_cidreq().'&amp;id='.$document_id.'&amp;dt2a=pediaphon">'.Display::return_icon('pediaphon.png', get_lang('Pediaphon'),'',ICON_SIZE_MEDIUM).'</a>';
 echo '</div>';
 
 ?>
@@ -281,7 +277,6 @@ $(document).ready(function(){
 		<!--French -->
 		voices[3]=["<?php echo get_lang('Female').' (fr8 HQ)'; ?>|fr8"]
 
-
 		function update_voices(selectedvoicegroup){
 		voiceslist.options.length=0
 		for (i=0; i<voices[selectedvoicegroup].length; i++)

+ 84 - 34
main/document/create_document.php

@@ -5,10 +5,6 @@
  *
  *	@package chamilo.document
  */
-/**
- * Code
- */
-/*	INIT SECTION */
 
 // Name of the language file that needs to be included
 $language_file = array('document', 'gradebook');
@@ -162,16 +158,35 @@ if ($is_certificate_mode) {
 
 $doc_table = Database::get_course_table(TABLE_DOCUMENT);
 $course_id = api_get_course_int_id();
+$courseCode = api_get_course_id();
+$sessionId = api_get_session_id();
+$userId = api_get_user_id();
+$_course = api_get_course_info();
+$groupId = api_get_group_id();
+
+$document_data = DocumentManager::get_document_data_by_id(
+    $_REQUEST['id'],
+    $courseCode,
+    true,
+    0
+);
+
+if (!empty($sessionId) && empty($document_data)) {
+    $document_data = DocumentManager::get_document_data_by_id(
+        $_REQUEST['id'],
+        $courseCode,
+        true,
+        $sessionId
+    );
+}
 
-$document_data = DocumentManager::get_document_data_by_id($_REQUEST['id'], api_get_course_id(), true);
 if (empty($document_data)) {
     if (api_is_in_group()) {
-        $group_properties   = GroupManager::get_group_properties(api_get_group_id());
-        $document_id        = DocumentManager::get_document_id(api_get_course_info(), $group_properties['directory']);
+        $group_properties   = GroupManager::get_group_properties($groupId);
+        $document_id        = DocumentManager::get_document_id($_course, $group_properties['directory']);
         $document_data      = DocumentManager::get_document_data_by_id($document_id, api_get_course_id());
-
-        $dir                = $document_data['path'];
-        $folder_id          = $document_data['id'];
+        $dir = $document_data['path'];
+        $folder_id = $document_data['id'];
     } else {
         $dir = '/';
         $folder_id = 0;
@@ -225,7 +240,9 @@ for ($i = 0; $i < ($count_dir); $i++) {
 	$relative_url .= '../';
 }
 
-// We do this in order to avoid the condition in html_editor.php ==> if ($this -> fck_editor->Config['CreateDocumentWebDir']=='' || $this -> fck_editor->Config['CreateDocumentDir']== '')
+/* We do this in order to avoid the condition in html_editor.php ==> if
+   ($this -> fck_editor->Config['CreateDocumentWebDir']=='' || $this -> fck_editor->Config['CreateDocumentDir']== '')*
+*/
 if ($relative_url== '') {
 	$relative_url = '/';
 }
@@ -283,7 +300,7 @@ if (!$is_allowed_in_course) {
 
 if (!($is_allowed_to_edit ||
     $_SESSION['group_member_with_upload_rights'] ||
-    is_my_shared_folder($_user['user_id'], $dir, api_get_session_id()))
+    is_my_shared_folder($userId, $dir, api_get_session_id()))
 ) {
 	api_not_allowed(true);
 }
@@ -330,15 +347,27 @@ $defaults['id'] = $folder_id;
 $form->addElement('hidden', 'title_edited', 'false', 'id="title_edited"');
 
 /**
- * Check if a document width the choosen filename allready exists
+ * Check if a document width the chosen filename already exists
  */
 function document_exists($filename) {
-	global $filepath;
-	$filename = addslashes(trim($filename));
+    global $dir;
+    // Clean up the name, only ASCII characters should stay. (and strict)
+    $cleanName = replace_dangerous_char($filename, 'strict');
+
+    // No "dangerous" files
+    $cleanName = disable_dangerous_file($cleanName);
+
+    return !DocumentManager::documentExists(
+        $dir.$cleanName.'.html',
+        api_get_course_info(),
+        api_get_session_id(),
+        api_get_group_id()
+    );
+	/*$filename = addslashes(trim($filename));
 	$filename = Security::remove_XSS($filename);
 	$filename = replace_dangerous_char($filename);
 	$filename = disable_dangerous_file($filename);
-	return !file_exists($filepath.$filename.'.html');
+	return !file_exists($filepath.$filename.'.html');*/
 }
 
 // Add group to the form
@@ -364,7 +393,7 @@ $folders = DocumentManager::get_all_document_folders($_course, $to_group_id, $is
 // If we are not in the certificates creation, display a folder chooser for the
 // new document created
 
-if (!$is_certificate_mode && !is_my_shared_folder($_user['user_id'], $dir, $current_session_id)) {
+if (!$is_certificate_mode && !is_my_shared_folder($userId, $dir, $current_session_id)) {
 	$folders = DocumentManager::get_all_document_folders($_course, $to_group_id, $is_allowed_to_edit);
 
 	$parent_select = $form->addElement('select', 'curdirpath', array(null, get_lang('DestinationDirectory')));
@@ -472,10 +501,6 @@ if ($form->validate()) {
 	$readonly = isset($values['readonly']) ? 1 : 0;
 	$values['title'] = trim($values['title']);
 
-	/*if (!empty($values['curdirpath'])) {
-		$dir = $values['curdirpath'];
-	}*/
-
     if ($dir[strlen($dir) - 1] != '/') {
 		$dir .= '/';
 	}
@@ -486,11 +511,16 @@ if ($form->validate()) {
 	$filename = Security::remove_XSS($filename);
 	$filename = replace_dangerous_char($filename);
 	$filename = disable_dangerous_file($filename);
+    $filename .= DocumentManager::getDocumentSuffix(
+        $_course,
+        api_get_session_id(),
+        api_get_group_id()
+    );
 
-    //Setting the title
-	$title 		= $values['title'];
+    // Setting the title
+	$title = $values['title'];
 
-    //Setting the extension
+    // Setting the extension
 	$extension = 'html';
 
 	$content = Security::remove_XSS($values['content'], COURSEMANAGERLOWSECURITY);
@@ -498,6 +528,16 @@ if ($form->validate()) {
 	if (strpos($content, '/css/frames.css') == false) {
 		$content = str_replace('</head>', '<link rel="stylesheet" href="./css/frames.css" type="text/css" /><style> body{margin:50px;}</style></head>', $content);
 	}
+
+    // Don't create file with the same name.
+
+    if (file_exists($filepath.$filename.'.'.$extension)) {
+        Display:: display_header($nameTools, 'Doc');
+        Display:: display_error_message(get_lang('FileExists').' '.$title, false);
+        Display:: display_footer();
+        exit;
+    }
+
 	if ($fp = @fopen($filepath.$filename.'.'.$extension, 'w')) {
 		$content = str_replace(api_get_path(WEB_COURSE_PATH), $_configuration['url_append'].'/courses/', $content);
 
@@ -511,25 +551,34 @@ if ($form->validate()) {
 		fputs($fp, $content);
 		fclose($fp);
 		chmod($filepath.$filename.'.'.$extension, api_get_permissions_for_new_files());
+
 		if (!is_dir($filepath.'css')) {
 			mkdir($filepath.'css', api_get_permissions_for_new_directories());
 			$doc_id = add_document($_course, $dir.'css', 'folder', 0, 'css');
-			api_item_property_update($_course, TOOL_DOCUMENT, $doc_id, 'FolderCreated', $_user['user_id'], null, null, null, null, $current_session_id);
-			api_item_property_update($_course, TOOL_DOCUMENT, $doc_id, 'invisible', $_user['user_id'], null, null, null, null, $current_session_id);
+			api_item_property_update($_course, TOOL_DOCUMENT, $doc_id, 'FolderCreated', $userId, null, null, null, null, $current_session_id);
+			api_item_property_update($_course, TOOL_DOCUMENT, $doc_id, 'invisible', $userId, null, null, null, null, $current_session_id);
 		}
 
 		if (!is_file($filepath.'css/frames.css')) {
 			// Make a copy of the current css for the new document
 			copy(api_get_path(SYS_CODE_PATH).'css/'.api_get_setting('stylesheets').'/frames.css', $filepath.'css/frames.css');
 			$doc_id = add_document($_course, $dir.'css/frames.css', 'file', filesize($filepath.'css/frames.css'), 'frames.css');
-			api_item_property_update($_course, TOOL_DOCUMENT, $doc_id, 'DocumentAdded', $_user['user_id'], null, null, null, null, $current_session_id);
-			api_item_property_update($_course, TOOL_DOCUMENT, $doc_id, 'invisible', $_user['user_id'], null, null, null, null, $current_session_id);
+			api_item_property_update($_course, TOOL_DOCUMENT, $doc_id, 'DocumentAdded', $userId, null, null, null, null, $current_session_id);
+			api_item_property_update($_course, TOOL_DOCUMENT, $doc_id, 'invisible', $userId, null, null, null, null, $current_session_id);
 		}
 
 		$file_size = filesize($filepath.$filename.'.'.$extension);
 		$save_file_path = $dir.$filename.'.'.$extension;
 
-		$document_id = add_document($_course, $save_file_path, 'file', $file_size, $title, null, $readonly);
+        $document_id = add_document(
+            $_course,
+            $save_file_path,
+            'file',
+            $file_size,
+            $title,
+            null,
+            $readonly
+        );
 
 		if ($document_id) {
 			api_item_property_update(
@@ -537,7 +586,7 @@ if ($form->validate()) {
                 TOOL_DOCUMENT,
                 $document_id,
                 'DocumentAdded',
-                $_user['user_id'],
+                $userId,
                 $to_group_id,
                 null,
                 null,
@@ -545,7 +594,7 @@ if ($form->validate()) {
                 $current_session_id
             );
 			// Update parent folders
-			item_property_update_on_folder($_course, $dir, $_user['user_id']);
+			item_property_update_on_folder($_course, $dir, $userId);
 			$new_comment = isset($_POST['comment']) ? trim($_POST['comment']) : '';
             $new_comment = Database::escape_string($new_comment);
 			$new_title = isset($_POST['title']) ? trim($_POST['title']) : '';
@@ -600,15 +649,16 @@ if ($form->validate()) {
 	}
 
 	Display :: display_header($nameTools, "Doc");
-	//api_display_tool_title($nameTools);
 	// actions
 	echo '<div class="actions">';
 
 	// link back to the documents overview
 	if ($is_certificate_mode)
-		echo '<a href="document.php?certificate=true&id='.$folder_id.'&selectcat=' . Security::remove_XSS($_GET['selectcat']).'">'.Display::return_icon('back.png',get_lang('Back').' '.get_lang('To').' '.get_lang('CertificateOverview'),'',ICON_SIZE_MEDIUM).'</a>';
+		echo '<a href="document.php?certificate=true&id='.$folder_id.'&selectcat=' . Security::remove_XSS($_GET['selectcat']).'">'.
+            Display::return_icon('back.png',get_lang('Back').' '.get_lang('To').' '.get_lang('CertificateOverview'),'',ICON_SIZE_MEDIUM).'</a>';
 	else
-		echo '<a href="document.php?curdirpath='.Security::remove_XSS($dir).'">'.Display::return_icon('back.png',get_lang('Back').' '.get_lang('To').' '.get_lang('DocumentsOverview'),'',ICON_SIZE_MEDIUM).'</a>';
+		echo '<a href="document.php?curdirpath='.Security::remove_XSS($dir).'">'.
+            Display::return_icon('back.png',get_lang('Back').' '.get_lang('To').' '.get_lang('DocumentsOverview'),'',ICON_SIZE_MEDIUM).'</a>';
 	echo '</div>';
 
 	if ($is_certificate_mode) {

+ 13 - 29
main/document/create_draw.php

@@ -9,11 +9,6 @@
  * @author Juan Carlos Raña Trabado
  * @since 25/september/2010
 */
-/**
- * Code
- */
-
-/*	INIT SECTION */
 
 // Name of the language file that needs to be included
 $language_file = array('document');
@@ -114,33 +109,22 @@ if (isset ($group)) {
 }
 
 // Interbreadcrumb for the current directory root path
-	// Copied from document.php
-	$dir_array = explode('/', $dir);
-	$array_len = count($dir_array);
-
-	/*
-	TODO:check and delete this code
-	if (!$is_certificate_mode) {
-		if ($array_len > 1) {
-			if (empty($_SESSION['_gid'])) {
-				$url_dir = 'document.php?&curdirpath=/';
-				$interbreadcrumb[] = array('url' => $url_dir, 'name' => get_lang('HomeDirectory'));
-			}
-		}
-	}
-	*/
-	// Interbreadcrumb for the current directory root path
-	if (empty($document_data['parents'])) {
-		$interbreadcrumb[] = array('url' => '#', 'name' => $document_data['title']);
-	} else {
-		foreach($document_data['parents'] as $document_sub_data) {
-			$interbreadcrumb[] = array('url' => $document_sub_data['document_url'], 'name' => $document_sub_data['title']);
-		}
-	}
+// Copied from document.php
+$dir_array = explode('/', $dir);
+$array_len = count($dir_array);
+
+// Interbreadcrumb for the current directory root path
+if (empty($document_data['parents'])) {
+    $interbreadcrumb[] = array('url' => '#', 'name' => $document_data['title']);
+} else {
+    foreach($document_data['parents'] as $document_sub_data) {
+        $interbreadcrumb[] = array('url' => $document_sub_data['document_url'], 'name' => $document_sub_data['title']);
+    }
+}
 Display :: display_header($nameTools, 'Doc');
 
 echo '<div class="actions">';
-		echo '<a href="document.php?id='.$document_id.'">'.Display::return_icon('back.png',get_lang('BackTo').' '.get_lang('DocumentsOverview'),'',ICON_SIZE_MEDIUM).'</a>';
+echo '<a href="document.php?id='.$document_id.'">'.Display::return_icon('back.png',get_lang('BackTo').' '.get_lang('DocumentsOverview'),'',ICON_SIZE_MEDIUM).'</a>';
 echo '</div>';
 
 if (api_browser_support('svg')) {

+ 7 - 15
main/document/create_paint.php

@@ -9,9 +9,6 @@
  * @since 30/January/2011
  * @todo clean all file
 */
-/**
- * Code
- */
 
 /*	INIT SECTION */
 $language_file = array('document');
@@ -33,7 +30,7 @@ if (api_get_setting('enabled_support_paint') == 'false') {
 $document_data = DocumentManager::get_document_data_by_id($_GET['id'], api_get_course_id(), true);
 if (empty($document_data)) {
     if (api_is_in_group()) {
-        $group_properties   = GroupManager::get_group_properties(api_get_group_id());        
+        $group_properties   = GroupManager::get_group_properties(api_get_group_id());
         $document_id        = DocumentManager::get_document_id(api_get_course_info(), $group_properties['directory']);
         $document_data      = DocumentManager::get_document_data_by_id($document_id, api_get_course_id());
     }
@@ -100,7 +97,6 @@ if (!($is_allowed_to_edit || $_SESSION['group_member_with_upload_rights'] || is_
 	api_not_allowed(true);
 }
 
-
 /*	Header */
 event_access_tool(TOOL_DOCUMENT);
 $display_dir = $dir;
@@ -122,14 +118,15 @@ if (empty($document_data['parents'])) {
 Display :: display_header($nameTools, 'Doc');
 
 echo '<div class="actions">';
-		echo '<a href="document.php?id='.$document_id.'">'.Display::return_icon('back.png',get_lang('BackTo').' '.get_lang('DocumentsOverview'),'',ICON_SIZE_MEDIUM).'</a>';
+echo '<a href="document.php?id='.$document_id.'">'.
+    Display::return_icon('back.png',get_lang('BackTo').' '.get_lang('DocumentsOverview'),'',ICON_SIZE_MEDIUM).'</a>';
 echo '</div>';
 
 ///pixlr
 // max size 1 Mb ??
-$title=urlencode(utf8_encode(get_lang('NewImage')));//TODO:check
+$title = urlencode(utf8_encode(get_lang('NewImage')));//TODO:check
 //
-$image=api_get_path(WEB_IMG_PATH).'canvas1024x768.png';
+$image = api_get_path(WEB_IMG_PATH) . 'canvas1024x768.png';
 //
 $pixlr_code_translation_table = array('' => 'en', 'pt' => 'pt-Pt', 'sr' => 'sr_latn');
 $langpixlr  = api_get_language_isocode();
@@ -157,16 +154,11 @@ if ($_SERVER['HTTP_HOST']=="localhost") {
 		@file_put_contents($path_and_file, $crossdomain);
 	}
 	$credentials="true";
-}
-else {
+} else {
 	$credentials="false";
 }
-
 $pixlr_url = api_get_protocol().'://pixlr.com/editor/?title='.$title.'&amp;image='.$image.'&amp;loc='.$loc.'&amp;referrer='.$referrer.'&amp;target='.$target.'&amp;exit='.$exit_path.'&amp;locktarget='.$locktarget.'&amp;locktitle='.$locktitle.'&amp;credentials='.$credentials;
-
-
 ?>
-
 <script type="text/javascript">
 
 document.write ('<iframe id="frame" frameborder="0" scrolling="no" src="<?php echo  $pixlr_url; ?>" width="100%" height="100%"><noframes><p>Sorry, your browser does not handle frames</p></noframes></iframe></div>');
@@ -189,4 +181,4 @@ echo '<noscript>';
 echo '<iframe style="height: 600px; width: 100%;" scrolling="no" frameborder="0" src="'.$pixlr_url.'"><noframes><p>Sorry, your browser does not handle frames</p></noframes></iframe>';
 echo '</noscript>';
 
-Display::display_footer();
+Display::display_footer();

+ 122 - 75
main/document/document.inc.php

@@ -6,7 +6,7 @@
  */
 
 /**
- * Builds the form thats enables the user to
+ * Builds the form that enables the user to
  * select a directory to browse/upload in
  *
  * @param array 	An array containing the folders we want to be able to select
@@ -104,7 +104,12 @@ function build_directory_selector($folders, $document_id, $group_dir = '', $chan
  * @param int $show_as_icon - if it is true, only a clickable icon will be shown
  * @return string url
  */
-function create_document_link($document_data, $show_as_icon = false, $counter = null, $visibility) {
+function create_document_link(
+    $document_data,
+    $show_as_icon = false,
+    $counter = null,
+    $visibility
+) {
     global $dbl_click_id;
     if (isset($_SESSION['_gid'])) {
         $req_gid = '&amp;gidReq=' . $_SESSION['_gid'];
@@ -174,9 +179,6 @@ function create_document_link($document_data, $show_as_icon = false, $counter =
     }
 
     // The little download icon
-    //$tooltip_title = str_replace('?cidReq='.$_GET['cidReq'], '', basename($path));
-    $tooltip_title = explode('?', basename($path));
-
     $tooltip_title = $title;
 
     $tooltip_title_alt = $tooltip_title;
@@ -210,26 +212,42 @@ function create_document_link($document_data, $show_as_icon = false, $counter =
     $send_to = null;
     if (!$show_as_icon) {
         if ($filetype == 'folder') {
-            if (api_is_allowed_to_edit() || api_is_platform_admin() || api_get_setting('students_download_folders') == 'true') {
+            if (api_is_allowed_to_edit() ||
+                api_is_platform_admin() ||
+                api_get_setting('students_download_folders') == 'true'
+            ) {
                 //filter when I am into shared folder, I can show for donwload only my shared folder
                 if (is_shared_folder($curdirpath, $current_session_id)) {
-                    if (preg_match('/shared_folder\/sf_user_' . api_get_user_id() . '$/', urldecode($forcedownload_link)) || preg_match('/shared_folder_session_' . $current_session_id . '\/sf_user_' . api_get_user_id() . '$/', urldecode($forcedownload_link)) || api_is_allowed_to_edit() || api_is_platform_admin()) {
-                        $force_download_html = ($size == 0) ? '' : '<a href="' . $forcedownload_link . '" style="float:right"' . $prevent_multiple_click . '>' . Display::return_icon($forcedownload_icon, get_lang('Download'), array(), ICON_SIZE_SMALL) . '</a>';
+                    if (preg_match('/shared_folder\/sf_user_' . api_get_user_id() . '$/', urldecode($forcedownload_link)) ||
+                        preg_match('/shared_folder_session_' . $current_session_id . '\/sf_user_' . api_get_user_id() . '$/', urldecode($forcedownload_link)) ||
+                        api_is_allowed_to_edit() || api_is_platform_admin()
+                    ) {
+                        $force_download_html = ($size == 0) ? '' : '<a href="' . $forcedownload_link . '" style="float:right"' . $prevent_multiple_click . '>' .
+                            Display::return_icon($forcedownload_icon, get_lang('Download'), array(), ICON_SIZE_SMALL) . '</a>';
                     }
-                } elseif (!preg_match('/shared_folder/', urldecode($forcedownload_link)) || api_is_allowed_to_edit() || api_is_platform_admin()) {
-                    $force_download_html = ($size == 0) ? '' : '<a href="' . $forcedownload_link . '" style="float:right"' . $prevent_multiple_click . '>' . Display::return_icon($forcedownload_icon, get_lang('Download'), array(), ICON_SIZE_SMALL) . '</a>';
+                } elseif (!preg_match('/shared_folder/', urldecode($forcedownload_link)) ||
+                    api_is_allowed_to_edit() ||
+                    api_is_platform_admin()
+                ) {
+                    $force_download_html = ($size == 0) ? '' : '<a href="' . $forcedownload_link . '" style="float:right"' . $prevent_multiple_click . '>' .
+                        Display::return_icon($forcedownload_icon, get_lang('Download'), array(), ICON_SIZE_SMALL) . '</a>';
                 }
             }
         } else {
-            $force_download_html = ($size == 0) ? '' : '<a href="' . $forcedownload_link . '" style="float:right"' . $prevent_multiple_click . '>' . Display::return_icon($forcedownload_icon, get_lang('Download'), array(), ICON_SIZE_SMALL) . '</a>';
+            $force_download_html = ($size == 0) ? '' : '<a href="' . $forcedownload_link . '" style="float:right"' . $prevent_multiple_click . '>' .
+                Display::return_icon($forcedownload_icon, get_lang('Download'), array(), ICON_SIZE_SMALL) . '</a>';
         }
 
-        //Copy files to users myfiles
-        if (api_get_setting('allow_social_tool') == 'true' && api_get_setting('users_copy_files') == 'true' && !api_is_anonymous()) {
+        // Copy files to users myfiles
+        if (api_get_setting('allow_social_tool') == 'true' &&
+            api_get_setting('users_copy_files') == 'true' &&
+            !api_is_anonymous()
+        ) {
             $copy_myfiles_link = ($filetype == 'file') ? api_get_self() . '?' . api_get_cidreq() . '&action=copytomyfiles&id=' . $document_data['id'] . $req_gid : api_get_self() . '?' . api_get_cidreq();
 
             if ($filetype == 'file') {
-                $copy_to_myfiles = '<a href="' . $copy_myfiles_link . '" style="float:right"' . $prevent_multiple_click . '>' . Display::return_icon('briefcase.png', get_lang('CopyToMyFiles'), array(), ICON_SIZE_SMALL) . '&nbsp;&nbsp;</a>';
+                $copy_to_myfiles = '<a href="' . $copy_myfiles_link . '" style="float:right"' . $prevent_multiple_click . '>' .
+                    Display::return_icon('briefcase.png', get_lang('CopyToMyFiles'), array(), ICON_SIZE_SMALL) . '&nbsp;&nbsp;</a>';
             }
 
             if ($filetype == 'file') {
@@ -239,32 +257,39 @@ function create_document_link($document_data, $show_as_icon = false, $counter =
 
         $pdf_icon = '';
         $extension = pathinfo($path, PATHINFO_EXTENSION);
-        if (!api_is_allowed_to_edit() && api_get_setting('students_export2pdf') == 'true' && $filetype == 'file' && in_array($extension, array('html', 'htm'))) {
-            $pdf_icon = ' <a style="float:right".' . $prevent_multiple_click . ' href="' . api_get_self() . '?' . api_get_cidreq() . '&action=export_to_pdf&id=' . $document_data['id'] . '">' . Display::return_icon('pdf.png', get_lang('Export2PDF'), array(), ICON_SIZE_SMALL) . '</a> ';
+        if (!api_is_allowed_to_edit() &&
+            api_get_setting('students_export2pdf') == 'true' &&
+            $filetype == 'file' &&
+            in_array($extension, array('html', 'htm'))
+        ) {
+            $pdf_icon = ' <a style="float:right".' . $prevent_multiple_click . ' href="' . api_get_self() . '?' . api_get_cidreq() . '&action=export_to_pdf&id=' . $document_data['id'] . '">' .
+                Display::return_icon('pdf.png', get_lang('Export2PDF'), array(), ICON_SIZE_SMALL) . '</a> ';
         }
 
         if ($is_browser_viewable_file) {
-            $open_in_new_window_link = '<a href="' . $www . str_replace('%2F', '/', $url_path) . '?' . api_get_cidreq() . '" style="float:right"' . $prevent_multiple_click . ' target="_blank">' . Display::return_icon('open_in_new_window.png', get_lang('OpenInANewWindow'), array(), ICON_SIZE_SMALL) . '&nbsp;&nbsp;</a>';
+            $open_in_new_window_link = '<a href="' . $www . str_replace('%2F', '/', $url_path) . '?' . api_get_cidreq() . '" style="float:right"' . $prevent_multiple_click . ' target="_blank">' .
+                Display::return_icon('open_in_new_window.png', get_lang('OpenInANewWindow'), array(), ICON_SIZE_SMALL) . '&nbsp;&nbsp;</a>';
         }
         //target="'.$target.'"
         if ($filetype == 'file') {
             //Sound preview with jplayer
             if (preg_match('/mp3$/i', urldecode($url)) ||
-                    (preg_match('/wav$/i', urldecode($url)) && !preg_match('/_chnano_.wav$/i', urldecode($url))) ||
-                    preg_match('/ogg$/i', urldecode($url))) {
+                (preg_match('/wav$/i', urldecode($url)) && !preg_match('/_chnano_.wav$/i', urldecode($url))) ||
+                preg_match('/ogg$/i', urldecode($url))
+            ) {
                 return '<span style="float:left" ' . $visibility_class . '>' . $title . '</span>' . $force_download_html . $send_to . $copy_to_myfiles . $open_in_new_window_link . $pdf_icon;
             } elseif (
-                    //Show preview
-                    //preg_match('/html$/i', urldecode($url))  ||
-                    //preg_match('/htm$/i',  urldecode($url))  ||
-                    preg_match('/swf$/i', urldecode($url)) ||
-                    preg_match('/png$/i', urldecode($url)) ||
-                    preg_match('/gif$/i', urldecode($url)) ||
-                    preg_match('/jpg$/i', urldecode($url)) ||
-                    preg_match('/jpeg$/i', urldecode($url)) ||
-                    preg_match('/bmp$/i', urldecode($url)) ||
-                    preg_match('/svg$/i', urldecode($url)) ||
-                    (preg_match('/wav$/i', urldecode($url)) && preg_match('/_chnano_.wav$/i', urldecode($url)) && api_get_setting('enable_nanogong') == 'true')
+                //Show preview
+                //preg_match('/html$/i', urldecode($url))  ||
+                //preg_match('/htm$/i',  urldecode($url))  ||
+                preg_match('/swf$/i', urldecode($url)) ||
+                preg_match('/png$/i', urldecode($url)) ||
+                preg_match('/gif$/i', urldecode($url)) ||
+                preg_match('/jpg$/i', urldecode($url)) ||
+                preg_match('/jpeg$/i', urldecode($url)) ||
+                preg_match('/bmp$/i', urldecode($url)) ||
+                preg_match('/svg$/i', urldecode($url)) ||
+                (preg_match('/wav$/i', urldecode($url)) && preg_match('/_chnano_.wav$/i', urldecode($url)) && api_get_setting('enable_nanogong') == 'true')
             ) {
                 //yox view
                 //$url = 'showinframesmin.php?'.api_get_cidreq().'&id='.$document_data['id'].$req_gid;
@@ -285,13 +310,16 @@ function create_document_link($document_data, $show_as_icon = false, $counter =
         }
         //end copy files to users myfiles
     } else {
-        //Icon column
-        if (preg_match('/shared_folder/', urldecode($url)) && preg_match('/shared_folder$/', urldecode($url)) == false && preg_match('/shared_folder_session_' . $current_session_id . '$/', urldecode($url)) == false) {
+        // Icon column
+        if (preg_match('/shared_folder/', urldecode($url)) &&
+            preg_match('/shared_folder$/', urldecode($url)) == false &&
+            preg_match('/shared_folder_session_' . $current_session_id . '$/', urldecode($url)) == false
+        ) {
             if ($filetype == 'file') {
                 //Sound preview with jplayer
                 if (preg_match('/mp3$/i', urldecode($url)) ||
-                        (preg_match('/wav$/i', urldecode($url)) && !preg_match('/_chnano_.wav$/i', urldecode($url))) ||
-                        preg_match('/ogg$/i', urldecode($url))) {
+                    (preg_match('/wav$/i', urldecode($url)) && !preg_match('/_chnano_.wav$/i', urldecode($url))) ||
+                    preg_match('/ogg$/i', urldecode($url))) {
                     $sound_preview = DocumentManager::generate_media_preview($counter);
 
                     return $sound_preview;
@@ -309,42 +337,51 @@ function create_document_link($document_data, $show_as_icon = false, $counter =
                     (preg_match('/wav$/i', urldecode($url)) && preg_match('/_chnano_.wav$/i', urldecode($url)) && api_get_setting('enable_nanogong') == 'true')
                 ) {
                     $url = 'showinframes.php?' . api_get_cidreq() . '&id=' . $document_data['id'] . $req_gid;
-                    return '<a href="' . $url . '" title="' . $tooltip_title_alt . '" ' . $visibility_class . ' style="float:left">' . build_document_icon_tag($filetype, $path) . Display::return_icon('shared.png', get_lang('ResourceShared'), array()) . '</a>';
+                    return '<a href="' . $url . '" title="' . $tooltip_title_alt . '" ' . $visibility_class . ' style="float:left">' .
+                    build_document_icon_tag($filetype, $path) .
+                    Display::return_icon('shared.png', get_lang('ResourceShared'), array()) . '</a>';
                 } else {
-                    return '<a href="' . $url . '" title="' . $tooltip_title_alt . '" ' . $visibility_class . ' style="float:left">' . build_document_icon_tag($filetype, $path) . Display::return_icon('shared.png', get_lang('ResourceShared'), array()) . '</a>';
+                    return '<a href="' . $url . '" title="' . $tooltip_title_alt . '" ' . $visibility_class . ' style="float:left">' .
+                    build_document_icon_tag($filetype, $path) .
+                    Display::return_icon('shared.png', get_lang('ResourceShared'), array()) . '</a>';
                 }
             } else {
-                return '<a href="' . $url . '" title="' . $tooltip_title_alt . '" target="' . $target . '"' . $visibility_class . ' style="float:left">' . build_document_icon_tag($filetype, $path) . Display::return_icon('shared.png', get_lang('ResourceShared'), array()) . '</a>';
+                return '<a href="' . $url . '" title="' . $tooltip_title_alt . '" target="' . $target . '"' . $visibility_class . ' style="float:left">' .
+                build_document_icon_tag($filetype, $path) .
+                Display::return_icon('shared.png', get_lang('ResourceShared'), array()) . '</a>';
             }
         } else {
             if ($filetype == 'file') {
                 //Sound preview with jplayer
                 if (preg_match('/mp3$/i', urldecode($url)) ||
-                        (preg_match('/wav$/i', urldecode($url)) && !preg_match('/_chnano_.wav$/i', urldecode($url))) ||
-                        preg_match('/ogg$/i', urldecode($url))) {
+                    (preg_match('/wav$/i', urldecode($url)) && !preg_match('/_chnano_.wav$/i', urldecode($url))) ||
+                    preg_match('/ogg$/i', urldecode($url))) {
                     $sound_preview = DocumentManager::generate_media_preview($counter);
 
                     return $sound_preview;
                 } elseif (
-                        //Show preview
-                        preg_match('/html$/i', urldecode($url)) ||
-                        preg_match('/htm$/i', urldecode($url)) ||
-                        preg_match('/swf$/i', urldecode($url)) ||
-                        preg_match('/png$/i', urldecode($url)) ||
-                        preg_match('/gif$/i', urldecode($url)) ||
-                        preg_match('/jpg$/i', urldecode($url)) ||
-                        preg_match('/jpeg$/i', urldecode($url)) ||
-                        preg_match('/bmp$/i', urldecode($url)) ||
-                        preg_match('/svg$/i', urldecode($url)) ||
-                        (preg_match('/wav$/i', urldecode($url)) && preg_match('/_chnano_.wav$/i', urldecode($url)) && api_get_setting('enable_nanogong') == 'true')
+                    //Show preview
+                    preg_match('/html$/i', urldecode($url)) ||
+                    preg_match('/htm$/i', urldecode($url)) ||
+                    preg_match('/swf$/i', urldecode($url)) ||
+                    preg_match('/png$/i', urldecode($url)) ||
+                    preg_match('/gif$/i', urldecode($url)) ||
+                    preg_match('/jpg$/i', urldecode($url)) ||
+                    preg_match('/jpeg$/i', urldecode($url)) ||
+                    preg_match('/bmp$/i', urldecode($url)) ||
+                    preg_match('/svg$/i', urldecode($url)) ||
+                    (preg_match('/wav$/i', urldecode($url)) && preg_match('/_chnano_.wav$/i', urldecode($url)) && api_get_setting('enable_nanogong') == 'true')
                 ) {
                     $url = 'showinframes.php?' . api_get_cidreq() . '&id=' . $document_data['id'] . $req_gid; //without preview
-                    return '<a href="' . $url . '" title="' . $tooltip_title_alt . '" ' . $visibility_class . ' style="float:left">' . build_document_icon_tag($filetype, $path) . '</a>';
+                    return '<a href="' . $url . '" title="' . $tooltip_title_alt . '" ' . $visibility_class . ' style="float:left">' .
+                    build_document_icon_tag($filetype, $path) . '</a>';
                 } else {
-                    return '<a href="' . $url . '" title="' . $tooltip_title_alt . '" ' . $visibility_class . ' style="float:left">' . build_document_icon_tag($filetype, $path) . '</a>';
+                    return '<a href="' . $url . '" title="' . $tooltip_title_alt . '" ' . $visibility_class . ' style="float:left">' .
+                    build_document_icon_tag($filetype, $path) . '</a>';
                 }
             } else {
-                return '<a href="' . $url . '" title="' . $tooltip_title_alt . '" target="' . $target . '"' . $visibility_class . ' style="float:left">' . build_document_icon_tag($filetype, $path) . '</a>';
+                return '<a href="' . $url . '" title="' . $tooltip_title_alt . '" target="' . $target . '"' . $visibility_class . ' style="float:left">' .
+                build_document_icon_tag($filetype, $path) . '</a>';
             }
         }
     }
@@ -517,7 +554,7 @@ function build_edit_icons($document_data, $id, $is_template, $is_read_only = 0,
             if ($extension == 'svg' && api_browser_support('svg') && api_get_setting('enabled_support_svg') == 'true') {
                 $modify_icons = '<a href="edit_draw.php?' . api_get_cidreq() . '&id=' . $document_id . $req_gid . '">' . Display::return_icon('edit.png', get_lang('Modify'), '', ICON_SIZE_SMALL) . '</a>';
             } elseif (in_array($extension, $web_odf_extension_list)  && api_get_setting('enabled_support_odf') === true) {
-            $modify_icons = '<a href="edit_odf.php?' . api_get_cidreq() . '&id=' . $document_id . $req_gid . '">' . Display::return_icon('edit.png', get_lang('Modify'), '', ICON_SIZE_SMALL) . '</a>';
+                $modify_icons = '<a href="edit_odf.php?' . api_get_cidreq() . '&id=' . $document_id . $req_gid . '">' . Display::return_icon('edit.png', get_lang('Modify'), '', ICON_SIZE_SMALL) . '</a>';
             } elseif ($extension == 'png' || $extension == 'jpg' || $extension == 'jpeg' || $extension == 'bmp' || $extension == 'gif' || $extension == 'pxd' && api_get_setting('enabled_support_pixlr') == 'true') {
                 $modify_icons = '<a href="edit_paint.php?' . api_get_cidreq() . '&id=' . $document_id . $req_gid . '">' . Display::return_icon('edit.png', get_lang('Modify'), '', ICON_SIZE_SMALL) . '</a>';
             } else {
@@ -600,23 +637,28 @@ function build_edit_icons($document_data, $id, $is_template, $is_read_only = 0,
         if (in_array($path, DocumentManager::get_system_folders())) {
             $modify_icons .= '&nbsp;' . Display::return_icon('delete_na.png', get_lang('ThisFolderCannotBeDeleted'), array(), ICON_SIZE_SMALL);
         } else {
-            if (isset($_GET['curdirpath']) && $_GET['curdirpath'] == '/certificates' && DocumentManager::get_default_certificate_id(api_get_course_id()) == $id) {
-                $modify_icons .= '&nbsp;<a href="' . api_get_self() . '?' . api_get_cidreq() . '&amp;curdirpath=' . $curdirpath . '&action=delete_item&id='.$parent_id.'&deleteid='.$document_id.$req_gid.'&amp;' . $sort_params . 'delete_certificate_id=' . $id . '" onclick="return confirmation(\'' . basename($path) . '\');">' .
+            $titleToShow = addslashes(basename($document_data['title']));
+
+            if (isset($_GET['curdirpath']) &&
+                $_GET['curdirpath'] == '/certificates' &&
+                DocumentManager::get_default_certificate_id(api_get_course_id()) == $id
+            ) {
+                $modify_icons .= '&nbsp;<a href="' . api_get_self() . '?' . api_get_cidreq() . '&amp;curdirpath=' . $curdirpath . '&action=delete_item&id='.$parent_id.'&deleteid='.$document_id.$req_gid.'&amp;' . $sort_params . 'delete_certificate_id=' . $id . '" onclick="return confirmation(\'' . $titleToShow . '\');">' .
                     Display::return_icon('delete.png', get_lang('Delete'), array(), ICON_SIZE_SMALL) . '</a>';
             } else {
                 if ($is_certificate_mode) {
-                    $modify_icons .= '&nbsp;<a href="' . api_get_self() . '?' . api_get_cidreq() . '&amp;curdirpath=' . $curdirpath . '&action=delete_item&id='.$parent_id.'&deleteid=' . $document_id . $req_gid . '&amp;' . $sort_params . '" onclick="return confirmation(\'' . basename($path) . '\');">' .
+                    $modify_icons .= '&nbsp;<a href="' . api_get_self() . '?' . api_get_cidreq() . '&amp;curdirpath=' . $curdirpath . '&action=delete_item&id='.$parent_id.'&deleteid=' . $document_id . $req_gid . '&amp;' . $sort_params . '" onclick="return confirmation(\'' . $titleToShow . '\');">' .
                         Display::return_icon('delete.png', get_lang('Delete'), array(), ICON_SIZE_SMALL) . '</a>';
                 } else {
                     if (api_get_session_id()) {
                         if ($document_data['session_id'] == api_get_session_id()) {
-                            $modify_icons .= '&nbsp;<a href="' . api_get_self() . '?' . api_get_cidreq() . '&amp;curdirpath=' . $curdirpath . '&action=delete_item&id='.$parent_id.'&deleteid='.$document_id . $req_gid . '&amp;' . $sort_params . '" onclick="return confirmation(\'' . basename($path) . '\');">'.
+                            $modify_icons .= '&nbsp;<a href="' . api_get_self() . '?' . api_get_cidreq() . '&amp;curdirpath=' . $curdirpath . '&action=delete_item&id='.$parent_id.'&deleteid='.$document_id . $req_gid . '&amp;' . $sort_params . '" onclick="return confirmation(\'' . $titleToShow . '\');">'.
                                 Display::return_icon('delete.png', get_lang('Delete'), array(), ICON_SIZE_SMALL) . '</a>';
                         } else {
                             $modify_icons .= '&nbsp;' . Display::return_icon('delete_na.png', get_lang('ThisFolderCannotBeDeleted'), array(), ICON_SIZE_SMALL);
                         }
                     } else {
-                        $modify_icons .= '&nbsp;<a href="' . api_get_self() . '?' . api_get_cidreq() . '&amp;curdirpath=' . $curdirpath . '&action=delete_item&id='.$parent_id.'&deleteid='.$document_id . $req_gid . '&amp;' . $sort_params . '" onclick="return confirmation(\'' . basename($path) . '\');">' .
+                        $modify_icons .= '&nbsp;<a href="' . api_get_self() . '?' . api_get_cidreq() . '&amp;curdirpath=' . $curdirpath . '&action=delete_item&id='.$parent_id.'&deleteid='.$document_id . $req_gid . '&amp;' . $sort_params . '" onclick="return confirmation(\'' . $titleToShow. '\');">' .
                             Display::return_icon('delete.png', get_lang('Delete'), array(), ICON_SIZE_SMALL) . '</a>';
                     }
                 }
@@ -664,13 +706,13 @@ function build_edit_icons($document_data, $id, $is_template, $is_read_only = 0,
                     <img src="../img/' . $visibility_icon_certificate . '.png" border="0" title="' . $certificate . '" alt="" /></a>';
                     if ($is_preview) {
                         $modify_icons .= '&nbsp;<a target="_blank"  href="' . api_get_self() . '?' . api_get_cidreq() . '&amp;curdirpath=' . $curdirpath . '&amp;set_preview=' . $id . $req_gid . '&amp;' . $sort_params . '" >' .
-                                Display::return_icon('preview_view.png', $preview, '', ICON_SIZE_SMALL) . '</a>';
+                            Display::return_icon('preview_view.png', $preview, '', ICON_SIZE_SMALL) . '</a>';
                     }
                 }
             }
         } else {
             $modify_icons .= '&nbsp;<a href="' . api_get_self() . '?' . api_get_cidreq() . '&curdirpath=' . $curdirpath . '&amp;remove_as_template=' . $id . $req_gid . '&amp;' . $sort_params . '">' .
-                    Display::return_icon('wizard_na.png', get_lang('RemoveAsTemplate'), '', ICON_SIZE_SMALL) . '</a>';
+                Display::return_icon('wizard_na.png', get_lang('RemoveAsTemplate'), '', ICON_SIZE_SMALL) . '</a>';
         }
         $modify_icons .= '&nbsp;<a href="' . api_get_self() . '?' . api_get_cidreq() . '&action=export_to_pdf&id=' . $id . '">' .
             Display::return_icon('pdf.png', get_lang('Export2PDF'), array(), ICON_SIZE_SMALL) . '</a>';
@@ -695,16 +737,20 @@ function build_move_to_selector($folders, $curdirpath, $move_file, $group_dir =
 
         if (is_array($folders)) {
             foreach ($folders as & $folder) {
-                //Hide some folders
+                // Hide some folders
                 if ($folder == '/HotPotatoes_files' || $folder == '/certificates' || basename($folder) == 'css') {
                     continue;
                 }
                 //Admin setting for Hide/Show the folders of all users
-                if (api_get_setting('show_users_folders') == 'false' && (strstr($folder, '/shared_folder') || strstr($folder, 'shared_folder_session_'))) {
+                if (api_get_setting('show_users_folders') == 'false' &&
+                    (strstr($folder, '/shared_folder') || strstr($folder, 'shared_folder_session_'))
+                ) {
                     continue;
                 }
                 //Admin setting for Hide/Show Default folders to all users
-                if (api_get_setting('show_default_folders') == 'false' && ($folder == '/images' || $folder == '/flash' || $folder == '/audio' || $folder == '/video' || strstr($folder, '/images/gallery') || $folder == '/video/flv')) {
+                if (api_get_setting('show_default_folders') == 'false' &&
+                    ($folder == '/images' || $folder == '/flash' || $folder == '/audio' || $folder == '/video' || strstr($folder, '/images/gallery') || $folder == '/video/flv')
+                ) {
                     continue;
                 }
                 //Admin setting for Hide/Show chat history folder
@@ -731,7 +777,8 @@ function build_move_to_selector($folders, $curdirpath, $move_file, $group_dir =
         }
     } else {
         foreach ($folders as $folder) {
-            if (($curdirpath != $folder) && ($folder != $move_file) && (substr($folder, 0, strlen($move_file) + 1) != $move_file . '/')) { // Cannot copy dir into his own subdir
+            if (($curdirpath != $folder) && ($folder != $move_file) && (substr($folder, 0, strlen($move_file) + 1) != $move_file . '/')) {
+                // Cannot copy dir into his own subdir
                 $path_displayed = get_titles_of_path($folder);
                 $display_folder = substr($path_displayed, strlen($group_dir));
                 $display_folder = ($display_folder == '') ? get_lang('Documents') : $display_folder;
@@ -753,9 +800,7 @@ function build_move_to_selector($folders, $curdirpath, $move_file, $group_dir =
 function get_titles_of_path($path) {
     global $tmp_folders_titles;
     $course_id = api_get_course_int_id();
-
     $nb_slashes = substr_count($path, '/');
-    $tmp_path = '';
     $current_slash_pos = 0;
     $path_displayed = '';
     for ($i = 0; $i < $nb_slashes; $i++) {
@@ -853,8 +898,10 @@ function is_any_user_shared_folder($path, $current_session_id) {
  */
 function is_my_shared_folder($user_id, $path, $current_session_id) {
     $clean_path = Security::remove_XSS($path) . '/';
-    $main_user_shared_folder = '/shared_folder\/sf_user_' . $user_id . '\//'; //for security does not remove the last slash
-    $main_user_shared_folder_session = '/shared_folder_session_' . $current_session_id . '\/sf_user_' . $user_id . '\//'; //for security does not remove the last slash
+    //for security does not remove the last slash
+    $main_user_shared_folder = '/shared_folder\/sf_user_' . $user_id . '\//';
+    //for security does not remove the last slash
+    $main_user_shared_folder_session = '/shared_folder_session_' . $current_session_id . '\/sf_user_' . $user_id . '\//';
 
     if (preg_match($main_user_shared_folder, $clean_path)) {
         return true;
@@ -884,12 +931,12 @@ function search_keyword($document_name, $keyword) {
  */
 function is_browser_viewable($file_extension) {
     static $allowed_extensions = array(
-    'htm', 'html', 'xhtml',
-     'gif', 'jpg', 'jpeg', 'png', 'tif', 'tiff',
-     'pdf', 'svg', 'swf',
-     'txt', 'log',
-     'mp4', 'ogg', 'ogv', 'ogx', 'mpg', 'mpeg', 'mov', 'avi', 'webm', 'wmv',
-     'mp3', 'oga', 'wav', 'au', 'wma', 'mid', 'kar'
+        'htm', 'html', 'xhtml',
+        'gif', 'jpg', 'jpeg', 'png', 'tif', 'tiff',
+        'pdf', 'svg', 'swf',
+        'txt', 'log',
+        'mp4', 'ogg', 'ogv', 'ogx', 'mpg', 'mpeg', 'mov', 'avi', 'webm', 'wmv',
+        'mp3', 'oga', 'wav', 'au', 'wma', 'mid', 'kar'
     );
 
     /*

+ 86 - 21
main/document/document.php

@@ -232,7 +232,10 @@ switch ($action) {
                     if ($deleteDocument) {
                         $certificateId = isset($_GET['delete_certificate_id']) ? $_GET['delete_certificate_id'] : null;
                         DocumentManager::remove_attach_certificate(api_get_course_id(), $certificateId);
-                        $message = Display::return_message(get_lang('DocDeleted').': '.$documentInfo['path'], 'success');
+                        $message = Display::return_message(
+                            get_lang('DocDeleted') . ': ' . $documentInfo['title'],
+                            'success'
+                        );
                     } else {
                         $message = Display::return_message(get_lang('DocDeleteError'), 'warning');
                     }
@@ -649,7 +652,7 @@ if (isset($_GET['curdirpath']) &&
             $new_content_html
         );
         $new_content_html = str_replace(
-            '/main/img/',
+            SYS_CODE_PATH . 'img/',
             api_get_path(WEB_IMG_PATH),
             $new_content_html
         );
@@ -996,7 +999,12 @@ if ($is_allowed_to_edit ||
                 );
             } else {
                 $moveForm .= '<legend>'.get_lang('Move').'</legend>';
-                $moveForm .= build_move_to_selector($folders, $move_path, $my_get_move, $group_properties['directory']);
+                $moveForm .= build_move_to_selector(
+                    $folders,
+                    $move_path,
+                    $my_get_move,
+                    $group_properties['directory']
+                );
             }
         }
     }
@@ -1032,7 +1040,11 @@ if ($is_allowed_to_edit ||
                 $fileExist = true;
             }
             if (move($base_work_dir.$document_to_move['path'], $base_work_dir.$moveTo)) {
-                update_db_info('update', $document_to_move['path'], $moveTo.'/'.basename($document_to_move['path']));
+                update_db_info(
+                    'update',
+                    $document_to_move['path'],
+                    $moveTo . '/' . basename($document_to_move['path'])
+                );
 
                 //update database item property
                 $doc_id = $_POST['move_file'];
@@ -1098,8 +1110,16 @@ if ($is_allowed_to_edit ||
         $files = $_POST['ids'];
         $readonlyAlreadyChecked = false;
         $messages = null;
+        $items = array(
+            '/audio',
+            '/flash',
+            '/images',
+            '/shared_folder',
+            '/video',
+            '/chat_files',
+            '/certificates'
+        );
         foreach ($files as $documentId) {
-            $items = array('/audio', '/flash', '/images', '/shared_folder', '/video', '/chat_files', '/certificates');
             $data = DocumentManager::get_document_data_by_id($documentId, $courseInfo['code']);
             if (in_array($data['path'], $items)) {
                 // exclude system directories (do not allow deletion)
@@ -1120,7 +1140,7 @@ if ($is_allowed_to_edit ||
                             null,
                             $sessionId
                         )) {
-                            $messages .= Display::return_message(get_lang('VisibilityChanged').': '.$data['path'], 'confirmation');
+                            $messages .= Display::return_message(get_lang('VisibilityChanged').': '.$data['title'], 'confirmation');
                         } else {
                             $messages .= Display::return_message(get_lang('ViModProb'), 'error');
                         }
@@ -1139,7 +1159,7 @@ if ($is_allowed_to_edit ||
                             null,
                             $sessionId
                         )) {
-                            $messages .= Display::return_message(get_lang('VisibilityChanged').': '.$data['path'], 'confirmation');
+                            $messages .= Display::return_message(get_lang('VisibilityChanged').': '.$data['title'], 'confirmation');
                         } else {
                             $messages .= Display::return_message(get_lang('ViModProb'), 'error');
                         }
@@ -1160,7 +1180,10 @@ if ($is_allowed_to_edit ||
                                         $sessionId
                                     )
                                     ) {
-                                        $messages .= Display::return_message(get_lang('CantDeleteReadonlyFiles'), 'error');
+                                        $messages .= Display::return_message(
+                                            get_lang('CantDeleteReadonlyFiles'),
+                                            'error'
+                                        );
                                         break 2;
                                     }
                                 }
@@ -1177,7 +1200,10 @@ if ($is_allowed_to_edit ||
                             $groupId
                         );
                         if (!empty($deleteDocument)) {
-                            $messages .= Display::return_message(get_lang('DocDeleted').': '.$data['path'], 'confirmation');
+                            $messages .= Display::return_message(
+                                get_lang('DocDeleted').': '.$data['title'],
+                                'confirmation'
+                            );
                         }
                         break;
                 }
@@ -1205,6 +1231,7 @@ if ($is_allowed_to_edit ||
         if ($post_dir_name == '../' || $post_dir_name == '.' || $post_dir_name == '..') {
             $message = Display::return_message(get_lang('CannotCreateDir'), 'error');
         } else {
+            // dir_id is the parent folder id.
             if (!empty($_POST['dir_id'])) {
                 // Get the document data from the ID
                 $document_data = DocumentManager::get_document_data_by_id(
@@ -1232,7 +1259,7 @@ if ($is_allowed_to_edit ||
             $dir_check = $base_work_dir.$dir_name;
             $visibility = empty($groupId) ? null : 1;
 
-            $created_dir = create_unexisting_directory(
+            $newFolderData = create_unexisting_directory(
                 $courseInfo,
                 api_get_user_id(),
                 $sessionId,
@@ -1244,10 +1271,16 @@ if ($is_allowed_to_edit ||
                 $visibility
             );
 
-            if ($created_dir) {
-                $message = Display::return_message(get_lang('DirCr').' '.$created_dir, 'confirmation');
+            if (!empty($newFolderData)) {
+                $message = Display::return_message(
+                    get_lang('DirCr') . ' ' . $newFolderData['title'],
+                    'confirmation'
+                );
             } else {
-                $message = Display::return_message(get_lang('CannotCreateDir'), 'error');
+                $message = Display::return_message(
+                    get_lang('CannotCreateDir'),
+                    'error'
+                );
             }
 
         }
@@ -1617,7 +1650,13 @@ $total_size = 0;
 $sortable_data = array();
 
 if (isset($documentAndFolders) && is_array($documentAndFolders)) {
-    if ($groupId == 0 || GroupManager::user_has_access($userId, $groupId, GroupManager::GROUP_TOOL_DOCUMENTS)) {
+    if ($groupId == 0 ||
+        GroupManager::user_has_access(
+            $userId,
+            $groupId,
+            GroupManager::GROUP_TOOL_DOCUMENTS
+        )
+    ) {
         $count = 1;
         $countedPaths = array();
         $countedPaths = array();
@@ -1707,13 +1746,27 @@ if (isset($documentAndFolders) && is_array($documentAndFolders)) {
             $row[] = $invisibility_span_open.$display_date.$invisibility_span_close;
 
             // Admins get an edit column
-            if ($is_allowed_to_edit || $group_member_with_upload_rights || is_my_shared_folder(api_get_user_id(), $curdirpath, $sessionId)) {
+            if ($is_allowed_to_edit || $group_member_with_upload_rights ||
+                is_my_shared_folder(api_get_user_id(), $curdirpath, $sessionId)
+            ) {
                 $is_template = isset($document_data['is_template']) ? $document_data['is_template'] : false;
                 // If readonly, check if it the owner of the file or if the user is an admin
                 if ($document_data['insert_user_id'] == api_get_user_id() || api_is_platform_admin()) {
-                    $edit_icons = build_edit_icons($document_data, $key, $is_template, 0, $is_visible);
+                    $edit_icons = build_edit_icons(
+                        $document_data,
+                        $key,
+                        $is_template,
+                        0,
+                        $is_visible
+                    );
                 } else {
-                    $edit_icons = build_edit_icons($document_data, $key, $is_template, $document_data['readonly'], $is_visible);
+                    $edit_icons = build_edit_icons(
+                        $document_data,
+                        $key,
+                        $is_template,
+                        $document_data['readonly'],
+                        $is_visible
+                    );
                 }
                 $row[] = $edit_icons;
             }
@@ -1756,7 +1809,12 @@ if (!is_null($documentAndFolders)) {
             || api_is_platform_admin()
         ) {
             $actions .= Display::url(
-                Display::return_icon('save_pack.png', get_lang('Save').' (ZIP)', '', ICON_SIZE_MEDIUM),
+                Display::return_icon(
+                    'save_pack.png',
+                    get_lang('Save').' (ZIP)',
+                    '',
+                    ICON_SIZE_MEDIUM
+                ),
                 api_get_path(WEB_CODE_PATH).'document/document.php?'.api_get_cidreq().'&action=downloadfolder&id='.$document_id
             );
         }
@@ -1798,7 +1856,9 @@ if (!$is_certificate_mode) {
     );
 }
 
-if (($is_allowed_to_edit || $group_member_with_upload_rights) && count($documentAndFolders) > 1) {
+if (($is_allowed_to_edit || $group_member_with_upload_rights) &&
+    count($documentAndFolders) > 1
+) {
     $column_show[] = 1;
 }
 
@@ -1922,10 +1982,15 @@ if (count($documentAndFolders) > 1) {
         $course_quota = DocumentManager::get_course_quota();
 
         // Calculating the total space
-        $already_consumed_space_course = DocumentManager::documents_total_space(api_get_course_int_id());
+        $already_consumed_space_course = DocumentManager::documents_total_space(
+            api_get_course_int_id()
+        );
 
         // Displaying the quota
-        DocumentManager::display_simple_quota($course_quota, $already_consumed_space_course);
+        DocumentManager::display_simple_quota(
+            $course_quota,
+            $already_consumed_space_course
+        );
     }
 }
 if (!empty($table_footer)) {

+ 4 - 6
main/document/document_quota.php

@@ -4,9 +4,6 @@
  * Document quota management script
  * @package chamilo.document
  */
-/**
- * Init
- */
 
 $language_file = array('document');
 
@@ -60,7 +57,10 @@ if (!empty($session_list)) {
             $session_data['name'] = $session_data['name'] . ' * ';
         }
         $used_quota_bytes += $quota_bytes;
-        $session[] = array(addslashes(get_lang('Session').': '.$session_data['name']).' ('.format_file_size($quota_bytes).')', $quota_percentage);
+        $session[] = array(
+            addslashes(get_lang('Session').': '.$session_data['name']).' ('.format_file_size($quota_bytes).')',
+            $quota_percentage
+        );
     }
 }
 $group_list = GroupManager::get_groups();
@@ -111,9 +111,7 @@ if (is_array($document_list)) {
 }
 
 $quota_percentage = round(($total_quota_bytes - $used_quota_bytes)/$total_quota_bytes, 2)*100;
-
 $session[] = array(addslashes(get_lang('ShowCourseQuotaUse')).' ('.format_file_size($total_quota_bytes - $used_quota_bytes).') ', $quota_percentage);
-
 $quota_data = json_encode($session);
 
 $htmlHeadXtra[] = "

+ 2 - 2
main/document/download.php

@@ -31,10 +31,10 @@ if (strpos($doc_url, '../') OR strpos($doc_url, '/..')) {
 }
 
 // Dealing with image included into survey: when users receive a link towards a
-// survey while not being authenticated on the plateform.
+// survey while not being authenticated on the platform.
 // The administrator should probably be able to disable this code through admin
 // inteface.
-$refer_script = strrchr($_SERVER["HTTP_REFERER"], '/');
+$refer_script = isset($_SERVER["HTTP_REFERER"]) ? strrchr($_SERVER["HTTP_REFERER"], '/') : null;
 
 $sys_course_path = api_get_path(SYS_COURSE_PATH).$_course['path'].'/document';
 

+ 79 - 22
main/document/downloadfolder.inc.php

@@ -6,9 +6,12 @@
  *	@package chamilo.document
  */
 
+use \ChamiloSession as Session;
+
 set_time_limit(0);
 
 require_once '../inc/global.inc.php';
+
 api_protect_course_script();
 
 $sysCoursePath = api_get_path(SYS_COURSE_PATH);
@@ -72,7 +75,28 @@ $remove_dir = ($path != '/') ? substr($path, 0, strlen($path) - strlen(basename(
 // Put the files in the zip
 // 2 possibilities: Admins get all files and folders in the selected folder (except for the deleted ones)
 // Normal users get only visible files that are in visible folders
+function fixDocumentNameCallback($p_event, &$p_header)
+{
+    global $remove_dir;
+    $files = Session::read('doc_files_to_download');
+    $storedFile = $remove_dir.$p_header['stored_filename'];
+
+    if (!isset($files[$storedFile])) {
+        return 0;
+    }
 
+    $documentData = $files[$storedFile];
+    $documentNameFixed = DocumentManager::undoFixDocumentName(
+        $documentData['path'],
+        $documentData['c_id'],
+        $documentData['id_session'],
+        $documentData['to_group_id']
+    );
+
+    $p_header['stored_filename'] = $documentNameFixed;
+
+    return 1;
+}
 // Admins are allowed to download invisible files
 if (api_is_allowed_to_edit()) {
     // Set the path that will be used in the query
@@ -83,7 +107,7 @@ if (api_is_allowed_to_edit()) {
     }
     $querypath = Database::escape_string($querypath);
     // Search for all files that are not deleted => visibility != 2
-    $sql = "SELECT path, id_session
+    $sql = "SELECT path, id_session, docs.id, props.to_group_id, docs.c_id
             FROM $doc_table AS docs INNER JOIN $prop_table AS props
             ON
                 docs.id = props.ref AND
@@ -98,25 +122,38 @@ if (api_is_allowed_to_edit()) {
                 docs.c_id = ".$courseId." ";
 
     $sql.= DocumentManager::getSessionFolderFilters($querypath, $sessionId);
-    $query = Database::query($sql);
-    // Add tem to the zip file
-    while ($not_deleted_file = Database::fetch_assoc($query)) {
+
+    $result = Database::query($sql);
+
+    $files = array();
+    while ($row = Database::fetch_array($result)) {
+        $files[$row['path']] = $row;
+    }
+
+    Session::write('doc_files_to_download', $files);
+
+    foreach ($files as $not_deleted_file) {
         // Filtering folders and
         if (strpos($not_deleted_file['path'], 'chat_files') > 0 ||
             strpos($not_deleted_file['path'], 'shared_folder') > 0
         ) {
             if (!empty($sessionId)) {
-               if ($not_deleted_file['id_session'] != $sessionId) {
-                   continue;
-               }
+                if ($not_deleted_file['id_session'] != $sessionId) {
+                    continue;
+                }
             }
         }
+
         $zip->add(
             $sysCoursePath.$courseInfo['path'].'/document'.$not_deleted_file['path'],
             PCLZIP_OPT_REMOVE_PATH,
-            $sysCoursePath.$courseInfo['path'].'/document'.$remove_dir
+            $sysCoursePath.$courseInfo['path'].'/document'.$remove_dir,
+            PCLZIP_CB_PRE_ADD,
+            'fixDocumentNameCallback'
         );
     }
+
+    Session::erase('doc_files_to_download');
 } else {
     // For other users, we need to create a zip  file with only visible files and folders
 
@@ -132,7 +169,7 @@ if (api_is_allowed_to_edit()) {
        1st: Get all files that are visible in the given path
     */
     $querypath = Database::escape_string($querypath);
-    $sql = "SELECT path, id_session
+    $sql = "SELECT path, id_session, docs.id, props.to_group_id, docs.c_id
             FROM $doc_table AS docs INNER JOIN $prop_table AS props
             ON
                 docs.id = props.ref AND
@@ -147,10 +184,12 @@ if (api_is_allowed_to_edit()) {
                 props.to_group_id       = ".$groupId;
 
     $sql.= DocumentManager::getSessionFolderFilters($querypath, $sessionId);
+    $result = Database::query($sql);
+
+    $files = array();
 
-    $query = Database::query($sql);
     // Add them to an array
-    while ($all_visible_files = Database::fetch_assoc($query)) {
+    while ($all_visible_files = Database::fetch_assoc($result)) {
         if (strpos($all_visible_files['path'], 'chat_files') > 0 ||
             strpos($all_visible_files['path'], 'shared_folder') > 0
         ) {
@@ -161,10 +200,11 @@ if (api_is_allowed_to_edit()) {
             }
         }
         $all_visible_files_path[] = $all_visible_files['path'];
+        $files[$all_visible_files['path']] = $all_visible_files;
     }
 
     // 2nd: Get all folders that are invisible in the given path
-    $sql = "SELECT path
+    $sql = "SELECT path, id_session, docs.id, props.to_group_id, docs.c_id
             FROM $doc_table AS docs INNER JOIN $prop_table AS props
             ON
                 docs.id = props.ref AND
@@ -179,13 +219,16 @@ if (api_is_allowed_to_edit()) {
     $query2 = Database::query($sql);
 
     // If we get invisible folders, we have to filter out these results from all visible files we found
+
     if (Database::num_rows($query2) > 0) {
+        $files = array();
         // Add item to an array
         while ($invisible_folders = Database::fetch_assoc($query2)) {
             //3rd: Get all files that are in the found invisible folder (these are "invisible" too)
-            $sql = "SELECT path
-                    FROM $doc_table AS docs INNER JOIN $prop_table AS props
-                     ON
+            $sql = "SELECT path, docs.id, props.to_group_id, docs.c_id
+                    FROM $doc_table AS docs
+                    INNER JOIN $prop_table AS props
+                    ON
                         docs.id = props.ref AND
                         docs.c_id = props.c_id
                     WHERE
@@ -199,25 +242,36 @@ if (api_is_allowed_to_edit()) {
             // Add tem to an array
             while ($files_in_invisible_folder = Database::fetch_assoc($query3)) {
                 $files_in_invisible_folder_path[] = $files_in_invisible_folder['path'];
+                $files[$files_in_invisible_folder['path']] = $files_in_invisible_folder;
             }
         }
+
         // Compare the array with visible files and the array with files in invisible folders
         // and keep the difference (= all visible files that are not in an invisible folder)
-        $files_for_zipfile = diff((array)$all_visible_files_path, (array)$files_in_invisible_folder_path);
+        $files_for_zipfile = diff(
+            (array) $all_visible_files_path,
+            (array) $files_in_invisible_folder_path
+        );
+
     } else {
         // No invisible folders found, so all visible files can be added to the zipfile
         $files_for_zipfile = $all_visible_files_path;
     }
 
+    Session::write('doc_files_to_download', $files);
+
     // Add all files in our final array to the zipfile
     for ($i = 0; $i < count($files_for_zipfile); $i++) {
         $zip->add(
             $sysCoursePath . $courseInfo['path'] . '/document' . $files_for_zipfile[$i],
             PCLZIP_OPT_REMOVE_PATH,
-            $sysCoursePath . $courseInfo['path'] . '/document' . $remove_dir
+            $sysCoursePath . $courseInfo['path'] . '/document' . $remove_dir,
+            PCLZIP_CB_PRE_ADD,
+            'fixDocumentNameCallback'
         );
     }
-} // end for other users
+    Session::erase('doc_files_to_download');
+}
 
 // Launch event
 event_download(($path == '/') ? 'documents.zip (folder)' : basename($path).'.zip (folder)');
@@ -226,9 +280,11 @@ event_download(($path == '/') ? 'documents.zip (folder)' : basename($path).'.zip
 $name = ($path == '/') ? 'documents.zip' : $documentInfo['title'].'.zip';
 
 if (Security::check_abs_path($tempZipFile, api_get_path(SYS_ARCHIVE_PATH))) {
-   DocumentManager::file_send_for_download($tempZipFile, true, $name);
-   @unlink($tempZipFile);
-   exit;
+    $result = DocumentManager::file_send_for_download($tempZipFile, true, $name);
+    @unlink($tempZipFile);
+    exit;
+} else {
+    api_not_allowed(true);
 }
 
 /**
@@ -240,7 +296,8 @@ if (Security::check_abs_path($tempZipFile, api_get_path(SYS_ARCHIVE_PATH))) {
  *
  * @return array difference between the two arrays
  */
-function diff($arr1, $arr2) {
+function diff($arr1, $arr2)
+{
     $res = array();
     $r = 0;
     foreach ($arr1 as & $av) {

+ 48 - 19
main/document/edit_document.php

@@ -112,7 +112,12 @@ $dir = '/';
 $currentDirPath = isset($_GET['curdirpath']) ? Security::remove_XSS($_GET['curdirpath']) : null;
 
 if (isset($_GET['id'])) {
-    $document_data  = DocumentManager::get_document_data_by_id($_GET['id'], api_get_course_id(), true);
+    $document_data = DocumentManager::get_document_data_by_id(
+        $_GET['id'],
+        api_get_course_id(),
+        true
+    );
+
     $document_id    = $document_data['id'];
     $file           = $document_data['path'];
     $parent_id      = DocumentManager::get_document_id($course_info, dirname($file));
@@ -134,7 +139,7 @@ $call_from_tool = isset($_GET['origin']) ? Security::remove_XSS($_GET['origin'])
 $slide_id = isset($_GET['origin_opt']) ? Security::remove_XSS($_GET['origin_opt']) : null;
 $file_name = $doc;
 $group_document = false;
-$current_session_id = api_get_session_id();
+$sessionId = api_get_session_id();
 $user_id = api_get_user_id();
 $doc_tree = explode('/', $file);
 $count_dir = count($doc_tree) - 2; // "2" because at the begin and end there are 2 "/"
@@ -167,7 +172,7 @@ if ($is_certificate_mode) {
     $html_editor_config['BaseHref']             = api_get_path(WEB_COURSE_PATH).$_course['path'].'/document'.$dir;
 }
 
-$is_allowed_to_edit = api_is_allowed_to_edit(null, true) || $_SESSION['group_member_with_upload_rights']|| is_my_shared_folder(api_get_user_id(), $dir, $current_session_id);
+$is_allowed_to_edit = api_is_allowed_to_edit(null, true) || $_SESSION['group_member_with_upload_rights']|| is_my_shared_folder(api_get_user_id(), $dir, $sessionId);
 $noPHP_SELF = true;
 
 /*	Other initialization code */
@@ -274,8 +279,8 @@ if ($is_allowed_to_edit) {
 						if (!is_dir($filepath.'css')) {
 							mkdir($filepath.'css', api_get_permissions_for_new_directories());
 							$doc_id = add_document($_course, $dir.'css', 'folder', 0, 'css');
-							api_item_property_update($_course, TOOL_DOCUMENT, $doc_id, 'FolderCreated', api_get_user_id(), null, null, null, null, $current_session_id);
-							api_item_property_update($_course, TOOL_DOCUMENT, $doc_id, 'invisible', api_get_user_id(), null, null, null, null, $current_session_id);
+							api_item_property_update($_course, TOOL_DOCUMENT, $doc_id, 'FolderCreated', api_get_user_id(), null, null, null, null, $sessionId);
+							api_item_property_update($_course, TOOL_DOCUMENT, $doc_id, 'invisible', api_get_user_id(), null, null, null, null, $sessionId);
 						}
 
 						if (!is_file($filepath.'css/frames.css')) {
@@ -283,8 +288,8 @@ if ($is_allowed_to_edit) {
 							if (file_exists(api_get_path(SYS_CODE_PATH).'css/'.$platform_theme.'/frames.css')) {
 								copy(api_get_path(SYS_CODE_PATH).'css/'.$platform_theme.'/frames.css', $filepath.'css/frames.css');
 								$doc_id = add_document($_course, $dir.'css/frames.css', 'file', filesize($filepath.'css/frames.css'), 'frames.css');
-								api_item_property_update($_course, TOOL_DOCUMENT, $doc_id, 'DocumentAdded', api_get_user_id(), null, null, null, null, $current_session_id);
-								api_item_property_update($_course, TOOL_DOCUMENT, $doc_id, 'invisible', api_get_user_id(), null, null, null, null, $current_session_id);
+								api_item_property_update($_course, TOOL_DOCUMENT, $doc_id, 'DocumentAdded', api_get_user_id(), null, null, null, null, $sessionId);
+								api_item_property_update($_course, TOOL_DOCUMENT, $doc_id, 'invisible', api_get_user_id(), null, null, null, null, $sessionId);
 							}
 						}
 
@@ -293,7 +298,7 @@ if ($is_allowed_to_edit) {
 
 						if ($document_id) {
 							update_existing_document($_course, $document_id, $file_size, $read_only_flag);
-							api_item_property_update($_course, TOOL_DOCUMENT, $document_id, 'DocumentUpdated', api_get_user_id(), null, null, null, null, $current_session_id);
+							api_item_property_update($_course, TOOL_DOCUMENT, $document_id, 'DocumentUpdated', api_get_user_id(), null, null, null, null, $sessionId);
 							// Update parent folders
 							item_property_update_on_folder($_course, $dir, api_get_user_id());
 							header('Location: document.php?id='.$document_data['parent_id'].'&'.api_get_cidreq());
@@ -355,8 +360,24 @@ if (isset($info_message)) {
 }
 
 // Owner
-$document_info  = api_get_item_property_info(api_get_course_int_id(),'document', $document_id);
-$owner_id       = $document_info['insert_user_id'];
+
+$document_info = api_get_item_property_info(
+    api_get_course_int_id(),
+    'document',
+    $document_id,
+    0
+);
+// Try to find this document in the session
+if (!empty($sessionId)) {
+    $document_info = api_get_item_property_info(
+        api_get_course_int_id(),
+        'document',
+        $document_id,
+        $sessionId
+    );
+}
+
+$owner_id = $document_info['insert_user_id'];
 $last_edit_date = $document_info['lastedit_date'];
 
 if ($owner_id == api_get_user_id() ||
@@ -406,7 +427,7 @@ if ($owner_id == api_get_user_id() ||
 		}
 	}
 
-	if (!$group_document && !is_my_shared_folder(api_get_user_id(), $currentDirPath, $current_session_id)) {
+	if (!$group_document && !is_my_shared_folder(api_get_user_id(), $currentDirPath, $sessionId)) {
 		$metadata_link = '<a href="../metadata/index.php?eid='.urlencode('Document.'.$document_data['id']).'">'.get_lang('AddMetadata').'</a>';
 
 		//Updated on field
@@ -510,26 +531,34 @@ function change_name($base_work_dir, $source_file, $rename_to, $dir, $doc) {
 }
 
 //return button back to
-function show_return($document_id, $path, $call_from_tool='', $slide_id=0, $is_certificate_mode=false) {
+function show_return($document_id, $path, $call_from_tool='', $slide_id=0, $is_certificate_mode=false)
+{
     global $parent_id;
-	$pathurl = urlencode($path);
 	echo '<div class="actions">';
 
+    $url = api_get_path(WEB_CODE_PATH).'document/document.php?'.api_get_cidreq().'&id='.$parent_id;
+
 	if ($is_certificate_mode) {
-		echo '<a href="document.php?curdirpath='.Security::remove_XSS($_GET['curdirpath']).'&selectcat=' . Security::remove_XSS($_GET['selectcat']).'">'.Display::return_icon('back.png',get_lang('Back').' '.get_lang('To').' '.get_lang('CertificateOverview'),'',ICON_SIZE_MEDIUM).'</a>';
+		echo '<a href="document.php?curdirpath='.Security::remove_XSS($_GET['curdirpath']).'&selectcat=' . Security::remove_XSS($_GET['selectcat']).'">'.
+            Display::return_icon('back.png',get_lang('Back').' '.get_lang('To').' '.get_lang('CertificateOverview'),'',ICON_SIZE_MEDIUM).'</a>';
 	} elseif($call_from_tool=='slideshow') {
-		echo '<a href="'.api_get_path(WEB_PATH).'main/document/slideshow.php?slide_id='.$slide_id.'&curdirpath='.Security::remove_XSS(urlencode($_GET['curdirpath'])).'">'.Display::return_icon('slideshow.png', get_lang('BackTo').' '.get_lang('ViewSlideshow'),'',ICON_SIZE_MEDIUM).'</a>';
+		echo '<a href="'.api_get_path(WEB_PATH).'main/document/slideshow.php?slide_id='.$slide_id.'&curdirpath='.Security::remove_XSS(urlencode($_GET['curdirpath'])).'">'.
+            Display::return_icon('slideshow.png', get_lang('BackTo').' '.get_lang('ViewSlideshow'),'',ICON_SIZE_MEDIUM).'</a>';
 	} elseif($call_from_tool=='editdraw') {
-		echo '<a href="document.php?action=exit_slideshow&id='.$parent_id.'">'.Display::return_icon('back.png', get_lang('BackTo').' '.get_lang('DocumentsOverview'),'',ICON_SIZE_MEDIUM).'</a>';
+		echo '<a href="'.$url.'">'.
+            Display::return_icon('back.png', get_lang('BackTo').' '.get_lang('DocumentsOverview'),'',ICON_SIZE_MEDIUM).'</a>';
 		echo '<a href="javascript:history.back(1)">'.Display::return_icon('draw.png', get_lang('BackTo').' '.get_lang('Draw'), array(), 32).'</a>';
 	} elseif($call_from_tool=='editodf') {
-        echo '<a href="document.php?action=exit_slideshow&id='.$parent_id.'">'.Display::return_icon('back.png', get_lang('BackTo').' '.get_lang('DocumentsOverview'),'',ICON_SIZE_MEDIUM).'</a>';
+        echo '<a href="'.$url.'">'.
+            Display::return_icon('back.png', get_lang('BackTo').' '.get_lang('DocumentsOverview'),'',ICON_SIZE_MEDIUM).'</a>';
         echo '<a href="javascript:history.back(1)">'.Display::return_icon('draw.png', get_lang('BackTo').' '.get_lang('Write'), array(), 32).'</a>';
     } elseif($call_from_tool=='editpaint'){
-		echo '<a href="document.php?action=exit_slideshow&id='.$parent_id.'">'.Display::return_icon('back.png', get_lang('BackTo').' '.get_lang('DocumentsOverview'), array(), ICON_SIZE_MEDIUM).'</a>';
+		echo '<a href="'.$url.'">'.
+            Display::return_icon('back.png', get_lang('BackTo').' '.get_lang('DocumentsOverview'), array(), ICON_SIZE_MEDIUM).'</a>';
 		echo '<a href="javascript:history.back(1)">'.Display::return_icon('paint.png', get_lang('BackTo').' '.get_lang('Paint'), array(), 32).'</a>';
 	} else {
-		echo '<a href="document.php?action=exit_slideshow&id='.$parent_id.'">'.Display::return_icon('back.png', get_lang('BackTo').' '.get_lang('DocumentsOverview'),'',ICON_SIZE_MEDIUM).'</a>';
+		echo '<a href="'.$url.'">'.
+            Display::return_icon('back.png', get_lang('BackTo').' '.get_lang('DocumentsOverview'),'',ICON_SIZE_MEDIUM).'</a>';
 	}
 	echo '</div>';
 }

+ 9 - 14
main/document/edit_draw.php

@@ -9,11 +9,6 @@
  * @author Juan Carlos Ra�a Trabado
  * @since 25/september/2010
 */
-/**
- * Code
- */
-
-/*	INIT SECTION */
 
 $language_file = array('document');
 
@@ -31,7 +26,7 @@ $document_data = DocumentManager::get_document_data_by_id($_GET['id'], api_get_c
 
 if (empty($document_data)) {
     api_not_allowed();
-} else {    
+} else {
     $document_id    = $document_data['id'];
     $file_path      = $document_data['path'];
     $dir            = dirname($document_data['path']);
@@ -106,7 +101,7 @@ else
 // Interbreadcrumb for the current directory root path
 if (empty($document_data['parents'])) {
     $interbreadcrumb[] = array('url' => '#', 'name' => $document_data['title']);
-} else {    
+} else {
     foreach($document_data['parents'] as $document_sub_data) {
         if ($document_data['title'] == $document_sub_data['title']) {
             continue;
@@ -125,23 +120,23 @@ event_access_tool(TOOL_DOCUMENT);
 
 Display :: display_header($nameTools, 'Doc');
 echo '<div class="actions">';
-		echo '<a href="document.php?id='.$parent_id.'">'.Display::return_icon('back.png',get_lang('BackTo').' '.get_lang('DocumentsOverview'),'',ICON_SIZE_MEDIUM).'</a>';		
+		echo '<a href="document.php?id='.$parent_id.'">'.Display::return_icon('back.png',get_lang('BackTo').' '.get_lang('DocumentsOverview'),'',ICON_SIZE_MEDIUM).'</a>';
 		echo '<a href="edit_document.php?'.api_get_cidreq().'&id='.$document_id.$req_gid.'&origin=editdraw">'.Display::return_icon('edit.png',get_lang('Rename').'/'.get_lang('Comments'),'',ICON_SIZE_MEDIUM).'</a>';
 echo '</div>';
 
-if (api_browser_support('svg')) {	
+if (api_browser_support('svg')) {
 	//automatic loading the course language
 	$svgedit_code_translation_table = array('' => 'en', 'pt' => 'pt-Pt', 'sr' => 'sr_latn');
 	$langsvgedit  = api_get_language_isocode();
 	$langsvgedit = isset($svgedit_code_translation_table[$langsvgedit]) ? $svgedit_code_translation_table[$langsvgedit] : $langsvgedit;
 	$langsvgedit = file_exists(api_get_path(LIBRARY_PATH).'svg-edit/locale/lang.'.$langsvgedit.'.js') ? $langsvgedit : 'en';
-	
+
 	$svg_url= api_get_path(WEB_LIBRARY_PATH).'svg-edit/svg-editor.php?url=../../../../courses/'.$courseDir.$dir.$file.'&amp;lang='.$langsvgedit;
-		
+
 	?>
 
 	<script type="text/javascript">
-	
+
 	document.write ('<iframe id="frame" frameborder="0" scrolling="no" src="<?php echo  $svg_url; ?>" width="100%" height="100%"><noframes><p>Sorry, your browser does not handle frames</p></noframes></iframe>');
 	function resizeIframe() {
     	var height = window.innerHeight -50;
@@ -153,14 +148,14 @@ if (api_browser_support('svg')) {
 	};
 	document.getElementById('frame').onload = resizeIframe;
 	window.onresize = resizeIframe;
-	
+
 	</script>
 
     <?php
     echo '<noscript>';
 	echo '<iframe style="height: 550px; width: 100%;" scrolling="no" frameborder="0\' src="'.$svg_url.'"<noframes><p>Sorry, your browser does not handle frames</p></noframes></iframe>';
 	echo '</noscript>';
-} else {	
+} else {
 	Display::display_error_message(get_lang('BrowserDontSupportsSVG'));
 }
 Display::display_footer();

+ 1 - 3
main/document/edit_odf.php

@@ -4,9 +4,7 @@
  * ODF document editor script (maybe unused)
  * @package chamilo.document
  */
-/**
- * Init
- */
+
 require_once '../inc/global.inc.php';
 //exit;
 $document_id = $_GET['id'];

+ 24 - 27
main/document/edit_paint.php

@@ -9,11 +9,6 @@
  * @author Juan Carlos Raña Trabado
  * @since 30/january/2011
 */
-/**
- * Code
- */
-
-/*	INIT SECTION */
 
 $language_file = array('document');
 
@@ -26,20 +21,24 @@ require_once api_get_path(SYS_CODE_PATH).'document/document.inc.php';
 
 api_protect_course_script();
 api_block_anonymous_users();
-
-$document_data = DocumentManager::get_document_data_by_id($_GET['id'], api_get_course_id(), true);
+$groupId = api_get_group_id();
+$document_data = DocumentManager::get_document_data_by_id(
+    $_GET['id'],
+    api_get_course_id(),
+    true
+);
 
 if (empty($document_data)) {
     api_not_allowed();
-} else {    
+} else {
     $document_id    = $document_data['id'];
     $file_path      = $document_data['path'];
     $dir            = dirname($document_data['path']);
     $parent_id      = DocumentManager::get_document_id(api_get_course_info(), $dir);
-    $my_cur_dir_path = Security::remove_XSS($_GET['curdirpath']);
+    $my_cur_dir_path = isset($_GET['curdirpath']) ? Security::remove_XSS($_GET['curdirpath']) : null;
 }
 
-$dir= str_replace('\\', '/',$dir);//and urlencode each url $curdirpath (hack clean $curdirpath under Windows - Bug #3261)
+$dir= str_replace('\\', '/', $dir);//and urlencode each url $curdirpath (hack clean $curdirpath under Windows - Bug #3261)
 
 /* Constants & Variables */
 $current_session_id=api_get_session_id();
@@ -90,26 +89,24 @@ if (!is_dir($filepath)) {
 }
 
 //groups //TODO:clean
-if (isset ($_SESSION['_gid']) && $_SESSION['_gid'] != 0) {
-	
-	$req_gid = '&amp;gidReq='.$_SESSION['_gid'];
-	$interbreadcrumb[] = array ('url' => '../group/group_space.php?gidReq='.$_SESSION['_gid'], 'name' => get_lang('GroupSpace'));
+if (!empty($groupId)) {
+	$interbreadcrumb[] = array ('url' => '../group/group_space.php?'.api_get_cidreq(), 'name' => get_lang('GroupSpace'));
 	$group_document = true;
-	$noPHP_SELF = true;	
+	$noPHP_SELF = true;
 }
 
 
 $is_certificate_mode = DocumentManager::is_certificate_mode($dir);
 
 if (!$is_certificate_mode)
-	$interbreadcrumb[]= array("url" => "./document.php?curdirpath=".urlencode($my_cur_dir_path).$req_gid, "name"=> get_lang('Documents'));
+	$interbreadcrumb[]= array("url" => "./document.php?curdirpath=".urlencode($my_cur_dir_path).'&'.api_get_cidreq(), "name"=> get_lang('Documents'));
 else
 	$interbreadcrumb[]= array ('url' => '../gradebook/'.$_SESSION['gradebook_dest'], 'name' => get_lang('Gradebook'));
 
 // Interbreadcrumb for the current directory root path
 if (empty($document_data['parents'])) {
     $interbreadcrumb[] = array('url' => '#', 'name' => $document_data['title']);
-} else {    
+} else {
     foreach($document_data['parents'] as $document_sub_data) {
         if ($document_data['title'] == $document_sub_data['title']) {
             continue;
@@ -127,15 +124,15 @@ if (!$is_allowedToEdit) {
 event_access_tool(TOOL_DOCUMENT);
 
 Display :: display_header($nameTools, 'Doc');
-echo '<div class="actions">';		
-		echo '<a href="document.php?id='.$parent_id.'">'.Display::return_icon('back.png',get_lang('BackTo').' '.get_lang('DocumentsOverview'),'',ICON_SIZE_MEDIUM).'</a>';		
-		echo '<a href="edit_document.php?'.api_get_cidreq().'&id='.$document_id.$req_gid.'&origin=editpaint">'.Display::return_icon('edit.png', get_lang('Rename').'/'.get_lang('Comment'  ),'',ICON_SIZE_MEDIUM).'</a>';
-echo '</div>'; 
+echo '<div class="actions">';
+echo '<a href="document.php?id='.$parent_id.'&'.api_get_cidreq().'">'.
+    Display::return_icon('back.png',get_lang('BackTo').' '.get_lang('DocumentsOverview'),'',ICON_SIZE_MEDIUM).'</a>';
+echo '<a href="edit_document.php?'.api_get_cidreq().'&id='.$document_id.'&'.api_get_cidreq().'&origin=editpaint">'.
+    Display::return_icon('edit.png', get_lang('Rename').'/'.get_lang('Comment'),'',ICON_SIZE_MEDIUM).'</a>';
+echo '</div>';
 
 ///pixlr
 $title=$file;//disk name. No sql name because pixlr return this when save
-//$image=urlencode(api_get_path(WEB_COURSE_PATH).$courseDir.$dir.$file);//TODO: only work with public courses. Doesn't remove please
-//
 $pixlr_code_translation_table = array('' => 'en', 'pt' => 'pt-Pt', 'sr' => 'sr_latn');
 $langpixlr  = api_get_language_isocode();
 $langpixlr = isset($pixlr_code_translation_table[$langpixlr]) ? $pixlredit_code_translation_table[$langpixlr] : $langpixlr;
@@ -181,7 +178,7 @@ $htaccess=api_get_path(SYS_ARCHIVE_PATH).'temp/images/.htaccess';
 if (!file_exists($htaccess)) {
 
 	$htaccess_content="order deny,allow\r\nallow from all\r\nOptions -Indexes";
-	
+
 	$fp = @ fopen(api_get_path(SYS_ARCHIVE_PATH).'temp/images/.htaccess', 'w');
 	if ($fp) {
 		fwrite($fp, $htaccess_content);
@@ -190,7 +187,7 @@ if (!file_exists($htaccess)) {
 }
 
 $html_index=api_get_path(SYS_ARCHIVE_PATH).'temp/images/index.html';
-if (!file_exists($html_index)) {	
+if (!file_exists($html_index)) {
 	$html_index_content="<html><head></head><body></body></html>";
 	$fp = @ fopen(api_get_path(SYS_ARCHIVE_PATH).'temp/images/index.html', 'w');
 	if ($fp) {
@@ -200,7 +197,7 @@ if (!file_exists($html_index)) {
 }
 
 //encript temp name file
-$name_crip=sha1(uniqid());//encript 
+$name_crip=sha1(uniqid());//encript
 $findext= explode(".", $file);
 $extension= $findext[count($findext)-1];
 $file_crip=$name_crip.'.'.$extension;
@@ -215,7 +212,7 @@ $_SESSION['temp_realpath_image']=$to;
 $to_url=api_get_path(WEB_ARCHIVE_PATH).'temp/images/'.$file_crip;
 $image=urlencode($to_url);
 $pixlr_url = api_get_protocol().'://pixlr.com/editor/?title='.$title.'&amp;image='.$image.'&amp;loc='.$loc.'&amp;referrer='.$referrer.'&amp;target='.$target.'&amp;exit='.$exit_path.'&amp;locktarget='.$locktarget.'&amp;locktitle='.$locktitle.'&amp;credentials='.$credentials;
- 
+
 //make frame an send image
 ?>
 

+ 3 - 7
main/document/exit_pixlr.php

@@ -9,14 +9,11 @@
  * @author Juan Carlos Ra�a Trabado
  * @since 30/january/2011
 */
-/**
- * Code
- */
 
 require_once '../inc/global.inc.php';
 api_protect_course_script();
 api_block_anonymous_users();
-	
+
 //delete temporal file
 unlink($_SESSION['temp_realpath_image']);
 
@@ -28,10 +25,9 @@ unset($_SESSION['temp_realpath_image']);
 
 if (!isset($_SESSION['exit_pixlr'])){
 	$location=api_get_path(WEB_CODE_PATH).'document/document.php';
-	echo '<script>window.parent.location.href="'.$location.'"</script>';					 
+	echo '<script>window.parent.location.href="'.$location.'"</script>';
 	api_not_allowed(true);
-}
-else{
+} else {
 	echo '<div align="center" style="padding-top:150; font-family:Arial, Helvetica, Sans-serif;font-size:25px;color:#aaa;font-weight:bold;">'.get_lang('PleaseStandBy').'</div>';
 	$location=api_get_path(WEB_CODE_PATH).'document/document.php?id='.Security::remove_XSS($_SESSION['exit_pixlr']);
 	echo '<script>window.parent.location.href="'.$location.'"</script>';

+ 1 - 3
main/document/footerpage.php

@@ -4,9 +4,7 @@
  *	@package chamilo.document
  *	TODO: There is no indication that this file us used for something.
  */
-/**
- * Code
- */
+
 require_once '../inc/global.inc.php';
 
 $my_style = api_get_visual_theme();

+ 0 - 3
main/document/headerpage.php

@@ -4,9 +4,6 @@
 /**
  *	@package chamilo.document
  */
-/**
- * Code
- */
 
 // Name of the language file that needs to be included
 exit;

+ 17 - 22
main/document/record_audio.php

@@ -9,11 +9,6 @@
  * @author Juan Carlos Raña Trabado herodoto@telefonica.net
  * @since 5/mar/2011
 */
-/**
- * Code
- */
-
-/*	INIT SECTION */
 
 // Name of the language file that needs to be included
 $language_file = array('document');
@@ -34,7 +29,7 @@ api_block_anonymous_users();
 $document_data = DocumentManager::get_document_data_by_id($_GET['id'], api_get_course_id(), true);
 if (empty($document_data)) {
     if (api_is_in_group()) {
-        $group_properties   = GroupManager::get_group_properties(api_get_group_id());        
+        $group_properties   = GroupManager::get_group_properties(api_get_group_id());
         $document_id        = DocumentManager::get_document_id(api_get_course_info(), $group_properties['directory']);
         $document_data      = DocumentManager::get_document_data_by_id($document_id, api_get_course_id());
     }
@@ -106,14 +101,14 @@ if (isset ($group)) {
 }
 
 // Interbreadcrumb for the current directory root path
-$counter = 0;   
+$counter = 0;
 if (isset($document_data['parents'])) {
     foreach($document_data['parents'] as $document_sub_data) {
         //fixing double group folder in breadcrumb
         if (api_get_group_id()) {
             if ($counter == 0) {
                 $counter++;
-                continue;  
+                continue;
             }
         }
         $interbreadcrumb[] = array('url' => $document_sub_data['document_url'], 'name' => $document_sub_data['title']);
@@ -127,8 +122,8 @@ echo '<div class="actions">';
 echo '</div>';
 
 ?>
-<script type="text/javascript"> 
-function submitVoice() { 
+<script type="text/javascript">
+function submitVoice() {
 	//lang vars
 	var lang_no_applet="<?php echo get_lang('NanogongNoApplet'); ?>";
 	var lang_record_before_save="<?php echo get_lang('NanogongRecordBeforeSave'); ?>";
@@ -142,15 +137,15 @@ function submitVoice() {
 	//path, url and filename
 	var filename = document.getElementById("audio_title").value+"_chnano_.wav";//adding name file, tag and extension
 	var filename = filename.replace(/\s/g, "_");//replace spaces by _
-	var filename = encodeURIComponent(filename);	
+	var filename = encodeURIComponent(filename);
 	var filepath="<?php echo urlencode($filepath); ?>";
 	var dir="<?php echo urlencode($dir); ?>";
 	var course_code="<?php echo urlencode($course_code); ?>";
 	//
 	var urlnanogong="../inc/lib/nanogong/receiver.php?filename="+filename+"&filepath="+filepath+"&dir="+dir+"&course_code="+course_code+"&nano_group_id="+nano_group_id+"&nano_session_id="+nano_session_id+"&nano_user_id="+nano_user_id;
 	var cookie="<?php  echo 'ch_sid='.session_id(); ?>";
-	
-	//check	
+
+	//check
 	var recorder
 	if (!(recorder = document.getElementById("nanogong"))) {
     	alert(lang_no_applet)
@@ -160,17 +155,17 @@ function submitVoice() {
 	if (duration <= 0) {
 	  	alert(lang_record_before_save)
 	  	return
-	}	
+	}
 	if (!document.getElementById("audio_title").value) {
 		alert(lang_give_a_title)
 		return
 	}
-	//	
-	var applet = document.getElementById("nanogong");	
+	//
+	var applet = document.getElementById("nanogong");
 	var ret = applet.sendGongRequest( "PostToForm", urlnanogong, "voicefile", cookie, "temp");//'PostToForm', postURL, inputname, cookie, filename
 
-	if (ret == null)  { 
-	    alert(lang_failled_to_submit); 
+	if (ret == null)  {
+	    alert(lang_failled_to_submit);
 	} else {
 	    alert(lang_submitted+"\n"+ret);
 	    $("#status").attr('value', '1');
@@ -191,14 +186,14 @@ echo '<applet id="nanogong" archive="'.api_get_path(WEB_LIBRARY_PATH).'nanogong/
 	echo '<param name="ShowTime" value="true" />'; // default false
 	//echo '<param name="Color" value="#C0E0FF" />'; // default #FFFFFF
 	//echo '<param name="StartTime" value="10.5" />';
-	//echo '<param name="EndTime" value="65" />';	
+	//echo '<param name="EndTime" value="65" />';
 	echo '<param name="AudioFormat" value="ImaADPCM" />';// ImaADPCM (more speed), Speex (more compression)|(default Speex)
 	//echo '<param name="SamplingRate" value="32000" />';//Quality for ImaADPCM (low 8000, medium 11025, normal 22050, hight 44100) OR Quality for Speex (low 8000, medium 16000, normal 32000, hight 44100) | (default 44100)
 	//echo '<param name="MaxDuration" value="60" />';
-	//echo '<param name="SoundFileURL" value="http://somewhere.com/mysoundfile.wav" />';//load a file |(default "")	
+	//echo '<param name="SoundFileURL" value="http://somewhere.com/mysoundfile.wav" />';//load a file |(default "")
 echo '</applet>';
- 
-echo '<form name="form_nanogong">';	
+
+echo '<form name="form_nanogong">';
 	echo '<input placeholder="'.get_lang('InputNameHere').'" type="text" id="audio_title">';
 	echo '<input id="status" type="hidden" name="status" value="0">';
 	echo '<button class="upload" type="submit" value="'.get_lang('Send').'" onClick="submitVoice()" />'.get_lang('Send').'</button>';

+ 0 - 5
main/document/record_audio_wami.php

@@ -9,11 +9,6 @@
  * @author Juan Carlos Raña Trabado herodoto@telefonica.net
  * @since 5/april/2012
 */
-/**
- * Code
- */
-
-/*	INIT SECTION */
 
 // Name of the language file that needs to be included
 $language_file = array('document');

+ 0 - 4
main/document/show_content.php

@@ -5,10 +5,6 @@
  *
  *	@package chamilo.document
  */
-/**
- * Code
- */
-/*   INITIALIZATION */
 
 $language_file[] = 'document';
 require_once '../inc/global.inc.php';

+ 132 - 104
main/document/showinframes.php

@@ -1,5 +1,6 @@
 <?php
 /* For licensing terms, see /license.txt */
+
 /**
  *	This file will show documents in a separate frame.
  *	We don't like frames, but it was the best of two bad things.
@@ -21,9 +22,7 @@
  *	@author Roan Embrechts (roan.embrechts@vub.ac.be)
  *	@package chamilo.document
  */
-/**
- * INITIALIZATION
- */
+
 $language_file[] = 'document';
 require_once '../inc/global.inc.php';
 
@@ -43,13 +42,24 @@ if (empty($course_info)) {
 
 $show_web_odf = false;
 
-//Generate path
+// Generate path
 if (!$document_id) {
     $document_id = DocumentManager::get_document_id($course_info, $header_file);
 }
-$document_data = DocumentManager::get_document_data_by_id($document_id, $course_code, true, $session_id);
+$document_data = DocumentManager::get_document_data_by_id(
+    $document_id,
+    $course_code,
+    true,
+    $session_id
+);
+
 if ($session_id != 0 and !$document_data) {
-    $document_data = DocumentManager::get_document_data_by_id($document_id, $course_code, true, 0);
+    $document_data = DocumentManager::get_document_data_by_id(
+        $document_id,
+        $course_code,
+        true,
+        0
+    );
 }
 
 if (empty($document_data)) {
@@ -83,7 +93,6 @@ if ($is_allowed_in_course == false) {
 }
 
 // Check user visibility.
-//$is_visible = DocumentManager::is_visible_by_id($document_id, $course_info, api_get_session_id(), api_get_user_id());
 $is_visible = DocumentManager::check_visibility_tree(
     $document_id,
     api_get_course_id(),
@@ -97,7 +106,6 @@ if (!api_is_allowed_to_edit() && !$is_visible) {
 }
 
 $pathinfo = pathinfo($header_file);
-
 $jplayer_supported_files = array('mp4', 'ogv','flv');
 $jplayer_supported = false;
 
@@ -121,18 +129,18 @@ if (isset($group_id) && $group_id != '') {
 $interbreadcrumb[] = array('url' => './document.php?curdirpath='.dirname($header_file).'&'.api_get_cidreq(), 'name' => get_lang('Documents'));
 
 if (empty($document_data['parents'])) {
-	if (isset($_GET['createdir'])) {
-		$interbreadcrumb[] = array('url' => $document_data['document_url'], 'name' => $document_data['title']);
-	} else {
-		$interbreadcrumb[] = array('url' => '#', 'name' => $document_data['title']);
-	}
+    if (isset($_GET['createdir'])) {
+        $interbreadcrumb[] = array('url' => $document_data['document_url'], 'name' => $document_data['title']);
+    } else {
+        $interbreadcrumb[] = array('url' => '#', 'name' => $document_data['title']);
+    }
 } else {
-	foreach($document_data['parents'] as $document_sub_data) {
-		if (!isset($_GET['createdir']) && $document_sub_data['id'] ==  $document_data['id']) {
-			$document_sub_data['document_url'] = '#';
-		}
-		$interbreadcrumb[] = array('url' => $document_sub_data['document_url'], 'name' => $document_sub_data['title']);
-	}
+    foreach($document_data['parents'] as $document_sub_data) {
+        if (!isset($_GET['createdir']) && $document_sub_data['id'] ==  $document_data['id']) {
+            $document_sub_data['document_url'] = '#';
+        }
+        $interbreadcrumb[] = array('url' => $document_sub_data['document_url'], 'name' => $document_sub_data['title']);
+    }
 }
 
 $this_section = SECTION_COURSES;
@@ -154,6 +162,7 @@ if ($is_courseAdmin) {
     $frameheight = 165;
 }
 $js_glossary_in_documents = '';
+
 if (api_get_setting('show_glossary_in_documents') == 'ismanual') {
     $js_glossary_in_documents = '	//	    $(document).ready(function() {
                                     $.frameReady(function() {
@@ -187,7 +196,6 @@ if (api_get_setting('show_glossary_in_documents') == 'ismanual') {
                                 //   });';
 }
 
-
 $web_odf_supported_files = DocumentManager::get_web_odf_extension_list();
 // PDF should be displayed with viewerJS
 $web_odf_supported_files[] = 'pdf';
@@ -209,12 +217,12 @@ if (in_array(strtolower($pathinfo['extension']), $web_odf_supported_files)) {
   </script>';
     */
     $htmlHeadXtra[] = '
-    <script charset="utf-8">
+    <script>
         resizeIframe = function() {
-                var bodyHeight = $("body").height();
-                var topbarHeight = $("#topbar").height();
-                $("#viewerJSContent").height((bodyHeight - topbarHeight));
-            }
+            var bodyHeight = $("body").height();
+            var topbarHeight = $("#topbar").height();
+            $("#viewerJSContent").height((bodyHeight - topbarHeight));
+        }
         $(document).ready(function() {
             $(window).resize(resizeIframe());
         });
@@ -222,13 +230,32 @@ if (in_array(strtolower($pathinfo['extension']), $web_odf_supported_files)) {
     ;
 }
 
+// Activate code highlight.
+$isChatFolder = false;
+if (isset($document_data['parents']) && isset($document_data['parents'][0])) {
+    $chatFolder = $document_data['parents'][0];
+    if (isset($chatFolder['path']) && $chatFolder['path'] == '/chat_files') {
+        $isChatFolder = true;
+    }
+}
+
+if ($isChatFolder) {
+    $htmlHeadXtra[] = api_get_js('highlight/highlight.pack.js');
+    $htmlHeadXtra[] = api_get_css(api_get_path(WEB_CSS_PATH).'chat.css');
+    $htmlHeadXtra[] = api_get_css(
+        api_get_path(WEB_LIBRARY_PATH) . 'javascript/highlight/styles/github.css'
+    );
+    $htmlHeadXtra[] = '
+    <script>
+        hljs.initHighlightingOnLoad();
+    </script>';
+}
+
 $execute_iframe = true;
 
 if ($jplayer_supported) {
-
     $extension = api_strtolower($pathinfo['extension']);
-
-    $js_path 		= api_get_path(WEB_LIBRARY_PATH).'javascript/';
+    $js_path = api_get_path(WEB_LIBRARY_PATH).'javascript/';
     $htmlHeadXtra[] = '<link rel="stylesheet" href="'.$js_path.'jquery-jplayer/skins/blue/jplayer.blue.monday.css" type="text/css">';
     $htmlHeadXtra[] = '<script type="text/javascript" src="'.$js_path.'jquery-jplayer/jquery.jplayer.min.js"></script>';
 
@@ -257,17 +284,18 @@ if ($jplayer_supported) {
     </script>';
     $execute_iframe = false;
 }
+
 if ($show_web_odf) {
     $execute_iframe = false;
 }
 
 $is_freemind_available = $pathinfo['extension']=='mm' && api_get_setting('enable_freemind') == 'true';
-if ($is_freemind_available){
+if ($is_freemind_available) {
     $execute_iframe = false;
 }
 
 $is_nanogong_available = $pathinfo['extension']=='wav' && preg_match('/_chnano_.wav/i', $file_url_web) && api_get_setting('enable_nanogong') == 'true';
-if ($is_nanogong_available){
+if ($is_nanogong_available) {
     $execute_iframe = false;
 }
 
@@ -280,20 +308,21 @@ if (!$jplayer_supported && $execute_iframe) {
     </script>';
     $htmlHeadXtra[] = '<script type="text/javascript" src="'.api_get_path(WEB_LIBRARY_PATH).'javascript/jquery.frameready.js"></script>';
     $htmlHeadXtra[] = '<script>
-    <!--
         var updateContentHeight = function() {
             my_iframe = document.getElementById("mainFrame");
-            //this doesnt seem to work in IE 7,8,9
-            new_height = my_iframe.contentWindow.document.body.scrollHeight;
-            my_iframe.height = my_iframe.contentWindow.document.body.scrollHeight + "px";
+            if (my_iframe) {
+                //this doesnt seem to work in IE 7,8,9
+                new_height = my_iframe.contentWindow.document.body.scrollHeight;
+                my_iframe.height = my_iframe.contentWindow.document.body.scrollHeight + "px";
+            }
         };
 
         // Fixes the content height of the frame
         window.onload = function() {
             updateContentHeight();
             '.$js_glossary_in_documents.'
+
         }
-    -->
     </script>';
 }
 
@@ -311,7 +340,6 @@ if (!$is_nanogong_available) {
 }
 
 if ($show_web_odf) {
-    //echo Display::url(get_lang('Show'), api_get_path(WEB_CODE_PATH).'document/edit_odf.php?id='.$document_data['id'], array('class' => 'btn'));
     echo '<div id="viewerJS">';
     echo '<iframe id="viewerJSContent" frameborder="0" allowfullscreen="allowfullscreen" style="width:100%;"
         src="'.api_get_path(WEB_LIBRARY_PATH).'javascript/ViewerJS/index.html#'.$file_url.'">
@@ -331,87 +359,87 @@ if ($jplayer_supported) {
 }
 
 if ($is_freemind_available) {
-	?>
-	<script type="text/javascript" src="<?php echo api_get_path(WEB_LIBRARY_PATH) ?>swfobject/swfobject.js"></script>
-	<style type="text/css">
-		#flashcontent {
-			height: 500px;
-			padding-top:10px;
-		}
-	</style>
-	<div id="flashcontent" onmouseover="giveFocus();">
-		 Flash plugin or Javascript are turned off.
-		 Activate both  and reload to view the mindmap
-	</div>
-	<script>
+    ?>
+    <script type="text/javascript" src="<?php echo api_get_path(WEB_LIBRARY_PATH) ?>swfobject/swfobject.js"></script>
+    <style type="text/css">
+        #flashcontent {
+            height: 500px;
+            padding-top:10px;
+        }
+    </style>
+    <div id="flashcontent" onmouseover="giveFocus();">
+        Flash plugin or Javascript are turned off.
+        Activate both  and reload to view the mindmap
+    </div>
+    <script>
         function giveFocus() {
-		  document.visorFreeMind.focus();
-		}
-
-		document.onload=giveFocus;
-		// <![CDATA[
-		// for allowing using http://.....?mindmap.mm mode
-		function getMap(map){
-		  var result=map;
-		  var loc=document.location+'';
-		  if(loc.indexOf(".mm")>0 && loc.indexOf("?")>0){
-			result=loc.substring(loc.indexOf("?")+1);
-		  }
-		  return result;
-		}
-		var fo = new FlashObject("<?php echo api_get_path(WEB_LIBRARY_PATH); ?>freeMindFlashBrowser/visorFreemind.swf", "visorFreeMind", "100%", "100%", 6, "#ffffff");
-		fo.addParam("quality", "high");
-		//fo.addParam("bgcolor", "#a0a0f0");
-		fo.addVariable("openUrl", "_blank");//Default value "_self"
-		fo.addVariable("startCollapsedToLevel","3");//Default value = "-1", meaning do nothing, the mindmap will open as it was saved. The root node, or central node, of your mindmap is level zero. You could force the browser to open (unfold) your mind map to an expanded level using this variable.
-		fo.addVariable("maxNodeWidth","200");
-		//
-		fo.addVariable("mainNodeShape","elipse");//"rectangle", "elipse", "none". None hide the main node. Default is "elipse"
-		fo.addVariable("justMap","false");
-		fo.addVariable("initLoadFile",getMap("<?php echo $file_url_web; ?>"));
-		fo.addVariable("defaultToolTipWordWrap",200);//max width for tooltips. Default "600" pixels
-		fo.addVariable("offsetX","left");//for the center of the mindmap. Admit also "left" and "right"
-		fo.addVariable("offsetY","top");//for the center of the mindmap. Admit also "top" and "bottom"
-		fo.addVariable("buttonsPos","top");//"top" or "bottom"
-		fo.addVariable("min_alpha_buttons",20);//for dynamic view of buttons
-		fo.addVariable("max_alpha_buttons",100);//for dynamic view of buttons
-		fo.addVariable("scaleTooltips","false");
-		//
-		//extra
-		//fo.addVariable("CSSFile","<?php // echo api_get_path(WEB_LIBRARY_PATH); ?>freeMindFlashBrowser/flashfreemind.css");//
-		//fo.addVariable("baseImagePath","<?php // echo api_get_path(WEB_LIBRARY_PATH); ?>freeMindFlashBrowser/");//
-		//fo.addVariable("justMap","false");//Hides all the upper control options. Default value "false"
-		//fo.addVariable("noElipseMode","anyvalue");//for changing to old elipseNode edges. Default = not set
-		//fo.addVariable("ShotsWidth","200");//The width of snapshots, in pixels.
-		//fo.addVariable("genAllShots","true");//Preview shots (like the samples on the Shots Width page) will be generated for all linked maps when your main map loads. If you have a lot of linked maps, this could take some time to complete
-		//fo.addVariable("unfoldAll","true"); //For each mindmap loaded start the display with all nodes unfolded. Another variable to be wary of!
-		//fo.addVariable("toolTipsBgColor","0xaaeeaa");: bgcolor for tooltips ej;"0xaaeeaa"
-		//fo.addVariable("defaultWordWrap","300"); //default 600
-		//
-
-		fo.write("flashcontent");
-		// ]]>
-	</script>
-	<?php
-}
+            document.visorFreeMind.focus();
+        }
 
+        document.onload=giveFocus;
+        // <![CDATA[
+        // for allowing using http://.....?mindmap.mm mode
+        function getMap(map){
+            var result=map;
+            var loc=document.location+'';
+            if(loc.indexOf(".mm")>0 && loc.indexOf("?")>0){
+                result=loc.substring(loc.indexOf("?")+1);
+            }
+            return result;
+        }
+        var fo = new FlashObject("<?php echo api_get_path(WEB_LIBRARY_PATH); ?>freeMindFlashBrowser/visorFreemind.swf", "visorFreeMind", "100%", "100%", 6, "#ffffff");
+        fo.addParam("quality", "high");
+        //fo.addParam("bgcolor", "#a0a0f0");
+        fo.addVariable("openUrl", "_blank");//Default value "_self"
+        fo.addVariable("startCollapsedToLevel","3");//Default value = "-1", meaning do nothing, the mindmap will open as it was saved. The root node, or central node, of your mindmap is level zero. You could force the browser to open (unfold) your mind map to an expanded level using this variable.
+        fo.addVariable("maxNodeWidth","200");
+        //
+        fo.addVariable("mainNodeShape","elipse");//"rectangle", "elipse", "none". None hide the main node. Default is "elipse"
+        fo.addVariable("justMap","false");
+        fo.addVariable("initLoadFile",getMap("<?php echo $file_url_web; ?>"));
+        fo.addVariable("defaultToolTipWordWrap",200);//max width for tooltips. Default "600" pixels
+        fo.addVariable("offsetX","left");//for the center of the mindmap. Admit also "left" and "right"
+        fo.addVariable("offsetY","top");//for the center of the mindmap. Admit also "top" and "bottom"
+        fo.addVariable("buttonsPos","top");//"top" or "bottom"
+        fo.addVariable("min_alpha_buttons",20);//for dynamic view of buttons
+        fo.addVariable("max_alpha_buttons",100);//for dynamic view of buttons
+        fo.addVariable("scaleTooltips","false");
+        //
+        //extra
+        //fo.addVariable("CSSFile","<?php // echo api_get_path(WEB_LIBRARY_PATH); ?>freeMindFlashBrowser/flashfreemind.css");//
+        //fo.addVariable("baseImagePath","<?php // echo api_get_path(WEB_LIBRARY_PATH); ?>freeMindFlashBrowser/");//
+        //fo.addVariable("justMap","false");//Hides all the upper control options. Default value "false"
+        //fo.addVariable("noElipseMode","anyvalue");//for changing to old elipseNode edges. Default = not set
+        //fo.addVariable("ShotsWidth","200");//The width of snapshots, in pixels.
+        //fo.addVariable("genAllShots","true");//Preview shots (like the samples on the Shots Width page) will be generated for all linked maps when your main map loads. If you have a lot of linked maps, this could take some time to complete
+        //fo.addVariable("unfoldAll","true"); //For each mindmap loaded start the display with all nodes unfolded. Another variable to be wary of!
+        //fo.addVariable("toolTipsBgColor","0xaaeeaa");: bgcolor for tooltips ej;"0xaaeeaa"
+        //fo.addVariable("defaultWordWrap","300"); //default 600
+        //
+
+        fo.write("flashcontent");
+        // ]]>
+    </script>
+<?php
+}
 
 if ($is_nanogong_available) {
-
     $file_url_web = DocumentManager::generateAudioTempFolder($file_url_sys);
-
     echo '<div align="center">';
     echo '<a class="btn" href="'.$file_url_web.'" target="_blank">'.get_lang('Download').'</a>';
     echo '<br/>';
     echo '<br/>';
-
     echo DocumentManager::readNanogongFile($to_url);
-
-    //erase temp file in tmp directory when return to documents
+    // Erase temp file in tmp directory when return to documents
     echo '</div>';
 }
 
 if ($execute_iframe) {
-    echo '<iframe id="mainFrame" name="mainFrame" border="0" frameborder="0" scrolling="no" style="width:100%;" height="600" src="'.$file_url_web.'&amp;rand='.mt_rand(1, 10000).'" height="500"></iframe>';
+    if ($isChatFolder) {
+        $content = Security::remove_XSS(file_get_contents($file_url_sys));
+        echo $content;
+    } else {
+        echo '<iframe id="mainFrame" name="mainFrame" border="0" frameborder="0" scrolling="no" style="width:100%;" height="600" src="'.$file_url_web.'&amp;rand='.mt_rand(1, 10000).'" height="500"></iframe>';
+    }
 }
 Display::display_footer();

+ 45 - 70
main/document/slideshow.php

@@ -15,7 +15,7 @@ api_protect_course_script();
 $noPHP_SELF = true;
 $path = Security::remove_XSS($_GET['curdirpath']);
 $pathurl = urlencode($path);
-$slide_id = Security::remove_XSS($_GET['slide_id']);
+$slide_id = isset($_GET['slide_id']) ? Security::remove_XSS($_GET['slide_id']) : null;
 
 if (empty($slide_id)) {
 	$edit_slide_id = 1;
@@ -117,16 +117,19 @@ if ($slide_id != 'all') {
 }
 
 // Exit the slideshow
-echo '<a href="document.php?action=exit_slideshow&curdirpath='.$pathurl.'">'.Display::return_icon('back.png',get_lang('BackTo').' '.get_lang('DocumentsOverview'),'',ICON_SIZE_MEDIUM).'</a>';
+echo '<a href="document.php?action=exit_slideshow&curdirpath='.$pathurl.'&'.api_get_cidreq().'">'.
+    Display::return_icon('back.png',get_lang('BackTo').' '.get_lang('DocumentsOverview'),'',ICON_SIZE_MEDIUM).'</a>';
 
 // Show thumbnails
 if ($slide_id != 'all') {
-	echo '<a href="slideshow.php?slide_id=all&curdirpath='.$pathurl.'">'.Display::return_icon('thumbnails.png',get_lang('ShowThumbnails'),'',ICON_SIZE_MEDIUM).'</a>';
+	echo '<a href="slideshow.php?slide_id=all&curdirpath='.$pathurl.'&'.api_get_cidreq().'">'.
+        Display::return_icon('thumbnails.png',get_lang('ShowThumbnails'),'',ICON_SIZE_MEDIUM).'</a>';
 } else {
 	echo Display::return_icon('thumbnails_na.png',get_lang('ShowThumbnails'),'',ICON_SIZE_MEDIUM);
 }
 // Slideshow options
-echo '<a href="slideshowoptions.php?curdirpath='.$pathurl.'">'.Display::return_icon('settings.png',get_lang('SetSlideshowOptions'),'',ICON_SIZE_MEDIUM).'</a>';
+echo '<a href="slideshowoptions.php?curdirpath='.$pathurl.'&'.api_get_cidreq().'">'.
+    Display::return_icon('settings.png',get_lang('SetSlideshowOptions'),'',ICON_SIZE_MEDIUM).'</a>';
 
 ?>
 </div>
@@ -185,26 +188,6 @@ if ($slide_id == 'all') {
 		@mkdir($directory_thumbnails, api_get_permissions_for_new_directories());
     }
 
-	/*
-	//
-	//disabled by now, because automatic mode is heavy for server (scandir), only manual
-	//
-
-	// Delete orphaned thumbnails
-	$directory_images=$sys_course_path.$_course['path'].'/document'.$folder;
-	$all_thumbnails  = scandir($directory_thumbnails);
-	$all_files  = scandir($directory_images);
-	foreach ($all_thumbnails as $check_thumb) {
-		$temp_filename=substr($check_thumb,1);//erase the first dot in file, and translate .. to .
-		if ($temp_filename=='.') {
-			 continue; //need because scandir also return . and .. simbols
-		}
-		if(in_array($filename, $all_files)==false) {
-			unlink($directory_thumbnails.'.'.$temp_filename);
-		}
-	}
-	*/
-
 	// check files and thumbnails
 	if (is_array($image_files_only)) {
 
@@ -338,40 +321,26 @@ if ($slide_id == 'all') {
 
 	// Creating the table
 	$html_table = '';
-	echo '<table align="center" width="760px" border="0" cellspacing="10">';
+
 	$i = 0;
 	$count_image = count($image_tag);
 	$number_iteration = ceil($count_image/$number_image);
 	$p = 0;
+    echo '<ul class="thumbnails">';
 	for ($k = 0; $k < $number_iteration; $k++) {
-		echo '<tr height="'.$thumbnail_height.'">';
 		for ($i = 0; $i < $number_image; $i++) {
-			if (!is_null($image_tag[$p])) {
-				echo '<td>';
-				//TODO:move styles to css files and center image vertical
-				?>
-
-				<style>
-				div.thumbnail:hover {
-				  border-color: #0088cc;
-				  background-color:#FBFFFF;
-				  -webkit-box-shadow: 0 1px 4px rgba(0, 105, 214, 0.25);
-				  -moz-box-shadow: 0 1px 4px rgba(0, 105, 214, 0.25);
-				  box-shadow: 0 1px 4px rgba(0, 105, 214, 0.25);
-				}
-				</style>
-
-				<?php
-				echo '<div class="thumbnail" style="text-align: center; margin:5px; padding:9px; height:'.$thumbnail_height_frame.'px; width:'.$thumbnail_width_frame.'px">';
+			if (isset($image_tag[$p])) {
+				echo '<li class="span4">
+                      <div class="thumbnail">';
 				echo '<a href="slideshow.php?slide_id='.$p.'&curdirpath='.$pathurl.'">'.$image_tag[$p].'</a>';
 				echo '</div>';
-				echo '</td>';
+                echo '</li>';
 			}
 			$p++;
 		}
-		echo '</tr>';
 	}
-	echo '</table>';
+    echo '</ul>';
+
 }//end slide==all
 
 /*	ONE AT A TIME VIEW */
@@ -405,11 +374,6 @@ if ($slide_id != 'all' && !empty($image_files_only)) {
 
 		echo '<table align="center" border="0" cellspacing="10">';
 		echo '<tr>';
-		echo '<td style="padding:10px;" align="center">';
-		echo Display::tag('h2',$row['title']);
-		echo '</td>';
-		echo '</tr>';
-		echo '<tr>';
 		echo '<td id="td_image" align="center">';
 		if ($slide < $total_slides - 1 && $slide_id != 'all') {
 			echo "<a href='slideshow.php?slide_id=".$next_slide."&curdirpath=$pathurl'>";
@@ -421,9 +385,8 @@ if ($slide_id != 'all' && !empty($image_files_only)) {
         }
 
 		list($width, $height) = getimagesize($image);
-
-		//auto resize
-		if ($_SESSION["image_resizing"]!="noresizing" && $_SESSION["image_resizing"]!="resizing" ) {
+		// Auto resize
+		if (isset($_SESSION["image_resizing"]) &&  $_SESSION["image_resizing"] == 'resizing') {
 		?>
 
 		<script type="text/javascript">
@@ -488,16 +451,37 @@ if ($slide_id != 'all' && !empty($image_files_only)) {
 		echo '<td>';
 		echo $row['comment'];
 		echo '</td>';
+
+        echo '<tr>';
+        echo '<td style="padding:10px;" align="center">';
+        echo Display::tag('h3', $row['title']);
+        echo '</td>';
+        echo '</tr>';
 		echo '</tr>';
 		echo '</table>';
+
 		echo '<table align="center" border="0">';
 		if (api_is_allowed_to_edit(null, true)) {
-			echo '<tr>';
-			echo '<td align="center">';
-			echo '<a href="edit_document.php?'.api_get_cidreq().'&id='.$row['id'].'&origin=slideshow&amp;origin_opt='.$edit_slide_id.'&amp;">
-			      <img src="../img/edit.gif" border="0" title="'.get_lang('Modify').'" alt="'.get_lang('Modify').'" /></a><br />';
 			$aux = explode('.', htmlspecialchars($image_files_only[$slide]));
 			$ext = $aux[count($aux) - 1];
+
+            if ($_SESSION['image_resizing'] == 'resizing') {
+                $resize_info = get_lang('Resizing').'<br />';
+                $resize_widht = $_SESSION["image_resizing_width"].' x ';
+                $resize_height = $_SESSION['image_resizing_height'];
+            } elseif($_SESSION['image_resizing'] != 'noresizing'){
+                $resize_info = get_lang('Resizing').'<br />';
+                $resize_widht = get_lang('Auto').' x ';
+                $resize_height = get_lang('Auto');
+            } else {
+                $resize_info = get_lang('NoResizing').'<br />';
+            }
+
+            echo '<tr>';
+            echo '<td align="center">';
+            echo '<a href="edit_document.php?'.api_get_cidreq().'&id='.$row['id'].'&origin=slideshow&amp;origin_opt='.$edit_slide_id.'&amp;">
+			      <img src="../img/edit.gif" border="0" title="'.get_lang('Modify').'" alt="'.get_lang('Modify').'" /></a><br />';
+
 			echo $image_files_only[$slide].' <br />';
 			echo $width.' x '.$height.' <br />';
 			echo round((filesize($image)/1024), 2).' KB';
@@ -506,17 +490,6 @@ if ($slide_id != 'all' && !empty($image_files_only)) {
 			echo '</tr>';
 			echo '<tr>';
 			echo '<td align="center">';
-			if ($_SESSION['image_resizing'] == 'resizing') {
-				$resize_info = get_lang('Resizing').'<br />';
-				$resize_widht = $_SESSION["image_resizing_width"].' x ';
-				$resize_height = $_SESSION['image_resizing_height'];
-			} elseif($_SESSION['image_resizing'] != 'noresizing'){
-				$resize_info = get_lang('Resizing').'<br />';
-				$resize_widht = get_lang('Auto').' x ';
-				$resize_height = get_lang('Auto');
-			} else {
-				$resize_info = get_lang('NoResizing').'<br />';
-			}
 			echo $resize_info;
 			echo $resize_widht;
 			echo $resize_height;
@@ -529,7 +502,9 @@ if ($slide_id != 'all' && !empty($image_files_only)) {
 		Display::display_warning_message(get_lang('FileNotFound'));
 	}
 } else {
-    Display::display_warning_message(get_lang('NoDataAvailable'));
+    if ($slide_id != 'all') {
+        Display::display_warning_message(get_lang('NoDataAvailable'));
+    }
 }
 
 Display :: display_footer();

+ 20 - 21
main/document/upload.php

@@ -1,5 +1,6 @@
 <?php
 /* For licensing terms, see /license.txt */
+
 /**
  * Main script for the documents tool
  *
@@ -56,8 +57,8 @@ function check_unzip() {
         document.upload.if_exists[0].checked=true;
         document.upload.if_exists[0].disabled=false;
         document.upload.if_exists[2].disabled=false;
-        }
     }
+}
 
 function advanced_parameters() {
     if (document.getElementById(\'options\').style.display == \'none\') {
@@ -100,7 +101,8 @@ $(function () {
 // Variables
 
 $is_allowed_to_edit = api_is_allowed_to_edit(null, true);
-
+$_course = api_get_course_info();
+$groupId = api_get_group_id();
 $courseDir = $_course['path'].'/document';
 $sys_course_path = api_get_path(SYS_COURSE_PATH);
 $base_work_dir = $sys_course_path.$courseDir;
@@ -137,33 +139,26 @@ if (empty($document_data)) {
 $group_properties = array();
 
 // This needs cleaning!
-if (api_get_group_id()) {
+if (!empty($groupId)) {
     // If the group id is set, check if the user has the right to be here
-    // Needed for group related stuff
-    require_once api_get_path(LIBRARY_PATH).'groupmanager.lib.php';
     // Get group info
-    $group_properties = GroupManager::get_group_properties(api_get_group_id());
+    $group_properties = GroupManager::get_group_properties($groupId);
 
     // Only courseadmin or group members allowed
-    if ($is_allowed_to_edit || GroupManager::is_user_in_group(api_get_user_id(), api_get_group_id())) {
-        $to_group_id = api_get_group_id();
-        $req_gid = '&amp;gidReq='.api_get_group_id();
-        $interbreadcrumb[] = array('url' => '../group/group_space.php?gidReq='.api_get_group_id(), 'name' => get_lang('GroupSpace'));
+    if ($is_allowed_to_edit || GroupManager::is_user_in_group(api_get_user_id(), $groupId)) {
+        $interbreadcrumb[] = array('url' => '../group/group_space.php?'.api_get_cidreq(), 'name' => get_lang('GroupSpace'));
     } else {
         api_not_allowed(true);
     }
 } elseif ($is_allowed_to_edit || is_my_shared_folder(api_get_user_id(), $path, api_get_session_id())) {
 
-    // Admin for "regular" upload, no group documents. And check if is my shared folder
-    $to_group_id = 0;
-    $req_gid = '';
 } else {
     // No course admin and no group member...
     api_not_allowed(true);
 }
 
 // Group docs can only be uploaded in the group directory
-if ($to_group_id != 0 && $path == '/') {
+if ($groupId != 0 && $path == '/') {
     $path = $group_properties['directory'];
 }
 
@@ -177,7 +172,7 @@ if ($is_certificate_array[0] == 'certificates') {
 
 // Title of the tool
 $add_group_to_title = null;
-if ($to_group_id != 0) {
+if ($groupId != 0) {
     // Add group name after for group documents
     $add_group_to_title = ' ('.$group_properties['name'].')';
 }
@@ -191,7 +186,7 @@ if (isset($_REQUEST['certificate'])) {
 if ($is_certificate_mode) {
     $interbreadcrumb[] = array('url' => '../gradebook/'.$_SESSION['gradebook_dest'], 'name' => get_lang('Gradebook'));
 } else {
-    $interbreadcrumb[] = array('url' => './document.php?id='.$document_id.$req_gid, 'name'=> get_lang('Documents'));
+    $interbreadcrumb[] = array('url' => './document.php?id='.$document_id.'&'.api_get_cidreq(), 'name'=> get_lang('Documents'));
 }
 
 // Interbreadcrumb for the current directory root path
@@ -210,6 +205,8 @@ Display::display_header($nameTools, 'Doc');
 
 /*    Here we do all the work */
 
+$unzip = isset($_POST['unzip']) ? $_POST['unzip'] : null;
+$index = isset($_POST['index_document']) ? $_POST['index_document'] : null;
 // User has submitted a file
 if (!empty($_FILES)) {
     DocumentManager::upload_document(
@@ -217,9 +214,9 @@ if (!empty($_FILES)) {
         $_POST['curdirpath'],
         $_POST['title'],
         $_POST['comment'],
-        $_POST['unzip'],
+        $unzip,
         $_POST['if_exists'],
-        $_POST['index_document'],
+        $index,
         true
     );
 }
@@ -239,7 +236,7 @@ if ($is_certificate_mode) {
 echo '</div>';
 
 // Form to select directory
-$folders = DocumentManager::get_all_document_folders($_course, $to_group_id, $is_allowed_to_edit);
+$folders = DocumentManager::get_all_document_folders($_course, $groupId, $is_allowed_to_edit);
 if (!$is_certificate_mode) {
     echo build_directory_selector(
         $folders,
@@ -303,14 +300,16 @@ $simple_form = $form->return_form();
 $url = api_get_path(WEB_AJAX_PATH).'document.ajax.php?'.api_get_cidreq().'&a=upload_file';
 $multiple_form =  get_lang('ClickToSelectOrDragAndDropMultipleFilesOnTheUploadField').'<br />';
 $multiple_form .=  '
-    <center>
+    <div class="form-ajax">
     <form id="file_upload" action="'.$url.'" method="POST" enctype="multipart/form-data">
         <input type="hidden" name="curdirpath" value="'.$path.'" />
         <input type="file" name="file" multiple>
         <button type="submit">Upload</button>
+        <div class="button-load">
         '.get_lang('UploadFiles').'
+        </div>
     </form>
-    </center>
+    </div>
     <table style="display:none; width:50%" class="files data_table">
         <tr>
             <th>'.get_lang('FileName').'</th>

+ 22 - 27
main/document/webcam_clip.php

@@ -9,11 +9,6 @@
  * @author Juan Carlos Raña Trabado herodoto@telefonica.net
  * @since 7/jun/2012
 */
-/**
- * Code
- */
-
-/*	INIT SECTION */
 
 // Name of the language file that needs to be included
 $language_file = array('document');
@@ -34,7 +29,7 @@ api_block_anonymous_users();
 $document_data = DocumentManager::get_document_data_by_id($_GET['id'], api_get_course_id(), true);
 if (empty($document_data)) {
     if (api_is_in_group()) {
-        $group_properties   = GroupManager::get_group_properties(api_get_group_id());        
+        $group_properties   = GroupManager::get_group_properties(api_get_group_id());
         $document_id        = DocumentManager::get_document_id(api_get_course_info(), $group_properties['directory']);
         $document_data      = DocumentManager::get_document_data_by_id($document_id, api_get_course_id());
     }
@@ -113,14 +108,14 @@ if (isset ($group)) {
 }
 
 // Interbreadcrumb for the current directory root path
-$counter = 0;   
+$counter = 0;
 if (isset($document_data['parents'])) {
     foreach($document_data['parents'] as $document_sub_data) {
         //fixing double group folder in breadcrumb
         if (api_get_group_id()) {
             if ($counter == 0) {
                 $counter++;
-                continue;  
+                continue;
             }
         }
         $interbreadcrumb[] = array('url' => $document_sub_data['document_url'], 'name' => $document_sub_data['title']);
@@ -145,7 +140,7 @@ echo '</div>';
 <h3><?php echo get_lang('LocalInputImage'); ?></h3>
 <!-- First, include the JPEGCam JavaScript Library -->
 	<script type="text/javascript" src="<?php echo api_get_path(WEB_LIBRARY_PATH); ?>jpegcam/webcam.js"></script>
-	
+
 	<!-- Configure a few settings -->
 	<script language="JavaScript">
 		var clip_filename='video_clip.jpg';
@@ -154,14 +149,14 @@ echo '</div>';
 		webcam.set_shutter_sound( true,'<?php echo api_get_path(WEB_LIBRARY_PATH); ?>jpegcam/shutter.mp3' ); // true play shutter click sound
 		webcam.set_quality( 90 ); // JPEG quality (1 - 100)
 		webcam.set_api_url( '<?php echo api_get_path(WEB_LIBRARY_PATH); ?>jpegcam/webcam_receiver.php?webcamname='+escape(clip_filename)+'&webcamdir=<?php echo $webcamdir; ?>&webcamuserid=<?php echo $webcamuserid; ?>' );
-		
+
 	</script>
-	
+
 	<!-- Next, write the movie to the page at 320x240 -->
 	<script language="JavaScript">
 		document.write( webcam.get_html(320, 240) );
 	</script>
-	
+
 	<!-- Some buttons for controlling things -->
 	<br/>
     <form>
@@ -171,16 +166,16 @@ echo '</div>';
         <input type=button value="<?php echo get_lang('Send'); ?>" onClick="do_upload()">
         &nbsp;&nbsp;||&nbsp;&nbsp;
         <input type=button value="<?php echo get_lang('Auto'); ?>" onClick="start_video();">
-		<input type=button value="<?php echo get_lang('Stop'); ?>" onClick="stop_video()"> 
+		<input type=button value="<?php echo get_lang('Stop'); ?>" onClick="stop_video()">
         <br/>
         <input type=button value="<?php echo get_lang('Configure'); ?>" onClick="webcam.configure()">
-		 
+
 	</form>
-    
+
 	<!-- Code to handle the server response (see webcam_receiver.php) -->
 	<script language="JavaScript">
 		webcam.set_hook( 'onComplete', 'my_completion_handler' );
-		
+
 		function do_upload() {
 			// upload to server
 			if (this.loaded){
@@ -188,19 +183,19 @@ echo '</div>';
 			}
 			webcam.upload();
 		}
-		
+
 		function my_completion_handler(msg) {
 			// extract URL out of PHP output
 			if (msg.match(/(http\:\/\/\S+)/)) {
 				var image_url = RegExp.$1;
-				
+
 				image_url=image_url.replace(/\\/g,'/').replace( /.*\//, '' );// extract basename
 				image_url='<?php echo api_get_path(WEB_COURSE_PATH).$_course['path'].'/document/'.$dir;?>'+image_url+'<?php echo '?'.api_get_cidreq(); ?>';
-			
+
 				// show JPEG image in page
-				document.getElementById('upload_results').innerHTML = 
+				document.getElementById('upload_results').innerHTML =
 				'<div style="width: 320px;">' +
-					'<h3><?php echo get_lang('ClipSent'); ?></h3>' + 
+					'<h3><?php echo get_lang('ClipSent'); ?></h3>' +
 					'<img src="' + image_url + '">' +
 					'</div>';
 				// reset camera for another shot
@@ -209,7 +204,7 @@ echo '</div>';
 			else alert("PHP Error: " + msg);
 		}
 	</script>
-	
+
      <script language=javascript>
 	   var internaval=null;
 	   var timeout=null;
@@ -217,7 +212,7 @@ echo '</div>';
 	   var fps=1000;//one frame per second
 	   var maxclip=25;//maximum number of clips
 	   var maxtime=60000;//stop after one minute
-	
+
 	   function stop_video() {
 			interval=window.clearInterval(interval);
 	   }
@@ -226,7 +221,7 @@ echo '</div>';
 		   	webcam.set_stealth( true ); // do not freeze image upon capture
 		 	interval=window.setInterval("clip_send_video()",fps);
 	   }
-	   
+
 	   function clip_send_video() {
 		   counter++
 		   timeout=setTimeout('stop_video()',maxtime);
@@ -238,8 +233,8 @@ echo '</div>';
 		   }
 	   }
  </script>
-    
-    
+
+
 	</td><td width=50>&nbsp;</td><td valign=top>
 		<div id="upload_results" style="background-color:#ffffff;"></div>
 	</td></tr></table>
@@ -247,4 +242,4 @@ echo '</div>';
 
 <?php
 
-Display :: display_footer();
+Display :: display_footer();

+ 9 - 9
main/exercice/exercise.class.php

@@ -1760,9 +1760,10 @@ class Exercise
      * Saves a test attempt
      *
      * @param int  clock_expired_time
-     * @param int  lp id
-     * @param int  lp item id
-     * @param int  lp item_view id
+     * @param int  int lp id
+     * @param int  int lp item id
+     * @param int  int lp item_view id
+     * @param float $weight
      * @param array question list
      */
     public function save_stat_track_exercise_info(
@@ -1774,9 +1775,9 @@ class Exercise
         $weight = 0
     ) {
         $track_exercises = Database :: get_statistic_table(TABLE_STATISTIC_TRACK_E_EXERCICES);
-        $safe_lp_id 			= intval($safe_lp_id);
-        $safe_lp_item_id 		= intval($safe_lp_item_id);
-        $safe_lp_item_view_id 	= intval($safe_lp_item_view_id);
+        $safe_lp_id = intval($safe_lp_id);
+        $safe_lp_item_id = intval($safe_lp_item_id);
+        $safe_lp_item_view_id = intval($safe_lp_item_view_id);
 
         if (empty($safe_lp_id)) {
             $safe_lp_id = 0;
@@ -1797,9 +1798,8 @@ class Exercise
         $questionList = array_map('intval', $questionList);
 
         $weight = Database::escape_string($weight);
-        $sql = "INSERT INTO $track_exercises ($sql_fields exe_exo_id, exe_user_id, exe_cours_id, status,session_id, data_tracking, start_date, orig_lp_id, orig_lp_item_id, exe_weighting)
-                VALUES($sql_fields_values '".$this->id."','" . api_get_user_id() . "','" . api_get_course_id() . "','incomplete','" . api_get_session_id() . "','" . implode(',', $questionList) . "', '" . api_get_utc_datetime() . "', '$safe_lp_id', '$safe_lp_item_id', '$weight' )";
-
+        $sql = "INSERT INTO $track_exercises ($sql_fields exe_exo_id, exe_user_id, exe_cours_id, status,session_id, data_tracking, start_date, orig_lp_id, orig_lp_item_id, orig_lp_item_view_id, exe_weighting)
+                VALUES($sql_fields_values '".$this->id."','" . api_get_user_id() . "','" . api_get_course_id() . "','incomplete','" . api_get_session_id() . "','" . implode(',', $questionList) . "', '" . api_get_utc_datetime() . "', '$safe_lp_id', '$safe_lp_item_id', '$safe_lp_item_view_id', '$weight')";
         Database::query($sql);
         $id = Database::insert_id();
         return $id;

+ 24 - 20
main/exercice/exercise.lib.php

@@ -1,5 +1,6 @@
 <?php
 /* For licensing terms, see /license.txt */
+
 /**
  * Exercise library
  * @todo convert this lib into a static class
@@ -941,22 +942,22 @@ function get_exercise_track_exercise_info($exe_id)
     $exe_id = intval($exe_id);
     $result = array();
     if (!empty($exe_id)) {
-       $sql_fb_type = "SELECT q.*, tee.*
-                        FROM $TBL_EXERCICES as q
-                        INNER JOIN $TBL_TRACK_EXERCICES as tee
-                        ON q.id=tee.exe_exo_id
-                        INNER JOIN $TBL_COURSE c
-                        ON c.code = tee.exe_cours_id
-                        WHERE tee.exe_id=$exe_id
-                        AND q.c_id=c.id";
-
-       $res_fb_type = Database::query($sql_fb_type);
+       $sql = " SELECT q.*, tee.*
+                FROM $TBL_EXERCICES as q
+                INNER JOIN $TBL_TRACK_EXERCICES as tee
+                ON q.id=tee.exe_exo_id
+                INNER JOIN $TBL_COURSE c
+                ON c.code = tee.exe_cours_id
+                WHERE tee.exe_id=$exe_id
+                AND q.c_id=c.id";
+
+       $res_fb_type = Database::query($sql);
        $result      = Database::fetch_array($res_fb_type, 'ASSOC');
     }
+
     return $result;
 }
 
-
 /**
  * Validates the time control key
  */
@@ -965,7 +966,8 @@ function exercise_time_control_is_valid($exercise_id, $lp_id = 0 , $lp_item_id =
     $course_id = api_get_course_int_id();
     $exercise_id = intval($exercise_id);
     $TBL_EXERCICES =  Database::get_course_table(TABLE_QUIZ_TEST);
-    $sql 	= "SELECT expired_time FROM $TBL_EXERCICES WHERE c_id = $course_id AND id = $exercise_id";
+    $sql = "SELECT expired_time FROM $TBL_EXERCICES
+            WHERE c_id = $course_id AND id = $exercise_id";
     $result = Database::query($sql);
     $row	= Database::fetch_array($result, 'ASSOC');
     if (!empty($row['expired_time'])) {
@@ -1122,8 +1124,8 @@ function getLatestHotPotatoResult(
     $exercisePath,
     $userId,
     $courseId,
-    $sessionId)
-{
+    $sessionId
+) {
     $table = Database :: get_statistic_table(TABLE_STATISTIC_TRACK_E_HOTPOTATOES);
 
     $courseInfo = api_get_course_info_by_id($courseId);
@@ -1165,7 +1167,7 @@ function get_exam_results_data(
     $course_id = api_get_course_int_id();
     $course_code = api_get_course_id();
 
-   	$is_allowedToEdit           = api_is_allowed_to_edit(null,true) || api_is_allowed_to_edit(true) || api_is_drh();
+   	$is_allowedToEdit = api_is_allowed_to_edit(null,true) || api_is_allowed_to_edit(true) || api_is_drh();
 
     $TBL_USER                   = Database :: get_main_table(TABLE_MAIN_USER);
     $TBL_EXERCICES              = Database :: get_course_table(TABLE_QUIZ_TEST);
@@ -1678,11 +1680,10 @@ function get_all_exercises(
     $course_info = null,
     $session_id = 0,
     $check_publication_dates = false,
-    $search_exercise = '',
+    $search = '',
     $search_all_sessions = false,
     $active = 2
 ) {
-    $TBL_EXERCICES = Database :: get_course_table(TABLE_QUIZ_TEST);
     $course_id = api_get_course_int_id();
 
     if (!empty($course_info) && !empty($course_info['real_id'])) {
@@ -1703,8 +1704,8 @@ function get_all_exercises(
         $time_conditions .= " (start_time = '0000-00-00 00:00:00'   AND end_time =  '0000-00-00 00:00:00'))  "; // nothing is set
     }
 
-    $needle_where   = (!empty($search_exercise)) ? " AND title LIKE '?' "       : '';
-    $needle         = (!empty($search_exercise)) ? "%" . $search_exercise . "%" : '';
+    $needle_where = !empty($search) ? " AND title LIKE '?' " : '';
+    $needle = !empty($search) ? "%" . $search . "%" : '';
 
     //Show courses by active status
     $active_sql = '';
@@ -1733,8 +1734,11 @@ function get_all_exercises(
         }
     }
 
-    return Database::select('*',$TBL_EXERCICES, $conditions);
+    $table = Database :: get_course_table(TABLE_QUIZ_TEST);
+
+    return Database::select('*', $table, $conditions);
 }
+
 /**
  * Get exercise information by id
  * @param int $exerciseId Exercise Id

+ 1 - 1
main/exercice/exercise_result.php

@@ -176,7 +176,7 @@ if ($origin != 'learnpath') {
 
 	Display::display_footer();
 } else {
-	$lp_mode =  $_SESSION['lp_mode'];
+	$lp_mode = isset($_SESSION['lp_mode']) ? $_SESSION['lp_mode'] : null;
 	$url = '../newscorm/lp_controller.php?cidReq='.api_get_course_id().'&action=view&lp_id='.$learnpath_id.'&lp_item_id='.$learnpath_item_id.'&exeId='.$exercise_stat_info['exe_id'].'&fb_type='.$objExercise->feedback_type;
 	$href = ($lp_mode == 'fullscreen')?' window.opener.location.href="'.$url.'" ':' top.location.href="'.$url.'"';
 

+ 5 - 1
main/exercice/exercise_show.php

@@ -62,7 +62,11 @@ if (empty($id)) {
     api_not_allowed(true);
 }
 
-if (api_is_course_session_coach(api_get_user_id(), api_get_course_id(), api_get_session_id())) {
+if (api_is_course_session_coach(
+    api_get_user_id(),
+    api_get_course_id(),
+    api_get_session_id()
+)) {
     if (!api_coach_can_edit_view_results(api_get_course_id(), api_get_session_id())) {
         api_not_allowed(true);
     }

+ 6 - 1
main/exercice/exercise_submit.php

@@ -265,6 +265,7 @@ if (empty($exercise_stat_info)) {
 		$_SESSION['expired_time'][$current_expired_time_key] 	 = $clock_expired_time;
 		if ($debug) { error_log('5.4. Setting the $_SESSION[expired_time]: '.$_SESSION['expired_time'][$current_expired_time_key] ); };
 	}
+
     $exe_id = $objExercise->save_stat_track_exercise_info(
         $clock_expired_time,
         $learnpath_id,
@@ -648,7 +649,11 @@ if (api_is_course_admin() && $origin != 'learnpath') {
     echo '</div>';
 }
 
-$is_visible_return = $objExercise->is_visible($learnpath_id, $learnpath_item_id, $learnpath_item_view_id);
+$is_visible_return = $objExercise->is_visible(
+    $learnpath_id,
+    $learnpath_item_id,
+    $learnpath_item_view_id
+);
 if ($is_visible_return['value'] == false) {
     echo $is_visible_return['message'];
     if ($origin != 'learnpath') {

+ 12 - 2
main/exercice/hotpotatoes.php

@@ -123,8 +123,18 @@ if ((api_is_allowed_to_edit(null, true)) && (($finish == 0) || ($finish == 2)))
 
             /*if (treat_uploaded_file($_FILES['userFile'], $document_sys_path, $uploadPath."/".$fld, $max_filled_space, $unzip))*/
             $allow_output_on_success = false;
-            if (handle_uploaded_document($_course, $_FILES['userFile'], $document_sys_path, $uploadPath.'/'.$fld, api_get_user_id(), null, null, $unzip, '', $allow_output_on_success)) {
-
+            if (handle_uploaded_document(
+                $_course,
+                $_FILES['userFile'],
+                $document_sys_path,
+                $uploadPath . '/' . $fld,
+                api_get_user_id(),
+                null,
+                null,
+                $unzip,
+                '',
+                $allow_output_on_success
+            )) {
                 if ($finish == 2) {
                     $imgparams = $_POST['imgparams'];
                     $checked = CheckImageName($imgparams, $filename);

+ 61 - 46
main/exercice/question_pool.php

@@ -50,11 +50,6 @@ if (!isset($_GET['selected_course']) && !isset($_GET['exerciseId'])) {
 
 $_course = api_get_course_info();
 
-// document path
-$documentPath = api_get_path(SYS_COURSE_PATH).$_course['path'].'/document';
-// picture path
-$picturePath = $documentPath.'/images';
-
 if (empty($objExercise) && !empty($fromExercise)) {
     $objExercise = new Exercise();
     $objExercise->read($fromExercise);
@@ -136,7 +131,7 @@ if ($is_allowedToEdit) {
         // Adds the question ID represented by $recup into the list of questions for the current exercise
         $objExercise->addToList($recup);
         Session::write('objExercise', $objExercise);
-    } else if( isset($_POST['recup']) && is_array($_POST['recup']) && $fromExercise) {
+    } else if (isset($_POST['recup']) && is_array($_POST['recup']) && $fromExercise) {
         $list_recup = $_POST['recup'];
 
         foreach ($list_recup as $course_id => $question_data) {
@@ -403,22 +398,23 @@ $question_list = Question::get_question_type_list();
 
 $new_question_list = array();
 $new_question_list['-1']  = get_lang('All');
-$objExercise = new Exercise();
-$objExercise->read($fromExercise);
-foreach ($question_list as $key=>$item) {
-    if ($objExercise->feedback_type == EXERCISE_FEEDBACK_TYPE_DIRECT) {
-        if (!in_array($key, array(HOT_SPOT_DELINEATION, UNIQUE_ANSWER))) {
-            continue;
-        }
-        $new_question_list[$key] = get_lang($item[1]);
-    } else {
-        if ($key == HOT_SPOT_DELINEATION) {
-            continue;
+if (!empty($_course)) {
+    $objExercise = new Exercise();
+    $objExercise->read($fromExercise);
+    foreach ($question_list as $key => $item) {
+        if ($objExercise->feedback_type == EXERCISE_FEEDBACK_TYPE_DIRECT) {
+            if (!in_array($key, array(HOT_SPOT_DELINEATION, UNIQUE_ANSWER))) {
+                continue;
+            }
+            $new_question_list[$key] = get_lang($item[1]);
+        } else {
+            if ($key == HOT_SPOT_DELINEATION) {
+                continue;
+            }
+            $new_question_list[$key] = get_lang($item[1]);
         }
-        $new_question_list[$key] = get_lang($item[1]);
     }
 }
-
 // Answer type list
 $select_answer_html = Display::select(
     'answerType',
@@ -439,7 +435,7 @@ echo "<input type='hidden' id='exercice_id_changed' name='exercice_id_changed' v
 <form method="post" action="<?php echo $url.'?'.api_get_cidreq().'&fromExercise='.$fromExercise; ?>" >
 <?php
 echo '<input type="hidden" name="course_id" value="'.$selected_course.'">';
-$main_question_list = array();
+$mainQuestionList = array();
 
 // if we have selected an exercise in the list-box 'Filter'
 
@@ -475,7 +471,7 @@ if ($exerciseId > 0) {
 
     $result = Database::query($sql);
     while($row = Database::fetch_array($result, 'ASSOC')) {
-        $main_question_list[] = $row;
+        $mainQuestionList[] = $row;
     }
 } elseif ($exerciseId == -1) {
 	// If we have selected the option 'Orphan questions' in the list-box 'Filter'
@@ -532,7 +528,7 @@ if ($exerciseId > 0) {
              )";
     $result = Database::query($sql);
     while($row = Database::fetch_array($result, 'ASSOC')) {
-        $main_question_list[] = $row;
+        $mainQuestionList[] = $row;
     }
 } else {
 	// All tests for selected course
@@ -555,7 +551,7 @@ if ($exerciseId > 0) {
 	}
 
     if (!empty($session_id) && $session_id != '-1') {
-        $main_question_list = array();
+        $mainQuestionList = array();
         if (!empty($course_list)) {
             foreach ($course_list as $course_item) {
                 $courseItemId = $course_item['real_id'];
@@ -565,6 +561,7 @@ if ($exerciseId > 0) {
                         continue;
                     }
                 }
+
                 $exerciseList = get_all_exercises($course_item, $session_id);
 
                 if (!empty($exerciseList)) {
@@ -603,7 +600,9 @@ if ($exerciseId > 0) {
                                         continue;
                                     }
 
-                                    if ($objExercise->feedback_type != EXERCISE_FEEDBACK_TYPE_DIRECT) {
+                                    if (!empty($objExercise) &&
+                                        $objExercise->feedback_type != EXERCISE_FEEDBACK_TYPE_DIRECT
+                                    ) {
                                         if ($question_obj->type == HOT_SPOT_DELINEATION) {
                                             continue;
                                         }
@@ -615,9 +614,10 @@ if ($exerciseId > 0) {
                                         'type' => $question_obj->type,
                                         'level' => $question_obj->level,
                                         'exercise_id' => $exercise['id'],
+                                        'exercise_name' => $exercise['title'],
                                         'course_id' => $courseItemId,
                                     );
-                                    $main_question_list[] = $question_row;
+                                    $mainQuestionList[] = $question_row;
                                 }
                             }
                         }
@@ -626,7 +626,6 @@ if ($exerciseId > 0) {
             }
         }
     } else {
-
         if ($session_id == -1 or empty($session_id)) {
             $session_id = 0;
         }
@@ -648,14 +647,14 @@ if ($exerciseId > 0) {
                 ORDER BY session_id ASC";
         $result = Database::query($sql);
         while ($row = Database::fetch_array($result, 'ASSOC')) {
-            $main_question_list[] = $row;
+            $mainQuestionList[] = $row;
         }
     }
 	// forces the value to 0
-	$exerciseId=0;
+    $exerciseId = 0;
 }
 
-$nbrQuestions = count($main_question_list);
+$nbrQuestions = count($mainQuestionList);
 
 // build the line of the array to display questions
 // Actions are different if you launch the question_pool page
@@ -715,38 +714,54 @@ $header = array(
 );
 
 $data = array();
-if (is_array($main_question_list)) {
-    foreach ($main_question_list as $tabQuestion) {
+
+/*$hideDoubles = false;
+if (empty($exerciseId) && !empty($session_id) && $session_id != '-1') {
+    $hideDoubles = true;
+}
+$questionAdded = array();*/
+
+if (is_array($mainQuestionList)) {
+    foreach ($mainQuestionList as $question) {
+
+        /*if ($hideDoubles) {
+            if (in_array($question['question'], $questionAdded)) {
+                continue;
+            }
+        }
+        $questionAdded[$question['question']] = $question;*/
+
         $row = array();
 
         // This function checks if the question can be read
         $question_type = get_question_type_for_question(
             $selected_course,
-            $tabQuestion['id']
+            $question['id']
         );
 
         if (empty($question_type)) {
             continue;
         }
 
-        $sessionId = isset($tabQuestion['session_id']) ? $tabQuestion['session_id'] : null;
+        $sessionId = isset($question['session_id']) ? $question['session_id'] : null;
+        $exerciseName = isset($question['exercise_name']) ? '<br />('.$question['exercise_id'].') ' : null;
         $row[] = get_a_tag_for_question(
             $questionTagA,
             $fromExercise,
-            $tabQuestion['id'],
-            $tabQuestion['type'],
-            $tabQuestion['question'],
+            $question['id'],
+            $question['type'],
+            $question['question'],
             $sessionId
-        );
+        ).$exerciseName;
         $row[] = $question_type;
-        $row[] = get_question_categorie_for_question($selected_course, $tabQuestion['id']);
-        $row[] = $tabQuestion['level'];
+        $row[] = get_question_categorie_for_question($selected_course, $question['id']);
+        $row[] = $question['level'];
         $row[] = get_action_icon_for_question(
                     $actionIcon1,
                     $fromExercise,
-                    $tabQuestion['id'],
-                    $tabQuestion['type'],
-                    $tabQuestion['question'],
+                    $question['id'],
+                    $question['type'],
+                    $question['question'],
                     $selected_course,
                     $courseCategoryId,
                     $exerciseLevel,
@@ -754,13 +769,13 @@ if (is_array($main_question_list)) {
                     $session_id,
                     $exerciseId
                 ).
-                    "&nbsp;".
+                "&nbsp;".
                 get_action_icon_for_question(
                     $actionIcon2,
                     $fromExercise,
-                    $tabQuestion['id'],
-                    $tabQuestion['type'],
-                    $tabQuestion['question'],
+                    $question['id'],
+                    $question['type'],
+                    $question['question'],
                     $selected_course,
                     $courseCategoryId,
                     $exerciseLevel,

+ 36 - 17
main/forum/download.php

@@ -9,10 +9,6 @@
  * @package chamilo.document
  */
 
-/*
-        MAIN CODE
-*/
-
 session_cache_limiter('public');
 
 require_once '../inc/global.inc.php';
@@ -44,11 +40,12 @@ $full_file_name = api_get_path(SYS_COURSE_PATH).api_get_course_path().'/upload/f
 //if the rewrite rule asks for a directory, we redirect to the document explorer
 if (is_dir($full_file_name)) {
     //remove last slash if present
-    //$doc_url = ($doc_url{strlen($doc_url)-1}=='/')?substr($doc_url,0,strlen($doc_url)-1):$doc_url;
     //mod_rewrite can change /some/path/ to /some/path// in some cases, so clean them all off (René)
-    while ($doc_url{$dul = strlen($doc_url)-1}=='/') $doc_url = substr($doc_url,0,$dul);
+    while ($doc_url{$dul = strlen($doc_url) - 1} == '/') {
+        $doc_url = substr($doc_url, 0, $dul);
+    }
     //create the path
-    $document_explorer = api_get_path(WEB_COURSE_PATH).api_get_course_path(); // home course path
+    $document_explorer = api_get_path(WEB_COURSE_PATH).api_get_course_path();
     //redirect
     header('Location: '.$document_explorer);
 }
@@ -61,19 +58,41 @@ $course_id = api_get_course_int_id();
 // launch event
 event_download($doc_url);
 
-$sql='SELECT thread_id, forum_id,filename FROM '.$tbl_forum_post.'  f  INNER JOIN '.$tbl_forum_attachment.' a
-        ON a.post_id=f.post_id 
-      WHERE f.c_id = '.$course_id.' AND a.c_id = '.$course_id.' AND path LIKE BINARY "'.$doc_url.'"';
+$sql = 'SELECT thread_id, forum_id,filename
+        FROM '.$tbl_forum_post.'  f
+        INNER JOIN '.$tbl_forum_attachment.' a
+        ON a.post_id=f.post_id
+        WHERE
+            f.c_id = '.$course_id.' AND
+            a.c_id = '.$course_id.' AND
+            path LIKE BINARY "'.$doc_url.'"';
 
 $result = Database::query($sql);
-$row    = Database::fetch_array($result);
-
-$forum_thread_visibility = api_get_item_visibility(api_get_course_info($course_code),TOOL_FORUM_THREAD,$row['thread_id'], api_get_session_id());
-$forum_forum_visibility  = api_get_item_visibility(api_get_course_info($course_code),TOOL_FORUM,$row['forum_id'], api_get_session_id());
+$row = Database::fetch_array($result);
+
+$forum_thread_visibility = api_get_item_visibility(
+    api_get_course_info($course_code),
+    TOOL_FORUM_THREAD,
+    $row['thread_id'],
+    api_get_session_id()
+);
+$forum_forum_visibility = api_get_item_visibility(
+    api_get_course_info($course_code),
+    TOOL_FORUM,
+    $row['forum_id'],
+    api_get_session_id()
+);
 
 if ($forum_thread_visibility==1 && $forum_forum_visibility==1) {
-    if (Security::check_abs_path($full_file_name, api_get_path(SYS_COURSE_PATH).api_get_course_path().'/upload/forum/')) {
-       DocumentManager::file_send_for_download($full_file_name, TRUE, $row['filename']);
+    if (Security::check_abs_path(
+        $full_file_name,
+        api_get_path(SYS_COURSE_PATH).api_get_course_path().'/upload/forum/')
+    ) {
+        DocumentManager::file_send_for_download(
+            $full_file_name,
+            true,
+            $row['filename']
+        );
     }
 }
-exit;
+exit;

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