Allow app_dev.php in prod

pull/2487/head
Julio 10 years ago
commit 8e528cb940
  1. 1
      app/Migrations/Schema/V110/Version110.php
  2. 2
      app/config/config_dev.yml
  3. 113
      documentation/changelog.html
  4. 5
      main/auth/external_login/ldap.inc.php
  5. 2
      main/auth/shibboleth/db/shibboleth_upgrade.class.php
  6. 3
      main/auth/shibboleth/lib/store.class.php
  7. 2
      main/auth/sso/sso.Drupal.class.php
  8. 2
      main/coursecopy/classes/Course.class.php
  9. 2
      main/coursecopy/classes/CourseBuilder.class.php
  10. 10
      main/coursecopy/classes/CourseRestorer.class.php
  11. 4
      main/coursecopy/classes/CourseSelectForm.class.php
  12. 3
      main/coursecopy/classes/Event.class.php
  13. 3
      main/coursecopy/classes/QuizQuestion.class.php
  14. 2
      main/coursecopy/classes/Resource.class.php
  15. 3
      main/coursecopy/copy_course_session_selected.php
  16. 3
      main/cron/create_course_sessions.php
  17. 4
      main/cron/import_csv.php
  18. 1
      main/dropbox/dropbox_class.inc.php
  19. 15
      main/dropbox/dropbox_functions.inc.php
  20. 5
      main/exercice/TestCategory.php
  21. 10
      main/exercice/answer.class.php
  22. 85
      main/exercice/exercise.class.php
  23. 5
      main/exercice/exercise_result.php
  24. 1076
      main/exercice/exercise_show.php
  25. 4
      main/exercice/export/aiken/aiken_classes.php
  26. 7
      main/exercice/export/aiken/aiken_import.inc.php
  27. 8
      main/exercice/export/exercise_import.inc.php
  28. 15
      main/exercice/export/qti2/qti2_export.php
  29. 9
      main/exercice/export/scorm/scorm_classes.php
  30. 29
      main/exercice/fill_blanks.class.php
  31. 6
      main/exercice/hotpotatoes.lib.php
  32. 1
      main/exercice/hotpotatoes_exercise_result.class.php
  33. 2
      main/exercice/hotspot.class.php
  34. 13
      main/exercice/question.class.php
  35. 4
      main/exercice/unique_answer.class.php
  36. 23
      main/forum/forumfunction.inc.php
  37. 9
      main/gradebook/lib/GradebookUtils.php
  38. 19
      main/gradebook/lib/be/abstractlink.class.php
  39. 32
      main/gradebook/lib/be/category.class.php
  40. 6
      main/gradebook/lib/be/evaluation.class.php
  41. 2
      main/gradebook/lib/be/exerciselink.class.php
  42. 2
      main/gradebook/lib/be/forumthreadlink.class.php
  43. 3
      main/gradebook/lib/be/result.class.php
  44. 4
      main/gradebook/lib/fe/linkform.class.php
  45. 4
      main/gradebook/lib/flatview_data_generator.class.php
  46. 3
      main/gradebook/lib/gradebook_data_generator.class.php
  47. 2
      main/gradebook/lib/gradebook_result.class.php
  48. 2
      main/gradebook/lib/results_data_generator.class.php
  49. 8
      main/gradebook/lib/scoredisplay.class.php
  50. 2
      main/group/group_space.php
  51. 2
      main/inc/ajax/admin.ajax.php
  52. 13
      main/inc/ajax/exercise.ajax.php
  53. 4
      main/inc/lib/AnnouncementEmail.php
  54. 2
      main/inc/lib/access_url_edit_courses_to_url_functions.lib.php
  55. 2
      main/inc/lib/access_url_edit_users_to_url_functions.lib.php
  56. 5
      main/inc/lib/add_course.lib.inc.php
  57. 2
      main/inc/lib/add_courses_to_session_functions.lib.php
  58. 2
      main/inc/lib/add_many_session_to_category_functions.lib.php
  59. 11
      main/inc/lib/agenda.lib.php
  60. 79
      main/inc/lib/api.lib.php
  61. 3
      main/inc/lib/app_view.php
  62. 8
      main/inc/lib/banner.lib.php
  63. 18
      main/inc/lib/blog.lib.php
  64. 4
      main/inc/lib/browser/Browser.php
  65. 2
      main/inc/lib/chat.lib.php
  66. 54
      main/inc/lib/course.lib.php
  67. 77
      main/inc/lib/course_category.lib.php
  68. 2
      main/inc/lib/course_description.lib.php
  69. 6
      main/inc/lib/course_request.lib.php
  70. 1
      main/inc/lib/dashboard.lib.php
  71. 8
      main/inc/lib/database.lib.php
  72. 1410
      main/inc/lib/exercise.lib.php
  73. 2
      main/inc/lib/usermanager.lib.php
  74. 4
      main/install/version.php
  75. 4
      tests/features/forum.feature
  76. 10
      tests/features/socialGroup.feature
  77. 7
      tests/scripts/packaging/gitlog.php

@ -24,6 +24,7 @@ class Version110 extends AbstractMigrationChamilo
$this->addSql("ALTER TABLE session_rel_course ENGINE=InnoDB");
$this->addSql("ALTER TABLE session_rel_course_rel_user ENGINE=InnoDB");
$this->addSql("ALTER TABLE session_rel_user ENGINE=InnoDB");
$this->addSql("UPDATE session SET session.id_coach = 1 WHERE id_coach NOT IN ( SELECT user_id FROM user)");
}
/**

@ -8,7 +8,7 @@ framework:
web_profiler:
toolbar: true
intercept_redirects: false
intercept_redirects: true
monolog:
handlers:

@ -49,52 +49,82 @@
<a name="1.10.6"></a>
<h1>Chamilo 1.10.6 - ???, ?? of May 2016</h1>
<h1>Chamilo 1.10.6 - Zacatecas, 23rd of May 2016</h1>
<h3>Release notes - summary</h3>
<p>Chamilo 1.10.6 is a minor, bugfix release of the 1.10.x branch, with a few new features and bugfixes on top of 1.10.4.</p>
<h3>Release name</h3>
<p><a href="http://www.openstreetmap.org/node/1947201#map=14/51.3786/-2.3580">NNNh</a> .....</p>
<p><a href="http://www.openstreetmap.org/#map=10/22.6337/-102.5869">Zacatecas</a> is a small city North of Mexico City, in the region of Zacatecas, that harbours Spanish colonial style constructions in the historical center, and is an active mining area. It is also the home of the Laboratorio de Software Libre (Free Software lab) in the Consejo Zacatecano de Ciencia, Tecnología e Innovación (Science, Technology and Innovation Council of Zacatecas), possibly the first such initiative in Latin America, and a good development bed for software like Chamilo.</p>
<h3>Security fixes</h3>
<p>None that we know of.</p>
<p>None in this version.</p>
<h3>Possibly breaking changes</h3>
<p>None that we know of.</p>
<p>None in this version.</p>
<h3>Notable new Features</h3>
<h4>For end-users, teachers and Chamilo admins</h4>
<ul>
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/34e9b7442d2c4114ec6fb3d52477b249344117bc">34e9b744</a>) Add svg edit 2.8.1 as is.</li>
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/0ea0a859c58de592b14759c1541ad7cefc87a462">0ea0a859</a> - <a href="https://support.chamilo.org/issues/8233">#8233</a>) Load ckeditor js plugin only when user is logged on</li>
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/700d3516f86c441460f30d5feb64916465d1d545">700d3516</a> - <a href="https://task.beeznest.com/issues/11186">BT#11186</a>) Fix random questions</li>
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/dd051695d71cb7e69969d6b3644a5b1ee79bedfb">dd051695</a>) Add new exercise option: RESULT_DISABLE_SHOW_SCORE_ATTEMPT_SHOW_ANSWERS_LAST_ATTEMPT</li>
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/1c76446ff2967542afc9f1ec963f6444593b3c5e">1c76446f</a>) Add course setting "bbb_enable_conference_in_groups"</li>
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/88842fd706130a593d2a5e95cd37784a4d0de389">88842fd7</a> - <a href="https://task.beeznest.com/issues/11141">BT#11141</a>) Allow to platform admin manage all sessions</li>
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/652538011f33cb4ebef14455adfbbd30f0b704cf">65253801</a> - <a href="https://support.chamilo.org/issues/8156">#8156</a>) Fix login with Facebook</li>
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/f1db277f1ac8565266006ceba4309710af1d8d6d">f1db277f</a> - <a href="https://support.chamilo.org/issues/8156">#8156</a>) Fix logout with facebook</li>
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/06c15644a8f091b74470e0bdedfcdbe2faf5342d">06c15644</a> - <a href="https://task.beeznest.com/issues/11073">BT#11073</a>) Add Classes to Reporting fields</li>
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/391cc31bd185dec1cdd701eea07a190ee2854dde">391cc31b</a>) Add new option to $_configuration['courses_list_session_title_link']</li>
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/10729dea98234918de3e7e8c8718503ba5e2efbd">10729dea</a> - <a href="https://task.beeznest.com/issues/10952">BT#10952</a>) Add multiple attachment in agenda</li>
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/940fbdd51c97e6feecebbd156130ba8818d98ad8">940fbdd5</a> - <a href="https://task.beeznest.com/issues/10052">BT#10052</a>) Adding setting "exercise_enable_category_order"</li>
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/6b51fae1a37d3c7b3f7c656e3631cb2eb50d028e">6b51fae1</a> - <a href="https://task.beeznest.com/issues/10052">BT#10052</a>) Add function needed for BT#10052</li>
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/dd051695d71cb7e69969d6b3644a5b1ee79bedfb">dd051695</a>) Add option to show right answers only during the last exercise attempt (RESULT_DISABLE_SHOW_SCORE_ATTEMPT_SHOW_ANSWERS_LAST_ATTEMPT)</li>
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/1c76446ff2967542afc9f1ec963f6444593b3c5e">1c76446f</a>) Add course setting "bbb_enable_conference_in_groups" to allow for conferences through course groups (requires the BigBlueButton plugin)</li>
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/88842fd706130a593d2a5e95cd37784a4d0de389">88842fd7</a> - <a href="https://task.beeznest.com/issues/11141">BT#11141</a>) Allow platform admins to manage all sessions</li>
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/06c15644a8f091b74470e0bdedfcdbe2faf5342d">06c15644</a> - <a href="https://task.beeznest.com/issues/11073">BT#11073</a>) Add Classes column to users reporting</li>
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/391cc31bd185dec1cdd701eea07a190ee2854dde">391cc31b</a>) Add new option to $_configuration['courses_list_session_title_link'] to make sessions foldable or unclickable</li>
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/10729dea98234918de3e7e8c8718503ba5e2efbd">10729dea</a> - <a href="https://task.beeznest.com/issues/10952">BT#10952</a>) Add multiple attachments in agenda</li>
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/940fbdd51c97e6feecebbd156130ba8818d98ad8">940fbdd5</a> - <a href="https://task.beeznest.com/issues/10052">BT#10052</a>) Adding setting "exercise_enable_category_order" to enable exercises categories</li>
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/960a90abaa140578528eceb6687f20fded07df8e">960a90ab</a> - <a href="https://task.beeznest.com/issues/11048">BT#11048</a>) Add social share buttons to issued badge page</li>
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/046ca86376979d423407d96a9fe46c21d1739a49">046ca863</a>) Add learning path finalization page</li>
</ul>
<h4>For developers and sysadmins</h4>
<ul>
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/7b00cc61c2ececae41c4b38b8bdc28fd4a28cd1e">7b00cc61</a> - <a href="https://support.chamilo.org/issues/8218">#8218</a>) Require PHPWord</li>
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/1826f23d58b1ab280219fd45c420d13f06d8eb9c">1826f23d</a> - <a href="https://support.chamilo.org/issues/8218">#8218</a>) Remove phpdocx library</li>
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/91ebd4677be9f6ebd7965dd3d84cd3cb3ece50b4">91ebd467</a> - <a href="https://support.chamilo.org/issues/8225">#8225</a>) Add section about PHP limits to optimization guide</li>
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/761be6d5a6f43a4e3340a7d6383f06404b6a3270">761be6d5</a>) Add Behat test for reply/delete/quote a forum message</li>
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/d9b490b537d1188a61f57f62f5ed3482b3b65c52">d9b490b5</a> - <a href="https://support.chamilo.org/issues/8200">#8200</a>) Add sql_mode = '' to avoid errors in php 5.7</li>
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/7b82a178a2059ca4784d66419ad8887d0745a5a0">7b82a178</a> - <a href="https://task.beeznest.com/issues/11005">BT#11005</a>) Save track_e_course_access before removing the session information</li>
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/12c7e7eccbf933ccf29306dcb720972792a9f8f2">12c7e7ec</a> - <a href="https://support.chamilo.org/issues/8175">#8175</a>) Use custom CKEditor</li>
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/761be6d5a6f43a4e3340a7d6383f06404b6a3270">761be6d5</a>) Add Behat tests for reply/delete/quote a forum message</li>
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/d9b490b537d1188a61f57f62f5ed3482b3b65c52">d9b490b5</a> - <a href="https://support.chamilo.org/issues/8200">#8200</a>) Add sql_mode = '' to installation scripts to avoid errors in php 5.7</li>
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/7b82a178a2059ca4784d66419ad8887d0745a5a0">7b82a178</a> - <a href="https://task.beeznest.com/issues/11005">BT#11005</a>) Save track_e_course_access before getting out of the session, to avoid loosing time registration when getting from a course/session out of it</li>
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/12c7e7eccbf933ccf29306dcb720972792a9f8f2">12c7e7ec</a> - <a href="https://support.chamilo.org/issues/8175">#8175</a>) Use custom CKEditor to allow for FLV videos</li>
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/c312f5a1ada22229451f231770247e2ea90ba068">c312f5a1</a> - <a href="https://task.beeznest.com/issues/11195">BT#11195</a>) Add student boss in user_edit.php and user_information see BT#11195</li>
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/405b2c7bdf7918ef5a7c12f56a7b305eb74f3dd1">405b2c7b</a>) Add SMTP debug information</li>
</ul>
<h3>Improvements (minor features) and debug</h3>
<ul>
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/0907a64acdf89143cb1aeec8fd3e76f54476e466">0907a64a</a>) Update "upgraded from versions"</li>
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/2e64b949bdf7cf00f02a2688817d4936d3d8b247">2e64b949</a> - <a href="https://task.beeznest.com/issues/8236">BT#8236</a>) Use latest version of svgedit see #8236</li>
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/6b51fae1a37d3c7b3f7c656e3631cb2eb50d028e">6b51fae1</a> - <a href="https://task.beeznest.com/issues/10052">BT#10052</a>) Add function needed for exercises categories</li>
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/1eac339bacb87237413064b9f20f6047d4093dad">1eac339b</a>) Fix the update of API keys when no key exists previously (update_api_key())</li>
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/f40efabc34cbffb840a47f44495e0fa59fc476e9">f40efabc</a>) Fix - Enable/disable tickets plugin from menu, display blank screen</li>
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/2cf9c3ed87fc93e8e24dced6ff2868630f743927">2cf9c3ed</a> - <a href="https://support.chamilo.org/issues/8200">#8200</a>) Fix null id_coach in session table blocking migration from 1.9</li>
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/1f0b7589bf8c4b113c4cf1e827038a58c6d806a3">1f0b7589</a> - <a href="https://support.chamilo.org/issues/8247">#8247</a>) Fix action bar style (add class)</li>
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/6cd10f4fcd0103a8ef2a22bcd1e93f32a6c9e495">6cd10f4f</a> - <a href="https://support.chamilo.org/issues/8246">#8246</a>) Fix CSS divs of answer review</li>
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/cbca6874407130615849ac3b70f6b19e9ada7cc8">cbca6874</a> - <a href="https://support.chamilo.org/issues/8233">#8233</a>) Optimization: remove CKeditor lib from homepage (other method)</li>
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/a1f39d1250057b12387955d3855d76d8102b5d85">a1f39d12</a> - <a href="https://support.chamilo.org/issues/8237">#8237</a>) Save the calculated answer without the correct answer</li>
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/b0da587cd46a68d018c0842347ffedb25ffd068e">b0da587c</a> - <a href="https://support.chamilo.org/issues/8248">#8248</a>) Apply fix to message display in user information, submitted by @nicogaldo</li>
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/34fa348ee544a8f048b71b6831d3fda6e9d40897">34fa348e</a> - <a href="https://support.chamilo.org/issues/8248">#8248</a>) Add filtering on course code and session ID in user information page when removing from a course - loosely refs CT#8248</li>
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/6e7781cf25a455b02265d69fdd5786d049a613a1">6e7781cf</a> - <a href="https://support.chamilo.org/issues/8244">#8244</a>) Fix session can't be set to no-category (1.10.x)</li>
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/3a6f9c204757c88fe8c4a0ae447fabdb000ced85">3a6f9c20</a>) Re-introduce the code condition to show SVG icons in test mode (removed in another context in commit 7dd9ca2e1c46f45eb4c5d12ffadaed5f4fcfdac8)</li>
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/b77003a2c17c3c50816cb3536f7e6c8f0ac09fc9">b77003a2</a> - <a href="https://support.chamilo.org/issues/8235">#8235</a>) Change service order in text to speech feature</li>
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/99ff770173f4f292f9745dfbaf7e4c731e74114f">99ff7701</a>) Fix boss info</li>
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/4b006900f470727ebc25794bdc36a27fd1ed98d8">4b006900</a> - <a href="https://support.chamilo.org/issues/8237">#8237</a>) Fix questions list for calculated answers</li>
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/2160752128c61da7413a449874878f79610b1b30">21607521</a> - <a href="https://support.chamilo.org/issues/8237">#8237</a>) Fix showing resuls for calculated answers</li>
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/3f94d26026d5bf5de4cb43d52cd496834eb648fa">3f94d260</a> - <a href="https://support.chamilo.org/issues/8237">#8237</a>) Fix show hotspot question</li>
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/32f2c23469f4b8e7e6bfa0243f38fb26f228ec09">32f2c234</a> - <a href="https://support.chamilo.org/issues/8237">#8237</a>) Fix questions list with calculated questions</li>
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/a788c0e861a326d1bc91c741ac951124101bd1f8">a788c0e8</a> - <a href="https://task.beeznest.com/issues/11202">BT#11202</a>) Modify behaviour of setting result_disabled</li>
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/f25aedce3a4a7200cd1dc3381fb8cca5592422ed">f25aedce</a> - <a href="https://support.chamilo.org/issues/1162">#1162</a>) Scrutinizer Auto-Fixes (#5) (#1162)</li>
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/51aebacc51016aed8819a7bdb3887cc4325c5f24">51aebacc</a>) Indent code in vcard lib file that will probably never be synchronized from source again</li>
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/242900e8d03ecdc511cc62bf442b677eca8f6399">242900e8</a>) Code styling corrections suggested by @scrutinizer to lib file that will probably never be synchronized from source again</li>
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/45b3872f107ed37075c57cc185add597c8ca1cc2">45b3872f</a> - <a href="https://support.chamilo.org/issues/8240">#8240</a>) Add documentation about hosting_total_size_limit and fix comment about hosting_limit_active_courses</li>
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/3f49cdf44b230d1f837da1415f68f33f3a5923c1">3f49cdf4</a>) Use iid instead of auto_id when updating answers (fixes issue editing answers of 2 different exercises simultaneously)</li>
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/79078610bb53bb3dce7172f33d1613324cc8b4d6">79078610</a>) Fix getNumberOfQuestionRandomByCategory() and getNumberMaxQuestionByCat()</li>
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/dc02b10eda428983ff872d147315558ab3c34d90">dc02b10e</a> - <a href="https://support.chamilo.org/issues/8242">#8242</a>) Fix CSS for exercises clock color (again)</li>
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/e81d8db84dcedc209fcc3db36b7daeb8a0e23736">e81d8db8</a> - <a href="https://support.chamilo.org/issues/8234">#8234</a>) Suggest writing permissions for main/lang directory in migration from 1.9</li>
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/432f771fd82a28def67b517cab751b602419664c">432f771f</a> - <a href="https://support.chamilo.org/issues/8241">#8241</a>) Fix hotspot stylesheet</li>
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/f834ff524cf98794f472d1469d6b2cf4afb30b37">f834ff52</a> - <a href="https://support.chamilo.org/issues/8235">#8235</a>) Add translate_app_google_key fix setting, fix Pediaphon service</li>
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/a160cf70c0968f0f92d017b1e1ac01e2957b8a41">a160cf70</a> - <a href="https://support.chamilo.org/issues/8200">#8200</a>) Fix migration from 1.9 issues when ids are autoincrement</li>
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/3c862d2d7192fa52cacfb991d6159421494108e0">3c862d2d</a>) Restore hosting_limit_disk_space in main/admin/system_status.php?section=chamilo</li>
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/18faa539b675a34ff90aa98a1f6514d69a42c39b">18faa539</a> - <a href="https://support.chamilo.org/issues/8241">#8241</a>) Show loader icon when hotspot question is loading</li>
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/cb6a68f4ff2830cf2e2860cd5710aac71d5f6684">cb6a68f4</a>) Fix "bouncing" actions menu effect in admin settings page</li>
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/34e9b7442d2c4114ec6fb3d52477b249344117bc">34e9b744</a> Update SVG edit to fix issues with Chrome</li>
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/652538011f33cb4ebef14455adfbbd30f0b704cf">65253801</a> - <a href="https://support.chamilo.org/issues/8156">#8156</a>) Fix login with Facebook</li>
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/f1db277f1ac8565266006ceba4309710af1d8d6d">f1db277f</a> - <a href="https://support.chamilo.org/issues/8156">#8156</a>) Fix logout with facebook</li>
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/b472658a4379cae03dcda44ae028e87a6b6b28c3">b472658a</a>) Remove E_NOTICE on installer when no connection</li>
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/ec3e41c584aacc88d00362ed1a0ad2b08988ab73">ec3e41c5</a> - <a href="https://support.chamilo.org/issues/8232">#8232</a>) Fix get_course_extra_field_value and subscribe_user2course.php</li>
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/c39a86fb1c89e86a7229206a6d3ac4a13187545f">c39a86fb</a> - <a href="https://support.chamilo.org/issues/8233">#8233</a>) Fix Load ckeditor js plugin only when user is logged on</li>
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/ec93280321de6938faf3bc0f6f14090196e8e60c">ec932803</a> - <a href="https://support.chamilo.org/issues/8210">#8210</a>) Remove unused file</li>
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/c312f5a1ada22229451f231770247e2ea90ba068">c312f5a1</a> - <a href="https://task.beeznest.com/issues/11195">BT#11195</a>) Add student boss in user_edit.php and user_information see BT#11195</li>
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/52e3a414bfc9cc387679e1882fbd10bd317b19ab">52e3a414</a> - <a href="https://support.chamilo.org/issues/8218">#8218</a>) Fix export gradebook results to docx</li>
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/e79d2fc2bf9cd0702abdf64555c75da3f1dc8373">e79d2fc2</a> - <a href="https://support.chamilo.org/issues/8200">#8200</a>) Revert "Fix issue setting PRIMARY KEY to possible NULL in migration from 1.9 to 1.10</li>
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/3b3cbc97fde6ee1286661b3fa626fbb37ccf6c44">3b3cbc97</a> - <a href="https://task.beeznest.com/issues/11148">BT#11148</a>) Fix exercise creation</li>
@ -104,7 +134,7 @@
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/a32a3a251bd9b0a806f7671507fce0b07833a271">a32a3a25</a>) Add validateCourseSetting function to show/hide course plugin settings.</li>
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/c88a5e9ea16027daeef1e6588b1beb2af63e8d99">c88a5e9e</a>) Fix infocourse when using checkbox</li>
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/123d3dc396ec9a1069bd6b32790ca25d3f9e0992">123d3dc3</a>) Remove the api_is_plugin_installedfunction because not used</li>
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/92218a89a43e1e08a2fa5a999377e60842cfcf93">92218a89</a> - <a href="https://task.beeznest.com/issues/11014">BT#11014</a>) Add link in group_space if tool is enabled + group setting is on. BT#11014</li>
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/92218a89a43e1e08a2fa5a999377e60842cfcf93">92218a89</a> - <a href="https://task.beeznest.com/issues/11014">BT#11014</a>) Add link in group_space if tool is enabled + group setting is on</li>
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/0111ccbc6b3aff96fac56cf64fe209d035f655a8">0111ccbc</a>) Update function api_get_cidreq typos</li>
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/911a81e0201b648ef39756c24794ace8d61d6e46">911a81e0</a> - <a href="https://support.chamilo.org/issues/8218">#8218</a>) Fix table when exporting gradebook tool to PDf</li>
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/45a64220ef6839ae79f584ba5ca58422b2d84a89">45a64220</a> - <a href="https://support.chamilo.org/issues/8214">#8214</a>) Fix display issue in forum category style when adding an image aligned left</li>
@ -151,14 +181,13 @@
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/4c93468b27de33f0352dffcdf8730c1c86b4dc20">4c93468b</a> - <a href="https://support.chamilo.org/issues/11048">#11048</a>) Fix LPFinalItem to hide for the position list</li>
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/b3ef9036fc15697401d5f9dc1ab1b0bb26f43b2e">b3ef9036</a> - <a href="https://task.beeznest.com/issues/11048">BT#11048</a>) Fix generation of last item page with certificates and badges in learning path</li>
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/f701abf01c25a85b54a58ca20dc0641ba29a272b">f701abf0</a> - <a href="https://task.beeznest.com/issues/11048">BT#11048</a>) Fix condition to generate skills so it doesn't depend on certificates</li>
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/81e1d972386985d050caadb9c6ed405bc3bd5cf3">81e1d972</a> - <a href="https://task.beeznest.com/issues/7683">BT#7683</a>) fix link unsubscribe social BT#7683</li>
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/81e1d972386985d050caadb9c6ed405bc3bd5cf3">81e1d972</a> - <a href="https://task.beeznest.com/issues/7683">BT#7683</a>) Fix unsubscribe link in social network</li>
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/c36a9c308818ea77e7d89846e1305c8392576244">c36a9c30</a>) Add info to README about upgrading Chamilo to Git-based from a package-based installation</li>
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/77f9c3e46ef8da29aae396ec7dae4f96812a941b">77f9c3e4</a> - <a href="https://support.chamilo.org/issues/8205">#8205</a>) Fix wrong session_rel_user.duration bug</li>
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/ce3ab0c51a02a27d4a49848a6a541eaf2eb63025">ce3ab0c5</a> - <a href="https://task.beeznest.com/issues/8205">BT#8205</a>) Adding session_rel_user.duration validation</li>
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/1e092a112a96a6f8b7c0ca4bbb24bb2002f1b874">1e092a11</a>) Fix LP Final Item show finished page to 100%</li>
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/54f1ccc787b52cc0b9234aba9a36bdf47b4e5c56">54f1ccc7</a> - <a href="https://task.beeznest.com/issues/11048">BT#11048</a>) Remove useless JS code added in previous commit</li>
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/658fb16d414a3c4ea7b0aca5e9a7d64f5ff811a6">658fb16d</a> - <a href="https://task.beeznest.com/issues/11048">BT#11048</a>) Move code block placed in the wrong condition in previous commit - Fix twitter:site meta not appearing in badges page</li>
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/960a90abaa140578528eceb6687f20fded07df8e">960a90ab</a> - <a href="https://task.beeznest.com/issues/11048">BT#11048</a>) Add social share buttons to issued badge page</li>
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/aeb1521fb73efbf63aef08ee4fa4e6c9c1092436">aeb1521f</a> - <a href="https://task.beeznest.com/issues/11108">BT#11108</a>) Fix access to users list for admins: allow platform admin to enter open courses (visibility 2). There was apparently a condition allowing admins to enter all courses but the ones open to the platform - loosely refs BT#11108</li>
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/9554dbf76feac837d6f34ca2fc7ae4842edc497d">9554dbf7</a> - <a href="https://support.chamilo.org/issues/10992">#10992</a>) Fix Twitter:card conflict with OpenGraph meta in user badge page</li>
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/c49934ae80a9e86765a78ee0ca2f0d4974e0f031">c49934ae</a>) Remove unused database.sql file.</li>
@ -167,11 +196,10 @@
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/30648a5154d2e3b31217ef8baeaccd722ddff36e">30648a51</a> - <a href="https://task.beeznest.com/issues/8200">BT#8200</a>) Adding hasColumn conditions for migration</li>
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/9c952de7420ccfc484277f956d14904b20ae2402">9c952de7</a>) Show course description when course_catalog_hide_private is false</li>
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/ff8290cb87eced2991d8919fa086eeba5a2fb304">ff8290cb</a>) Fix table name</li>
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/5d85e2a36f71b74c2b72e05c86b451b119ff641a">5d85e2a3</a> - <a href="https://support.chamilo.org/issues/8194">#8194</a>) Add required rules when editon custom icon on course homepage</li>
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/5d85e2a36f71b74c2b72e05c86b451b119ff641a">5d85e2a3</a> - <a href="https://support.chamilo.org/issues/8194">#8194</a>) Add required rules when editing custom icon on course homepage</li>
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/91150cfe5cbf061de682d3dd581bd049950d02dc">91150cfe</a> - <a href="https://support.chamilo.org/issues/8194">#8194</a>) Fix translation for custom icon on course homepage</li>
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/26639296e83eb1c630c35bd431130ec2f9b4a69b">26639296</a>) Fix mail content format.</li>
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/ae30908e756132c07e050b8411fb65cfc6a9725b">ae30908e</a> - <a href="https://task.beeznest.com/issues/11067">BT#11067</a>) Fix email format - add nl2br</li>
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/046ca86376979d423407d96a9fe46c21d1739a49">046ca863</a>) Finalización Archivement</li>
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/37d5af337e3ea895f6b5b7dec55e9dc4dbecfe2e">37d5af33</a>) Fix forms when adding/editing lp items</li>
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/36635d142199d3c8e6a5adbfd1b531dbbe85d318">36635d14</a>) Fix URL for create forum in lp</li>
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/1f0c917fc949132afbc50f070dd2bb3ef25f18a6">1f0c917f</a>) Fix report titles.</li>
@ -179,54 +207,57 @@
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/ece4c9d8f227f8fcf39bc4a2c995af8eb35c9d3b">ece4c9d8</a>) If in a session show all LPs not only LP added in session.</li>
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/5bcac3efc308d4c2dc4a6708f59b16bbc02c4206">5bcac3ef</a>) Fix constructor</li>
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/33dafb19fa049fa9b70263d4daf9fc0b8ab6292a">33dafb19</a> - <a href="https://task.beeznest.com/issues/11062">BT#11062</a>) Change scrollbar to scrollbar-light</li>
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/405b2c7bdf7918ef5a7c12f56a7b305eb74f3dd1">405b2c7b</a>) Add SMTP debug information</li>
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/10f30d19c69e5880cdca9d7adc19c1ccadb766ec">10f30d19</a>) Fix link</li>
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/5e5859107b0d6d247626bce7f6d1e308dc009bfc">5e585910</a>) Fix social group doesnt show in group list when adding an image (1.10.x)</li>
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/f34bae386d81c613c11411c921d81e7d9656cfd0">f34bae38</a> - <a href="https://support.chamilo.org/issues/8188">#8188</a>) Fix menu tabs (broken in 1.10.4)</li>
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/88b3acf7002421f9e7c60b1619d507bfd15c9d9d">88b3acf7</a> - <a href="https://support.chamilo.org/issues/8185">#8185</a>) Update bower assets</li>
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/cede17daf3925bfe56b108476dfb33140023d164">cede17da</a>) Use 1 setting instead of 2</li>
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/cede17daf3925bfe56b108476dfb33140023d164">cede17da</a>) Use 1 setting instead of 2 in class for exercises categories</li>
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/997288805472841bbfc3bf3caedf996f1db0acba">99728880</a> - <a href="https://support.chamilo.org/issues/8157">#8157</a>) Replace mysql with pdo_mysql extension</li>
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/c002d1e8f752b14e111e43ee65926eba37e558f7">c002d1e8</a>) Fix fatal error on blog tool.</li>
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/64f6ccf359425a726f4be99df86c371ad59e9c16">64f6ccf3</a> - <a href="https://task.beeznest.com/issues/11021">BT#11021</a>) Remove button for download video file in lp</li>
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/380db06ab13e4524247999e92cb4065aeaf12ef1">380db06a</a> - <a href="https://task.beeznest.com/issues/11021">BT#11021</a>) Fix template for jplayer viewer</li>
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/ecf16fb37b0e14bd54ec624bf6055925f8d26366">ecf16fb3</a> - <a href="https://task.beeznest.com/issues/11021">BT#11021</a>) Show lp video items in iframe</li>
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/615a1224e97b16a510a65b1f9fe389f74aec011c">615a1224</a> - <a href="https://task.beeznest.com/issues/10936">BT#10936</a>) Set user id from function</li>
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/a231628dc85d72a6728c6b2a3360d8c94011817e">a231628d</a> - <a href="https://task.beeznest.com/issues/10936">BT#10936</a>) Fix fatal error when using a web service </li>
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/db12470781fa479ed7c25d0a61af62eda07cb2af">db124707</a> - <a href="https://task.beeznest.com/issues/10936">BT#10936</a>) Fix fatal error</li>
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/a231628dc85d72a6728c6b2a3360d8c94011817e">a231628d</a> - <a href="https://task.beeznest.com/issues/10936">BT#10936</a>) Fix another fatal error when using a web service </li>
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/db12470781fa479ed7c25d0a61af62eda07cb2af">db124707</a> - <a href="https://task.beeznest.com/issues/10936">BT#10936</a>) Fix fatal error when using a web service</li>
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/8f864966c9bc725047b09270e21db891399fb1ab">8f864966</a> - <a href="https://support.chamilo.org/issues/8173">#8173</a>) Fix Renaming a document in upload document's form</li>
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/8f652341004346d57558183aa9f9134a97a58339">8f652341</a>) Fix select bootstrap overflow visible</li>
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/cec0161eff56dd0a81c778bfe24a2e7d618f1691">cec0161e</a> - <a href="https://support.chamilo.org/issues/8166">#8166</a>) Fix create course when doesn't exists an admin with id 1</li>
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/55c17b801c573e1f65fd036efaf1cd114040d3db">55c17b80</a> - <a href="https://task.beeznest.com/issues/10997">BT#10997</a>) Fix Migrations</li>
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/55c17b801c573e1f65fd036efaf1cd114040d3db">55c17b80</a> - <a href="https://task.beeznest.com/issues/10997">BT#10997</a>) Fix Migration issues</li>
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/a1f5d466b7baec90de31b31a40a09f606e728404">a1f5d466</a> - <a href="https://support.chamilo.org/issues/8024">#8024</a>) Add clock-exercise.png</li>
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/d46b5c15141020c681d26fb46bd9242a6e5e12a1">d46b5c15</a> - <a href="https://support.chamilo.org/issues/8024">#8024</a>) Fixed css clock CT#8024</li>
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/d46b5c15141020c681d26fb46bd9242a6e5e12a1">d46b5c15</a> - <a href="https://support.chamilo.org/issues/8024">#8024</a>) Fix CSS clock</li>
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/4292a69177fb993561ad07aadce77fedfe0b4244">4292a691</a> - <a href="https://support.chamilo.org/issues/8154">#8154</a>) Fix attached files in mail</li>
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/6c56132f69b3124ed36d6a0f577b95bed6888580">6c56132f</a> - <a href="https://task.beeznest.com/issues/10997">BT#10997</a>) Remove condition hiding the user ID when teacher cannot subscribe students to course, because it causes the user_id data to be nullified, which prevents links to work properly</li>
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/bdb5a042a50d40c40b8775b241deb5b97b998d57">bdb5a042</a> - <a href="https://task.beeznest.com/issues/10979">BT#10979</a>) Fix and remove E_NOTICE when search_enabled is true</li>
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/798b6f52089b52092cd597b76eef0ec9e3a41c16">798b6f52</a> - <a href="https://support.chamilo.org/issues/8135">#8135</a>) Fix previous/next buttons in calendar</li>
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/28117fcfc2e04dcaa2528e589a45fcd72787db1f">28117fcf</a>) Fix issue with foreign keys when removing URLs and avoid a notice</li>
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/767d99cf540650ac8b43690986690f6c0964bb15">767d99cf</a> - <a href="https://task.beeznest.com/issues/10927">BT#10927</a>) Add from and too</li>
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/767d99cf540650ac8b43690986690f6c0964bb15">767d99cf</a> - <a href="https://task.beeznest.com/issues/10927">BT#10927</a>) Add from and to</li>
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/44706ef925530c642933112adc084cb313e05148">44706ef9</a> - <a href="https://support.chamilo.org/issues/8140">#8140</a>) Remove user from all portals</li>
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/9f4f4a53ded2d67fd9416a8d10137277bcd5fefa">9f4f4a53</a> - <a href="https://task.beeznest.com/issues/10979">BT#10979</a>) Fix E_NOTICEs when search_enabled is true</li>
</ul>
<h3>Stylesheets and theming</h3>
<ul>
<li>None that we know of.</li>
<li>Added "Holi" stylesheet</li>
<li>Updated several tpl files. If you have a customized template, you'll need to make sure yours still matches the main template</li>
</ul>
<h3>Web services</h3>
<ul>
<li>None that we know of.</li>
<li>Fix several little issues</li>
</ul>
<h3>Removals</h3>
<ul>
<li>None that we know of.</li>
<li>phpdocx library (beneficially replaced by PHPWord)</li>
<li>database.sql file (deprecated by entities)</li>
</ul>
<h3>Known issues</h3>
<ul>
<li>IMS/QTI import/export has issues</li>
<li>In Internet Explorer 9, learning paths might not show other pages than the first to be opened. We lacked computers with IE9 at the time of release of 1.10.4. Guaranteeing IE9 support will likely require additional services. See <a href="https://support.chamilo.org/issues/8075">the corresponding bug report</a></li>
<li>The text-to-speech converter based on Google now requires an API key</li>
<li>The Xapian search module is broken. We'll fix that soon, but not a lot of people use it</li>
<li>Encoding issues when importing accentuated characters from MS-Office-generated .xlsx files (for example when importing exercises). This isn't really a Chamilo issue, but since some users might have issues with that, we've decided to report it to avoid any surprise.</li>
</ul>
<a name="1.10.4"></a>
<h1>Chamilo 1.10.4 - Bath, 22th of March 2016</h1>

@ -28,7 +28,7 @@ function extldap_purify_string($string)
/**
* Establishes a connection to the LDAP server and sets the protocol version
*
* @return resource ldap link identifier or false
* @return boolean ldap link identifier or false
* @author ndiechburg <noel@cblue.be>
* */
function extldap_connect()
@ -77,6 +77,7 @@ function extldap_connect()
/**
* Authenticate user on external ldap server and return user ldap entry if that succeeds
*
* @param string $password
* @return mixed false if user cannot authenticate on ldap, user ldap entry if tha succeeds
* @author ndiechburg <noel@cblue.be>
* Modified by hubert.borderiou@grenet.fr
@ -237,7 +238,7 @@ function extldap_get_user_search_string($username)
/**
* Imports all LDAP users into Chamilo
* @return bool false on error, true otherwise
* @return false|null false on error, true otherwise
*/
function extldap_import_all_users()
{

@ -35,7 +35,7 @@ class ShibbolethUpgrade
* Creates the 'shibb_unique_id' field in the table 'user' of the main Chamilo database if it doesn't exist yet
*
* @author Nicolas Rod
* @return void
* @return false|null
*/
public static function create_shibb_unique_id_field_if_missing()
{

@ -346,6 +346,9 @@ class Store
return $result;
}
/**
* @param string $sql
*/
protected function execute($sql)
{
return Database::query($sql, null, __FILE__);

@ -90,7 +90,7 @@ class ssoDrupal
/**
* Validates the received active connection data with the database
* @return bool Return the loginFailed variable value to local.inc.php
* @return null|false Return the loginFailed variable value to local.inc.php
*/
public function check_user()
{

@ -327,6 +327,7 @@ class Course
/**
* Serialize the course with the best serializer available
* @return string
*/
public static function serialize($course)
{
@ -339,6 +340,7 @@ class Course
/**
* Unserialize the course with the best serializer available
* @param string $course
*/
public static function unserialize($course)
{

@ -123,7 +123,7 @@ class CourseBuilder
* @param string $courseCode
* @param bool true if you want to get the elements that exists in the course and
* in the session, (session_id = 0 or session_id = X)
* @return object The course object structure
* @return Course The course object structure
*/
public function build(
$session_id = 0,

@ -84,7 +84,7 @@ class CourseRestorer
/**
* CourseRestorer constructor.
* @param array $course
* @param Course $course
*/
public function __construct($course)
{
@ -133,7 +133,7 @@ class CourseRestorer
* @param int $session_id
* @param bool $update_course_settings Course settings are going to be restore?
* @param bool $respect_base_content
* @return bool
* @return false|null
*/
public function restore(
$destination_course_code = '',
@ -1154,6 +1154,7 @@ class CourseRestorer
/**
* Restore a forum-topic
* @param false|string $forum_id
*/
public function restore_topic($thread_id, $forum_id, $sessionId = 0)
{
@ -1210,6 +1211,7 @@ class CourseRestorer
/**
* Restore a forum-post
* @TODO Restore tree-structure of posts. For example: attachments to posts.
* @param false|string $topic_id
*/
public function restore_post($id, $topic_id, $forum_id, $sessionId = 0)
{
@ -2306,6 +2308,7 @@ class CourseRestorer
/**
* Check availability of a survey code
* @param string $survey_code
*/
public function is_survey_code_available($survey_code)
{
@ -2320,6 +2323,7 @@ class CourseRestorer
/**
* Restore survey-questions
* @param string $survey_id
*/
public function restore_survey_question($id, $survey_id)
{
@ -2776,6 +2780,8 @@ class CourseRestorer
* @param string The path origin
* @param string The path destination
* @param boolean Option Overwrite
* @param string $source
* @param string $dest
* @return void()
* @deprecated
*/

@ -13,7 +13,7 @@ class CourseSelectForm
{
/**
* Display the form
* @param array $hidden_fiels Hidden fields to add to the form.
* @param array $hidden_fields Hidden fields to add to the form.
* @param boolean the document array will be serialize. This is used in the course_copy.php file
*/
static function display_form($course, $hidden_fields = null, $avoid_serialize = false)
@ -570,7 +570,7 @@ class CourseSelectForm
/**
* Display the form session export
* @param array $hidden_fiels Hidden fields to add to the form.
* @param array $hidden_fields Hidden fields to add to the form.
* @param boolean the document array will be serialize. This is used in the course_copy.php file
*/
public static function display_form_session_export($list_course, $hidden_fields = null, $avoid_serialize = false)

@ -50,9 +50,6 @@ class CalendarEvent extends Coursecopy\Resource
* @param int $id
* @param string $title
* @param string $content
* @param string $date
* @param string $hour
* @param int $duration
*/
public function __construct(
$id,

@ -115,6 +115,9 @@ class QuizQuestion extends Coursecopy\Resource
$this->answers[] = $answer;
}
/**
* @param QuizQuestionOption $option_obj
*/
public function add_option($option_obj)
{
$this->question_options[$option_obj->obj->id] = $option_obj;

@ -128,7 +128,7 @@ class Resource
/**
* Resturns the type of this resource
* @return constant The type.
* @return integer The type.
*/
public function get_type()
{

@ -65,6 +65,9 @@ $tbl_course = Database::get_main_table(TABLE_MAIN_COURSE);
/* FUNCTIONS */
/**
* @param string $name
*/
function make_select_session_list($name, $sessions, $attr = array())
{

@ -50,6 +50,7 @@ function getQuarterFirstAndLastDates($initialDate = null)
/**
* Returns a quarter from a month
* @param string The month (digit), with or without leading 0
* @param string $month
* @return int The yearly quarter (1, 2, 3 or 4) in which this month lies
*/
function getQuarter($month)
@ -96,6 +97,7 @@ function getQuarter($month)
/**
* Returns the first month of the quarter
* @param int Quarter
* @param integer $quarter
* @return string Number of the month, with leading 0
*/
function getQuarterFirstMonth($quarter)
@ -116,6 +118,7 @@ function getQuarterFirstMonth($quarter)
/**
* Get the quarter in Roman letters
* @param int Quarter
* @param integer $quarter
* @return string Roman letters
*/
function getQuarterRoman($quarter)

@ -48,7 +48,7 @@ class ImportCsv
public $conditions;
/**
* @param Logger $logger
* @param Monolog\Logger $logger
* @param array
*/
public function __construct($logger, $conditions)
@ -66,7 +66,7 @@ class ImportCsv
}
/**
* @return mixed
* @return boolean
*/
public function getDumpValues()
{

@ -587,6 +587,7 @@ class Dropbox_Person
/**
* Deletes all the received categories and work of this person
* @param integer $id
*/
function deleteReceivedWorkFolder($id)
{

@ -22,7 +22,7 @@ $(document).ready(function () {
/**
* This function is a wrapper function for the multiple actions feature.
* @return Mixed If there is a problem, return a string message, otherwise nothing
* @return string|null If there is a problem, return a string message, otherwise nothing
* @author Patrick Cool <patrick.cool@UGent.be>, Ghent University
* @version march 2006
*/
@ -209,9 +209,9 @@ function display_move_form($part, $id, $target = array(), $extra_params = array(
*
* @param $id the id of the file we are moving
* @param $target the id of the folder we are moving to
* @param $part are we moving a received file or a sent file?
* @param string $part are we moving a received file or a sent file?
*
* @return language string
* @return string string
*
* @author Patrick Cool <patrick.cool@UGent.be>, Ghent University
* @version march 2006
@ -290,7 +290,7 @@ function display_action_options($part, $categories, $current_category = 0)
* @param $id the unique id of the file
* @param $part are we dealing with a sent or with a received file?
*
* @return html code
* @return string code
*
* @author Patrick Cool <patrick.cool@UGent.be>, Ghent University
* @version march 2006
@ -771,6 +771,7 @@ function getLoginFromId($id)
}
/**
* @param string $user_id
* @return boolean indicating if user with user_id=$user_id is a course member
* @todo check if this function is still necessary. There might be a library function for this.
*/
@ -1132,7 +1133,7 @@ function feedback($array) {
/**
* This function returns the html code to display the feedback messages on a given dropbox file
* @param $feedback_array an array that contains all the feedback messages about the given document.
* @return html code
* @return string code
* @todo add the form for adding new comment (if the other party has not deleted it yet).
*
* @author Patrick Cool <patrick.cool@UGent.be>, Ghent University
@ -1149,7 +1150,7 @@ function format_feedback($feedback)
/**
* this function returns the code for the form for adding a new feedback message to a dropbox file.
* @return html code
* @return string code
*
* @author Patrick Cool <patrick.cool@UGent.be>, Ghent University
* @version march 2006
@ -1210,7 +1211,7 @@ function check_if_file_exist($id)
}
/**
* @return a language string (depending on the success or failure.
* @return string language string (depending on the success or failure.
*
* @author Patrick Cool <patrick.cool@UGent.be>, Ghent University
* @version march 2006

@ -367,7 +367,7 @@ class TestCategory
* Return the list of differents categories NAME for a test
* @param int exercise id
* @param bool
* @return array of string
* @return integer of string
*
* @author function rewrote by jmontoya
*/
@ -990,7 +990,6 @@ class TestCategory
/**
* Return the id of the test category with title = $in_title
* @param $in_title
* @param int $in_c_id
*
* @return int is id of test category
*/
@ -1018,7 +1017,7 @@ class TestCategory
* @param int $questionId
* @param int $courseId
*
* @return int
* @return string|false
*/
public static function add_category_for_question_id($categoryId, $questionId, $courseId)
{

@ -72,7 +72,8 @@ class Answer
$objExercise = new Exercise($this->course_id);
$exerciseId = isset($_REQUEST['exerciseId']) ? $_REQUEST['exerciseId'] : null;
$objExercise->read($exerciseId);
if ($objExercise->random_answers == '1') {
if ($objExercise->random_answers == '1' && $this->getQuestionType() != CALCULATED_ANSWER) {
$this->readOrderedBy('rand()', '');// randomize answers
} else {
$this->read(); // natural order
@ -187,6 +188,7 @@ class Answer
* Reads answer information from the data base ordered by parameter
* @param string Field we want to order by
* @param string DESC or ASC
* @param string $field
* @author Frederic Vauthier
*/
public function readOrderedBy($field, $order='ASC')
@ -308,6 +310,7 @@ class Answer
* returns the question ID of the destination question
*
* @author Julio Montoya
* @param integer $id
* @return integer - the question ID
*/
public function selectDestination($id)
@ -329,6 +332,7 @@ class Answer
/**
* return array answer by id else return a bool
* @param integer $auto_id
*/
public function selectAnswerByAutoId($auto_id)
{
@ -467,6 +471,7 @@ class Answer
*
* @author Olivier Brouckaert
* @param - integer $id - answer ID
* @param integer $id
* @return integer - answer weighting
*/
public function selectWeighting($id)
@ -491,6 +496,7 @@ class Answer
*
* @author Olivier Brouckaert
* @param integer Answer ID
* @param integer $id
* @return integer Answer position
*/
public function selectHotspotCoordinates($id)
@ -503,6 +509,7 @@ class Answer
*
* @author Toon Keppens
* @param integer Answer ID
* @param integer $id
* @return integer Answer position
*/
public function selectHotspotType($id)
@ -729,6 +736,7 @@ class Answer
* @author Olivier Brouckaert
* @param int question id
* @param array destination course info (result of the function api_get_course_info() )
* @param string $newQuestionId
*/
public function duplicate($newQuestionId, $course_info = null)
{

@ -1,8 +1,6 @@
<?php
/* For licensing terms, see /license.txt */
use ChamiloSession as Session;
/**
* Class Exercise
*
@ -162,7 +160,9 @@ class Exercise
$this->display_category_name = $object->display_category_name;
$this->pass_percentage = $object->pass_percentage;
$this->sessionId = $object->session_id;
$this->is_gradebook_locked = api_resource_is_locked_by_gradebook($id, LINK_EXERCISE);
$this->review_answers = (isset($object->review_answers) && $object->review_answers == 1) ? true : false;
$this->globalCategoryId = isset($object->global_category_id) ? $object->global_category_id : null;
$this->questionSelectionType = isset($object->question_selection_type) ? $object->question_selection_type : null;
@ -187,11 +187,19 @@ class Exercise
$this->edit_exercise_in_lp = true;
}
<<<<<<< HEAD
if (!empty($object->end_time)) {
$this->end_time = $object->end_time;
}
if (!empty($object->start_time)) {
$this->start_time = $object->start_time;
=======
if ($object->end_time != '0000-00-00 00:00:00') {
$this->end_time = $object->end_time;
}
if ($object->start_time != '0000-00-00 00:00:00') {
$this->start_time = $object->start_time;
>>>>>>> origin/1.10.x
}
//control time
@ -353,7 +361,7 @@ class Exercise
}
/**
* @return int
* @return string
*/
public function selectPassPercentage()
{
@ -462,7 +470,7 @@ class Exercise
* tells if questions are selected randomly, and if so returns the draws
*
* @author Olivier Brouckaert
* @return integer - 0 if not random, otherwise the draws
* @return boolean - 0 if not random, otherwise the draws
*/
public function isRandom()
{
@ -2830,7 +2838,7 @@ class Exercise
* @param int int lp id
* @param int int lp item id
* @param int int lp item_view id
* @param float $weight
* @param integer $weight
* @param array question list
*/
public function save_stat_track_exercise_info(
@ -3093,7 +3101,7 @@ class Exercise
* @param bool $show_result show results or not
* @param int $propagate_neg
* @param array $hotspot_delineation_result
*
* @param boolean $showTotalScoreAndUserChoices
* @todo reduce parameters of this function
* @return string html code
*/
@ -3717,16 +3725,7 @@ class Exercise
}
break;
case CALCULATED_ANSWER:
$calculatedAnswerId = Session::read('calculatedAnswerId');
$answer = '';
if ($calculatedAnswerId) {
$calculatedAnswerInfo = Session::read('calculatedAnswerInfo');
if (isset($calculatedAnswerInfo[$questionId])) {
$answer = $calculatedAnswerInfo[$questionId];
} else {
$answer = $objAnswerTmp->selectAnswer($calculatedAnswerId[$questionId]);
}
}
$answer = $objAnswerTmp->selectAnswer($_SESSION['calculatedAnswerId'][$questionId]);
$preArray = explode('@@', $answer);
$last = count($preArray) - 1;
$answer = '';
@ -3765,7 +3764,7 @@ class Exercise
$queryfill = "SELECT answer FROM ".$TBL_TRACK_ATTEMPT."
WHERE
exe_id = '".$exeId."' AND
question_id= ".intval($questionId)."";
question_id= ".intval($questionId);
$resfill = Database::query($queryfill);
$str = Database::result($resfill, 0, 'answer');
api_preg_match_all('#\[([^[]*)\]#', $str, $arr);
@ -3773,7 +3772,14 @@ class Exercise
$choice = $arr[1];
if (isset($choice[$j])) {
$tmp = api_strrpos($choice[$j], ' / ');
$choice[$j] = api_substr($choice[$j], 0, $tmp);
if ($tmp) {
$choice[$j] = api_substr($choice[$j], 0, $tmp);
} else {
$tmp = ltrim($tmp, '[');
$tmp = rtrim($tmp, ']');
}
$choice[$j] = trim($choice[$j]);
// Needed to let characters ' and " to work as part of an answer
$choice[$j] = stripslashes($choice[$j]);
@ -3792,18 +3798,6 @@ class Exercise
}
$answer = '';
$realCorrectTags = $correctTags;
if ($from_database && empty($calculatedAnswerId)) {
$queryfill = "SELECT answer, marks FROM ".$TBL_TRACK_ATTEMPT."
WHERE
exe_id = '".$exeId."' AND
question_id= ".intval($questionId) ;
$resfill = Database::query($queryfill);
$rowFill = Database::fetch_assoc($resfill);
$answer = $rowFill['answer'];
$questionScore = $rowFill['marks'];
}
for ($i = 0; $i < count($realCorrectTags); $i++) {
if ($i == 0) {
$answer .= $realText[0];
@ -3825,18 +3819,17 @@ class Exercise
// adds a tabulation if no word has been typed by the student
$answer .= ''; // remove &nbsp; that causes issue
}
<<<<<<< HEAD
// adds the correct word, followed by ] to close the blank
$addCorrecWord = true;
=======
// adds the correct word, followed by ] to close the blank
>>>>>>> origin/1.10.x
if (
Session::has('objExercise') &&
Session::read('objExercise')->selectResultsDisabled() == EXERCISE_FEEDBACK_TYPE_EXAM
$this->results_disabled != EXERCISE_FEEDBACK_TYPE_EXAM
) {
$addCorrecWord = false;
}
if ($addCorrecWord) {
// adds the correct word, followed by ] to close the blank
$answer .= ' / <font color="green"><b>' . $realCorrectTags[$i] . '</b></font>';
}
@ -4594,7 +4587,8 @@ class Exercise
$studentChoice,
$answerComment,
$results_disabled,
$answerId
$answerId,
$showTotalScoreAndUserChoices
);
break;
case HOT_SPOT_DELINEATION:
@ -5168,6 +5162,7 @@ class Exercise
/**
* Sends a notification when a user ends an examn
*
* @param integer $exe_id
*/
public function send_mail_notification_for_exam($question_list_answers, $origin, $exe_id)
{
@ -5248,6 +5243,7 @@ class Exercise
/**
* Sends a notification when a user ends an examn
*
* @param integer $exe_id
*/
function send_notification_for_open_questions($question_list_answers, $origin, $exe_id)
{
@ -5345,6 +5341,9 @@ class Exercise
}
}
/**
* @param integer $exe_id
*/
function send_notification_for_oral_questions($question_list_answers, $origin, $exe_id)
{
if (api_get_course_setting('email_alert_manager_on_new_quiz') != 1 ) {
@ -5438,7 +5437,7 @@ class Exercise
/**
* @param array $user_data result of api_get_user_info()
* @param null $start_date
* @param string $start_date
* @param null $duration
* @param string $ip Optional. The user IP
* @return string
@ -5496,7 +5495,7 @@ class Exercise
* @param int Maximum number of attempts (0 if no limit)
* @param int Feedback type
* @todo this was function was added due the import exercise via CSV
* @return int New exercise ID
* @return string New exercise ID
*/
public function createExercise(
$title,
@ -6831,7 +6830,7 @@ class Exercise
* @param bool $show_comment
* @param null $exercise_feedback
* @param bool $show_answers
* @param null $modelType
* @param integer $modelType
* @param bool $categoryMinusOne
* @return bool|null|string
*/
@ -7998,8 +7997,8 @@ class Exercise
/**
* Returns an HTML ribbon to show on top of the exercise result, with
* colouring depending on the success or failure of the student
* @param $score
* @param $weight
* @param integer $score
* @param integer $weight
* @param bool $check_pass_percentage
* @return string
*/

@ -185,6 +185,7 @@ ExerciseLib::exercise_time_control_delete(
$learnpath_id,
$learnpath_item_id
);
ExerciseLib::delete_chat_exercise_session($exe_id);
if ($origin != 'learnpath') {
@ -199,8 +200,6 @@ if ($origin != 'learnpath') {
if (api_is_allowed_to_session_edit()) {
Session::erase('objExercise');
Session::erase('exe_id');
Session::erase('calculatedAnswerId');
Session::erase('calculatedAnswerInfo');
}
Display::display_footer();
} else {
@ -211,8 +210,6 @@ if ($origin != 'learnpath') {
if (api_is_allowed_to_session_edit()) {
Session::erase('objExercise');
Session::erase('exe_id');
Session::erase('calculatedAnswerId');
Session::erase('calculatedAnswerInfo');
}
// Record the results in the learning path, using the SCORM interface (API)

File diff suppressed because it is too large Load Diff

@ -10,6 +10,10 @@
if ( count( get_included_files() ) == 1 ) die( '---' );
if (!function_exists('mime_content_type')) {
/**
* @param string $filename
*/
function mime_content_type($filename) {
return DocumentManager::file_get_mime_type((string)$filename);
}

@ -55,6 +55,8 @@ function aiken_display_form($msg = '') {
* Gets the uploaded file (from $_FILES) and unzip it to the given directory
* @param string The directory where to do the work
* @param string The path of the temporary directory where the exercise was uploaded and unzipped
* @param string $baseWorkDir
* @param string $uploadPath
* @return bool True on success, false on failure
*/
function get_and_unzip_uploaded_exercise($baseWorkDir, $uploadPath) {
@ -229,7 +231,10 @@ function aiken_import_exercise($file)
* @param string Path to the directory with the file to be parsed (without final /)
* @param string Name of the last directory part for the file (without /)
* @param string Name of the file to be parsed (including extension)
* @return mixed True on success, error message on error
* @param string $exercisePath
* @param string $file
* @param string $questionFile
* @return string|boolean True on success, error message on error
* @assert ('','','') === false
*/
function aiken_parse_file(&$exercise_info, $exercisePath, $file, $questionFile) {

@ -30,6 +30,8 @@ function tempdir($dir, $prefix = 'tmp', $mode = 0777)
* Unzip the exercise in the temp folder
* @param string The path of the temporary directory where the exercise was uploaded and unzipped
* @param string
* @param string $baseWorkDir
* @param string $uploadPath
* @return bool
*/
function get_and_unzip_uploaded_exercise($baseWorkDir, $uploadPath)
@ -217,9 +219,9 @@ function formatText($text)
/**
* Parses a given XML file and fills global arrays with the elements
* @param $exercisePath
* @param $file
* @param $questionFile
* @param string $exercisePath
* @param string $file
* @param string $questionFile
* @return bool
*/
function parse_file($exercisePath, $file, $questionFile)

@ -32,7 +32,7 @@ class ImsAssessmentItem
/**
* Constructor.
*
* @param $question Ims2Question object we want to export.
* @param Ims2Question $question Ims2Question object we want to export.
*/
function ImsAssessmentItem($question)
{
@ -101,7 +101,7 @@ class ImsAssessmentItem
* This is a default behaviour, some classes may want to override this.
*
* @param $standalone: Boolean stating if it should be exported as a stand-alone question
* @return A string, the XML flow for an Item.
* @return string string, the XML flow for an Item.
*/
function export($standalone = false)
{
@ -154,7 +154,7 @@ class ImsSection
/**
* Constructor.
* @param $exe The Exercise instance to export
* @param Exercise $exe The Exercise instance to export
* @author Amand Tihon <amand@alrj.org>
*/
function ImsSection($exe)
@ -239,7 +239,7 @@ class ImsSection
* Export the exercise in IMS/QTI.
*
* @param bool $standalone Wether it should include XML tag and DTD line.
* @return a string containing the XML flow
* @return string string containing the XML flow
* @author Amand Tihon <amand@alrj.org>
*/
function export($standalone)
@ -383,7 +383,7 @@ class ImsItem
* This is a default behaviour, some classes may want to override this.
*
* @param $standalone: Boolean stating if it should be exported as a stand-alone question
* @return A string, the XML flow for an Item.
* @return string string, the XML flow for an Item.
* @author Amand Tihon <amand@alrj.org>
*/
function export($standalone = False)
@ -417,7 +417,7 @@ class ImsItem
*
* @param int $exerciseId The exercise to export
* @param boolean $standalone Wether it should include XML tag and DTD line.
* @return The XML as a string, or an empty string if there's no exercise with given ID.
* @return string XML as a string, or an empty string if there's no exercise with given ID.
*/
function export_exercise_to_qti($exerciseId, $standalone = true)
{
@ -474,6 +474,9 @@ function formatExerciseQtiTitle($text)
return htmlspecialchars($text);
}
/**
* @param string $text
*/
function cleanAttribute($text)
{
return $text;

@ -27,6 +27,7 @@ class ScormQuestion extends Question
* @param int The JavaScript ID for this question.
* Due to the nature of interactions, we must have a natural sequence for
* questions in the generated JavaScript.
* @param integer $js_id
*/
public static function export_question($questionId, $standalone = true, $js_id)
{
@ -687,7 +688,7 @@ class ScormAssessmentItem
/**
* Constructor.
*
* @param $question The Question object we want to export.
* @param ScormQuestion $question The Question object we want to export.
*/
public function ScormAssessmentItem($question, $standalone = false)
{
@ -915,7 +916,7 @@ class ScormSection
*
* @param int $exerciseId The exercise to exporte
* @param boolean $standalone Wether it should include XML tag and DTD line.
* @return The XML as a string, or an empty string if there's no exercise with given ID.
* @return string XML as a string, or an empty string if there's no exercise with given ID.
*/
public static function export_exercise_to_scorm($exerciseId, $standalone=true) {
$exercise = new Exercise();
@ -930,7 +931,7 @@ class ScormSection
/**
* Constructor.
* @param $exe The Exercise instance to export
* @param Exercise $exe The Exercise instance to export
* @author Amand Tihon <amand@alrj.org>
*/
function ScormSection($exe) {
@ -1091,7 +1092,7 @@ class ScormSection
* This is a default behaviour, some classes may want to override this.
*
* @param $standalone: Boolean stating if it should be exported as a stand-alone question
* @return A string, the XML flow for an Item.
* @return string string, the XML flow for an Item.
*/
function export()
{

@ -413,7 +413,7 @@ class FillBlanks extends Question
* @param null $feedback_type
* @param null $counter
* @param null $score
* @return null|string
* @return string
*/
public function return_header($feedback_type = null, $counter = null, $score = null)
{
@ -427,15 +427,16 @@ class FillBlanks extends Question
}
/**
* @param $separatorStartRegexp
* @param $separatorEndRegexp
* @param $correctItemRegexp
* @param $questionId
* @param string $separatorStartRegexp
* @param string $separatorEndRegexp
* @param string $correctItemRegexp
* @param integer $questionId
* @param $correctItem
* @param $attributes
* @param $answer
* @param string $answer
* @param $listAnswersInfo
* @param $displayForStudent
* @param boolean $displayForStudent
* @param integer $inBlankNumber
* @return string
*/
public static function getFillTheBlankHtml(
@ -734,11 +735,11 @@ class FillBlanks extends Question
* 0 : student answer is correct
* >0 : for fill the blank question with choice menu, is the index of the student answer (right answer indice is 0)
*
* @param $testId
* @param $questionId
* @param integer $testId
* @param integer $questionId
* @param $studentsIdList
* @param $startDate
* @param $endDate
* @param string $startDate
* @param string $endDate
* @param bool $useLastAnswerredAttempt
* @return array
* (
@ -915,7 +916,7 @@ class FillBlanks extends Question
* return $text protected for use in regexp
* @param string $text
*
* @return mixed
* @return string
*/
public static function getRegexpProtected($text)
{
@ -973,7 +974,7 @@ class FillBlanks extends Question
* return the start separator for answer
* @param string $number
*
* @return mixed
* @return string
*/
public static function getStartSeparator($number)
{
@ -986,7 +987,7 @@ class FillBlanks extends Question
* return the end separator for answer
* @param string $number
*
* @return mixed
* @return string
*/
public static function getEndSeparator($number)
{

@ -94,7 +94,7 @@ function GetComment($path, $course_code = '')
* Sets the comment in the database for a particular path.
* @param string File path
* @param string Comment to set
* @return string Result of the database operation (Database::query will output some message directly on error anyway)
* @return Doctrine\DBAL\Driver\Statement|null Result of the database operation (Database::query will output some message directly on error anyway)
*/
function SetComment($path, $comment)
{
@ -112,6 +112,7 @@ function SetComment($path, $comment)
/**
* Reads the file contents into a string.
* @param string Urlencoded path
* @param string $full_file_path
* @return string The file contents or false on security error
*/
function ReadFileCont($full_file_path)
@ -257,6 +258,7 @@ function GenerateHiddenList($imgparams)
* Searches for a node in the given array.
* @param reference Reference to the array to search
* @param string Node we are looking for in the array
* @param string $node
* @return mixed Node name or false if not found
*/
function myarraysearch(&$array, $node)
@ -316,6 +318,8 @@ function ReplaceImgTag($content)
* Fills the folder name up to a certain length with "0".
* @param string Original folder name
* @param integer Length to reach
* @param integer $name
* @param integer $nsize
* @return string Modified folder name
*/
function FillFolderName($name, $nsize)

@ -18,6 +18,7 @@ class HotpotatoesExerciseResult
* Gets the results of all students (or just one student if access is limited)
* @param string The document path (for HotPotatoes retrieval)
* @param integer User ID. Optional. If no user ID is provided, we take all the results. Defauts to null
* @param string $document_path
*/
public function getExercisesReporting($document_path, $hotpotato_name)
{

@ -52,7 +52,7 @@ class HotSpot extends Question
/**
* @param FormValidator $form
* @param null $objExercise
* @return bool
* @return null|false
*/
public function processCreation($form, $objExercise = null)
{

@ -264,7 +264,7 @@ abstract class Question
}
/**
* @return bool|string
* @return string|false
*/
public function selectPicturePath()
{
@ -589,7 +589,7 @@ abstract class Question
* @param string $Dimension - Resizing happens proportional according to given dimension: height|width|any
* @param integer $Max - Maximum size
*
* @return boolean - true if success, false if failed
* @return boolean|null - true if success, false if failed
*
* @author Toon Keppens
*/
@ -750,6 +750,7 @@ abstract class Question
/**
* Sets extra info
* @param string $extra
*/
public function setExtra($extra)
{
@ -1273,7 +1274,7 @@ abstract class Question
*
* @author Olivier Brouckaert
* @param array $course_info Course info of the destination course
* @return int ID of the new question
* @return false|string ID of the new question
*/
public function duplicate($course_info = [])
{
@ -1649,7 +1650,7 @@ abstract class Question
* @param string $name
* @param int $course_id
* @param int $position
* @return bool|int
* @return false|string
*/
static function saveQuestionOption($question_id, $name, $course_id, $position = 0)
{
@ -1788,6 +1789,7 @@ abstract class Question
* @param int Maximum result for the question
* @param int Type of question (see constants at beginning of question.class.php)
* @param int Question level/category
* @param string $quiz_id
*/
public function create_question(
$quiz_id,
@ -1870,6 +1872,7 @@ abstract class Question
/**
* Get course medias
* @param int course id
* @param integer $course_id
*/
static function get_course_medias(
$course_id,
@ -1935,7 +1938,7 @@ abstract class Question
}
/**
* @return array
* @return integer[]
*/
public static function get_default_levels()
{

@ -417,8 +417,8 @@ class UniqueAnswer extends Question
* @param int $question_id The question ID (to which the answer is attached)
* @param string $title The text of the answer
* @param string $comment The feedback for the answer
* @param float|null $score The score you get when picking this answer
* @param int|null $correct Whether this answer is considered *the* correct one (this is the unique answer type)
* @param double $score The score you get when picking this answer
* @param integer $correct Whether this answer is considered *the* correct one (this is the unique answer type)
*/
public function addAnswer(
$id,

@ -1064,7 +1064,7 @@ function return_lock_unlock_icon($content, $id, $current_lock_status, $additiona
* an up and down icon except for the first (no up icon) and the last (no down icon)
* The key of this $list array is the id of the item.
*
* @return void HTML
* @return string HTML
**/
function return_up_down_icon($content, $id, $list)
{
@ -2033,7 +2033,7 @@ function get_thread_information($thread_id)
* This function retrieves forum thread users details
* @param int Thread ID
* @param string Course DB name (optional)
* @return resource array Array of type ([user_id=>w,lastname=>x,firstname=>y,thread_id=>z],[])
* @return Doctrine\DBAL\Driver\Statement|null array Array of type ([user_id=>w,lastname=>x,firstname=>y,thread_id=>z],[])
* @author Christian Fasanando <christian.fasanando@dokeos.com>,
* @todo this function need to be improved
* @version octubre 2008, dokeos 1.8
@ -2088,7 +2088,7 @@ function get_thread_users_details($thread_id)
* This function retrieves forum thread users qualify
* @param int Thread ID
* @param string Course DB name (optional)
* @return array Array of type ([user_id=>w,lastname=>x,firstname=>y,thread_id=>z],[])
* @return Doctrine\DBAL\Driver\Statement|null Array of type ([user_id=>w,lastname=>x,firstname=>y,thread_id=>z],[])
* @author Jhon Hinojosa
* @todo this function need to be improved
*/
@ -2155,7 +2155,7 @@ function get_thread_users_qualify($thread_id)
* This function retrieves forum thread users not qualify
* @param int Thread ID
* @param string Course DB name (optional)
* @return array Array of type ([user_id=>w,lastname=>x,firstname=>y,thread_id=>z],[])
* @return Doctrine\DBAL\Driver\Statement|null Array of type ([user_id=>w,lastname=>x,firstname=>y,thread_id=>z],[])
* @author Jhon Hinojosa<jhon.hinojosa@dokeos.com>,
* @version oct 2008, dokeos 1.8
*/
@ -3185,6 +3185,10 @@ function getThreadScoreHistory($user_id, $thread_id, $opt)
* @param integer contains the information the current user id
* @param integer contains the information the current thread id
* @param integer contains the information the current qualify
* @param string $option
* @param integer $course_id
* @param integer $user_id
* @param integer $thread_id
* @return void
* <code>$option=1 obtained the qualification of the current thread</code>
* @author Isaac Flores <isaac.flores@dokeos.com>, U.N.A.S University
@ -3768,6 +3772,8 @@ function increase_thread_view($thread_id)
*
* @author Patrick Cool <patrick.cool@UGent.be>, Ghent University
* @version february 2006, dokeos 1.8
* @param string $last_post_id
* @param string $post_date
*/
function updateThreadInfo($thread_id, $last_post_id, $post_date)
{
@ -3982,6 +3988,8 @@ function send_notification_mails($thread_id, $reply_info)
*
* @param string Content type (post, thread, forum, forum_category)
* @param int Item DB ID
* @param string $content
* @param integer $id
* @return string language variable
* @author Patrick Cool <patrick.cool@UGent.be>, Ghent University
* @version february 2006, dokeos 1.8
@ -4459,6 +4467,7 @@ function forum_search()
/**
* Display the search results
* @param string
* @param string $search_term
* @return void display the results
* @author Patrick Cool <patrick.cool@UGent.be>, Ghent University, Belgium
* @version march 2008, dokeos 1.8.5
@ -4588,7 +4597,7 @@ function search_link()
* This function adds an attachment file into a forum
* @param string $file_comment a comment about file
* @param int $last_id from forum_post table
* @return int|bool
* @return false|null
*/
function add_forum_attachment_file($file_comment, $last_id)
{
@ -4799,7 +4808,7 @@ function getAllAttachment($postId)
* @param post id
* @param int $id_attach
* @param bool $display to show or not result message
* @return void
* @return integer
* @author Julio Montoya Dokeos
* @version october 2014, chamilo 1.9.8
*/
@ -5081,7 +5090,7 @@ function get_notifications($content, $id)
* @param integer $forum_id the id of the forum
* @param integer $thread_id the id of the thread
* @param integer $post_id the id of the post
* @return bool
* @return false|null
*
* @author Patrick Cool <patrick.cool@UGent.be>, Ghent University, Belgium
* @version May 2008, dokeos 1.8.5

@ -19,6 +19,7 @@ class GradebookUtils
* @param int Visibility (0 hidden, 1 shown)
* @param int Session ID (optional or 0 if not defined)
* @param int
* @param integer $resource_type
* @return boolean True on success, false on failure
*/
public static function add_resource_to_course_gradebook(
@ -117,7 +118,6 @@ class GradebookUtils
/**
* Builds an img tag for a gradebook item
* @param string $type value returned by a gradebookitem's get_icon_name()
*/
public static function build_type_icon_tag($kind, $attributes = array())
{
@ -580,6 +580,9 @@ class GradebookUtils
* @param int The user id
* @param float The score obtained for certified
* @param Datetime The date when you obtained the certificate
* @param integer $cat_id
* @param integer $user_id
* @param string $date_certificate
* @return void()
*/
public static function register_user_info_about_certificate($cat_id, $user_id, $score_certificate, $date_certificate)
@ -959,7 +962,7 @@ class GradebookUtils
}
/**
* @param array $list_values
* @param string[] $list_values
* @return string
*/
public static function score_badges($list_values)
@ -1019,7 +1022,7 @@ class GradebookUtils
}
/**
* @param $result
* @param Doctrine\DBAL\Driver\Statement|null $result
* @return array
*/
public static function get_user_array_from_sql_result($result)

@ -193,6 +193,9 @@ abstract class AbstractLink implements GradebookItem
$this->visible = $visible;
}
/**
* @param integer $id
*/
public function set_session_id($id)
{
$this->session_id = $id;
@ -217,6 +220,12 @@ abstract class AbstractLink implements GradebookItem
/**
* Retrieve links and return them as an array of extensions of AbstractLink.
* To keep consistency, do not call this method but LinkFactory::load instead.
* @param integer $id
* @param integer $type
* @param integer $user_id
* @param string $course_code
* @param integer $category_id
* @param integer $visible
*/
public static function load(
$id = null,
@ -288,7 +297,7 @@ abstract class AbstractLink implements GradebookItem
}
/**
* @param $result
* @param Doctrine\DBAL\Driver\Statement|null $result
* @return array
*/
private static function create_objects_from_sql_result($result)
@ -463,6 +472,7 @@ abstract class AbstractLink implements GradebookItem
/**
* Internal function used by get_target_categories()
* @param integer $level
*/
private function add_target_subcategories($targets, $level, $catid)
{
@ -492,6 +502,7 @@ abstract class AbstractLink implements GradebookItem
* Find links by name
* To keep consistency, do not call this method but LinkFactory::find_links instead.
* @todo can be written more efficiently using a new (but very complex) sql query
* @param string $name_mask
*/
public function find_links ($name_mask,$selectcat)
{
@ -559,21 +570,21 @@ abstract class AbstractLink implements GradebookItem
}
/**
* @param $name
* @param string $name
*/
public function set_name($name)
{
}
/**
* @param $description
* @param string $description
*/
public function set_description($description)
{
}
/**
* @param $max
* @param integer $max
*/
public function set_max($max)
{

@ -77,7 +77,7 @@ class Category implements GradebookItem
}
/**
* @return float
* @return integer|null
*/
public function get_certificate_min_score()
{
@ -97,7 +97,7 @@ class Category implements GradebookItem
}
/**
* @return mixed
* @return integer
*/
public function get_parent_id()
{
@ -105,7 +105,7 @@ class Category implements GradebookItem
}
/**
* @return mixed
* @return integer
*/
public function get_weight()
{
@ -121,7 +121,7 @@ class Category implements GradebookItem
}
/**
* @return mixed
* @return boolean
*/
public function is_visible()
{
@ -244,7 +244,7 @@ class Category implements GradebookItem
}
/**
* @return null
* @return null|integer
*/
public function get_grade_model_id()
{
@ -487,7 +487,7 @@ class Category implements GradebookItem
}
/**
* @param $result
* @param Doctrine\DBAL\Driver\Statement|null $result
*
* @return array
*/
@ -863,7 +863,8 @@ class Category implements GradebookItem
/**
* Calculate the score of this category
* @param $stud_id student id (default: all students - then the average is returned)
* @param integer $stud_id student id (default: all students - then the average is returned)
* @param integer $session_id
* @return array (score sum, weight sum)
* or null if no scores available
*/
@ -1124,6 +1125,9 @@ class Category implements GradebookItem
* @param int student id
* @param string Course code
* @param int Session id
* @param integer $stud_id
* @param string $course_code
* @param integer $session_id
*/
public function get_root_categories_for_student($stud_id, $course_code = null, $session_id = null)
{
@ -1204,6 +1208,9 @@ class Category implements GradebookItem
* @param int user id (to return everything, use 'null' here)
* @param string course code (optional)
* @param int session id (optional)
* @param integer $user_id
* @param string $course_code
* @param integer $session_id
*/
public function get_root_categories_for_teacher($user_id, $course_code = null, $session_id = null)
{
@ -1302,6 +1309,7 @@ class Category implements GradebookItem
/**
* Internal function used by get_target_categories()
* @param integer $level
*/
private function add_target_subcategories($targets, $level, $catid)
{
@ -1401,6 +1409,8 @@ class Category implements GradebookItem
/**
* Internal function used by get_tree()
* @param integer $level
* @param null|integer $visible
*/
private function add_subtree ($targets, $level, $catid, $visible)
{
@ -1418,6 +1428,7 @@ class Category implements GradebookItem
/**
* Generate an array of courses that a teacher hasn't created a category for.
* @param integer $user_id
* @return array 2-dimensional array - every element contains 2 subelements (code, title)
*/
public function get_not_created_course_categories ($user_id)
@ -1452,6 +1463,7 @@ class Category implements GradebookItem
/**
* Generate an array of all courses that a teacher is admin of.
* @param integer $user_id
* @return array 2-dimensional array - every element contains 2 subelements (code, title)
*/
public function get_all_courses ($user_id)
@ -1532,7 +1544,7 @@ class Category implements GradebookItem
/**
* Retrieve all categories inside a course independent category
* that should be visible to a student.
* @param $cat_id parent category
* @param integer $cat_id parent category
* @param $stud_id student id
* @param $cats optional: if defined, the categories will be added to this array
*/
@ -1853,7 +1865,7 @@ class Category implements GradebookItem
* the platform administrator.
* @param int locked 1 or unlocked 0
* @return bool
* @return boolean|null
* */
public function lock($locked)
{
@ -2270,7 +2282,7 @@ class Category implements GradebookItem
* @param float $score The achieved score
* @param int $userId The user id
* @param int $categoryId The gradebook category
* @return int The insert id
* @return false|string The insert id
*/
public static function registerCurrentScore($score, $userId, $categoryId)
{

@ -81,6 +81,9 @@ class Evaluation implements GradebookItem
return $this->name;
}
/**
* @return string
*/
public function get_description()
{
return $this->description;
@ -208,7 +211,7 @@ class Evaluation implements GradebookItem
* @param int $user_id user id (evaluation owner)
* @param string $course_code course code
* @param int $category_id parent category
* @param $visible visible
* @param integer $visible visible
*/
public static function load(
$id = null,
@ -658,6 +661,7 @@ class Evaluation implements GradebookItem
/**
* Internal function used by get_target_categories()
* @param integer $level
*/
private function add_target_subcategories($targets, $level, $catid)
{

@ -372,7 +372,7 @@ class ExerciseLink extends AbstractLink
}
/**
* @return array|string
* @return string
*/
public function get_type_name()
{

@ -121,7 +121,7 @@ class ForumThreadLink extends AbstractLink
/**
* Has anyone done this exercise yet ?
* @return int
* @return boolean
*/
public function has_results()
{

@ -62,6 +62,9 @@ class Result
$this->evaluation = $evaluation_id;
}
/**
* @param string $creation_date
*/
public function set_date($creation_date)
{
$this->created_at = $creation_date;

@ -124,8 +124,8 @@ class LinkForm extends FormValidator
}
/**
* @param $link
* @param $courseCode
* @param integer $link
* @param null|string $courseCode
* @return AttendanceLink|DropboxLink|ExerciseLink|ForumThreadLink|LearnpathLink|null|StudentPublicationLink|SurveyLink
*/
private function createLink($link, $courseCode)

@ -30,7 +30,7 @@ class FlatViewDataGenerator
* @param array $evals
* @param array $links
* @param array $params
* @param null $mainCourseCategory
* @param Category|null $mainCourseCategory
*/
public function __construct(
$users = array(),
@ -276,6 +276,8 @@ class FlatViewDataGenerator
/**
* Get actual array data
* @param integer $users_count
* @param integer $items_count
* @return array 2-dimensional array - each array contains the elements:
* 0: user id
* 1: user lastname

@ -71,6 +71,7 @@ class GradebookDataGenerator
/**
* Get actual array data
* @param integer $count
* @return array 2-dimensional array - each array contains the elements:
* 0: cat/eval/link object
* 1: item name
@ -304,7 +305,7 @@ class GradebookDataGenerator
/**
* @param int $userId
* @param GradebookItem $item
* @param $ignore_score_color
* @param boolean $ignore_score_color
* @return null|string
*/
private function build_result_column(

@ -76,7 +76,7 @@ class GradeBookResult
/**
* Exports the complete report as an XLS file
* @return boolean False on error
* @return boolean|null False on error
*/
public function exportCompleteReportXLS($data)
{

@ -45,6 +45,7 @@ class ResultsDataGenerator
/**
* Get actual array data
* @param integer $count
* @return array 2-dimensional array - each array contains the elements:
* 0 ['id'] : user id
* 1 ['result_id'] : result id
@ -130,6 +131,7 @@ class ResultsDataGenerator
* @param float Current absolute score (max score is taken from $this->evaluation->get_max()
* @param bool Whether we want the real score (2/4 (50 %)) or the transformation (A, B, C, etc)
* @param bool Whether we want to ignore the score color
* @param boolean $realscore
* @result string The score as we want to show it
*/
private function get_score_display ($score, $realscore, $ignore_score_color = false)

@ -231,7 +231,7 @@ class ScoreDisplay
/**
* @param int $category_id
* @return bool
* @return false|null
*/
public function insert_defaults($category_id)
{
@ -262,7 +262,7 @@ class ScoreDisplay
}
/**
* @return int|null|string
* @return integer
*/
public function get_number_decimals()
{
@ -336,8 +336,8 @@ class ScoreDisplay
/**
* @param $score
* @param $type
* @return float|string
* @param integer $type
* @return string
*/
private function display_default($score, $type)
{

@ -491,7 +491,7 @@ function email_filter($email)
* Display a user icon that links to the user page
*
* @param integer $user_id the id of the user
* @return html code
* @return string code
*
* @author Patrick Cool <patrick.cool@UGent.be>, Ghent University, Belgium
* @version April 2008

@ -189,6 +189,8 @@ function check_system_version()
* @param float Timeout
* @param bool Include HTTP Request headers?
* @param bool Include HTTP Response headers?
* @param string $ip
* @return string
*/
function _http_request($ip, $port = 80, $uri = '/', $getdata = array(), $timeout = 5, $req_hdr = false, $res_hdr = false)
{

@ -283,9 +283,7 @@ switch ($action) {
$attempt_list = array();
// First time here we create an attempt (getting the exe_id).
if (empty($exercise_stat_info)) {
} else {
if (!empty($exercise_stat_info)) {
// We know the user we get the exe_id.
$exe_id = $exercise_stat_info['exe_id'];
$total_score = $exercise_stat_info['exe_result'];
@ -325,10 +323,10 @@ switch ($action) {
error_log("exe_id is empty");
}
exit;
} else {
$_SESSION['exe_id'] = $exe_id;
}
$_SESSION['exe_id'] = $exe_id;
// Getting the total weight if the request is simple
$total_weight = 0;
@ -351,7 +349,8 @@ switch ($action) {
continue;
}
$my_choice = isset($choice[$my_question_id]) ? $choice[$my_question_id] : null;
$my_choice = isset($choice[$my_question_id]) ?
$choice[$my_question_id] : null;
if ($debug) {
error_log("my_choice = ".print_r($my_choice, 1)."");
@ -361,7 +360,7 @@ switch ($action) {
$objQuestionTmp = Question::read($my_question_id, $course_id);
// Getting free choice data.
if ($objQuestionTmp->type == FREE_ANSWER && $type == 'all') {
if ($objQuestionTmp->type == FREE_ANSWER && $type == 'all') {
$my_choice = isset($_REQUEST['free_choice'][$my_question_id]) && !empty($_REQUEST['free_choice'][$my_question_id]) ? $_REQUEST['free_choice'][$my_question_id]: null;
}

@ -16,7 +16,7 @@ class AnnouncementEmail
/**
*
* @param int|array $course
* @param int|array $annoucement
* @param integer $announcement
*
* @return AnnouncementEmail
*/
@ -50,7 +50,7 @@ class AnnouncementEmail
*
* @param string $key
*
* @return array
* @return string|null
*/
public function course($key = '')
{

@ -22,7 +22,7 @@ class Accessurleditcoursestourl
* a given string
* @param string String to search for
* @param int Deprecated param
* @return string A formatted, xajax answer block
* @return xajaxResponse A formatted, xajax answer block
* @assert () === false
*/
function search_courses($needle, $id)

@ -23,7 +23,7 @@ class Accessurledituserstourl
* search string
* @param string Search string
* @param int Deprecated param
* @return string Xajax response block
* @return xajaxResponse Xajax response block
* @assert () === false
*/
function search_users($needle, $id)

@ -189,7 +189,7 @@ class AddCourse
/**
* Gets an array with all the course tables (deprecated?)
* @return array
* @return string[]
* @assert (null) !== null
*/
public static function get_course_tables()
@ -310,6 +310,8 @@ class AddCourse
* @param string Complete path to directory we want to list
* @param array A list of files to which we want to add the files found
* @param string Type of base directory from which we want to recover the files
* @param string $path
* @param string $media
* @return array
* @assert (null,null,null) === false
* @assert ('abc',array(),'') === array()
@ -371,6 +373,7 @@ class AddCourse
* Sorts pictures by type (used?)
* @param array List of files (sthg like array(0=>array('png'=>1)))
* @param string File type
* @param string $type
* @return array The received array without files not matching type
* @assert (array(),null) === array()
*/

@ -10,7 +10,7 @@ class AddCourseToSession
* Searches a course, given a search string and a type of search box
* @param string $needle Search string
* @param string $type Type of search box ('single' or anything else)
* @return string XajaxResponse
* @return xajaxResponse XajaxResponse
* @assert ('abc', 'single') !== null
* @assert ('abc', 'multiple') !== null
*/

@ -17,7 +17,7 @@ class AddManySessionToCategoryFunctions
* Search for a session based on a given search string
* @param string A search string
* @param string A search box type (single or anything else)
* @return string XajaxResponse
* @return xajaxResponse XajaxResponse
* @assert () !== ''
* @assert ('abc','single') !== ''
*/

@ -565,7 +565,7 @@ class Agenda
* @param string $color
* @param bool $addAnnouncement
*
* @return bool
* @return null|false
*/
public function editEvent(
$id,
@ -1308,6 +1308,7 @@ class Agenda
*
* @param int $eventId
* @param int $courseId
* @param integer $sessionId
* @paraù int $sessionId
*
* @return array
@ -2469,6 +2470,7 @@ class Agenda
* Adds x weeks to a UNIX timestamp
* @param int The timestamp
* @param int The number of weeks to add
* @param integer $timestamp
* @return int The new timestamp
*/
function addWeek($timestamp, $num = 1)
@ -2480,6 +2482,7 @@ class Agenda
* Adds x months to a UNIX timestamp
* @param int The timestamp
* @param int The number of years to add
* @param integer $timestamp
* @return int The new timestamp
*/
function addMonth($timestamp, $num = 1)
@ -2498,6 +2501,7 @@ class Agenda
* Adds x years to a UNIX timestamp
* @param int The timestamp
* @param int The number of years to add
* @param integer $timestamp
* @return int The new timestamp
*/
function addYear($timestamp, $num = 1)
@ -2697,7 +2701,7 @@ class Agenda
/**
* @param array $courseInfo
* @param $file
* @return array|bool|string
* @return false|string
*/
public function importEventFile($courseInfo, $file)
{
@ -2810,7 +2814,7 @@ class Agenda
/**
* Parse filter turns USER:12 to ['users' => [12])] or G:1 ['groups' => [1]]
* @param $filter
* @param integer $filter
* @return array
*/
public function parseAgendaFilter($filter)
@ -3324,6 +3328,7 @@ class Agenda
* @param int user ID of the user
* @param string Optional start date in datetime format (if no start date is given, uses today)
* @param string Optional end date in datetime format (if no date is given, uses one year from now)
* @param integer $user_id
* @return array Array of events ordered by start date, in
* [0]('datestart','dateend','title'),[1]('datestart','dateend','title','link','coursetitle') format,
* where datestart and dateend are in yyyyMMddhhmmss format.

@ -581,9 +581,14 @@ require_once __DIR__.'/internationalization.lib.php';
* Also, this function provides conversion between path types, in this case the input path points inside the Chamilo area too.
*
* See $_configuration['course_folder'] in the configuration.php to alter the WEB_COURSE_PATH and SYS_COURSE_PATH parameters.
<<<<<<< HEAD
* @param string $path The requested path type (a defined constant), see the examples.
* @param array $configuration
=======
* @param string $path (optional) A path which type is to be converted. Also, it may be a defined constant for a path.
* This parameter has meaning when $type parameter has one of the following values: TO_WEB, TO_SYS, TO_REL. Otherwise it is ignored.
>>>>>>> origin/1.10.x
* @return string The requested path or the converted path.
*
*
@ -935,7 +940,7 @@ function api_remove_trailing_slash($path) {
* Checks the RFC 3986 syntax of a given URL.
* @param string $url The URL to be checked.
* @param bool $absolute Whether the URL is absolute (beginning with a scheme such as "http:").
* @return bool Returns the URL if it is valid, FALSE otherwise.
* @return string|false Returns the URL if it is valid, FALSE otherwise.
* This function is an adaptation from the function valid_url(), Drupal CMS.
* @link http://drupal.org
* Note: The built-in function filter_var($urs, FILTER_VALIDATE_URL) has a bug for some versions of PHP.
@ -1511,6 +1516,7 @@ function api_get_course_path($course_code = null)
* Gets a course setting from the current course_setting table. Try always using integer values.
* @param string The name of the setting we want from the table
* @param string Optional: course code
* @param string $setting_name
* @return mixed The value of that setting in that table. Return -1 if not found.
*/
function api_get_course_setting($setting_name, $course_code = null)
@ -1839,7 +1845,7 @@ function api_generate_password($length = 8) {
/**
* Checks a password to see wether it is OK to use.
* @param string $password
* @return true if the password is acceptable, false otherwise
* @return boolean if the password is acceptable, false otherwise
* Notes about what a password "OK to use" is:
* 1. The password should be at least 5 characters long.
* 2. Only English letters (uppercase or lowercase, it doesn't matter) and digits are allowed.
@ -2011,7 +2017,7 @@ class api_failure {
* @author Hugues Peeters <peeters@ipm.ucl.ac.be>
* @param string $failure_type - the type of failure
* @global array $api_failureList
* @return bolean false to stay consistent with the main script
* @return boolean false to stay consistent with the main script
*/
static function set_failure($failure_type) {
global $api_failureList;
@ -3027,8 +3033,8 @@ function api_is_allowed_to_session_edit($tutor = false, $coach = false)
/**
* Checks whether the user is allowed in a specific tool for a specific action
* @param $tool the tool we are checking if the user has a certain permission
* @param $action the action we are checking (add, edit, delete, move, visibility)
* @param string $tool the tool we are checking if the user has a certain permission
* @param string $action the action we are checking (add, edit, delete, move, visibility)
* @author Patrick Cool <patrick.cool@UGent.be>, Ghent University
* @author Julio Montoya
* @version 1.0
@ -3330,7 +3336,7 @@ function api_not_allowed($print_headers = false, $message = null)
/**
* Gets a UNIX timestamp from a database (MySQL) datetime format string
* @param $last_post_datetime standard output date in a sql query
* @return unix timestamp
* @return integer timestamp
* @author Toon Van Hoecke <Toon.VanHoecke@UGent.be>
* @version October 2003
* @desc convert sql date to unix timestamp
@ -3363,6 +3369,9 @@ function api_get_datetime($time = null) {
* @param string Tool (learnpath, document, etc)
* @param int The item ID in the given tool
* @param int The session ID (optional)
* @param string $tool
* @param integer $user_id
* @param string $type
* @return int -1 on error, 0 if invisible, 1 if visible
*/
function api_get_item_visibility(
@ -3431,7 +3440,7 @@ function api_get_item_visibility(
* @param int $userId
* @param int $groupId
* @param int $sessionId
* @return void
* @return false|null
*/
function api_item_property_delete(
$courseInfo,
@ -3486,7 +3495,7 @@ function api_item_property_delete(
* @param array $_course array with course properties
* @param string $tool tool id, linked to 'rubrique' of the course tool_list (Warning: language sensitive !!)
* @param int $item_id id of the item itself, linked to key of every tool ('id', ...), "*" = all items of the tool
* @param string $lastedit_type add or update action
* @param string $last_edit_type add or update action
* (1) message to be translated (in trad4all) : e.g. DocumentAdded, DocumentUpdated;
* (2) "delete"
* (3) "visible"
@ -3769,6 +3778,8 @@ function api_item_property_update(
* @param string tool name, linked to 'rubrique' of the course tool_list (Warning: language sensitive !!)
* @param int id of the item itself, linked to key of every tool ('id', ...), "*" = all items of the tool
* @param int $session_id
* @param string $tool
* @param string $course_code
* @return array All fields from c_item_property (all rows found) or empty array
*/
function api_get_item_property_by_tool($tool, $course_code, $session_id = null)
@ -4032,7 +4043,7 @@ function api_get_languages_combo($name = 'language')
* Displays a form (drop down menu) so the user can select his/her preferred language.
* The form works with or without javascript
* @param boolean Hide form if only one language available (defaults to false = show the box anyway)
* @return void Display the box directly
* @return null|string Display the box directly
*/
function api_display_language_form($hide_if_no_choice = false)
{
@ -4321,6 +4332,7 @@ function api_get_themes() {
* and also when a user subscribes to courses (the new course is added at the end of the main category
* @author Patrick Cool <patrick.cool@UGent.be>, Ghent University
* @param int $user_course_category: the id of the user_course_category
* @param integer $user_id
* @return int the value of the highest sort of the user_course_category
*/
function api_max_sort_value($user_course_category, $user_id)
@ -4514,6 +4526,8 @@ function rmdirr($dirname, $delete_only_content_in_folder = false, $strict = fals
* @param the dest folder
* @param an array of excluded file_name (without extension)
* @param copied_files the returned array of copied files
* @param string $source
* @param string $dest
*/
function copyr($source, $dest, $exclude = array(), $copied_files = array()) {
if (empty($dest)) { return false; }
@ -4553,6 +4567,11 @@ function copyr($source, $dest, $exclude = array(), $copied_files = array()) {
}
// TODO: Using DIRECTORY_SEPARATOR is not recommended, this is an obsolete approach. Documentation header to be added here.
/**
* @param string $pathname
* @param string $base_path_document
* @param integer $session_id
*/
function copy_folder_course_session(
$pathname,
$base_path_document,
@ -4638,6 +4657,9 @@ function copy_folder_course_session(
}
// TODO: chmodr() is a better name. Some corrections are needed. Documentation header to be added here.
/**
* @param string $path
*/
function api_chmod_R($path, $filemode) {
if (!is_dir($path)) {
return chmod($path, $filemode);
@ -4720,7 +4742,7 @@ function api_chmod_R($path, $filemode) {
* version = VERSION
* @endverbatim
* </code>
* @param $filename
* @param string $filename
* The file we are parsing. Accepts file with relative or absolute path.
* @return
* The info array.
@ -4812,7 +4834,7 @@ function api_get_software_name() {
/**
* Checks whether status given in parameter exists in the platform
* @param mixed the status (can be either int either string)
* @return true if the status exists, else returns false
* @return boolean if the status exists, else returns false
*/
function api_status_exists($status_asked) {
global $_status_list;
@ -4834,7 +4856,7 @@ function api_status_key($status) {
/**
* Gets the status langvars list
* @return array the list of status with their translations
* @return string[] the list of status with their translations
*/
function api_get_status_langvars() {
return array(
@ -4910,6 +4932,7 @@ function api_delete_setting_option($id) {
* @param string The sub-variable if any (in most cases, this will remain null)
* @param string The category if any (in most cases, this will remain null)
* @param int The access_url for which this parameter is valid
* @param string $cat
*/
function api_set_setting($var, $value, $subvar = null, $cat = null, $access_url = 1)
{
@ -5005,6 +5028,8 @@ function api_set_setting($var, $value, $subvar = null, $cat = null, $access_url
* @param string Value
* @param int Access URL. Optional. Defaults to 1
* @param array Optional array of filters on field type
* @param string $category
* @param string $value
*/
function api_set_settings_category($category, $value = null, $access_url = 1, $fieldtype = array())
{
@ -5248,6 +5273,10 @@ function api_delete_category_settings_by_subkey($subkey, $access_url_id = 1) {
* @param string The subkey text
* @param int The access_url for which this parameter is valid
* @param int The changeability of this setting for non-master urls
* @param string $val
* @param string $var
* @param string $sk
* @param string $c
* @return boolean true on success, false on failure
*/
function api_add_setting($val, $var, $sk = null, $type = 'textfield', $c = null, $title = '', $com = '', $sc = null, $skt = null, $a = 1, $v = 0) {
@ -5513,6 +5542,7 @@ function api_is_course_visible_for_user($userid = null, $cid = null) {
* @param String the tool of the element
* @param int the element id in database
* @param int the session_id to compare with element session id
* @param string $tool
* @return boolean true if the element is in the session, false else
*/
function api_is_element_in_the_session($tool, $element_id, $session_id = null) {
@ -5558,8 +5588,6 @@ function api_is_element_in_the_session($tool, $element_id, $session_id = null) {
* Replaces "forbidden" characters in a filename string.
*
* @param string $filename
* @param int $length
* @param bool $file_name
*
* @return string
*/
@ -5801,6 +5829,7 @@ function api_is_xml_http_request() {
* @link http://php.net/manual/en/function.getimagesize.php
* @link http://www.dokeos.com/forum/viewtopic.php?t=12345
* @link http://www.dokeos.com/forum/viewtopic.php?t=16355
* @return integer
*/
function api_getimagesize($path) {
$image = new Image($path);
@ -5961,6 +5990,7 @@ function shorten($input, $length = 15, $encoding = null) {
* with his user id and the access_url_id=1
*
* @author Julio Montoya
* @param integer $user_id
*/
function api_is_global_platform_admin($user_id = null)
{
@ -6022,7 +6052,7 @@ function api_global_admin_can_edit_admin($admin_id_to_check, $my_user_id = null,
* @param int $admin_id_to_check
* @param int $my_user_id
* @param bool $allow_session_admin
* @return bool
* @return boolean|null
*/
function api_protect_super_admin($admin_id_to_check, $my_user_id = null, $allow_session_admin = false)
{
@ -6264,6 +6294,7 @@ function api_get_asset($file) {
/**
* Returns the <link> HTML tag
* @param string $file
*/
function api_get_css($file, $media = 'screen') {
return '<link href="'.$file.'" rel="stylesheet" media="'.$media.'" type="text/css" />'."\n";
@ -6401,7 +6432,8 @@ function api_get_jquery_libraries_js($libraries) {
* This function relies on api_get_course_info()
* @param string The course code - optional (takes it from session if not given)
* @param int The session id - optional (takes it from session if not given)
* @return mixed The URL of the course or null if something does not work
* @param integer $session_id
* @return string|null The URL of the course or null if something does not work
* @author Julio Montoya <gugli100@gmail.com>
*/
function api_get_course_url($course_code = null, $session_id = null)
@ -6518,7 +6550,7 @@ function api_resource_is_locked_by_gradebook($item_id, $link_type, $course_code
* @param int LINK_EXERCISE, LINK_STUDENTPUBLICATION, LINK_LEARNPATH LINK_FORUM_THREAD, LINK_ATTENDANCE
* see gradebook/lib/be/linkfactory
* @param string course code
* @return boolean
* @return false|null
*/
function api_block_course_item_locked_by_gradebook($item_id, $link_type, $course_code = null) {
if (api_is_platform_admin()) {
@ -6602,7 +6634,7 @@ function api_get_locked_settings() {
* false if he isn't. If the user ID is given and is an integer, then the same
* ID is simply returned
* @param integer User ID
* @return mixed Integer User ID is logged in, or false otherwise
* @return boolean Integer User ID is logged in, or false otherwise
*/
function api_user_is_login($user_id = null) {
$user_id = empty($user_id) ? api_get_user_id() : intval($user_id);
@ -6637,6 +6669,7 @@ function api_get_real_ip(){
* Checks whether an IP is included inside an IP range
* @param string IP address
* @param string IP range
* @param string $ip
* @return bool True if IP is in the range, false otherwise
* @author claudiu at cnixs dot com on http://www.php.net/manual/fr/ref.network.php#55230
* @author Yannick Warnier for improvements and managment of multiple ranges
@ -7021,6 +7054,7 @@ function api_set_setting_last_update()
/**
* Tries to set memory limit, if authorized and new limit is higher than current
* @param string New memory limit
* @param string $mem
* @return bool True on success, false on failure or current is higher than suggested
* @assert (null) === false
* @assert (-1) === false
@ -7077,7 +7111,6 @@ function api_get_bytes_memory_limit($mem){
/**
* Finds all the information about a user from username instead of user id
* @param string $username
*
* @return array $user_info user_id, lastname, firstname, username, email, ...
* @author Yannick Warnier <yannick.warnier@beeznest.com>
@ -7099,7 +7132,6 @@ function api_get_user_info_from_official_code($official_code = '')
/**
*
* @param string $inputId the jquery id example: #password
*
* @return string
*/
@ -7224,6 +7256,7 @@ function api_get_user_blocked_by_captcha($username)
/**
* Remove tags from HTML anf return the $in_number_char first non-HTML char
* Postfix the text with "..." if it has been truncated.
* @param integer $in_number_char
* @return string
* @author hubert borderiou
*/
@ -7268,7 +7301,7 @@ function api_drh_can_access_all_session_content()
/**
* @param string $tool
* @param string $setting
* @param mixed $defaultValue
* @param integer $defaultValue
* @return string
*/
function api_get_default_tool_setting($tool, $setting, $defaultValue)
@ -7393,7 +7426,7 @@ function api_delete_firstpage_parameter()
}
/**
* @return true if course_code for direct course access after login is set
* @return boolean if course_code for direct course access after login is set
*/
function exist_firstpage_parameter()
{
@ -7685,7 +7718,7 @@ function api_create_protected_dir($name, $parentDirectory)
* @param array data file (path and filename)
* @param bool True for attaching a embedded file inside content html (optional)
* @param array Additional parameters
* @return returns true if mail was sent
* @return integer true if mail was sent
* @see class.phpmailer.php
*/
function api_mail_html(

@ -18,6 +18,7 @@ class View
/**
* Constructor, init tool path for rendering
* @param string tool name (optional)
* @param string $template_path
*/
public function __construct($toolname = '', $template_path=null)
{
@ -50,6 +51,7 @@ class View
/**
* Set layout view sent from a controller
* @param string layout view
* @param string $layout
*/
public function set_layout( $layout )
{
@ -59,6 +61,7 @@ class View
/**
* Set template view sent from a controller
* @param string template view
* @param string $template
*/
public function set_template($template)
{

@ -153,9 +153,13 @@ function getCustomTabs()
}
/**
<<<<<<< HEAD
* Return the active logo of the portal, based on a series of settings
* @param string $theme The name of the theme folder from web/css/themes/
* @return string HTML string with logo as an HTML element
=======
* @param string $theme
>>>>>>> origin/1.10.x
*/
function return_logo($theme)
{
@ -574,11 +578,15 @@ function menuArray()
}
/**
<<<<<<< HEAD
* Return the breadcrumb menu elements as an array of <li> items
* @param array $interbreadcrumb The elements to add to the breadcrumb
* @param string $language_file Deprecated
* @param string $nameTools The name of the current tool (not linked)
* @return string HTML string of <li> items
=======
* @param string $nameTools
>>>>>>> origin/1.10.x
*/
function return_breadcrumb($interbreadcrumb, $language_file, $nameTools)
{

@ -96,9 +96,7 @@ class Blog
/**
* Creates a new blog in the given course
* @author Toon Keppens
* @param int $course_id Id
* @param string $title
* @param Text $description
*/
public static function create_blog($title, $subtitle)
{
@ -185,9 +183,7 @@ class Blog
/**
* Update title and subtitle of a blog in the given course
* @author Toon Keppens
* @param int $course_id Id
* @param string $title
* @param string $description
*/
public static function edit_blog($blog_id, $title, $subtitle)
{
@ -711,7 +707,6 @@ class Blog
/**
* Deletes an assigned task from a blog
* @param Integer $blog_id
* @param Integer $assignment_id
*/
public static function delete_assigned_task($blog_id, $task_id, $user_id)
{
@ -1129,9 +1124,7 @@ class Blog
*
* @param String $type
* @param Integer $blog_id
* @param Integer $item_id
*
*@return String
* @param integer $post_id
*/
public static function display_rating_form ($type, $blog_id, $post_id, $comment_id = NULL)
{
@ -2136,7 +2129,7 @@ class Blog
*
* @param Integer $blog_id
*
* @return Html Form with sortable table with users to unsubcribe from a blog.
* @return false|null Form with sortable table with users to unsubcribe from a blog.
*/
public static function display_form_user_unsubscribe ($blog_id)
{
@ -2257,6 +2250,7 @@ class Blog
* @author Toon Keppens
*
* @param Integer $blog_id
* @param integer $post_id
*/
public static function display_new_comment_form($blog_id, $post_id, $title)
{
@ -2305,10 +2299,8 @@ class Blog
* @author Patrick Cool
* @author Toon Keppens
*
* @param Array $blogitems an array containing all the blog items for the given month
* @param Integer $month: the integer value of the month we are viewing
* @param Integer $year: the 4-digit year indication e.g. 2005
* @param String $monthName: the language variable for the mont name
*
* @return html code
*/
@ -2597,6 +2589,7 @@ class Blog
* @param the blog's id
* @param the post's id
* @param the comment's id
* @param integer $blog_id
* @return array with the post info according the parameters
* @author Julio Montoya Dokeos
* @version avril 2008, dokeos 1.8.5
@ -2638,6 +2631,9 @@ function get_blog_attachment($blog_id, $post_id=null,$comment_id=null)
* @param the blog's id
* @param the post's id
* @param the comment's id
* @param integer $blog_id
* @param integer $post_id
* @param integer $comment_id
* @author Julio Montoya Dokeos
* @version avril 2008, dokeos 1.8.5
*/

@ -158,7 +158,7 @@ class Browser
/**
* Set the name of the browser
* @param $browser string The name of the Browser
* @param string $browser string The name of the Browser
*/
public function setBrowser($browser)
{
@ -266,7 +266,7 @@ class Browser
/**
* Set the browser to be from AOL
* @param $isAol
* @param boolean $isAol
*/
public function setAol($isAol)
{

@ -41,6 +41,7 @@ class Chat extends Model
/**
* Set user chat status
* @param int 0 if disconnected, 1 if connected
* @param integer $status
*
* @return void
*/
@ -164,6 +165,7 @@ class Chat extends Model
/**
* Saves into session the fact that a chat window exists with the given user
* @param int The ID of the user with whom the current user is chatting
* @param integer $user_id
* @return void
*/
public function save_window($user_id)

@ -731,7 +731,7 @@ class CourseManager
* @param int $status (optional) The user's status in the course
* @param int The user category in which this subscription will be classified
*
* @return boolean true if subscription succeeds, boolean false otherwise.
* @return false|string true if subscription succeeds, boolean false otherwise.
* @assert ('', '') === false
*/
public static function add_user_to_course($user_id, $courseCode, $status = STUDENT, $userCourseCategoryId = 0)
@ -803,7 +803,7 @@ class CourseManager
* Checks wether a parameter exists.
* If it doesn't, the function displays an error message.
*
* @return true if parameter is set and not empty, false otherwise
* @return boolean if parameter is set and not empty, false otherwise
* @todo move function to better place, main_api ?
*/
public static function check_parameter($parameter, $error_message)
@ -827,7 +827,7 @@ class CourseManager
}
/**
* @return true if there already are one or more courses
* @return boolean if there already are one or more courses
* with the same code OR visual_code (visualcode), false otherwise
*/
public static function course_code_exists($wanted_course_code)
@ -1010,7 +1010,7 @@ class CourseManager
/**
* @param int $userId
* @param array $courseInfo
* @return bool
* @return boolean|null
*/
public static function isUserSubscribedInCourseAsDrh($userId, $courseInfo)
{
@ -1116,10 +1116,10 @@ class CourseManager
/**
* Is the user a teacher in the given course?
*
* @param $user_id , the id (int) of the user
* @param integer $user_id , the id (int) of the user
* @param $course_code , the course code
*
* @return true if the user is a teacher in the course, false otherwise
* @return boolean if the user is a teacher in the course, false otherwise
*/
public static function is_course_teacher($user_id, $course_code)
{
@ -1148,7 +1148,7 @@ class CourseManager
* @param int the id of the user
* @param int $courseId
* @deprecated linked_courses definition doesn't exists
* @return true if the user is registered in the real course or linked courses, false otherwise
* @return boolean if the user is registered in the real course or linked courses, false otherwise
*/
public static function is_user_subscribed_in_real_or_linked_course($user_id, $courseId, $session_id = '')
{
@ -1219,9 +1219,9 @@ class CourseManager
* @param string $order_by the field to order the users by.
* Valid values are 'lastname', 'firstname', 'username', 'email', 'official_code' OR a part of a SQL statement
* that starts with ORDER BY ...
* @param null $filter_by_status if using the session_id: 0 or 2 (student, coach),
* @param integer|null $filter_by_status if using the session_id: 0 or 2 (student, coach),
* if using session_id = 0 STUDENT or COURSEMANAGER
* @param null $return_count
* @param boolean|null $return_count
* @param bool $add_reports
* @param bool $resumed_report
* @param array $extra_field
@ -2015,7 +2015,7 @@ class CourseManager
* @param int $courseId
* @param string $separator
* @param bool $add_link_to_profile
* @return null|string
* @return string
*/
public static function get_coachs_from_course_to_string(
$session_id = 0,
@ -2088,7 +2088,7 @@ class CourseManager
* Get the list of groups from the course
* @param string $course_code
* @param int $session_id Session ID (optional)
* @param boolean $in_get_empty_group get empty groups (optional)
* @param integer $in_get_empty_group get empty groups (optional)
* @return array List of groups info
*/
public static function get_group_list_of_course($course_code, $session_id = 0, $in_get_empty_group = 0)
@ -2144,6 +2144,7 @@ class CourseManager
* course.
*
* @param string The code of the course to delete
* @param string $code
* @todo When deleting a virtual course: unsubscribe users from that virtual
* course from the groups in the real course if they are not subscribed in
* that real course.
@ -2355,6 +2356,7 @@ class CourseManager
* Sort courses for a specific user ??
* @param int User ID
* @param string Course code
* @param integer $user_id
* @return int Minimum course order
* @todo Review documentation
*/
@ -2432,7 +2434,7 @@ class CourseManager
* check if course exists
* @param string course_code
* @param string whether to accept virtual course codes or not
* @return true if exists, false else
* @return integer if exists, false else
*/
public static function course_exists($course_code, $accept_virtual = false)
{
@ -2451,9 +2453,9 @@ class CourseManager
* Send an email to tutor after the auth-suscription of a student in your course
* @author Carlos Vargas <carlos.vargas@dokeos.com>, Dokeos Latino
* @param int $user_id the id of the user
* @param string $course_code the course code
* @param string $courseId the course code
* @param bool $send_to_tutor_also
* @return string we return the message that is displayed when the action is successful
* @return false|null we return the message that is displayed when the action is successful
*/
public static function email_to_tutor($user_id, $courseId, $send_to_tutor_also = false)
{
@ -2696,6 +2698,7 @@ class CourseManager
/**
* Get emails of tutors to course
* @param string Visual code
* @param integer $courseId
* @return array List of emails of tutors to course
* @author @author Carlos Vargas <carlos.vargas@dokeos.com>, Dokeos Latino
* */
@ -2719,6 +2722,7 @@ class CourseManager
* Get coaches emails by session
* @param int session id
* @param int $courseId
* @param integer $session_id
* @return array array(email => name_tutor) by coach
* @author Carlos Vargas <carlos.vargas@dokeos.com>
*/
@ -2767,7 +2771,9 @@ class CourseManager
* @param string Field's internal variable name
* @param int Field's type
* @param string Field's language var name
* @return int new extra field id
* @param integer $fieldType
* @param string $default
* @return boolean new extra field id
*/
public static function create_course_extra_field($variable, $fieldType, $displayText, $default)
{
@ -2789,7 +2795,7 @@ class CourseManager
* @param int Course id
* @param string Attribute name
* @param string Attribute value
* @return bool True if attribute was successfully updated,
* @return Doctrine\DBAL\Driver\Statement|null True if attribute was successfully updated,
* false if course was not found or attribute name is invalid
*/
public static function update_attribute($id, $name, $value)
@ -2807,7 +2813,7 @@ class CourseManager
*
* @param int Course id
* @param array Associative array with field names as keys and field values as values
* @return bool True if update was successful, false otherwise
* @return Doctrine\DBAL\Driver\Statement|null True if update was successful, false otherwise
*/
public static function update_attributes($id, $attributes)
{
@ -2833,7 +2839,7 @@ class CourseManager
* @param integer Course ID
* @param string Field variable name
* @param string Field value
* @return boolean true if field updated, false otherwise
* @return boolean|null true if field updated, false otherwise
*/
public static function update_course_extra_field_value($course_code, $variable, $value = '')
{
@ -3454,6 +3460,7 @@ class CourseManager
* @uses displayCoursesInCategory() to display the courses themselves
* @param int user id
* @param bool Whether to show the document quick-loader or not
* @param integer $user_id
* @return string
*/
public static function returnCourses($user_id, $load_dirs = false)
@ -4118,6 +4125,8 @@ class CourseManager
* @param int source session id
* @param string destination course code
* @param int destination session id
* @param integer $source_session_id
* @param integer $destination_session_id
* @return bool
*/
public static function copy_course(
@ -4152,6 +4161,7 @@ class CourseManager
* @param int source session id
* @param int destination session id
* @param bool new copied tools (Exercises and LPs)will be set to invisible by default?
* @param string $new_title
*
* @return array
*/
@ -4405,6 +4415,7 @@ class CourseManager
* @param int course id
* @param int session id
* @param id url id
* @param integer $session_id
* @return array
**/
public static function update_course_ranking(
@ -4487,7 +4498,7 @@ class CourseManager
* @param int course id
* @param int session id
* @param int url id (access_url_id)
* @return mixed 'added', 'updated' or 'nothing'
* @return false|string 'added', 'updated' or 'nothing'
*/
public static function add_course_vote($user_id, $vote, $course_id, $session_id = null, $url_id = null)
{
@ -4782,6 +4793,7 @@ class CourseManager
* Get courses count
* @param int Access URL ID (optional)
* @param int $visibility
* @param integer $access_url_id
*
* @return int Number of courses
*/
@ -4838,6 +4850,7 @@ class CourseManager
/**
* Get available le courses count
* @param int Access URL ID (optional)
* @param integer $accessUrlId
* @return int Number of courses
*/
public static function countAvailableCourses($accessUrlId = null)
@ -4882,6 +4895,7 @@ class CourseManager
* @param int User ID
* @param array Course details array
* @param array List of courses to which the user is subscribed (if not provided, will be generated)
* @param integer $uid
* @return mixed 'enter' for a link to go to the course or 'register' for a link to subscribe, or false if no access
*/
static function get_access_link_by_user($uid, $course, $user_courses = array())
@ -4952,7 +4966,7 @@ class CourseManager
* @param bool $deleteTeachersNotInList
* @param bool $editTeacherInSessions
* @param bool $deleteSessionTeacherNotInList
* @return bool
* @return false|null
*/
public static function updateTeachers(
$courseId,

@ -94,8 +94,25 @@ class CourseCategory
$category['nbr_courses'] = 1;
}
<<<<<<< HEAD
return $categories;
}
=======
/**
* @param string $code
* @param string $name
* @param string $canHaveCourses
* @param int $parent_id
*
* @return false|string
*/
function addNode($code, $name, $canHaveCourses, $parent_id)
{
$tbl_category = Database::get_main_table(TABLE_MAIN_CATEGORY);
$code = trim($code);
$name = trim($name);
$parent_id = trim($parent_id);
>>>>>>> origin/1.10.x
/**
* @param string $code
@ -291,7 +308,27 @@ class CourseCategory
WHERE code= '".$row['code']."'";
Database::query($sql);
<<<<<<< HEAD
return true;
=======
/**
* Counts the number of children categories a category has
* @param int $categoryId The ID of the category of which we want to count the children
* @return integer The number of subcategories this category has
*/
function courseCategoryChildrenCount($categoryId)
{
$tbl_category = Database::get_main_table(TABLE_MAIN_CATEGORY);
$categoryId = intval($categoryId);
$count = 0;
if (empty($categoryId)) {
return 0;
}
$sql = "SELECT id, code FROM $tbl_category WHERE parent_id = $categoryId";
$result = Database::query($sql);
while ($row = Database::fetch_array($result)) {
$count += courseCategoryChildrenCount($row['id']);
>>>>>>> origin/1.10.x
}
/**
@ -473,6 +510,7 @@ class CourseCategory
return Database::store_result(Database::query($sql));
}
<<<<<<< HEAD
/**
* @param int $id
*
@ -481,6 +519,17 @@ class CourseCategory
public static function addToUrl($id)
{
UrlManager::addCourseCategoryListToUrl(array($id), array(api_get_current_access_url_id()));
=======
/**
* @param int $id
*
* @return false|null
*/
function addToUrl($id)
{
if (!isMultipleUrlSupport()) {
return false;
>>>>>>> origin/1.10.x
}
/**
@ -918,6 +967,7 @@ class CourseCategory
return Database::store_result($result, 'ASSOC');
}
<<<<<<< HEAD
/**
* @return array
*/
@ -935,6 +985,33 @@ class CourseCategory
'current' => $pageCurrent,
'length' => $pageLength,
);
=======
return $limitFilter;
}
/**
* Get Pagination HTML div
* @param $pageCurrent
* @param $pageLength
* @param integer $pageTotal
* @return string
*/
function getCataloguePagination($pageCurrent, $pageLength, $pageTotal)
{
// Start empty html
$pageDiv = '';
$html='';
$pageBottom = max(1, $pageCurrent - 3);
$pageTop = min($pageTotal, $pageCurrent + 3);
if ($pageBottom > 1) {
$pageDiv .= getPageNumberItem(1, $pageLength);
if ($pageBottom > 2) {
$pageDiv .= getPageNumberItem($pageBottom - 1, $pageLength, null, '...');
}
} else {
// Nothing to do
>>>>>>> origin/1.10.x
}
/**

@ -95,7 +95,7 @@ class CourseDescription
* Get all data by description and session id,
* first you must set session_id property with the object CourseDescription
* @param int $description_type Description type
* @param string $course_code Course code (optional)
* @param string $courseId Course code (optional)
* @param int $session_id Session id (optional)
* @return array List of fields from the descriptions found of the given type
*/

@ -18,7 +18,7 @@ class CourseRequestManager
/**
* Checks whether a given course code has been already occupied.
* @param string $wanted_course_code The code to be checked.
* @return string
* @return boolean
* Returns TRUE if there is created:
* - a course with the same code OR visual_code (visualcode).
* - a course request with the same code as the given one, or
@ -368,7 +368,7 @@ class CourseRequestManager
}
/**
* @param null $status
* @param integer $status
* @return bool
*/
public static function count_course_requests($status = null)
@ -390,7 +390,7 @@ class CourseRequestManager
/**
* Gets all the information about a course request using its database id as an access key.
* @param int/string $id The id (an integer number) of the corresponding database record.
* @param integer $id The id (an integer number) of the corresponding database record.
* @return array/bool Returns the requested data as an array or FALSE on failure.
*/
public static function get_course_request_info($id)

@ -493,6 +493,7 @@ class DashboardManager
* This function update extra user blocks data after closing a dashboard block
* @param int User id
* @param string plugin path
* @param integer $user_id
* @return bool
*/
public static function close_user_block($user_id, $path)

@ -66,7 +66,7 @@ class Database
*
* @param string $table
*
* @return mixed
* @return string
*/
public static function get_main_table($table)
{
@ -272,7 +272,7 @@ class Database
/**
* Frees all the memory associated with the provided result identifier.
* @return bool Returns TRUE on success or FALSE on failure.
* @return boolean|null Returns TRUE on success or FALSE on failure.
* Notes: Use this method if you are concerned about how much memory is being used for queries that return large result sets.
* Anyway, all associated result memory is automatically freed at the end of the script's execution.
*/
@ -388,7 +388,7 @@ class Database
* @param array $attributes
* @param bool $show_query
*
* @return bool|int
* @return false|string
*/
public static function insert($table_name, $attributes, $show_query = false)
{
@ -689,7 +689,7 @@ class Database
}
/**
* @param $table
* @param string $table
* @return \Doctrine\DBAL\Schema\Column[]
*/
public static function listTableColumns($table)

File diff suppressed because it is too large Load Diff

@ -3013,7 +3013,7 @@ class UserManager
self::delete_api_key($id_key['id']);
$num = self::add_api_key($user_id, $api_service);
} elseif ($num == 0) {
$num = self::add_api_key($user_id);
$num = self::add_api_key($user_id, $api_service);
}
return $num;
}

@ -13,7 +13,11 @@
/**
* Variables used from the main/install/index.php
*/
<<<<<<< HEAD
$new_version = '1.11.0';
=======
$new_version = '1.10.6';
>>>>>>> origin/1.10.x
$new_version_status = 'stable';
$new_version_last_id = 0;
$new_version_stable = true;

@ -32,7 +32,7 @@ Feature: Forum tool
Scenario: Reply to forum message
Given I am on "/main/forum/viewthread.php?forum=1&thread=1"
When I follow "reply-to-1"
When I follow "reply-to-post-1"
And I fill in the following:
| post_text | This is a reply to the first message for test |
And I press "SubmitPost"
@ -49,4 +49,4 @@ Feature: Forum tool
# Given I am on "/main/forum/viewthread.php?forum=1&thread=1"
# When I follow "quote-1"
# And I press "SubmitPost"
# Then I should see "The reply has been added"
# Then I should see "The reply has been added"

@ -14,8 +14,8 @@ Feature: Social Group
Scenario: Invite a friend to group
Given I am a platform administrator
And I have a friend named "fbaggins" with id "11"
When I invite to a friend with id "11" to a social group with id "1"
And I have a friend named "fbaggins" with id "12"
When I invite to a friend with id "12" to a social group with id "1"
Then I should see "Invitation sent"
Scenario: Accept an invitation to social group
@ -26,8 +26,8 @@ Feature: Social Group
Scenario: Deny an invitation to social group
Given I am a platform administrator
And I have a friend named "sgamgee" with id "13"
And I invite to a friend with id "13" to a social group with id "1"
And I have a friend named "sgamgee" with id "14"
And I invite to a friend with id "14" to a social group with id "1"
When I am logged as "sgamgee"
And I am on "/main/social/invitations.php"
And I follow "deny-invitation-1"
@ -35,5 +35,5 @@ Feature: Social Group
Scenario: Delete user from group
Given I am a platform administrator
When I try delete a friend with id "11" from the social group with id "1"
When I try delete a friend with id "12" from the social group with id "1"
Then I should see "The user has been deleted"

@ -34,13 +34,14 @@ foreach ($logs as $log) {
if ($showDate) {
echo $log['date']->format('Y-m-d H:i:s').' '.substr($log['sha1'],0,8).PHP_EOL;
}
// Check for messages to ignore...
// Check for Minor importance messages to ignore...
if (strncasecmp($log['message'], 'Minor', 5) === 0) {
//Skip minor messages
continue;
}
if ($log['message'] == 'Update language terms') {
//Skip language update messages
//Skip language update messages (not important)
$langMsg = 'Update language terms';
if (strpos($log['message'], $langMsg) === 0) {
continue;
}
// Look for tasks references

Loading…
Cancel
Save