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

1.9.x
Alex 12 years ago
commit 14c45f5858
  1. 123
      documentation/changelog.html
  2. 2
      index.php
  3. 9
      main/admin/course_intro_pdf_import.php
  4. 4
      main/auth/profile.php
  5. 59
      main/auth/set_temp_password.php
  6. 4
      main/course_home/course_home.php
  7. 13
      main/coursecopy/classes/CourseRestorer.class.php
  8. 6
      main/dropbox/dropbox_functions.inc.php
  9. 84
      main/dropbox/index.php
  10. 32
      main/exercice/exercise.class.php
  11. 17
      main/exercice/export/exercise_import.inc.php
  12. 3
      main/inc/global.inc.php
  13. 2
      main/inc/global_error_message.inc.php
  14. 11
      main/inc/lib/banner.lib.php
  15. 2
      main/inc/lib/fckeditor/myconfig.php
  16. 14
      main/inc/lib/formvalidator/Element/html_editor.php
  17. 33
      main/inc/lib/formvalidator/FormValidator.class.php
  18. 2
      main/inc/lib/login.lib.php
  19. 2
      main/inc/lib/main_api.lib.php
  20. 29
      main/inc/lib/plugin.class.php
  21. 224
      main/inc/lib/sessionmanager.lib.php
  22. 2
      main/inc/lib/social.lib.php
  23. 2
      main/inc/lib/template.lib.php
  24. 33
      main/inc/local.inc.php
  25. 3
      main/install/index.php
  26. 2
      main/install/install.lib.php
  27. 1
      main/lang/arabic/trad4all.inc.php
  28. 1
      main/lang/arabic/userInfo.inc.php
  29. 1
      main/lang/basque/trad4all.inc.php
  30. 1
      main/lang/basque/userInfo.inc.php
  31. 1
      main/lang/brazilian/trad4all.inc.php
  32. 1
      main/lang/brazilian/userInfo.inc.php
  33. 12
      main/lang/catalan/trad4all.inc.php
  34. 1
      main/lang/catalan/userInfo.inc.php
  35. 1
      main/lang/dutch/trad4all.inc.php
  36. 1
      main/lang/dutch/userInfo.inc.php
  37. 4
      main/lang/english/trad4all.inc.php
  38. 1
      main/lang/english/userInfo.inc.php
  39. 1
      main/lang/french/trad4all.inc.php
  40. 1
      main/lang/french/userInfo.inc.php
  41. 1
      main/lang/galician/trad4all.inc.php
  42. 1
      main/lang/galician/userInfo.inc.php
  43. 1
      main/lang/german/trad4all.inc.php
  44. 1
      main/lang/german/userInfo.inc.php
  45. 1
      main/lang/greek/trad4all.inc.php
  46. 1
      main/lang/greek/userInfo.inc.php
  47. 1
      main/lang/italian/trad4all.inc.php
  48. 1
      main/lang/italian/userInfo.inc.php
  49. 1
      main/lang/japanese/trad4all.inc.php
  50. 1
      main/lang/japanese/userInfo.inc.php
  51. 1
      main/lang/latvian/trad4all.inc.php
  52. 1
      main/lang/latvian/userInfo.inc.php
  53. 1
      main/lang/persian/trad4all.inc.php
  54. 1
      main/lang/persian/userInfo.inc.php
  55. 1
      main/lang/polish/trad4all.inc.php
  56. 1
      main/lang/polish/userInfo.inc.php
  57. 91
      main/lang/portuguese/trad4all.inc.php
  58. 1
      main/lang/portuguese/userInfo.inc.php
  59. 2
      main/lang/slovak/trad4all.inc.php
  60. 1
      main/lang/slovak/userInfo.inc.php
  61. 7
      main/lang/slovenian/trad4all.inc.php
  62. 1
      main/lang/slovenian/userInfo.inc.php
  63. 1
      main/lang/spanish/trad4all.inc.php
  64. 1
      main/lang/spanish/userInfo.inc.php
  65. 1
      main/lang/spanish_latin/trad4all.inc.php
  66. 1
      main/lang/swedish/trad4all.inc.php
  67. 1
      main/lang/swedish/userInfo.inc.php
  68. 3
      main/mySpace/access_details.php
  69. 12
      main/mySpace/course.php
  70. 10
      main/newscorm/learnpath.class.php
  71. 41
      main/newscorm/lp_controller.php
  72. 44
      main/newscorm/lp_view.php
  73. 13
      main/survey/fillsurvey.php
  74. 6
      main/survey/preview.php
  75. 4
      main/template/default/auth/set_temp_password.tpl
  76. 2
      plugin/bbb/lib/bbb.lib.php
  77. 2
      plugin/bbb/listing.php
  78. 10
      plugin/ticket/database.php
  79. 115
      plugin/ticket/lang/english.php
  80. 115
      plugin/ticket/lang/french.php
  81. 18
      plugin/ticket/src/assign_tickets.php
  82. 7
      plugin/ticket/src/download.php
  83. 1
      plugin/ticket/src/index.php
  84. 76
      plugin/ticket/src/myticket.php
  85. 82
      plugin/ticket/src/new_ticket.php
  86. 75
      plugin/ticket/src/report.php
  87. 47
      plugin/ticket/src/send_ticket.php
  88. 523
      plugin/ticket/src/ticket.class.php
  89. 5
      plugin/ticket/src/ticket_assign_log.php
  90. 61
      plugin/ticket/src/ticket_details.php
  91. 21
      plugin/ticket/src/ticket_plugin.class.php
  92. 32
      plugin/ticket/src/tutor.php
  93. 20
      plugin/ticket/src/tutor_report.lib.php

@ -20,23 +20,23 @@
<ul class="nav">
<li><a href="index.html">Home</a></li>
<li ><a href="readme.html">About</a></li>
<li ><a href="license.html">License</a></li>
<li><a href="credits.html">Credits</a></li>
<li><a href="dependencies.html">Dependencies</a></li>
<li ><a href="license.html">License</a></li>
<li><a href="credits.html">Credits</a></li>
<li><a href="dependencies.html">Dependencies</a></li>
<li class="active"><a href="changelog.html">Changelog</a></li>
</ul>
</ul>
</div><!--/.nav-collapse -->
</div>
</div>
</div>
</div>
<div class="container">
<ul class="breadcrumb">
<li>
<a href="index.html">Documentation</a>
<span class="divider">/</span>
</li>
</li>
<li>Changelog</li>
</ul>
<h1>Chamilo&nbsp;Changelog</h1>
@ -286,7 +286,8 @@ standards (but still much less than Firefox, Chrome, Opera or even Safari)</p>
</ul>
<h3>Removals</h3>
<ul>
<li>Custom tabs can no longer be defined directly in the settings_current table. If you have custom_tabs in this table (select * from settings_current where variable='show_tabs' AND subkey like 'custom_tab_%'), please add them through the hompeage edition screen.</li>
<li>Custom tabs can no longer be defined directly in the settings_current table.
If you have custom_tabs in this table (select * from settings_current where variable='show_tabs' AND subkey like 'custom_tab_%'), please add them through the homepage edition screen.</li>
</ul>
<h1>Chamilo 1.9.6 - Rochefort, 4th of June, 2013</h1>
@ -433,7 +434,7 @@ standards (but still much less than Firefox, Chrome, Opera or even Safari)</p>
<p>Chamilo 1.9.4 is a minor stable version with a series of improvements on top of 1.9.2.</p>
<h3>Release name</h3>
<p><a href="http://es.wikipedia.org/wiki/Puebla">Puebla</a> is a large city very close to México D.F. and is considered an "extension" of the capital city in many ways. Puebla has very nice blend of precolombine and spaniard architecture. All in all, we felt like Puebla, in tremendous growth, was a close image to Chamilo 1.9 on its way to 1.10.
<p><a href="http://es.wikipedia.org/wiki/Puebla">Puebla</a> is a large city very close to México D.F. and is considered an "extension" of the capital city in many ways. Puebla has very nice blend of precolombine and spaniard architecture. All in all, we felt like Puebla, in tremendous growth, was a close image to Chamilo 1.9 on its way to 1.10.
<h3>New Features</h3>
<ul>
@ -524,7 +525,7 @@ standards (but still much less than Firefox, Chrome, Opera or even Safari)</p>
<li>Web services: Added examples for users registration web services (commit:21137)</li>
<li>Plugins: Improved translation of BigBlueButton plugin (BT#5272)</li>
<li>Web services: Added check on emptiness of firstname/lastname in WSUserEdit* services (BT#5743)</li>
<li>Admin: Avoid not sending mails if notification extra fields do not exist (BT#5739)</li>
<li>Admin: Avoid not sending mails if notification extra fields do not exist (BT#5739)</li>
</ul>
<h3>Debugging</h3>
<ul>
@ -696,7 +697,7 @@ standards (but still much less than Firefox, Chrome, Opera or even Safari)</p>
<li>Added session-box-text and session-item elements to improve styling</li>
<li>Modified #main_content to #top_main_content to avoid double #main_content id on the same page</li>
</ul>
<h1>Chamilo 1.9.2 - Hanga Roa, 27th of September, 2012</h1>
@ -876,7 +877,7 @@ This version of Chamilo includes a few new features.
<li>Admin: The new "System" block was added in administration</li>
<li>Admin: A new option was added to delete files in /archive (only for the super administrator can access it)</li>
<li>Admin: When disabling the gradebook tool, no more reference appear to the gradebook in other tools (#5034)</li>
<li>Admin: The hide tool options now blocks the access to the tool. See BT#4138</li>
<li>Admin: The hide tool options now blocks the access to the tool. See BT#4138</li>
<li>Admin: Removed $_configuration['tracking_enabled'] (#2808)</li>
<li>Agenda: Invalid dates were removed in time selector (#1197)</li>
<li>Agenda: The personal agenda is now enabled by default (#3828)</li>
@ -938,7 +939,7 @@ This version of Chamilo includes a few new features.
<ul>
<li>Admin: Fixed bug by which a session could be added in two distinct URLs at the same time (#3733)</li>
<li>Admin: Data filler: several fixes added (developers only)</li>
<li>Admin: The setting "Hide course tools" was changed: Check the tools you want to hide from teachers. This will prohibit access to the tool instead of just hiding the tools.</li>
<li>Admin: The setting "Hide course tools" was changed: Check the tools you want to hide from teachers. This will prohibit access to the tool instead of just hiding the tools.</li>
<li>Admin: if the forums tool is hidden on the course, should not be displayed in the social network, also in a blog (#1959)</li>
<li>Admin: Settings: Registration Page (#3681)</li>
<li>Admin: Warn about failure to create backup (#3729)</li>
@ -1283,7 +1284,7 @@ Due to the move to HTML5, it is very likely that any older stylesheet will have
<h3>Third-Party Libraries additions/updates</h3>
<ul>
<li>Fullcalendar js library version 1.5.2</li>
<li>Fullcalendar js library version 1.5.2</li>
<li>Twig Template system added</li>
<li>Twitter Bootstrap CSS Framework</li>
<li>More libraries were added but haven't been properly registered at this time...</li>
@ -1332,13 +1333,13 @@ This version of Chamilo only includes a few minor new features:
<li>Certificates: QR code generation for certifications #3631</li>
<li>New landing page for every exercise created, now we show the student's results see BT#2804 </li>
<li>Attendances and Course Progress added in the backup/copy course Chamilo creation</li>
</ul>
<h3>Debugging</h3>
<ul>
<li>
Agenda
<ul>
<ul>
<li>Improving UI + fixes in previews</li>
<li>Import ICS with multiple events #3622</li>
<li>Now we can create an event with only a start date</li>
@ -1348,7 +1349,7 @@ This version of Chamilo only includes a few minor new features:
</li>
<li>
Announcements
<ul>
<ul>
<li>Fixing announcements listing BT#2751 </li>
<li>New slider added in the index.php see #3785</li>
</ul>
@ -1358,15 +1359,15 @@ This version of Chamilo only includes a few minor new features:
<ul>
<li>Made assignments editable/removable by students only until they have been reviewed and scored (&#062; 0) by the teacher (changeset bc1b8e1e603d)</li>
<li>Teachers can changed the score even if the assignment is already passed.</li>
<li>Fixed wrong date convertions </li>
<li>Fixed wrong date convertions </li>
</ul>
</li>
<li>
Attendances
<ul>
<ul>
<li>Improving UI</li>
<li>Fixed bug when clicking in the "Today" filter. Filter is set to "All" by default BT#2663</li>
<li>Adding shortcuts in order to edit or create Attendances plans</li>
<li>Adding shortcuts in order to edit or create Attendances plans</li>
</ul>
</li>
<li>Documents
@ -1374,11 +1375,11 @@ This version of Chamilo only includes a few minor new features:
  <li>"Document preview" bug fixed when using a course in Dutch (yoxview bad translate file) (changeset e205fe6d94fe)</li>
  <li>Bug fixed when using glossary terms in a document #3620</li>
  <li>Bug fixed when reading MP3 files using the jplayer plugin #3593</li>
  <li>Bug fixed when hiding a course document in a session </li>
  <li>Bug fixed when hiding a course document in a session </li>
  <li>Bug fixed when using the simple upload form</li>
  <li>Improved documents visibility now we check the parents visibility</li>
</ul>
</li>
</li>
 <li>Exercises
<ul>
 <li>Fixed question matching when using French/Spanish accents </li>
@ -1391,9 +1392,9 @@ This version of Chamilo only includes a few minor new features:
<li>Gradebook
<ul>
<li>Several fixes including, better session integration and some warning messages added when total score is not correct </li>
<li>Adding 2 new tags in the certification: course title and gradebook result </li>
<li>Adding 2 new tags in the certification: course title and gradebook result </li>
</ul>
</li>
</li>
<li>Glossary
<ul>
<li>Order arrows are removed #3123 </li>
@ -1402,7 +1403,7 @@ This version of Chamilo only includes a few minor new features:
<li>Fixed wrong date convertions </li>
</ul>
</li>
<li>Learning path
<ul>
<li>Drag and drop to order LP items! #3741</li>
@ -1410,21 +1411,21 @@ This version of Chamilo only includes a few minor new features:
<li>Fatal error fixed when editing item prerequisites when the videoconference is enabled #3658 </li>
<li>When creating documents inside the LP tool, a new folder with the LP name is created inside the Learning Path folder</li>
</ul>
</li>
</li>
<li>Links
<ul>
<li>URL fixed when adding the link in the course homepage BT#2751</li>
<li>Token support added #2477</li>
<li>Token support added #2477</li>
</ul>
</li>
</li>
<li>Migration
<ul>
<li>Fixed fatal error in upgrade from 1.8.5 by requiring image.lib.php - BT#2777</li>
<li>Fixed fatal error in upgrade from 1.8.6.2 by checking the availability of the DateTimeZone library in PHP - BT#2777</li>
</ul>
</li>
<li>Portal administration
<ul>
<li>System information fixed #3552</li>
@ -1434,15 +1435,15 @@ This version of Chamilo only includes a few minor new features:
<li>New way to generate usernames when importing users using CSV or XML file </li>
<li>Activities stats date fixed</li>
<li>When uploading users using a CSV/XML file, the username is generated using the first letter of the first name and the lastname #3686 </li>
<li>Now we can clean the chamilo/archive folder from the Portal Administration to make free space #3748</li>
<li>Catalan and Dutch translations updated</li>
<li>Now we can clean the chamilo/archive folder from the Portal Administration to make free space #3748</li>
<li>Catalan and Dutch translations updated</li>
</ul>
</li>
<li>User portal/ My courses
<ul>
<ul>
<li>Improving Course Catalog load time </li>
<li>Course catalog view is random by default</li>
<li>Courses order feature (creation of categories of courses by user) was moved from the Course Catalog to an independent window</li>
<li>Courses order feature (creation of categories of courses by user) was moved from the Course Catalog to an independent window</li>
</ul>
</li>
<li>Sessions
@ -1450,7 +1451,7 @@ This version of Chamilo only includes a few minor new features:
<li>A Session doesn't exist in 2 URLs at the same time #3733 </li>
<li>New session page UI fixes</li>
</ul>
</li>
</li>
<li>Social Network / Groups
<ul>
<li>Reply counter fixed in group topics and improving UI</li>
@ -1462,19 +1463,19 @@ This version of Chamilo only includes a few minor new features:
<li>Adding user extra fields in CSV/XLS exports #1647</li>
</ul>
</li>
<li>System
<ul>
<li>Fixed possible bug with magic_quotes_gpc #2970</li>
</ul>
</li>
<li>Style changes
<ul>
<li>Fixed who is online user images (changeset 61945685bcff)</li>
<li>Fixed who is online user images (changeset 61945685bcff)</li>
<li>CSS styles: fix.css and fix_chamilo.css were deleted, there are only base.css and base_chamilo.css calls are added directly in the CSS file</li>
<li>All CSS were reduced and improved in order to use the base.css and base_chamilo.css styles</li>
<li>New breadcrumb added to old styles (blue, academic, etc)</li>
<li>All CSS were reduced and improved in order to use the base.css and base_chamilo.css styles</li>
<li>New breadcrumb added to old styles (blue, academic, etc)</li>
</ul>
</li>
</ul>
@ -1491,11 +1492,11 @@ This version of Chamilo only includes a few minor new features:
</ul>
<h3>Third-Party Libraries updates</h3>
<ul>
<ul>
<li>Chozen library added (select tag improved) #3740</li>
<li>Jquery updated to version 1.6.2</li>
<li>Jquery-ui updated from version 1.8.7 to 1.8.16</li>
<li>bxslider library added to view Announcements</li>
<li>bxslider library added to view Announcements</li>
</ul>
<h1>Chamilo 1.8.8.2 - Bellavista, May 2011</h1>
@ -1531,10 +1532,10 @@ This version of Chamilo only includes a few minor new features:
</ul>
<h3>Known issues</h3>
<ul>
<li>Groups (admin only): When a user is subscribed in a Course through a Group and he's also subscribed in the same Course (tradional way), when removing the user from the Group, the user will be also removed from the Course in both levels.</li>
<li>Groups (admin only): When a user is subscribed in a Course through a Group and he's also subscribed in the same Course (traditional way), when removing the user from the Group, the user will be also removed from the Course in both levels.</li>
<li>Changed "givenname" for "cn" in LDAP queries. This might break some of the previous implementations of this plugin</li>
<li>If you used split users directories before v1.8.8 in combination with the "My files" feature (if it existed at all at that point), you will probably have a problem now, as the code in the previous version was wrong and was saving the personal portfolio file in another directory than the user's. Sorry about that. If you need professional assistance, see the http://www.chamilo.org/ website under support -> professional support for official providers who could help you. And don't forget to keep a backup. If you don't understand a thing about what I'm talking about, you are probable not concerned by this bug, so don't worry too much.</li>
<li>Document tool: when moving an HTML file using the "move" funcionality, images, videos and any incrusted file in that HTML will not be moved automatically see #1278 </li>
<li>Document tool: when moving an HTML file using the "move" functionality, images, videos and any incrusted file in that HTML will not be moved automatically see #1278 </li>
</ul>
<h3>Deprecated features</h3>
@ -1559,7 +1560,7 @@ This version of Chamilo only includes a few minor new features:
<h1>Chamilo 1.8.8 - Miraflores, May 2011</h1>
<h3>Release notes - summary</h3>
<p>Chamilo 1.8.8 is a major stable version. Altough it doesn't come with a strong redesign, it provides a large number of small improvements to the teacher's toolset and the user's using pleasure. Audio recording, schema drawing, certification generating, better administration features, plugin for videoconference with BigBlueButton and e-commerce with PrestaShop are only a few of the improvements that you will find in this version.</p>
<p>Chamilo 1.8.8 is a major stable version. Although it doesn't come with a strong redesign, it provides a large number of small improvements to the teacher's toolset and the user's using pleasure. Audio recording, schema drawing, certification generating, better administration features, plugin for videoconference with BigBlueButton and e-commerce with PrestaShop are only a few of the improvements that you will find in this version.</p>
<h3>New Features</h3>
<ul>
@ -1591,7 +1592,7 @@ This version of Chamilo only includes a few minor new features:
<li>Increased control by platform administrator on the visibility of the folders in the documents tool (Feature #2164,#2484)</li>
<li>Added admin feature to hide tools from all courses - BT#1942</li>
<li>Added jqgrid library for better data tables interactivity (Feature #340)</li>
<li>Added careers and promotions funcionality (see #2706)</li>
<li>Added careers and promotions functionality (see #2706)</li>
<li>Session start and end date can be left blank (see BT#1911)</li>
<li>Exercises: Questions list improved through new drag and drop behaviour</li>
<li>New Session page added when clicking the session name in the Course list</li>
@ -1606,9 +1607,9 @@ This version of Chamilo only includes a few minor new features:
<li>Exercises: Hotspot Delineation and Hotspot Direct Feedback option added see #2974</li>
<li>Documents: Added multiple uploads and drag&drop upload features #2784 </li>
<li>Webservices: Added new functions in order to sell Chamilo courses using a Prestashop plugin see BT#2325 </li>
<li>Learning path: Adding a toogle button in order to hide the navigation menu see #3116 added by Alberto Torreblanca</li>
<li>Learning path: Adding a toggle button in order to hide the navigation menu see #3116 added by Alberto Torreblanca</li>
<li>Document: Export an html file into a PDF document #1909</li>
<li>Access details: Now we can filter the access details of a user by date 3258# First version developved by Jorge Frisancho Jibaja - USIL</li>
<li>Access details: Now we can filter the access details of a user by date 3258# First version developved by Jorge Frisancho Jibaja - USIL</li>
<li>Integrated Nanogong voice recording tool. Teachers, students (into his/her user folder) and groups can record their voice and send to document tool(Feature #3257)</li>
<li>Added text-justify icon in online editor (#2928)</li>
<li>Upgraded to HTMPurifier 4.2.0 for better security protection (#2972)</li>
@ -1631,11 +1632,11 @@ This version of Chamilo only includes a few minor new features:
<li>Announcements: UI improvements</li>
<li>Attendance: Adding sticky header for the attendance sheet</li>
<li>Exercises: UI improvements</li>
<li>Exercises: Now we show the firstname and lastname of the students in different columns see BT#1263</li>
<li>Exercises: Now we show the first name and last name of the students in different columns see BT#1263</li>
<li>Exercises: Support UTC dates for time control and Exercise time limits see #2075</li>
<li>Exercises: Allowing duplication of exercise within a session BT#1647</li>
<li>Exercises: Improving pagination when browsing exercise results (private task BT#1901)</li>
<li>Exercises: Question Pool improvements: now we can copy a question from other courses see BT#1917</li>
<li>Exercises: Question Pool improvements: now we can copy a question from other courses see BT#1917</li>
<li>Learning Path: New mini floating panel, left-closing panel and other minor UI improvements</li>
<li>Profile: UI improvements</li>
<li>Installation: Tracking is always enabled from now on #2066</li>
@ -1656,7 +1657,7 @@ This version of Chamilo only includes a few minor new features:
<li>Improve group homepage (#2077)</li>
<li>Added support for global announcement by URL (#1763)</li>
</li>
</ul>
<h3>Debugging</h3>
<ul>
@ -1712,7 +1713,7 @@ This version of Chamilo only includes a few minor new features:
<li>Thickbox does not work well in the Social Tool #1995</li>
<li>Fixed Chamilo social-content-right #2010</li>
<li>Fixed screen when you try to access a protected course through the url #2026</li>
<li>Fixed bug deleting course teacher in admin edition #2109</li>
<li>Fixed bug deleting course teacher in admin edition #2109</li>
<li>Gradebook: Hiding print icon in Certificates BT#1650</li>
<li>Link Tool: IE icons replaced</li>
<li>Wiki: Fixed sessions #1659</li>
@ -1735,7 +1736,7 @@ This version of Chamilo only includes a few minor new features:
<li>Fixed bug with split user directories and personal files (Bug #2239)</li>
<li>Fixed bug in link to course from courses list when code != from category</li>
<li>Fixed bug with unregistered directories in documents when copying course to other course (Bug #3059)</li>
<li>Fixed positionning on last element of subsection in learnpath building (BT#2333)</li>
<li>Fixed positioning on last element of subsection in learnpath building (BT#2333)</li>
<li>Fixed bug by which tracking in courses could only be exported up to 50 rows at a time as for the HTML page limit (BT#2342)</li>
<li>Reviewed coding conventions and applied fixed to undefined variables to avoid notice-level messages</li>
<li>Removed a series of "File not found" errors caused by mistaken references</li>
@ -1772,8 +1773,8 @@ This version of Chamilo only includes a few minor new features:
<li>Groups (admin only): When a user is subscribed in a Course through a Group and he's also subscribed in the same Course (tradional way), when removing the user from the Group, the user will be also removed from the Course in both levels.</li>
<li>Changed "givenname" for "cn" in LDAP queries. This might break some of the previous implementations of this plugin</li>
<li>If you used split users directories before v1.8.8 in combination with the "My files" feature (if it existed at all at that point), you will probably have a problem now, as the code in the previous version was wrong and was saving the personal portfolio file in another directory than the user's. Sorry about that. If you need professional assistance, see the http://www.chamilo.org/ website under support -> professional support for official providers who could help you. And don't forget to keep a backup. If you don't understand a thing about what I'm talking about, you are probable not concerned by this bug, so don't worry too much.</li>
<li>For some reason, we have been reported unsuccessful migrations from 1.8.7 to 1.8.7.1 whereby the course_rel_user table was not integrally copied. We recommend keeping your database backup until you're sure every student/course relationship was copied (comparing the lines in the table before and after migration might help you)</li>
<li>Document tool: when moving an HTML file using the "move" funcionality, images, videos and any incrusted file in that HTML will not be moved automatically see #1278 </li>
<li>For some reason, we have been reported unsuccessful migrations from 1.8.7 to 1.8.7.1 whereby the course_rel_user table was not integrally copied. We recommend keeping your database backup until you're sure every student/course relationship was copied (comparing the lines in the table before and after migration might help you)</li>
<li>Document tool: when moving an HTML file using the "move" functionality, images, videos and any incrusted file in that HTML will not be moved automatically see #1278 </li>
<li>Hotpotatoes: When taking a Hotpotato exam added to Chamilo there is a javascript error, this bug can be only reproduced using Google Chrome see #3332</li>
</ul>
@ -1789,7 +1790,7 @@ If you feel like a feature listed here is of major importance to you, you can
either take the maintenance of this feature officially in charge by contacting
us at info@chamilo.org or you can hire the services of one of our official
providers (see our website, <i>Support</i> tab).
</p>
</p>
<ul>
<li>Legacy classes - There is now new code to combine classes with the
sessions feature or with the courses in a cleaner, more efficient way. We
@ -1808,7 +1809,7 @@ providers (see our website, <i>Support</i> tab).
</ul>
<h3>CSS changes</h3>
<ul>
<ul>
<li>CSS factorization - putting all common CSS to main/css/base.css see #3163</li>
<li>CSS factorization - putting all common CSS classic styles into main/css/base_classic.css see #3163</li>
<li>CSS factorization - putting all common CSS chamilo_XXX styles into main/css/base_chamilo.css see #3163</li>
@ -1816,11 +1817,7 @@ providers (see our website, <i>Support</i> tab).
<li>Thickbox UI was changed to improved usability</li>
</ul>
<h1>Chamilo 1.8.7.1 - Palmas</h1>
<h3>New Features</h3>
<ul>
<li>Ajax File Manager updated to 1.0 RC5 (Feature #247)</li>
@ -1843,7 +1840,7 @@ providers (see our website, <i>Support</i> tab).
<li>General visual improvements in gradebook tool (Feature #1740)</li>
<li>General code improvements in gradebook (Feature #1742)</li>
<li>Now displaying images uploaded by users in courses inside their social profile (Feature #1750)</li>
<li>Added simple social network link featurei (LinkedIn, Twitter, Facebook, ...) (Feature #1764)</li>
<li>Added simple social network link feature (LinkedIn, Twitter, Facebook, ...) (Feature #1764)</li>
<li>Enabled PDF export for HTML documents in documents tool (Feature #1768)</li>
<li>Changed Mr. Chamilo picture in course introduction for the Chamilo logo (more professional) (Feature #1778)</li>
</ul>
@ -2001,7 +1998,7 @@ providers (see our website, <i>Support</i> tab).
<li>When installing the platform will be active by default the following options: Allow edit tutors in the courses of the sessions, social network and sending messages</li>
<li>When you add an answer in Multiple choice or Multiple answers the score default is zero </li>
<li>Portal news UI improvements</li>
<li>User portal page UI improvements</li>
<li>User portal page UI improvements</li>
</ul>
<h3>Known issues</h3>
<ul>

@ -10,7 +10,7 @@ use \ChamiloSession as Session;
define('CHAMILO_HOMEPAGE', true);
$language_file = array('courses', 'index');
$language_file = array('courses', 'index', 'userInfo');
/* Flag forcing the 'current course' reset, as we're not inside a course anymore. */
// Maybe we should change this into an api function? an example: CourseManager::unset();

@ -41,7 +41,7 @@ if ($_POST['formSent']) {
} else {
$errors = import_pdfs($courses, $subDir);
if (count($errors) == 0) {
save_data($courses);
error_log('Course intros imported successfully in '.__FILE__.', line '.__LINE__);
}
}
}
@ -54,6 +54,8 @@ if (count($errors) != 0) {
}
$error_message .= '</ul>';
Display :: display_normal_message($error_message, false);
} elseif ($_POST['formSent']) {
Display :: display_confirmation_message('CourseIntroductionsAllImportesSuccessfully', false);
}
?>
<form method="post" action="<?php echo api_get_self(); ?>" enctype="multipart/form-data" style="margin: 0px;">
@ -108,6 +110,7 @@ function import_pdfs($file, $subDir = '/') {
require_once api_get_path(LIBRARY_PATH).'app_view.php';
require_once '../course_description/course_description_controller.php';
$list = scandir($baseDir.$uploadPath);
$i = 0;
foreach ($list as $file) {
if (substr($file,0,1) == '.' or !is_file($baseDir.$uploadPath.$file)) {
continue;
@ -149,6 +152,10 @@ function import_pdfs($file, $subDir = '/') {
error_log($parts[0].' is not a course, apparently');
$errors[] = array('Line' => 0, 'Code' => $parts[0], 'Title' => $parts[0].' - '.get_lang('CodeDoesNotExists'));
}
$i++; //found at least one entry that is not a dir or a .
}
if ($i == 0) {
$errors[] = array('Line' => 0, 'Code' => '.', 'Title' => get_lang('NoPDFFoundAtRoot'));
}
return $errors;
}

@ -639,10 +639,10 @@ if ($form->validate()) {
if (array_key_exists('name', $value)) {
$value['name'] = Security::filter_filename($value['name']);
}
UserManager::update_extra_field_value($user_id, substr($key, 6), $value);
UserManager::update_extra_field_value($user_id, $key, $value);
}
} else {
UserManager::update_extra_field_value($user_id, substr($key, 6), $value);
UserManager::update_extra_field_value($user_id, $key, $value);
}
}
}

@ -0,0 +1,59 @@
<?php
/* For license terms, see /license.txt */
/**
* This page aims at requesting a password from a user to access a course
* protected by password. If the password matches the course password, we
* store the fact that user can access it during its session
*/
/**
* Initializing context
*/
use \ChamiloSession as Session;
// Language files that need to be included
$language_file = array('courses');
$cidReset = true;
require_once '../inc/global.inc.php';
$this_section = SECTION_COURSES;
$course_id = isset($_GET['course_id']) ? intval($_GET['course_id']) : null;
$session_id = isset($_GET['session_id']) ? intval($_GET['session_id']) : null;
$user_id = api_get_user_id();
/**
* Security check
*/
if (empty($course_id)) {
api_not_allowed();
}
/**
* Code
*/
$course_info = CourseManager::get_course_information_by_id($course_id);
$tpl = new Template(null);
// Build the form
$form = new FormValidator('set_temp_password', 'POST', api_get_self().'?course_id='.$course_id.'&session_id='.$session_id);
$form->addElement('header', get_lang('CourseRequiresPassword'));
$form->addElement('hidden', 'course_id', $course_id);
$form->addElement('hidden', 'session_id', $session_id);
$form->addElement('password', 'course_password', null, get_lang('Password'));
$form->addElement('style_submit_button', null, get_lang('Accept'), 'class="save"');
if ($form->validate()) {
$form_values = $form->exportValues();
if ($form_values['course_password'] === $course_info['registration_code']) {
Session::write('course_password_'.$course_info['real_id'], true);
header('Location: '.api_get_course_url($course_info['code'], $session_id));
exit;
} else {
$tpl->assign('error_message', Display::display_error_message(get_lang('CourseRegistrationCodeIncorrect'), true, true));
}
}
$tpl->assign('form', $form->toHtml());
$content = $tpl->get_template('auth/set_temp_password.tpl');
$tpl->assign('content', $tpl->fetch($content));
$tpl->display_one_col_template();

@ -142,7 +142,9 @@ $is_speacialcourse = CourseManager::is_special_course($course_code);
if ($is_speacialcourse) {
$autoreg = Security::remove_XSS($_GET['autoreg']);
if ($autoreg == 1) {
CourseManager::subscribe_user($user_id, $course_code, $status = STUDENT);
if (CourseManager::subscribe_user($user_id, $course_code, $status = STUDENT)) {
Session::write('is_allowed_in_course', true);
}
}
}
if (isset($_GET['action']) && $_GET['action'] == 'subscribe') {

@ -1786,7 +1786,7 @@ class CourseRestorer
}
/**
* Restore learnpaths
* Restoring learning paths
*/
public function restore_learnpaths($session_id = 0, $respect_base_content = false)
{
@ -1872,13 +1872,14 @@ class CourseRestorer
Database::query($sql);
$new_lp_id = Database::insert_id();
if ($lp->visibility) {
$sql = "INSERT INTO $table_tool SET
c_id = ".$this->destination_course_id.",
name = '".self::DBUTF8escapestring($lp->name)."',
link = 'newscorm/lp_controller.php?action=view&lp_id=$new_lp_id&id_session=$session_id',
image = 'scormbuilder.gif',
visibility = '1',
visibility = '0',
admin = '0',
address = 'squaregrey.gif',
session_id = $session_id
@ -1887,6 +1888,7 @@ class CourseRestorer
}
if ($new_lp_id) {
api_item_property_update(
$this->destination_course_info,
TOOL_LEARNPATH,
@ -1899,7 +1901,8 @@ class CourseRestorer
0,
$session_id
);
//Set the new LP to visible
// Set the new LP to visible
api_item_property_update(
$this->destination_course_info,
TOOL_LEARNPATH,
@ -1988,7 +1991,7 @@ class CourseRestorer
$prerequisite_ids[$new_item_id] = $item['prerequisite'];
}
// updating prerequisites
// Updating prerequisites
foreach ($old_prerequisite as $key=>$my_old_prerequisite) {
if($my_old_prerequisite != ''){
$sql = "UPDATE ".$table_item." SET prerequisite = '".$my_old_prerequisite."'
@ -1997,7 +2000,7 @@ class CourseRestorer
}
}
//updating refs
// Updating refs
foreach ($old_refs as $key=>$my_old_ref) {
if ($my_old_ref != '') {
$sql = "UPDATE ".$table_item." SET ref = '".$my_old_ref."'

@ -80,8 +80,9 @@ function handle_multiple_actions()
}
// STEP 3C: moving
if (strstr($_POST['action'], 'move_')) {
// check move_received_n or move_sent_n command
// check move_received_n or move_sent_n command
if (strstr($_POST['action'], 'received')) {
$part = 'received';
$to_cat_id = str_replace('move_received_', '', $_POST['action']);
@ -90,9 +91,10 @@ function handle_multiple_actions()
$to_cat_id = str_replace('move_sent_', '', $_POST['action']);
}
foreach ($checked_file_ids as $key => $value) {
foreach ($checked_file_ids as $value) {
store_move($value, $to_cat_id, $part);
}
return get_lang('FilesMoved');
}

@ -17,7 +17,6 @@ $view = isset($_GET['view']) ? Security::remove_XSS($_GET['view']) : null;
$viewReceivedCategory = isset($_GET['view_received_category']) ? Security::remove_XSS($_GET['view_received_category']) : null;
$viewSentCategory = isset($_GET['view_sent_category']) ? Security::remove_XSS($_GET['view_sent_category']) : null;
// Do the tracking
event_access_tool(TOOL_DROPBOX);
@ -151,10 +150,14 @@ if (($action == 'deletereceivedcategory' OR $action == 'deletesentcategory') AND
// only the download has is handled separately in dropbox_init_inc.php because this has to be done before the headers are sent
// (which also happens in dropbox_init.inc.php
if (!isset($_POST['feedback']) && (strstr($postAction, 'move_received') OR
$postAction == 'delete_received' OR $postAction == 'download_received' OR
$postAction == 'delete_sent' OR $postAction == 'download_sent')) {
if (!isset($_POST['feedback']) && (
strstr($postAction, 'move_received') OR
strstr($postAction, 'move_sent') OR
$postAction == 'delete_received' OR
$postAction == 'download_received' OR
$postAction == 'delete_sent' OR
$postAction == 'download_sent')
) {
$display_message = handle_multiple_actions();
Display :: display_normal_message($display_message);
}
@ -269,19 +272,15 @@ if ($action != 'add') {
}
}
}
/* THE MENU TABS */
if ($dropbox_cnf['sent_received_tabs']) {
?>
<ul class="nav nav-tabs">
<li <?php if (!$view OR $view == 'sent') { echo 'class="active"'; } ?> >
<a href="index.php?<?php echo api_get_cidreq(); ?>&view=sent" ><?php echo get_lang('SentFiles'); ?></a></li>
<li <?php if ($view == 'received') { echo 'class="active"'; } ?> >
<a href="index.php?<?php echo api_get_cidreq(); ?>&view=received" ><?php echo get_lang('ReceivedFiles'); ?></a></li>
</ul>
<?php
}
@ -345,7 +344,6 @@ if ($action != 'add') {
$column_order[3] = 8;
$column_order[5] = 7;
// The content of the sortable table = the received files
foreach ($dropbox_person -> receivedWork as $dropbox_file) {
$dropbox_file_data = array();
@ -400,11 +398,15 @@ if ($action != 'add') {
// The content of the sortable table = the categories (if we are not in the root)
if ($view_dropbox_category_received == 0) {
foreach ($dropbox_categories as $category) { // Note: This can probably be shortened since the categories for the received files are already in the $dropbox_received_category array;
foreach ($dropbox_categories as $category) {
/* Note: This can probably be shortened since the categories
for the received files are already in the
$dropbox_received_category array;*/
$dropbox_category_data = array();
if ($category['received'] == '1') {
$movelist[$category['cat_id']] = $category['cat_name'];
$dropbox_category_data[] = $category['cat_id']; // This is where the checkbox icon for the files appear
// This is where the checkbox icon for the files appear
$dropbox_category_data[] = $category['cat_id'];
// The icon of the category
$link_open = '<a href="'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.$category['cat_id'].'&amp;view_sent_category='.$viewSentCategory.'&amp;view='.$view.'">';
$dropbox_category_data[] = $link_open.build_document_icon_tag('folder', $category['cat_name']).'</a>';
@ -420,9 +422,14 @@ if ($action != 'add') {
}
}
}
// Displaying the table
$additional_get_parameters = array('view' => $view, 'view_received_category' => $viewReceivedCategory, 'view_sent_category' => $viewSentCategory);
$selectlist = array('delete_received' => get_lang('Delete'), 'download_received' => get_lang('Download'));
$selectlist = array(
'delete_received' => get_lang('Delete'),
'download_received' => get_lang('Download')
);
if (is_array($movelist)) {
foreach ($movelist as $catid => $catname){
$selectlist['move_received_'.$catid] = get_lang('Move') . '->'. Security::remove_XSS($catname);
@ -433,7 +440,17 @@ if ($action != 'add') {
$selectlist = array();
}
Display::display_sortable_config_table('dropbox', $column_header, $dropbox_data_recieved, $sorting_options, $paging_options, $additional_get_parameters, $column_show, $column_order, $selectlist);
Display::display_sortable_config_table(
'dropbox',
$column_header,
$dropbox_data_recieved,
$sorting_options,
$paging_options,
$additional_get_parameters,
$column_show,
$column_order,
$selectlist
);
}
/* SENT FILES */
@ -500,7 +517,7 @@ if ($action != 'add') {
$column_order[5] = 7;
// The content of the sortable table = the received files
foreach ($dropbox_person -> sentWork as $dropbox_file) {
foreach ($dropbox_person->sentWork as $dropbox_file) {
$dropbox_file_data = array();
if ($view_dropbox_category_sent == $dropbox_file->category) {
@ -541,11 +558,16 @@ if ($action != 'add') {
}
}
$moveList = array();
// The content of the sortable table = the categories (if we are not in the root)
if ($view_dropbox_category_sent == 0) {
foreach ($dropbox_categories as $category) {
$dropbox_category_data = array();
if ($category['sent'] == '1') {
$moveList[$category['cat_id']] = $category['cat_name'];
$dropbox_category_data[] = $category['cat_id']; // This is where the checkbox icon for the files appear.
$link_open = '<a href="'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.$viewReceivedCategory.'&amp;view_sent_category='.$category['cat_id'].'&amp;view='.$view.'">';
$dropbox_category_data[] = $link_open.build_document_icon_tag('folder', Security::remove_XSS($category['cat_name'])).'</a>';
@ -565,13 +587,39 @@ if ($action != 'add') {
}
}
}
// Displaying the table
$additional_get_parameters = array('view' => $view, 'view_received_category' => $viewReceivedCategory, 'view_sent_category' => $viewSentCategory);
$selectlist = array('delete_received' => get_lang('Delete'), 'download_received' => get_lang('Download'));
$additional_get_parameters = array(
'view' => $view,
'view_received_category' => $viewReceivedCategory,
'view_sent_category' => $viewSentCategory
);
$selectlist = array(
'delete_received' => get_lang('Delete'),
'download_received' => get_lang('Download')
);
if (!empty($moveList)) {
foreach ($moveList as $catid => $catname) {
$selectlist['move_sent_'.$catid] = get_lang('Move') . '->'. Security::remove_XSS($catname);
}
}
if (api_get_session_id() != 0 && !api_is_allowed_to_session_edit(false, true)) {
$selectlist = array('download_received' => get_lang('Download'));
}
Display::display_sortable_config_table('dropbox', $column_header, $dropbox_data_sent, $sorting_options, $paging_options, $additional_get_parameters, $column_show, $column_order, $selectlist);
Display::display_sortable_config_table(
'dropbox',
$column_header,
$dropbox_data_sent,
$sorting_options,
$paging_options,
$additional_get_parameters,
$column_show,
$column_order,
$selectlist
);
}
}

@ -196,7 +196,10 @@ class Exercise
return false;
}
function getCutTitle()
/**
* @return string
*/
public function getCutTitle()
{
return cut($this->exercise, EXERCISE_MAX_NAME_SIZE);
}
@ -207,7 +210,8 @@ class Exercise
* @author Olivier Brouckaert
* @return int - exercise ID
*/
function selectId() {
public function selectId()
{
return $this->id;
}
@ -217,7 +221,8 @@ class Exercise
* @author Olivier Brouckaert
* @return string - exercise title
*/
function selectTitle() {
public function selectTitle()
{
return $this->exercise;
}
@ -226,7 +231,8 @@ class Exercise
*
* @return int - exercise attempts
*/
function selectAttempts() {
public function selectAttempts()
{
return $this->attempts;
}
@ -234,7 +240,8 @@ class Exercise
* 0=>Feedback , 1=>DirectFeedback, 2=>NoFeedback
* @return int - exercise attempts
*/
function selectFeedbackType() {
public function selectFeedbackType()
{
return $this->feedback_type;
}
@ -261,7 +268,8 @@ class Exercise
* @author Olivier Brouckaert
* @return string - exercise description
*/
function selectSound() {
public function selectSound()
{
return $this->sound;
}
@ -271,7 +279,8 @@ class Exercise
* @author Olivier Brouckaert
* @return integer - exercise type
*/
function selectType() {
public function selectType()
{
return $this->type;
}
@ -279,7 +288,8 @@ class Exercise
* @author hubert borderiou 30-11-11
* @return integer : do we display the question category name for students
*/
function selectDisplayCategoryName() {
public function selectDisplayCategoryName()
{
return $this->display_category_name;
}
@ -353,14 +363,14 @@ class Exercise
}
}
/**
* tells if questions are selected randomly, and if so returns the draws
* Tells if questions are selected randomly, and if so returns the draws
*
* @author Carlos Vargas
* @return integer - results disabled exercise
*/
function selectResultsDisabled() {
public function selectResultsDisabled()
{
return $this->results_disabled;
}

@ -49,7 +49,16 @@ function get_and_unzip_uploaded_exercise($baseWorkDir, $uploadPath)
}
if (preg_match('/.zip$/i', $_FILES['userFile']['name']) &&
handle_uploaded_document($_course, $_FILES['userFile'], $baseWorkDir, $uploadPath, $_user['user_id'], 0, null, 1)
handle_uploaded_document(
$_course,
$_FILES['userFile'],
$baseWorkDir,
$uploadPath,
$_user['user_id'],
0,
null,
1
)
) {
return true;
}
@ -57,7 +66,7 @@ function get_and_unzip_uploaded_exercise($baseWorkDir, $uploadPath)
}
/**
* main function to import an exercise,
* Imports an exercise,
* @param array $file
* @return an array as a backlog of what was really imported, and error or debug messages to display
*/
@ -91,6 +100,7 @@ function import_exercise($file)
//$module_info = array (); //array to store the info we need
// if file is not a .zip, then we cancel all
if (!preg_match('/.zip$/i', $file)) {
Display :: display_error_message(get_lang('You must upload a zip file'));
return false;
@ -110,8 +120,10 @@ function import_exercise($file)
$operation = false;
$result = false;
$filePath = null;
// parse every subdirectory to search xml question files
while (false !== ($file = readdir($exerciseHandle))) {
if (is_dir($baseWorkDir . '/' . $file) && $file != "." && $file != "..") {
// Find each manifest for each question repository found
$questionHandle = opendir($baseWorkDir . '/' . $file);
@ -123,6 +135,7 @@ function import_exercise($file)
}
}
} elseif (preg_match('/.xml$/i', $file)) {
// Else ignore file
$result = parse_file($baseWorkDir, '', $file);
$filePath = $baseWorkDir.'/'.$file;

@ -617,3 +617,6 @@ if (empty($default_quota)) {
$default_quota = 100000000;
}
define('DEFAULT_DOCUMENT_QUOTA', $default_quota);
// Sets the ascii_math plugin see #7134
$_SESSION['ascii_math_loaded'] = false;

@ -50,7 +50,7 @@ $TechnicalIssuesDescription = 'This portal is currently experiencing technical i
if (is_int($global_error_code) && $global_error_code > 0) {
$theme = 'chamilo_red_utp/';
$theme = 'chamilo/';
$css_path = 'main/css/';
$css_file = $css_path.$theme.'default.css';
$bootstrap_file = $css_path.'bootstrap.css';

@ -236,7 +236,7 @@ function return_navigation_array() {
$navigation = array();
$menu_navigation = array();
$possible_tabs = get_tabs();
// Campus Homepage
if (api_get_setting('show_tabs', 'campus_homepage') == 'true') {
$navigation[SECTION_CAMPUS] = $possible_tabs[SECTION_CAMPUS];
@ -330,16 +330,21 @@ function return_navigation_array() {
// Custom tabs
for ($i=1; $i <= 3; $i++) {
if (api_get_setting('show_tabs', 'custom_tab_' . $i) == 'true' && isset($possible_tabs['custom_tab_' . $i])) {
if (api_get_setting('show_tabs', 'custom_tab_' . $i) == 'true' &&
isset($possible_tabs['custom_tab_' . $i])
) {
$possible_tabs['custom_tab_'.$i]['url'] = api_get_path(WEB_PATH).$possible_tabs['custom_tab_'.$i]['url'];
$navigation['custom_tab_'.$i] = $possible_tabs['custom_tab_'.$i];
} else {
if (isset($possible_tabs['custom_tab_'.$i])) {
$possible_tabs['custom_tab_'.$i]['url'] = api_get_path(WEB_PATH).$possible_tabs['custom_tab_' . $i]['url'];
$menu_navigation['custom_tab_' . $i] = $possible_tabs['custom_tab_' . $i];
}
}
}
}
return array('menu_navigation' => $menu_navigation, 'navigation' => $navigation, 'possible_tabs' => $possible_tabs);
}

@ -204,7 +204,7 @@ if ((api_get_setting('enabled_asciisvg') == 'true')) {
if (api_get_setting('include_asciimathml_script') == 'true') {
// The automatic content parsing should be disabled on this case, otherwise content would be damaged.
// The editor does the necessary parsing within its separate iframe.
echo '<script type="text/javascript">var translateOnLoad = false ;</script>';
$config['LoadAsciiMath'] = '<script type="text/javascript">var translateOnLoad = false;</script>';
}
// WIRIS: plugin for inserting mathematical formulas

@ -106,10 +106,20 @@ class HTML_QuickForm_html_editor extends HTML_QuickForm_textarea {
if (!FCKeditor :: IsCompatible()) {
return parent::toHTML();
}
$this->fck_editor->Value = $this->getValue();
$this->fck_editor->Value = $this->getValue();
$result = $this->fck_editor->CreateHtml();
if (isset($this->fck_editor->Config['LoadAsciiMath'])) {
if (isset($_SESSION['ascii_math_loaded']) &&
$_SESSION['ascii_math_loaded'] == false
) {
$result .= $this->fck_editor->Config['LoadAsciiMath'];
$_SESSION['ascii_math_loaded'] = true;
}
}
//Add a link to open the allowed html tags window
//$result .= '<small><a href="#" onclick="MyWindow=window.open('."'".api_get_path(WEB_CODE_PATH)."help/allowed_html_tags.php?fullpage=". ($this->fullPage ? '1' : '0')."','MyWindow','toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,resizable=yes,width=500,height=600,left=200,top=20'".'); return false;">'.get_lang('AllowedHTMLTags').'</a></small>';
return $result;
}
}
}

@ -284,22 +284,22 @@ EOT;
$this->addElement('hidden', $name, $value);
}
function add_textarea($name, $label, $attributes = array())
public function add_textarea($name, $label, $attributes = array())
{
$this->addElement('textarea', $name, $label, $attributes);
}
function add_button($name, $label, $attributes = array())
public function add_button($name, $label, $attributes = array())
{
$this->addElement('button', $name, $label, $attributes);
}
function add_checkbox($name, $label, $trailer = '', $attributes = array())
public function add_checkbox($name, $label, $trailer = '', $attributes = array())
{
$this->addElement('checkbox', $name, $label, $trailer, $attributes);
}
function add_radio($name, $label, $options = '')
public function add_radio($name, $label, $options = '')
{
$group = array();
foreach ($options as $key => $value) {
@ -308,27 +308,27 @@ EOT;
$this->addGroup($group, $name, $label);
}
function add_select($name, $label, $options = '', $attributes = array())
public function add_select($name, $label, $options = '', $attributes = array())
{
$this->addElement('select', $name, $label, $options, $attributes);
}
function add_label($label, $text)
public function add_label($label, $text)
{
$this->addElement('label', $label, $text);
}
function add_header($text)
public function add_header($text)
{
$this->addElement('header', $text);
}
function add_file($name, $label, $attributes = array())
public function add_file($name, $label, $attributes = array())
{
$this->addElement('file', $name, $label, $attributes);
}
function add_html($snippet)
public function add_html($snippet)
{
$this->addElement('html', $snippet);
}
@ -338,6 +338,7 @@ EOT;
* A trim-filter is attached to the field.
* A HTML-filter is attached to the field (cleans HTML)
* A rule is attached to check for unwanted HTML
* @param string $name
* @param string $label The label for the form-element
* @param string $name The element name
* @param boolean $required (optional) Is the form-element required (default=true)
@ -395,13 +396,13 @@ EOT;
}
/**
* Adds a datepickerdate element to the form
* Adds a date picker date element to the form
* A rule is added to check if the date is a valid one
* @param string $label The label for the form-element
* @param string $name The element name
* @deprecated
*/
function add_datepickerdate($name, $label)
public function add_datepickerdate($name, $label)
{
$this->addElement('datepickerdate', $name, $label, array('form_name' => $this->getAttribute('name')));
$this->_elements[$this->_elementIndex[$name]]->setLocalOption('minYear', 1900); // TODO: Now - 9 years
@ -416,7 +417,7 @@ EOT;
* @param string $name The element name
* @deprecated
*/
function add_timewindow($name_1, $name_2, $label_1, $label_2)
public function add_timewindow($name_1, $name_2, $label_1, $label_2)
{
$this->add_datepicker($name_1, $label_1);
$this->add_datepicker($name_2, $label_2);
@ -446,7 +447,7 @@ EOT;
* @param string $label (optional) Custom label to be shown
* submits the form and the start of the progress bar.
*/
function add_progress_bar($delay = 2, $label = '')
public function add_progress_bar($delay = 2, $label = '')
{
if (empty($label)) {
$label = get_lang('PleaseStandBy');
@ -464,7 +465,7 @@ EOT;
* @param int $delay (optional) The frequency of the xajax call
* @param bool $wait_after_upload (optional)
*/
function add_real_progress_bar($upload_id, $element_after, $delay = 2, $wait_after_upload = false)
public function add_real_progress_bar($upload_id, $element_after, $delay = 2, $wait_after_upload = false)
{
if (!function_exists('uploadprogress_get_info')) {
$this->add_progress_bar($delay);
@ -553,14 +554,14 @@ EOT;
*
* @author Patrick Cool <patrick.cool@UGent.be>, Ghent University, august 2006
*/
function return_form()
public function return_form()
{
$error = false;
$addDateLibraries = false;
$dateElementTypes = array('date_range_picker', 'date_time_picker', 'date_picker', 'datepicker', 'datetimepicker');
/** @var HTML_QuickForm_element $element */
foreach ($this->_elements as $element) {
if (in_array($element->getType(),$dateElementTypes)) {
if (in_array($element->getType(), $dateElementTypes)) {
$addDateLibraries = true;
}
if (!is_null(parent::getElementError($element->getName()))) {

@ -472,7 +472,7 @@ class Login
$session_lifetime = 3600; // 1 hour
$course_code = $_course['sysCode'];
$time = api_get_datetime();
$time = api_get_utc_datetime();
if (isset($_user['user_id']) && !empty($_user['user_id'])) {

@ -3927,6 +3927,7 @@ function api_get_themes() {
* @param int $width The width of the form element
* @param string $attributes (optional) attributes for the form element
* @param array $editor_config (optional) Configuration options for the html-editor
* @deprecated
*/
function api_disp_html_area($name, $content = '', $height = '', $width = '100%', $attributes = null, $editor_config = null) {
global $_configuration, $_course, $fck_attribute;
@ -3951,6 +3952,7 @@ function api_disp_html_area($name, $content = '', $height = '', $width = '100%',
* @param int $width The width of the form element
* @param string $attributes (optional) attributes for the form element
* @param array $editor_config (optional) Configuration options for the html-editor
* @deprecated
*/
function api_return_html_area($name, $content = '', $height = '', $width = '100%', $attributes = null, $editor_config = null) {
global $_configuration, $_course, $fck_attribute;

@ -401,7 +401,8 @@ class Plugin
}
$plugin_name = Database::escape_string($plugin_name);
$sql = "DELETE FROM $t_tool WHERE c_id = $courseId AND name = '$plugin_name'";
$sql = "DELETE FROM $t_tool
WHERE c_id = $courseId AND name = '$plugin_name'";
Database::query($sql);
}
@ -462,28 +463,31 @@ class Plugin
* Method to be extended when changing the setting in the course
* configuration should trigger the use of a callback method
* @param array $values sent back from the course configuration script
*
* @return void
*/
public function course_settings_updated($values = array())
{
}
/**
* Add a tab to platform
* @param strings $tabName
* @param string $url
* @param string $tabName
* @param string $url
*
* @return boolean
*/
public function addTab($tabName, $url)
{
$sql = "SELECT *
FROM settings_current
WHERE variable = 'show_tabs'
AND subkey like 'custom_tab_%'";
$sql = "SELECT * FROM settings_current
WHERE
variable = 'show_tabs' AND
subkey like 'custom_tab_%'";
$result = Database::query($sql);
$customTabsNum = Database::num_rows($result);
$tabNum = $customTabsNum + 1;
//Avoid Tab Name Spaces
@ -525,7 +529,7 @@ class Plugin
*/
public function deleteTab($key)
{
$sql = "SELECT *
$sql = "SELECT *
FROM settings_current
WHERE variable = 'show_tabs'
AND subkey <> '$key'
@ -533,7 +537,7 @@ class Plugin
";
$resp = $result = Database::query($sql);
$customTabsNum = Database::num_rows($result);
if (!empty($key)) {
$whereCondition = array(
'variable = ? AND subkey = ?' => array('show_tabs', $key)
@ -541,8 +545,9 @@ class Plugin
$resp = Database::delete('settings_current', $whereCondition);
//if there is more than one tab
//reenumerate them
//re enumerate them
if (!empty($customTabsNum) && $customTabsNum > 0) {
$tabs = Database::store_result($result, 'ASSOC');
$i = 1;
foreach ($tabs as $row) {
$attributes = array(

@ -1,16 +1,16 @@
<?php
/* For licensing terms, see /license.txt */
/**
* Class SessionManager
*
* This is the session library for Chamilo.
* All main sessions functions should be placed here.
* This class provides methods for sessions management.
* Include/require it in your code to use its features.
*
* @package chamilo.library
*/
/**
* Class SessionManager
*
*/
class SessionManager
{
@ -295,7 +295,7 @@ class SessionManager
$access_url_id = api_get_current_access_url_id();
if ($access_url_id != -1) {
$where.= " AND ar.access_url_id = $access_url_id ";
$where.= " AND ar.access_url_id = $access_url_id ";
$sql = "SELECT count(id) as total_rows FROM (
SELECT DISTINCT
@ -354,21 +354,21 @@ class SessionManager
$extraJoin = " INNER JOIN $tbl_session_rel_user sru
ON sru.id_session = s.id ";
}
}
if (api_is_allowed_to_edit() && !api_is_platform_admin()) {
$where.=" AND s.id_coach = $user_id ";
}
$coach_name = " CONCAT(u.lastname , ' ', u.firstname) as coach_name ";
$coach_name = " CONCAT(u.lastname , ' ', u.firstname) as coach_name ";
if (api_is_western_name_order()) {
$coach_name = " CONCAT(u.firstname, ' ', u.lastname) as coach_name ";
}
$options['where'] = str_replace(
array("AND session_active = '1' )", " AND ( session_active = '1' )"), array(') GROUP BY s.name HAVING session_active = 1 ', " GROUP BY s.name HAVING session_active = 1 ")
, $options['where']
array("AND session_active = '1' )", " AND ( session_active = '1' )"), array(') GROUP BY s.name HAVING session_active = 1 ', " GROUP BY s.name HAVING session_active = 1 ")
, $options['where']
);
$options['where'] = str_replace("( session_active = ':' )", '1=1', $options['where']);
@ -419,8 +419,8 @@ class SessionManager
}
if (!empty($options['where'])) {
$where .= ' '.$options['where'];
}
$where .= ' '.$options['where'];
}
$order = null;
if (!empty($options['order'])) {
@ -563,7 +563,7 @@ class SessionManager
}
if (!empty($options['where'])) {
$where .= ' '.$options['where'];
$where .= ' '.$options['where'];
}
$order = null;
@ -676,7 +676,7 @@ class SessionManager
}
if (!empty($options['where'])) {
$where .= ' '.$options['where'];
$where .= ' '.$options['where'];
}
$order = null;
@ -805,7 +805,7 @@ class SessionManager
}
if (!empty($options['where'])) {
$where .= ' '.$options['where'];
$where .= ' '.$options['where'];
}
$order = null;
@ -1171,7 +1171,7 @@ class SessionManager
}
if (!empty($options['where'])) {
$where .= ' '.$options['where'];
$where .= ' '.$options['where'];
}
$order = null;
@ -1235,7 +1235,7 @@ class SessionManager
}
foreach ($return as $key => $info) {
//Search for ip, we do less querys if we iterate the final array
//Search for ip, we do less querys if we iterate the final array
$sql = sprintf("SELECT login_ip FROM $track_e_login WHERE login_user_id = %d AND login_date < '%s' ORDER BY login_date DESC LIMIT 1", $info['user_id'], $info['logindate']); //TODO add select by user too
$result = Database::query($sql);
$ip = Database::fetch_assoc($result);
@ -1308,7 +1308,7 @@ class SessionManager
* The parameter id is a primary key
* */
public static function edit_session(
$id, $name, $year_start, $month_start, $day_start, $year_end, $month_end, $day_end, $nb_days_acess_before, $nb_days_acess_after, $nolimit, $id_coach, $id_session_category, $id_visibility, $start_limit = true, $end_limit = true, $description = null, $showDescription = null
$id, $name, $year_start, $month_start, $day_start, $year_end, $month_end, $day_end, $nb_days_acess_before, $nb_days_acess_after, $nolimit, $id_coach, $id_session_category, $id_visibility, $start_limit = true, $end_limit = true, $description = null, $showDescription = null
)
{
$name = trim(stripslashes($name));
@ -1391,7 +1391,7 @@ class SessionManager
}
$sql = "UPDATE $tbl_session " .
"SET name='" . Database::escape_string($name) . "',
"SET name='" . Database::escape_string($name) . "',
date_start='" . $date_start . "',
date_end='" . $date_end . "',
id_coach='" . $id_coach . "',
@ -1482,7 +1482,7 @@ class SessionManager
* @return bool
*/
public static function suscribe_users_to_session(
$id_session, $user_list, $session_visibility = SESSION_VISIBLE_READ_ONLY, $empty_users = true, $send_email = false
$id_session, $user_list, $session_visibility = SESSION_VISIBLE_READ_ONLY, $empty_users = true, $send_email = false
)
{
@ -1618,7 +1618,7 @@ class SessionManager
* @return bool
*/
public static function subscribe_users_to_session_course(
$user_list, $session_id, $course_code, $session_visibility = SESSION_VISIBLE_READ_ONLY
$user_list, $session_id, $course_code, $session_visibility = SESSION_VISIBLE_READ_ONLY
)
{
$tbl_session_rel_course = Database::get_main_table(TABLE_MAIN_SESSION_COURSE);
@ -1945,7 +1945,7 @@ class SessionManager
return true;
} else {
$sqli = "INSERT INTO $t_sfv (session_id,field_id,field_value,tms) " .
"VALUES ('$session_id'," . $rowsf['id'] . ",'$fvalues',FROM_UNIXTIME($tms))";
"VALUES ('$session_id'," . $rowsf['id'] . ",'$fvalues',FROM_UNIXTIME($tms))";
//error_log('UM::update_extra_field_value: '.$sqli);
$resi = Database::query($sqli);
return($resi ? true : false);
@ -2096,10 +2096,10 @@ class SessionManager
}
if ($date_end <> null) {
$sql = "UPDATE $tbl_session_category SET name = '" . Database::escape_string($name) . "', date_start = '$date_start' " .
", date_end = '$date_end' WHERE id= '" . $id . "' ";
", date_end = '$date_end' WHERE id= '" . $id . "' ";
} else {
$sql = "UPDATE $tbl_session_category SET name = '" . Database::escape_string($name) . "', date_start = '$date_start' " .
", date_end = NULL WHERE id= '" . $id . "' ";
", date_end = NULL WHERE id= '" . $id . "' ";
}
$result = Database::query($sql);
return ($result ? true : false);
@ -2457,18 +2457,18 @@ class SessionManager
return array();
}
/**
* Get sessions followed by human resources manager
* @param int $userId
/**
* Get sessions followed by human resources manager
* @param int $userId
* @param int $start
* @param int $limit
* @param bool $getCount
* @param bool $getOnlySessionId
* @param bool $getSql
* @param string $orderCondition
* @return array sessions
*/
public static function get_sessions_followed_by_drh(
* @return array sessions
*/
public static function get_sessions_followed_by_drh(
$userId,
$start = null,
$limit = null,
@ -2489,7 +2489,7 @@ class SessionManager
$orderCondition,
$keyword
);
}
}
/**
* Get sessions followed by human resources manager
@ -2608,9 +2608,9 @@ class SessionManager
return $sessions;
}
/**
* Gets the list of courses by session filtered by access_url
* @param int $session_id
/**
* Gets the list of courses by session filtered by access_url
* @param int $session_id
* @param string $course_name
* @return array list of courses
*/
@ -2621,8 +2621,8 @@ class SessionManager
$session_id = intval($session_id);
// select the courses
$sql = "SELECT * FROM $tbl_course c
// select the courses
$sql = "SELECT * FROM $tbl_course c
INNER JOIN $tbl_session_rel_course src ON c.code = src.course_code
WHERE src.id_session = '$session_id'";
if (!empty($course_name)) {
@ -2631,16 +2631,99 @@ class SessionManager
}
$sql .= "ORDER BY title;";
$result = Database::query($sql);
$num_rows = Database::num_rows($result);
$courses = array();
if ($num_rows > 0) {
while ($row = Database::fetch_array($result,'ASSOC')) {
$courses[$row['id']] = $row;
}
}
return $courses;
}
$result = Database::query($sql);
$num_rows = Database::num_rows($result);
$courses = array();
if ($num_rows > 0) {
while ($row = Database::fetch_array($result,'ASSOC')) {
$courses[$row['id']] = $row;
}
}
return $courses;
}
/**
* Gets the list of courses by session filtered by access_url
*
* @param $userId
* @param $sessionId
* @param null $from
* @param null $limit
* @param null $column
* @param null $direction
* @param bool $getCount
* @return array
*/
public static function getAllCoursesFollowedByUser(
$userId,
$sessionId,
$from = null,
$limit = null,
$column = null,
$direction = null,
$getCount = false,
$keyword = null
) {
if (empty($sessionId)) {
$sessionsSQL = SessionManager::get_sessions_followed_by_drh(
$userId,
null,
null,
null,
true,
true
);
} else {
$sessionsSQL = intval($sessionId);
}
$tbl_course = Database::get_main_table(TABLE_MAIN_COURSE);
$tbl_session_rel_course = Database::get_main_table(TABLE_MAIN_SESSION_COURSE);
if ($getCount) {
$select = "SELECT COUNT(DISTINCT(c.code)) as count ";
} else {
$select = "SELECT DISTINCT c.* ";
}
$keywordCondition = null;
if (!empty($keyword)) {
$keyword = Database::escape_string($keyword);
$keywordCondition = " AND (c.code LIKE '%$keyword%' OR c.title LIKE '%$keyword%' ) ";
}
// Select the courses
$sql = "$select
FROM $tbl_course c
INNER JOIN $tbl_session_rel_course src
ON c.code = src.course_code
WHERE
src.id_session IN ($sessionsSQL)
$keywordCondition
";
if ($getCount) {
$result = Database::query($sql);
$row = Database::fetch_array($result,'ASSOC');
return $row['count'];
}
if (isset($from) && isset($limit)) {
$from = intval($from);
$limit = intval($limit);
$sql .= " LIMIT $from, $limit";
}
$result = Database::query($sql);
$num_rows = Database::num_rows($result);
$courses = array();
if ($num_rows > 0) {
while ($row = Database::fetch_array($result,'ASSOC')) {
$courses[$row['id']] = $row;
}
}
return $courses;
}
/**
* Gets the list of courses by session filtered by access_url
@ -2710,28 +2793,28 @@ class SessionManager
return null;
}
/**
* Get the session id based on the original id and field name in the extra fields. Returns 0 if session was not found
*
* @param string Original session id
* @param string Original field name
* @return int Session id
*/
public static function get_session_id_from_original_id($original_session_id_value, $original_session_id_name)
/**
* Get the session id based on the original id and field name in the extra fields. Returns 0 if session was not found
*
* @param string Original session id
* @param string Original field name
* @return int Session id
*/
public static function get_session_id_from_original_id($original_session_id_value, $original_session_id_name)
{
$t_sfv = Database::get_main_table(TABLE_MAIN_SESSION_FIELD_VALUES);
$table_field = Database::get_main_table(TABLE_MAIN_SESSION_FIELD);
$sql = "SELECT session_id
$t_sfv = Database::get_main_table(TABLE_MAIN_SESSION_FIELD_VALUES);
$table_field = Database::get_main_table(TABLE_MAIN_SESSION_FIELD);
$sql = "SELECT session_id
FROM $table_field sf INNER JOIN $t_sfv sfv ON sfv.field_id=sf.id
WHERE field_variable='$original_session_id_name' AND field_value='$original_session_id_value'";
$res_session = Database::query($sql);
$row = Database::fetch_object($res_session);
if ($row) {
return $row->session_id;
} else {
return 0;
}
}
$res_session = Database::query($sql);
$row = Database::fetch_object($res_session);
if ($row) {
return $row->session_id;
} else {
return 0;
}
}
/**
* Get users by session
@ -3045,7 +3128,7 @@ class SessionManager
$sql = "SELECT count(id) FROM $session_table s";
if (!empty($access_url_id) && $access_url_id == intval($access_url_id)) {
$sql .= ", $access_url_rel_session_table u " .
" WHERE s.id = u.session_id AND u.access_url_id = $access_url_id";
" WHERE s.id = u.session_id AND u.access_url_id = $access_url_id";
}
$res = Database::query($sql);
$row = Database::fetch_row($res);
@ -3068,7 +3151,7 @@ class SessionManager
static function protect_teacher_session_edit($id) {
if (!api_is_coach($id) && !api_is_platform_admin()) {
api_not_allowed(true);
api_not_allowed(true);
} else {
return true;
}
@ -3945,7 +4028,7 @@ class SessionManager
foreach ($sessionsDestination as $sessionDestinationId) {
$sessionDestinationInfo = self::fetch($sessionDestinationId);
$messages[] = Display::return_message(
sprintf(get_lang('AddingStudentsFromSessionXToSessionY'), $sessionInfo['name'], $sessionDestinationInfo['name']), 'info', false
sprintf(get_lang('AddingStudentsFromSessionXToSessionY'), $sessionInfo['name'], $sessionDestinationInfo['name']), 'info', false
);
if ($sessionId == $sessionDestinationId) {
$messages[] = Display::return_message(get_lang('SkipSession'), 'warning', false);
@ -3988,7 +4071,7 @@ class SessionManager
$courseInfo = api_get_course_info_by_id($courseId);
foreach ($coachesPerSession as $sessionId => $coachList) {
CourseManager::updateTeachers(
$courseInfo['code'], $coachList, false, false, false
$courseInfo['code'], $coachList, false, false, false
);
$result[$courseInfo['code']][$sessionId] = $coachList;
}
@ -4006,7 +4089,7 @@ class SessionManager
$sessionInfo = self::fetch($sessionId);
$htmlResult .= '<br />';
$htmlResult .= Display::url(
get_lang('Session') . ': ' . $sessionInfo['name'] . ' <br />', $sessionUrl . $sessionId, array('target' => '_blank')
get_lang('Session') . ': ' . $sessionInfo['name'] . ' <br />', $sessionUrl . $sessionId, array('target' => '_blank')
);
$teacherList = array();
foreach ($coachList as $coachId) {
@ -4384,5 +4467,4 @@ class SessionManager
return self::checkSubscribeDrhToSessionList($userSessionList);
}
}
}

@ -419,7 +419,7 @@ class SocialManager extends UserManager
break;
}
$res .= '<h3><a href="'.$item['link'].'">'.$item['title'].'</a></h3>';
$res .= '<div class="social-rss-item-date">'.api_get_datetime($item['date_timestamp']).'</div>';
$res .= '<div class="social-rss-item-date">'.api_get_local_time($item['date_timestamp']).'</div>';
$res .= '<div class="social-rss-item-content">'.$item['description'].'</div><br />';
$i++;
}

@ -640,7 +640,7 @@ class Template
$this->set_js_files();
//$this->set_js_files_post();
$browser = api_browser_support('check_browser');
$browser = api_browser_support('check_browser');
if ($browser[0] == 'Internet Explorer' && $browser[1] >= '11') {
$browser_head = '<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE9" />';
$this->assign('browser_specific_head', $browser_head);

@ -871,7 +871,7 @@ if (isset($cidReset) && $cidReset) {
$session_lifetime = 3600; // 1 hour
$course_code = $_course['sysCode'];
$time = api_get_datetime();
$time = api_get_utc_datetime();
if (isset($_user['user_id']) && !empty($_user['user_id'])) {
@ -1136,18 +1136,29 @@ if ((isset($uidReset) && $uidReset) || (isset($cidReset) && $cidReset))
}
if (!$is_platformAdmin) {
if (!$is_courseMember && isset($_course['registration_code']) && !empty($_course['registration_code'])) {
$is_courseMember = false;
$is_courseAdmin = false;
$is_courseTutor = false;
$is_courseCoach = false;
$is_sessionAdmin = false;
$is_allowed_in_course = false;
if (!$is_courseMember &&
isset($_course['registration_code']) &&
!empty($_course['registration_code']) &&
!Session::read('course_password_'.$_course['real_id'], false)
) {
// if we are here we try to access to a course requiring password
if ($is_allowed_in_course) {
// the course visibility allows to access the course
// with a password
$url = api_get_path(WEB_CODE_PATH).'auth/set_temp_password.php?course_id='.$_course['real_id'].'&session_id='.$session_id;
header('Location: '.$url);
exit;
} else {
$is_courseMember = false;
$is_courseAdmin = false;
$is_courseTutor = false;
$is_courseCoach = false;
$is_sessionAdmin = false;
$is_allowed_in_course = false;
}
}
}
} // check the session visibility
// check the session visibility
if ($is_allowed_in_course == true) {
//if I'm in a session

@ -111,7 +111,7 @@ error_reporting(E_ALL);
// Upgrading from any subversion of 1.6 is just like upgrading from 1.6.5
$update_from_version_6 = array('1.6', '1.6.1', '1.6.2', '1.6.3', '1.6.4', '1.6.5');
// Upgrading from any subversion of 1.8 avoids the additional step of upgrading from 1.6
$update_from_version_8 = array('1.8', '1.8.2', '1.8.3', '1.8.4', '1.8.5', '1.8.6', '1.8.6.1', '1.8.6.2','1.8.7','1.8.7.1','1.8.8','1.8.8.2', '1.8.8.4', '1.8.8.6', '1.9.0', '1.9.2','1.9.4','1.9.6');
$update_from_version_8 = array('1.8', '1.8.2', '1.8.3', '1.8.4', '1.8.5', '1.8.6', '1.8.6.1', '1.8.6.2','1.8.7','1.8.7.1','1.8.8','1.8.8.2', '1.8.8.4', '1.8.8.6', '1.9.0', '1.9.2','1.9.4','1.9.6', '1.9.6.1');
$my_old_version = '';
$tmp_version = get_config_param('dokeos_version');
@ -857,6 +857,7 @@ if (@$_POST['step2']) {
case '1.9.2':
case '1.9.4':
case '1.9.6':
case '1.9.6.1':
default:
break;
}

@ -1463,7 +1463,7 @@ function display_requirements($installType, $badUpdatePath, $updatePath = '', $u
?>
<p align="center" style="padding-top:15px">
<button type="submit" name="step1" class="back" onclick="javascript: window.location='index.php'; return false;" value="&lt; <?php echo get_lang('Previous'); ?>" ><?php echo get_lang('Previous'); ?></button>
<button type="submit" name="step2_install" class="add" value="<?php echo get_lang("NewInstallation"); ?>" <?php if ($error) echo 'disabled="disabled"'; ?> ><?php echo get_lang('NewInstallation'); ?></button>
<button type="submit" name="step2_install" class="plus" value="<?php echo get_lang("NewInstallation"); ?>" <?php if ($error) echo 'disabled="disabled"'; ?> ><?php echo get_lang('NewInstallation'); ?></button>
<input type="hidden" name="is_executable" id="is_executable" value="-" />
<?php
// Real code

@ -534,6 +534,7 @@ $ToolTracking = "التقارير";
$ToolCourseSetting = "الاعدادات";
$ToolCourseProgress = "مدي التقدم التقدم في المقرر";
$ContactInformation = "معلومات المستخدم";
$MyFiles = "ملفاتي";
$ConnectionsLastMonth = "مشاركات الشهر الماضي";
$ToolVideoconference = "مؤتمرات الفيديو";
$OpenInANewWindow = "فتح في نافذة جديدة";

@ -47,7 +47,6 @@ $Newest = "الاحدث";
$Popular = "الاكثر متايعة";
$YouNeedToHaveFriendsInYourSocialNetwork = "يجب ان يكون هناك اصدقاء في شبكة التواصل";
$SeeAllMyGroups = "رؤية كل المجموعات";
$MyFiles = "ملفاتي";
$MySocialGroups = "مجموعاتي";
$SocialGroups = "المجموعات";
?>

@ -1079,6 +1079,7 @@ $QualifyInGradebook = "Kalifikatu ebaluazio tresnan";
$SessionSpecificResource = "Saioaren baliabide espezifikoa";
$EditionNotAvailableFromSession = "Saio batetik ezin da edizioa erabili, mesedez, editatu oinarrizko ikastarotik";
$HandingOverOfTaskX = "%s zeregina entregatzea";
$MyFiles = "Nire fitxategiak";
$ProtectedDocument = "Babestutako dokumentua";
$ConnectionsLastMonth = "Azken hilabeteko konexioak";
$TotalStudents = "Ikasleak, guztira";

@ -193,7 +193,6 @@ $YouNeedToHaveFriendsInYourSocialNetwork = "Lagunak eduki behar dituzu zure giza
$SeeAllMyGroups = "Ikusi nire talde guztiak";
$YouAlreadyInviteAllYourContacts = "Zuk aurretik gonbidatu zenituen zure harreman guztiak";
$YouShouldCreateAGroup = "Talde bat sortu beharko zenuke";
$MyFiles = "Nire fitxategiak";
$MySocialGroups = "Nire gizarte taldeak";
$SocialGroups = "Gizarte taldeak";
$CreateASocialGroup = "Sortu gizarte talde bat";

@ -1010,6 +1010,7 @@ $QualifyInGradebook = "Qualificar na ferramenta de Avaliação";
$SessionSpecificResource = "Recurso específico de sessão";
$EditionNotAvailableFromSession = "Edição não disponível a partir da sessão, por favor, edite a partir do curso básico";
$HandingOverOfTaskX = "Entrega de tarefa %s";
$MyFiles = "Meus arquivos";
$ProtectedDocument = "Documento protegido";
$ConnectionsLastMonth = "Conexões no último mês";
$TotalStudents = "Total de estudantes";

@ -193,7 +193,6 @@ $YouNeedToHaveFriendsInYourSocialNetwork = "Você precisa ter amigos em sua rede
$SeeAllMyGroups = "Ver todos os meus grupos";
$YouAlreadyInviteAllYourContacts = "Você já convidou todos os seus contatos";
$YouShouldCreateAGroup = "Você deve criar um grupo";
$MyFiles = "Meus arquivos";
$MySocialGroups = "Meus grupos sociais";
$SocialGroups = "Grupos Sociais";
$CreateASocialGroup = "Criar um grupo social";

@ -2,6 +2,17 @@
/*
for more information: see languages.txt in the lang folder.
*/
$AvailableClasses = "Classes disponibles";
$RegisteredClasses = "Classes subscrites";
$DeleteItemsNotInFile = "Elimina elements que no es trobin a l'arxiu";
$ImportGroups = "Importa grups";
$HereIsYourFeedback = "Reposta del professor:";
$ShowSystemFolders = "Mostra els directoris del sistema";
$LoginToGoToThisCourse = "Connecteu-vos per accedir a aquest curs";
$LoginDate = "Data d'accés";
$ChooseStartDateAndEndDate = "Esculli les dates d'inici i final";
$WorkAdded = "Tasca afegida";
$AllowMemberLeaveGroup = "Permet als membres deixar el grup";
$CreatedByXYOnZ = "Creat per %s el %s";
$LoginWithExternalAccount = "Accedeix amb un compte extern";
$NumberOfGroupsToCreate = "Quantitat de grups a crear";
@ -1140,6 +1151,7 @@ $QualifyInGradebook = "Qualifica a l'eina avaluació";
$SessionSpecificResource = "Recurs específic a la sessió";
$EditionNotAvailableFromSession = "No és possible editar aquest recurs de curs des d'una sessió";
$HandingOverOfTaskX = "Entrega de tasques %s";
$MyFiles = "Els meus arxius";
$ProtectedDocument = "Document protegit";
$ConnectionsLastMonth = "Connexions durant el mes anterior";
$TotalStudents = "Estudiants";

@ -193,7 +193,6 @@ $YouNeedToHaveFriendsInYourSocialNetwork = "Necessiteu tenir amics a la seva xar
$SeeAllMyGroups = "Veure tots els meus grups";
$YouAlreadyInviteAllYourContacts = "Ja heu convidat a tots els vostres contactes";
$YouShouldCreateAGroup = "Hauríeu de crear un grup";
$MyFiles = "Els meus arxius";
$MySocialGroups = "Els meus grups";
$SocialGroups = "Grups";
$CreateASocialGroup = "Crea un grup social";

@ -847,6 +847,7 @@ $ToolTracking = "Statistieken";
$ToolCourseSetting = "Cursus instellingen";
$ToolCourseMaintenance = "Cursusback-up";
$ToolCourseProgress = "Voortgang";
$MyFiles = "Mijn bestanden";
$ToolVideoconference = "Videoconferentie";
$AddedToALP = "Toegevoegd aan leerpad";
$YouHaveANewInvitationFromX = "Je hebt een nieuwe uitnodiging van %s";

@ -193,7 +193,6 @@ $YouNeedToHaveFriendsInYourSocialNetwork = "U hebt vrienden nodig in uw sociaal
$SeeAllMyGroups = "Toon al mijn groepen";
$YouAlreadyInviteAllYourContacts = "U hebt reeds al uw contacten uitgenodigd";
$YouShouldCreateAGroup = "U moet een groep aanmaken";
$MyFiles = "Mijn bestanden";
$MySocialGroups = "Mijn sociale groepen";
$SocialGroups = "Sociale groepen";
$CreateASocialGroup = "Sociale groep maken";

@ -2,6 +2,9 @@
/*
for more information: see languages.txt in the lang folder.
*/
$EnterTheLettersYouSee = "Enter the letters you see.";
$ClickOnTheImageForANewOne = "Click on the image to load a new one.";
$AccountBlockedByCaptcha = "Account blocked by captcha.";
$CatchScreenCasts = "Capture screenshot/screencast";
$View = "View";
$AmountSubmitted = "Number submitted";
@ -1182,6 +1185,7 @@ $QualifyInGradebook = "Grade in the assessment tool";
$SessionSpecificResource = "Session-specific resource";
$EditionNotAvailableFromSession = "Edition not available from the session, please edit from the basic course.";
$HandingOverOfTaskX = "Handing over of task %s";
$MyFiles = "My files";
$ProtectedDocument = "Protected Document";
$ConnectionsLastMonth = "Connections last month";
$TotalStudents = "Total learners";

@ -193,7 +193,6 @@ $YouNeedToHaveFriendsInYourSocialNetwork = "You need to have friends in your soc
$SeeAllMyGroups = "See all my groups";
$YouAlreadyInviteAllYourContacts = "You already invite all your contacts";
$YouShouldCreateAGroup = "You should create a group";
$MyFiles = "My files";
$MySocialGroups = "My social groups";
$SocialGroups = "Social groups";
$CreateASocialGroup = "Create a social group";

@ -1181,6 +1181,7 @@ $QualifyInGradebook = "Évaluer dans le cahier de notes";
$SessionSpecificResource = "Ressource de session";
$EditionNotAvailableFromSession = "Cette ressource ne peut pas être éditée dans le contexte d'une session";
$HandingOverOfTaskX = "Remise du travail %s";
$MyFiles = "Mes fichiers";
$ProtectedDocument = "Document protégé";
$ConnectionsLastMonth = "Connexions le mois dernier";
$TotalStudents = "Apprenants totaux";

@ -193,7 +193,6 @@ $YouNeedToHaveFriendsInYourSocialNetwork = "Vous devez avoir des contacts dans v
$SeeAllMyGroups = "Voir tous mes groupes";
$YouAlreadyInviteAllYourContacts = "Vous avez déjà invité tous vos contacts";
$YouShouldCreateAGroup = "Vous devez créer un groupe";
$MyFiles = "Mes fichiers";
$MySocialGroups = "Mes groupes sociaux";
$SocialGroups = "Groupes sociaux";
$CreateASocialGroup = "Créer un groupe social";

@ -1067,6 +1067,7 @@ $QualifyInGradebook = "Cualificación no libro de cualificacións";
$SessionSpecificResource = "Recurso específico da sesión";
$EditionNotAvailableFromSession = "Edición non dispoñible dende a sesión, por favor edite dende o propio curso.";
$HandingOverOfTaskX = "Porcentaxe completada da tarefa %s";
$MyFiles = "Os meus arquivos";
$ProtectedDocument = "Documento protexido";
$ConnectionsLastMonth = "Conexións o mes pasado";
$TotalStudents = "Alumnos totais";

@ -193,7 +193,6 @@ $YouNeedToHaveFriendsInYourSocialNetwork = "Precisa ter amigos na súa rede soci
$SeeAllMyGroups = "Ver tódolos meus grupos";
$YouAlreadyInviteAllYourContacts = "Xa invitou a tódolos seus contactos";
$YouShouldCreateAGroup = "Debería crear un grupo";
$MyFiles = "Os meus arquivos";
$MySocialGroups = "Os meus grupos";
$SocialGroups = "Grupos";
$CreateASocialGroup = "Crear un grupo social";

@ -971,6 +971,7 @@ $QualifyInGradebook = "In Bewertungsmappe qualifizieren (bewerten)";
$SessionSpecificResource = "Session-Kurs spezifisches Element";
$EditionNotAvailableFromSession = "Ausgabe nicht in Session-Kurs verfügbar, bitte in Basis-Kurs bearbeiten.";
$HandingOverOfTaskX = "Übergabe von Aufgabe %s";
$MyFiles = "Meine Dateien";
$ProtectedDocument = "Geschütztes Dokument";
$ConnectionsLastMonth = "Verbindungen letzter Monat";
$TotalStudents = "Teilnehmer gesamt";

@ -193,7 +193,6 @@ $YouNeedToHaveFriendsInYourSocialNetwork = "Sie brauchen Freunde in Ihrem Sozial
$SeeAllMyGroups = "Alle meine Gruppen anzeigen";
$YouAlreadyInviteAllYourContacts = "Sie haben bereits alle Ihre Kontakte eingeladen";
$YouShouldCreateAGroup = "Sie sollten eine Gruppe anlegen";
$MyFiles = "Meine Dateien";
$MySocialGroups = "Meine sozialen Gruppen";
$SocialGroups = "Soziale Gruppen";
$CreateASocialGroup = "Eine soziale Gruppe anlegen";

@ -1022,6 +1022,7 @@ $QualifyInGradebook = "Grade in the assessment tool";
$SessionSpecificResource = "Session-specific resource";
$EditionNotAvailableFromSession = "Edition not available from the session, please edit from the basic course.";
$HandingOverOfTaskX = "Handing over of task %s";
$MyFiles = "Τα αρχεία μου";
$ProtectedDocument = "Προστατευμένο έγγραφο";
$ConnectionsLastMonth = "Συνδέσεις τον προηγούμενο μήνα";
$TotalStudents = "Σύνολο μαθητών";

@ -193,7 +193,6 @@ $YouNeedToHaveFriendsInYourSocialNetwork = "Πρέπει να έχετε φίλ
$SeeAllMyGroups = "Εμφάνιση όλων των ομάδων μου";
$YouAlreadyInviteAllYourContacts = "Έχετε ήδη προσκαλέσει όλες τις επαφές σας";
$YouShouldCreateAGroup = "Πρέπει να δημιουργήσετε μία ομάδα";
$MyFiles = "Τα αρχεία μου";
$MySocialGroups = "Κοινωνικές Ομάδες";
$SocialGroups = "Κοινωνικές Ομάδες";
$CreateASocialGroup = "Δημιουργία Κοινωνικής Ομάδας";

@ -979,6 +979,7 @@ $QualifyInGradebook = "Valuta nel Registro";
$SessionSpecificResource = "Risorsa specifica della sessione";
$EditionNotAvailableFromSession = "Non è possibile modificare questa risorsa nel corso di una sessione: puoi farlo nel corso di origine";
$HandingOverOfTaskX = "Compito realizzato al %s";
$MyFiles = "I miei documenti";
$ProtectedDocument = "Documento protetto";
$ConnectionsLastMonth = "Accessi ultimo mese";
$TotalStudents = "Totale Corsisti";

@ -192,7 +192,6 @@ $YouNeedToHaveFriendsInYourSocialNetwork = "Nel social network devi avere degli
$SeeAllMyGroups = "Mostra i miei gruppi";
$YouAlreadyInviteAllYourContacts = "Hai già mandato un invito a tutti i tuoi contatti";
$YouShouldCreateAGroup = "Devi prima creare un gruppo";
$MyFiles = "I miei documenti";
$MySocialGroups = "I miei gruppi";
$SocialGroups = "Gruppi";
$CreateASocialGroup = "Crea un gruppo";

@ -433,6 +433,7 @@ $DateUnLock = "日付をロック解除";
$DateLock = "日付をロック";
$GoToStudentDetails = "学生の詳細へ移動";
$RepeatDate = "日付を繰り返す";
$MyFiles = "ファイル";
$ConnectionsLastMonth = "過去 1 か月の接続";
$TotalStudents = "学生の合計";
$FilteringWithScoreX = "得点でフィルター: %s";

@ -34,7 +34,6 @@ $Open = "公開";
$GroupMembers = "グループ メンバー";
$Me = "自分";
$Topics = "トピック";
$MyFiles = "ファイル";
$SocialGroups = "ソーシャル グループ";
$CreateASocialGroup = "ソーシャル グループを作成";
?>

@ -980,6 +980,7 @@ $QualifyInGradebook = "Kvalificēties ieskaitēs";
$SessionSpecificResource = "Specifisks Sesijas resurss";
$EditionNotAvailableFromSession = "Redakcija nav pieejama no sesijas, lūdzu, labojiet no pamata kursa.";
$HandingOverOfTaskX = "Uzdevuma %s nodošana";
$MyFiles = "Mani faili";
$ProtectedDocument = "Aizsargāts dokuments";
$ConnectionsLastMonth = "Pieslēgšanās pēdējā mēneša laikā";
$TotalStudents = "Kopējais kursantu skaits";

@ -193,7 +193,6 @@ $YouNeedToHaveFriendsInYourSocialNetwork = "Jums ir jābūt kādam draugam jūsu
$SeeAllMyGroups = "Skatīt visas manas grupas";
$YouAlreadyInviteAllYourContacts = "Visi Jūsu kontakti jau ir uzaicināti";
$YouShouldCreateAGroup = "Jums vajadzētu izveidot grupu";
$MyFiles = "Mani faili";
$MySocialGroups = "Manas sociālās grupas";
$SocialGroups = "Sociālās grupas";
$CreateASocialGroup = "Izveidot sociālo grupu";

@ -956,6 +956,7 @@ $PageExecutionTimeWas = "زمان بارگذاری صفحه";
$MemoryUsage = "استفاده از حافظه";
$MemoryUsagePeak = "کداکثر استفاده از حافظه";
$Seconds = "ثانیه ها";
$MyFiles = "فایل های من";
$ProtectedDocument = "اسناد محافظت شده";
$ConnectionsLastMonth = "ارتباطات ماه قبل";
$TotalStudents = "کلیه دانشجویان";

@ -193,7 +193,6 @@ $YouNeedToHaveFriendsInYourSocialNetwork = "شما باید در شبکه اجت
$SeeAllMyGroups = "نمایش تمامی گروه های من";
$YouAlreadyInviteAllYourContacts = "شما قبلا همه مخاطبین خود را دعوت کردید";
$YouShouldCreateAGroup = "شما باید یک گروه بسازید";
$MyFiles = "فایل های من";
$MySocialGroups = "گروه های اجتماعی من";
$SocialGroups = "گروه های اجتماعی";
$CreateASocialGroup = "ساخت یک گروه اجتماعی";

@ -1085,6 +1085,7 @@ $QualifyInGradebook = "Ocena w narzędziach oceny";
$SessionSpecificResource = "Sesja - określony zasób";
$EditionNotAvailableFromSession = "Edycja nie jest dostępna w sesji, możesz edytować na poziomie podstawowym kursu.";
$HandingOverOfTaskX = "Przekazanie zadania %s";
$MyFiles = "Moje pliki";
$ProtectedDocument = "Zabezpieczony dokument";
$ConnectionsLastMonth = "Połączenia z ostatniego miesiąca";
$TotalStudents = "Liczba studentów";

@ -193,7 +193,6 @@ $YouNeedToHaveFriendsInYourSocialNetwork = "Trzeba mieć znajomych w sieci społ
$SeeAllMyGroups = "Zobacz wszystkie moje grupy";
$YouAlreadyInviteAllYourContacts = "Już wysłałeś zaproszenia do wszystkich kontaktów";
$YouShouldCreateAGroup = "Należy utworzyć grupę";
$MyFiles = "Moje pliki";
$MySocialGroups = "Moje grupy społeczne";
$SocialGroups = "Grupy społeczne";
$CreateASocialGroup = "Utwórz grupę społeczną";

@ -2,11 +2,42 @@
/*
for more information: see languages.txt in the lang folder.
*/
$CatchScreenCasts = "Capturas de ecrãn";
$View = "Ver";
$AmountSubmitted = "Número submetido";
$InstallWarningCouldNotInterpretPHP = "Aviso: o instalador detetou um erro ao tentar aceder ao ficheiro de teste em %s. Parece que o script PHP não foi interpretado.Isto poderá significar problemas quando pretender criar novos cursos. Por favor confirme o guia de instalação para mais informações sobre permissões. Se está a instalar um site num endereço URL que ainda não está direcionado/ativo, provavelmente pode ignorar esta mensagem.";
$BeforeX = "Antes %s";
$AfterX = "Depois %s";
$ExportSettingsAsXLS = "Exportar definições como XLS";
$DeleteAllItems = "Apagar todos os items";
$DeleteThisItem = "Apagar este item";
$RecordYourVoice = "Gravar a sua voz";
$RecordIsNotAvailable = "Nenhuma gravação disponível";
$WorkNumberSubmitted = "Trabalhos recebidos";
$WithoutCategory = "Sem categoria";
$IncorrectScore = "Resposta incorreta";
$CorrectScore = "Resultado correto";
$UseCustomScoreForAllQuestions = "Utilizar resultado personalizado para todas as questões";
$YouShouldAddItemsBeforeAttachAudio = "deve adicionar alguns items à sua Rota de Aprendizagem, de outra forma não poderá anexar ficheiros áudio";
$InactiveDays = "Dias sem atividade";
$FollowedHumanResources = "Diretores de RH seguidos";
$TheTextYouEnteredDoesNotMatchThePicture = "O texto inserido não corresponde à figura";
$RemoveOldRelationships = "Remover relações anteriores";
$ImportSessionDrhList = "Importar lista de diretores de RH para as sessões";
$FollowedStudents = "Alunos seguidos";
$FollowedTeachers = "Instrutores seguidos";
$AllowOnlyFiles = "Permitir apenas ficheiros";
$AllowOnlyText = "Permitir apenas texto";
$AllowFileOrText = "Permitir ficheiros ou texto online";
$DocumentType = "Tipo de documento";
$SendOnlyAnEmailToMySelfToTest = "Enviar email para mim para efeitos de teste";
$DeleteAllSelectedAttendances = "Apagar todas as presenças selecionadas";
$AvailableClasses = "Turmas disponíveis";
$RegisteredClasses = "Turmas registadas";
$DeleteItemsNotInFile = "Apagar items que não estejam no ficheiro";
$ImportGroups = "Importar grupos";
$HereIsYourFeedback = "Aqui está o seu comentário";
$ShowSystemFolders = "Mostrar ficheiros do sistema";
$LoginToGoToThisCourse = "Por favor, faça o login para ir para este curso";
$LoginDate = "Data do login";
$ChooseStartDateAndEndDate = "Escolha a data de começo e de final";
@ -14,6 +45,64 @@ $WorkAdded = "Trabalho adicionado";
$AllowMemberLeaveGroup = "Permitir que os membros deixem o grupo";
$CreatedByXYOnZ = "Criado por %s em %s";
$LoginWithExternalAccount = "Entrar sem uma conta institucional";
$NumberOfGroupsToCreate = "Número de grupos a criar";
$CoachesSubscribedAsATeacherInCourseX = "Instrutores inscritos como professores no curso %s";
$EnrollStudentsFromExistingSessions = "Inscrever alunos de sessões anteriores";
$EnrollTrainersFromExistingSessions = "Inscrever instrutores de sessões anteriores";
$AddingStudentsFromSessionXToSessionY = "Adicionar alunos da sessão %s para a sessão %s";
$AddUserGroupToThatURL = "Adicionar grupo a este endereço URL";
$FirstLetter = "Primeira letra";
$UserGroupList = "Lista de grupos do utilizador";
$AddUserGroupToURL = "Adicionar grupo ao endereço URL";
$UserGroupListInX = "Grupos em %s";
$UserGroupListInPlatform = "Lista de grupos na plataforma";
$EditUserGroupToURL = "Editar grupos para um endereço URL";
$ManageUserGroup = "Gerir os grupos do utilizador";
$RegistrationDisabled = "Lamentamos, está a tentar aceder a uma página registada neste portal, mas o registo está neste momento indisponível. Por favor contate o administrador (veja o contato no rodapé). Isto se já tiver uma conta neste site.";
$CasDirectCourseAccess = "Entrar no curso com autenticação CAS";
$TeachersWillBeAddedAsCoachInAllCourseSessions = "Os professores serão adicionados como instrutores em todas as sessões do curso";
$YesImSure = "Sim, tenho a certeza";
$NoIWantToTurnBack = "Não, desejo regressar";
$IfYouContinueYourAnswerWillBeSavedAnyChangeWillBeNotAllowed = "Se continuar a sua resposta será guardada. Qualquer alteração não será permitida";
$SpecialCourses = "Cursos especiais";
$Roles = "Funções";
$ToolCurriculum = "Currículo";
$ToReviewXYZ = "%s para rever (%s)";
$UnansweredXYZ = "%s não respondidas (%s)";
$AnsweredXYZ = "%s respondidas (%s) + (%s)";
$UnansweredZ = "(%s) Não respondidas";
$AnsweredZ = "(%s) Respondidas";
$CurrentQuestionZ = "(%s) Resposta atual";
$ToReviewZ = "(%s) Para rever";
$ReturnToExerciseList = "Regressar à lista de exercícios";
$ExerciseAutoLaunch = "Lançamento automático de exercícios";
$AllowFastExerciseEdition = "Ativar a edição rápida de exercício";
$Username = "Nome de utilizador";
$SignIn = "Entrar";
$YouAreReg = "Está registado em";
$ManageQuestionCategories = "Gerir as categorias de questões gerais";
$ManageCourseFields = "Gerir campos extra para os cursos";
$ManageQuestionFields = "Gerir campos extra para as questões";
$QuestionFields = "Campos das questões";
$FieldLoggeable = "As alterações nos campos devem ser registadas";
$EditExtraFieldWorkFlow = "Editar o processo destes campos";
$SelectRole = "Selecionar a função";
$SelectAnOption = "Por favor selecione uma opção";
$CurrentStatus = "Estado atual";
$MyCourseCategories = "As minhas categorias de cursos";
$SessionsCategories = "Categorias de Sessões";
$CourseSessionBlock = "Cursos e sessões";
$Committee = "Comissão";
$ModelType = "Tipo de modelo de exercício";
$YourPasswordCannotBeTheSameAsYourUsername = "A sua password não pode ser a mesma que o seu nome de utilizador";
$CheckEasyPasswords = "Verifique demasiado fáceis de descobrir";
$PasswordVeryStrong = "Muito forte";
$PasswordStrong = "Forte";
$PasswordMedium = "Média";
$PasswordNormal = "Normal";
$PasswordWeak = "Fraca";
$PasswordIsTooShort = "A password é muito curta";
$BadCredentials = "Más credenciais";
$AddForum = "Acrescentar novo fórum";
$Title = "Título";
$By = "Por";
@ -791,9 +880,11 @@ $AddAdditionalProfileField = "Adicionar campo de perfil de utilizador";
$InvitationDenied = "Convite negado";
$UserAdded = "O utilizador foi adicionado";
$UpdatedIn = "Atualizado em";
$Metadata = "Metadados";
$TitleColumnGradebook = "Cabeçalho da coluna no Relatório de Competências";
$QualifyWeight = "Peso no Relatório";
$DownloadLink = "Link/ligação para download";
$MyFiles = "Os meus arquivos";
$MaxWeightNeedToBeProvided = "Necessita indicar uma cotação máxima";
$ContainsAfile = "Contém um ficheiro";
?>

@ -193,7 +193,6 @@ $YouNeedToHaveFriendsInYourSocialNetwork = "Tem de ter amigos na sua rede social
$SeeAllMyGroups = "Ver todos os meus grupos";
$YouAlreadyInviteAllYourContacts = "Já convidou todos os seus contatos";
$YouShouldCreateAGroup = "Deve criar um grupo";
$MyFiles = "Os meus arquivos";
$MySocialGroups = "Os meus grupos sociais";
$SocialGroups = "Grupos sociais";
$CreateASocialGroup = "Criar um grupo social";

@ -4,6 +4,7 @@ for more information: see languages.txt in the lang folder.
*/
$BeforeX = "Pred %s";
$AfterX = "Po %s";
$ExportSettingsAsXLS = "Exportovať nastavenia ako XLS";
$DeleteAllItems = "Zmazať všetky položky";
$DeleteThisItem = "Zmazať túto položku";
$RecordYourVoice = "Nahrať svoj hlas";
@ -1175,6 +1176,7 @@ $QualifyInGradebook = "Stupeň v nástroji hodnotenia";
$SessionSpecificResource = "Stretnutie-špecifické zdroje";
$EditionNotAvailableFromSession = "Vydanie nie je k dispozícii zo stretnutia, prosím upravte zo základného kurzu.";
$HandingOverOfTaskX = "Odovzdanie úlohy %s";
$MyFiles = "Moje súbory";
$ProtectedDocument = "Chránený dokument";
$ConnectionsLastMonth = "Pripojenia posledný mesiac";
$TotalStudents = "Študentov celkom";

@ -193,7 +193,6 @@ $YouNeedToHaveFriendsInYourSocialNetwork = "Musíte mať priateľov vo vašej so
$SeeAllMyGroups = "Zobraziť všetky moje skupiny";
$YouAlreadyInviteAllYourContacts = "Už ste pozvali všetky svoje kontakty";
$YouShouldCreateAGroup = "Mali by ste vytvoriť skupinu";
$MyFiles = "Moje súbory";
$MySocialGroups = "Moje sociálne skupiny";
$SocialGroups = "Sociálne skupiny";
$CreateASocialGroup = "Vytvoriť sociálnu skupinu";

@ -39,15 +39,21 @@ $AddUserGroupToURL = "Dodaj skupino k URL";
$UserGroupListInX = "SKupine v %s";
$UserGroupListInPlatform = "Seznam skupin platforme";
$ManageUserGroup = "Upravljaj skupine uporabnikov";
$RegistrationDisabled = "Oprostite. Skušali ste dostopiti do strani za registracijo v portal. Registracije je trenutno onemogočena. Prosimo, da skušate kontaktirati upravitelja portala (glej informacije v nogi te strani).";
$CasDirectCourseAccess = "Vstopi v tečaj s CAS avtentifikacijo";
$TeachersWillBeAddedAsCoachInAllCourseSessions = "Učitelji bodo dodani kot tutorji/coach v vse seje tečaja";
$YesImSure = "Da, prepričan sem";
$NoIWantToTurnBack = "Ne, želim se vrniti";
$IfYouContinueYourAnswerWillBeSavedAnyChangeWillBeNotAllowed = "Če boste nadaljevali, bodo vaši rezultati shranjeni. Nadaljne spremembe ne bodo dopuščene.";
$SpecialCourses = "Posebni tečaji";
$Roles = "Vloge";
$ToolCurriculum = "Kurikulum";
$ReturnToExerciseList = "Nazaj na seznam vaj/testov";
$ExerciseAutoLaunch = "Avto-zagon za vaje/teste";
$AllowFastExerciseEdition = "Omogoči hitro urejanje za vaje/teste";
$Username = "Up. ime";
$SignIn = "Vpiši";
$YouAreReg = "Vpisan si v";
$SelectRole = "Izberite vlogo";
$SelectAnOption = "Izberite opcijo";
$CurrentStatus = "Trenuten status";
@ -1141,6 +1147,7 @@ $QualifyInGradebook = "Uvrsti v redovalnico";
$SessionSpecificResource = "Za sejo specifičen resurs";
$EditionNotAvailableFromSession = "Urejanje ni dostopno preko seje. Prosim, izvedite urejanje preko osnovnega tečaja.";
$HandingOverOfTaskX = "Predaja naloge %s";
$MyFiles = "Moje datoteke";
$ProtectedDocument = "Zaščiten dokument";
$ConnectionsLastMonth = "Povezav zadnji mesec";
$TotalStudents = "Vseh tečajnikov";

@ -193,7 +193,6 @@ $YouNeedToHaveFriendsInYourSocialNetwork = "Imeti morate prijatelje v svojem soc
$SeeAllMyGroups = "Pokaži vse moje skupine";
$YouAlreadyInviteAllYourContacts = "Povabili ste že vse svoje kontakte";
$YouShouldCreateAGroup = "Kreirati je potrebno skupino";
$MyFiles = "Moje datoteke";
$MySocialGroups = "Moje socialne skupine";
$SocialGroups = "Socialne skupine";
$CreateASocialGroup = "Ustvari socialno skupino";

@ -1184,6 +1184,7 @@ $QualifyInGradebook = "Calificar en la evaluación";
$SessionSpecificResource = "Recurso específico a la sesión";
$EditionNotAvailableFromSession = "No es posible editar este recurso de curso desde una sesión";
$HandingOverOfTaskX = "Entrega de tarea %s";
$MyFiles = "Mis archivos";
$ProtectedDocument = "Documento protegido";
$ConnectionsLastMonth = "Conexiones en el mes anterior";
$TotalStudents = "Estudiantes";

@ -193,7 +193,6 @@ $YouNeedToHaveFriendsInYourSocialNetwork = "Necesita tener amigos en su red soci
$SeeAllMyGroups = "Ver todos mis grupos";
$YouAlreadyInviteAllYourContacts = "Ya invitó a todos sus contactos";
$YouShouldCreateAGroup = "Debería crear un grupo";
$MyFiles = "Mis archivos";
$MySocialGroups = "Mis grupos";
$SocialGroups = "Grupos";
$CreateASocialGroup = "Crear un grupo social";

@ -398,5 +398,4 @@ $AssessmentQuestions = "¿ Cómo van a ser evaluados los estudiantes ? ¿ Cuále
$AssessmentInformation = "Ejemplos de las preguntas de examen. Criterios de evaluación. Pistas y trucos.";
$UploadADocument = "Subir un documento";
$LowerCaseUser = "usuario";
$ChooseEvaluation = "Seleccione la Evaluación";
?>

@ -550,6 +550,7 @@ $ToolSurvey = "Undersökning";
$ToolNotebook = "Anteckningsbok";
$ToolCourseProgress = "Kurs utveckling";
$ContactInformation = "Kontaktuppgifter";
$MyFiles = "Mina filer";
$ConnectionsLastMonth = "Anslutningar senaste månaden";
$ExamFail = "Underkänt";
$Profile = "Profil";

@ -121,6 +121,5 @@ $Popular = "Populär";
$Member = "Medlem";
$Open = "Öppen";
$AcceptInvitation = "Acceptera Inbjudan";
$MyFiles = "Mina filer";
$SocialGroups = "Sociala grupper";
?>

@ -84,7 +84,7 @@ function loadGraph() {
// Display confirmation message to the user
$('#messages').html(db.result).stop().css('opacity', 1).fadeIn(30);
$('#cev_cont_stats').html(db.stats);
$( '#graph' ).html(db.graph_result);
$('#graph' ).html(db.graph_result);
} else {
$('#messages').text('".get_lang('NoDataAvailable')."');
$('#messages').addClass('warning-message');
@ -129,7 +129,6 @@ echo Display::page_subheader(
$form->setDefaults(array('from' => $from, 'to' => $to));
$form->display();
?>
<div id="cev_results_header" class="ui-tabs ui-widget ui-widget-content ui-corner-all">
<div id="cev_results" class="ui-tabs ui-widget ui-widget-content ui-corner-all">
<div class="ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all">
<?php echo get_lang('Statistics'); ?>

@ -181,7 +181,7 @@ function get_count_courses()
function get_courses($from, $limit, $column, $direction)
{
$userId = api_get_user_id();
$sessionId = isset($_GET['session_id']) ? intval($_GET['session_id']) : null;
$sessionId = isset($_GET['session_id']) ? intval($_GET['session_id']) : 0;
$keyword = isset($_GET['keyword']) ? $_GET['keyword'] : null;
$drhLoaded = false;
@ -218,6 +218,7 @@ function get_courses($from, $limit, $column, $direction)
if (!empty($courses)) {
foreach ($courses as $data) {
$courseCode = $data['code'];
$courseInfo = api_get_course_info($courseCode);
$userList = CourseManager::get_user_list_from_course_code($data['code'], $sessionId);
$userIdList = array();
if (!empty($userList)) {
@ -258,9 +259,12 @@ function get_courses($from, $limit, $column, $direction)
$courseIcon = '<a href="'.api_get_path(WEB_CODE_PATH).'tracking/courseLog.php?cidReq='.$courseCode.'&id_session='.$sessionId.'">
<img src="'.api_get_path(WEB_IMG_PATH).'2rightarrow.gif" border="0" />
</a>';
$courseList[] = array(
$title = Display::url(
$data['title'],
$courseInfo['course_public_url'].'?id_session='.$sessionId
);
$courseList[] = array(
$title,
$countStudents,
is_null($avgTimeSpentInCourse) ? '-' : $avgTimeSpentInCourse,
$tematicAdvanceProgress,
@ -285,8 +289,6 @@ $table = new SortableTable(
10
);
$table->set_header(0, get_lang('CourseTitle'), false);
$table->set_header(1, get_lang('NbStudents'), false);
$table->set_header(2, get_lang('TimeSpentInTheCourse').Display :: return_icon('info3.gif', get_lang('TimeOfActiveByTraining'), array('align' => 'absmiddle', 'hspace' => '3px')), false);

@ -3849,12 +3849,14 @@ class learnpath
* @param integer Learnpath ID
* @param string New visibility
*/
public function toggle_visibility($lp_id, $set_visibility = 1) {
//if ($this->debug > 0) { error_log('New LP - In learnpath::toggle_visibility()', 0); }
public function toggle_visibility($lp_id, $set_visibility = 1)
{
$action = 'visible';
if ($set_visibility != 1) {
$action = 'invisible';
self::toggle_publish($lp_id, 'i');
}
return api_item_property_update(
api_get_course_info(),
TOOL_LEARNPATH,
@ -3869,7 +3871,7 @@ class learnpath
* on the course homepage
* Can be used as abstract
* @param integer $lp_id Learnpath id
* @param string $set_visibility New visibility (v/s - visible/invisible)
* @param string $set_visibility New visibility (v/i - visible/invisible)
* @return bool
*/
public static function toggle_publish($lp_id, $set_visibility = 'v')
@ -9316,7 +9318,7 @@ EOD;
return $row_max->previous;
}
function copy()
public function copy()
{
$main_path = api_get_path(SYS_CODE_PATH);
require_once $main_path.'coursecopy/classes/CourseBuilder.class.php';

@ -8,6 +8,7 @@
* @author Yannick Warnier <ywarnier@beeznest.org>
*/
use \ChamiloSession as Session;
$debug = 0;
if ($debug > 0) error_log('New LP -+- Entered lp_controller.php -+- (action: '.$_REQUEST['action'].')', 0);
@ -278,7 +279,12 @@ if (isset($_SESSION['lpobject'])) {
$oLP = unserialize($_SESSION['lpobject']);
if (isset($oLP) && is_object($oLP)) {
if ($debug > 0) error_log('New LP - oLP is object', 0);
if ($myrefresh == 1 OR empty($oLP->cc) OR $oLP->cc != api_get_course_id() OR $oLP->lp_view_session_id != $session_id OR $oLP->scorm_debug == '1') {
if ($myrefresh == 1 OR
empty($oLP->cc) OR
$oLP->cc != api_get_course_id() OR
$oLP->lp_view_session_id != $session_id OR
$oLP->scorm_debug == '1'
) {
if ($debug > 0) error_log('New LP - Course has changed, discard lp object', 0);
if ($myrefresh == 1) { $myrefresh_id = $oLP->get_id(); }
$oLP = null;
@ -520,9 +526,7 @@ switch ($action) {
} else {
require 'lp_add.php';
}
break;
case 'admin_view':
if (!$is_allowed_to_edit) {
api_not_allowed(true);
@ -624,13 +628,11 @@ switch ($action) {
}
}
break;
case 'move_item':
if (!$is_allowed_to_edit) {
api_not_allowed(true);
}
if ($debug > 0) error_log('New LP - move item action triggered', 0);
if (!$lp_found) { error_log('New LP - No learnpath given for move item', 0); require 'lp_list.php'; }
else {
$_SESSION['refresh'] = 1;
@ -678,7 +680,6 @@ switch ($action) {
chdir($cwdir);
require 'lp_list.php';
break;
case 'copy':
if (!$is_allowed_to_edit) {
api_not_allowed(true);
@ -703,7 +704,6 @@ switch ($action) {
}
break;
case 'export_to_pdf':
if (!learnpath::is_lp_visible_for_student($_SESSION['oLP']->lp_id, api_get_user_id())) {
api_not_allowed();
}
@ -725,15 +725,13 @@ switch ($action) {
if (!$lp_found) { error_log('New LP - No learnpath given for delete', 0); require 'lp_list.php'; }
else {
$_SESSION['refresh'] = 1;
// Remove lp from homepage if it is there.
//$_SESSION['oLP']->toggle_visibility((int)$_GET['lp_id'],'i');
$_SESSION['oLP']->delete(null, $_GET['lp_id'], 'remove');
Session::erase('oLP');
require 'lp_list.php';
}
break;
case 'toggle_visible': // Change lp visibility (inside lp tool).
case 'toggle_visible':
// Change lp visibility (inside lp tool).
if (!$is_allowed_to_edit) {
api_not_allowed(true);
}
@ -744,8 +742,8 @@ switch ($action) {
require 'lp_list.php';
}
break;
case 'toggle_publish': // Change lp published status (visibility on homepage).
case 'toggle_publish':
// Change lp published status (visibility on homepage).
if (!$is_allowed_to_edit) {
api_not_allowed(true);
}
@ -756,8 +754,8 @@ switch ($action) {
require 'lp_list.php';
}
break;
case 'move_lp_up': // Change lp published status (visibility on homepage)
case 'move_lp_up':
// Change lp published status (visibility on homepage)
if (!$is_allowed_to_edit) {
api_not_allowed(true);
}
@ -770,8 +768,8 @@ switch ($action) {
require 'lp_list.php';
}
break;
case 'move_lp_down': //change lp published status (visibility on homepage)
case 'move_lp_down':
// Change lp published status (visibility on homepage)
if (!$is_allowed_to_edit) {
api_not_allowed(true);
}
@ -784,7 +782,6 @@ switch ($action) {
require 'lp_list.php';
}
break;
case 'edit':
if (!$is_allowed_to_edit) {
api_not_allowed(true);
@ -838,7 +835,6 @@ switch ($action) {
$hide_toc_frame = null;
}
$_SESSION['oLP']->set_hide_toc_frame($hide_toc_frame);
$_SESSION['oLP']->set_prerequisite($_REQUEST['prerequisites']);
$_SESSION['oLP']->set_use_max_score($_REQUEST['use_max_score']);
@ -946,7 +942,6 @@ switch ($action) {
require 'lp_admin_view.php';
}
break;
case 'restart':
if ($debug > 0) error_log('New LP - restart action triggered', 0);
if (!$lp_found) { error_log('New LP - No learnpath given for restart', 0); require 'lp_list.php'; }
@ -955,7 +950,6 @@ switch ($action) {
require 'lp_view.php';
}
break;
case 'last':
if ($debug > 0) error_log('New LP - last action triggered', 0);
if (!$lp_found) { error_log('New LP - No learnpath given for last', 0); require 'lp_list.php'; }
@ -964,7 +958,6 @@ switch ($action) {
require 'lp_view.php';
}
break;
case 'first':
if ($debug > 0) error_log('New LP - first action triggered', 0);
if (!$lp_found) { error_log('New LP - No learnpath given for first', 0); require 'lp_list.php'; }
@ -973,7 +966,6 @@ switch ($action) {
require 'lp_view.php';
}
break;
case 'next':
if ($debug > 0) error_log('New LP - next action triggered', 0);
if (!$lp_found) { error_log('New LP - No learnpath given for next', 0); require 'lp_list.php'; }
@ -1094,7 +1086,6 @@ switch ($action) {
$_SESSION['oLP']->switch_attempt_mode();
require 'lp_list.php';
break;
case 'switch_scorm_debug':
if ($debug > 0) error_log('New LP - switch_scorm_debug action triggered', 0);
if (!$lp_found) { error_log('New LP - No learnpath given for switch', 0); require 'lp_list.php'; }
@ -1102,12 +1093,10 @@ switch ($action) {
$_SESSION['oLP']->update_scorm_debug();
require 'lp_list.php';
break;
case 'intro_cmdAdd':
if ($debug > 0) error_log('New LP - intro_cmdAdd action triggered', 0);
// Add introduction section page.
break;
case 'js_api_refresh':
if ($debug > 0) error_log('New LP - js_api_refresh action triggered', 0);
if (!$lp_found) { error_log('New LP - No learnpath given for js_api_refresh', 0); require 'lp_message.php'; }

@ -419,29 +419,26 @@ if ($is_allowed_to_edit) {
function updateContentHeight() {
document.body.style.overflow = 'hidden';
var IE = window.navigator.appName.match(/microsoft/i);
var hauteurHeader = document.getElementById('header').offsetHeight;
var hauteurAuthorImg = document.getElementById('author_image').offsetHeight;
var hauteurAuthorName = document.getElementById('author_name').offsetHeight;
var heightBreadcrumb = document.getElementById('learning_path_breadcrumb_zone').offsetHeight;
var control = document.getElementById('control');
var heightControl = (control)? control.offsetHeight : 0;
var hauteurMedia = 0;
if ($("#lp_media_file").length != 0) {
hauteurMedia = document.getElementById('lp_media_file').offsetHeight;
}
var hauteurTitre = document.getElementById('scorm_title').offsetHeight;
var hauteurAction = 0;
if (document.getElementById('actions_lp')) hauteurAction = document.getElementById('actions_lp').offsetHeight;
var hauteurHaut = hauteurHeader+hauteurAuthorImg+hauteurAuthorName+hauteurMedia+hauteurTitre+hauteurAction;
var innerHauteur = (IE) ? document.body.clientHeight : window.innerHeight ;
var debugsize = 0;
var heightHeader = ($('#header').height())? $('#header').height() : 0 ;
var heightAuthorImg = ($('#author_image').height())? $('#author_image').height() : 0 ;
var heightAuthorName = ($('#author_name').height())? $('#author_name').height() : 0 ;
var heightBreadcrumb = ($('#learning_path_breadcrumb_zone').height())? $('#learning_path_breadcrumb_zone').height() : 0 ;
var heightControl = ($('#control').is(':visible'))? $('#control').height() : 0 ;
var heightMedia = ($('#lp_media_file').length != 0)? $('#lp_media_file').height() : 0 ;
var heightTitle = ($('#scorm_title').height())? $('#scorm_title').height() : 0 ;
var heightAction = ($('#actions_lp').height())? $('#actions_lp').height() : 0 ;
var heightTop = heightHeader + heightAuthorImg + heightAuthorName + heightMedia + heightTitle + heightAction + 100;
heightTop = (heightTop < 230)? heightTop : 230;
var innerHeight = (IE) ? document.body.clientHeight : window.innerHeight ;
// -40 is a static adjustement for margin, spaces on the page
<?php if (!empty($_SESSION['oLP']->scorm_debug)) echo 'debugsize = 150;' ?>
document.getElementById('inner_lp_toc').style.height = innerHauteur - hauteurHaut - 40 - debugsize + "px";
if (document.getElementById('content_id')) {
document.getElementById('content_id').style.height = innerHauteur - debugsize - heightBreadcrumb - heightControl + "px";
$('#inner_lp_toc').css('height', innerHeight - heightTop - heightBreadcrumb - heightControl + "px");
if ($('#content_id')) {
$('#content_id').css('height', innerHeight - heightBreadcrumb - heightControl + "px");
}
if ($('#hide_bar')) {
$('#hide_bar').css('height', innerHeight - heightBreadcrumb - heightControl + "px");
}
// Loads the glossary library.
@ -481,6 +478,9 @@ if ($is_allowed_to_edit) {
?>}
$(document).ready(function() {
updateContentHeight();
$('#hide_bar').children().click(function(){
updateContentHeight();
});
$(window).resize(function() {
updateContentHeight();
});

@ -1127,9 +1127,12 @@ if ($survey_data['survey_type'] === '0') {
if ($survey_data['show_form_profile'] == 0) {
// The normal survey as always
if (($show < $numberofpages) || !$_GET['show']) { //$show = $_GET['show'] + 1
echo '<button type="submit" name="next_survey_page" class="next">'.get_lang('NextQuestion').'</button>';
if ($show == 0) {
echo '<button type="submit" name="next_survey_page" class="next">'.get_lang('StartSurvey').'</button>';
} else {
echo '<button type="submit" name="next_survey_page" class="next">'.get_lang('Next').'</button>';
}
}
if ($show >= $numberofpages && $_GET['show']) {
echo '<button type="submit" name="finish_survey" class="next">'.get_lang('FinishSurvey').'</button>';
}
@ -1138,7 +1141,11 @@ if ($survey_data['survey_type'] === '0') {
if (isset($_GET['show'])) {
$numberofpages = count($paged_questions);
if (($show < $numberofpages) || !$_GET['show']) { //$show = $_GET['show'] + 1
echo '<button type="submit" name="next_survey_page" class="next">'.get_lang('Next').'</button>';
if ($show == 0) {
echo '<button type="submit" name="next_survey_page" class="next">'.get_lang('StartSurvey').'</button>';
} else {
echo '<button type="submit" name="next_survey_page" class="next">'.get_lang('Next').'</button>';
}
}
if ($show >= $numberofpages && $_GET['show']) {

@ -214,7 +214,11 @@ if (api_is_course_admin() || (api_is_course_admin() && $_GET['isStudentView'] ==
}
if (($show < $numberofpages) || (!$_GET['show'] && count($questions) > 0)) {
echo '<br /><button type="submit" name="next_survey_page" class="next">'.get_lang('NextQuestion').' </button>';
if ($show == 0) {
echo '<br /><button type="submit" name="next_survey_page" class="next">'.get_lang('StartSurvey').' </button>';
} else {
echo '<br /><button type="submit" name="next_survey_page" class="next">'.get_lang('NextQuestion').' </button>';
}
}
if ($show >= $numberofpages && $_GET['show'] || (isset($_GET['show']) && count($questions) == 0)) {
if ($questions_exists == false) {

@ -0,0 +1,4 @@
{% if error_message %}
{{ error_message }}
{% endif %}
{{form}}

@ -115,7 +115,7 @@ class bbb {
if ($id) {
if ($this->debug) error_log("create_meeting: $id ");
$meeting_name = isset($params['meeting_name']) ? $params['meeting_name'] : api_get_course_id();
$meeting_name = isset($params['meeting_name']) ? $params['meeting_name'] : api_get_course_id().'-'.api_get_session_id();
$welcome_msg = isset($params['welcome_msg']) ? $params['welcome_msg'] : null;
$record = isset($params['record']) && $params['record'] ? 'true' : 'false';
$duration = isset($params['duration']) ? intval($params['duration']) : 0;

@ -83,7 +83,7 @@ if (!empty($meetings)) {
}
$users_online = $bbb->get_users_online_in_current_room();
$status = $bbb->is_server_running();
$meeting_exists = $bbb->meeting_exists(api_get_course_id());
$meeting_exists = $bbb->meeting_exists(api_get_course_id().'-'.api_get_session_id());
$show_join_button = false;
if ($meeting_exists || $teacher) {
$show_join_button = true;

@ -48,7 +48,7 @@ foreach ($categoRow as $category => $description) {
//Online evaluation requires a course
if ($i == 6) {
$attributes = array(
'id' => $i,
'id' => $i,
'category_id' => $i,
'name' => $category,
'description' => $description,
@ -57,14 +57,14 @@ foreach ($categoRow as $category => $description) {
);
} else {
$attributes = array(
'id' => $i,
'id' => $i,
'category_id' => $i,
'project_id' => 1,
'description' => $description,
'name' => $category
);
}
Database::insert($table, $attributes);
$i++;
}
@ -219,8 +219,8 @@ $sql = "CREATE TABLE IF NOT EXISTS ".$table." (
Database::query($sql);
//Menu main tabs
$rsTab = $objPlugin->addTab('Ticket', '/plugin/ticket/src/myticket.php');
$rsTab = $objPlugin->addTab('Ticket', 'plugin/ticket/src/myticket.php');
if ($rsTab) {
echo "<script>location.href = '" . $_SERVER['REQUEST_URI'] . "';</script>";
}
}

@ -1,35 +1,84 @@
<?php /* License: see /license.txt */
//Needed in order to show the plugin title
$strings['plugin_title'] = "Support tickets";
$strings['plugin_comment'] = "Plugin to include a support tickets system inside Chamilo.";
$strings['tool_enable'] = "Enable Ticket plugin";
$strings['tool_enable_help'] = "Enabling the ticket tool will make a new tab available in the main horizontal menu. This tab will appear for all users and will lead them to the tickets management system where they can check the status of their tickets.";
$strings['TabsTickets'] = "Tickets tab";
$strings['TicketNum'] = "Ticket #";
$strings['Date'] = "Date";
$strings['Category'] = "Category";
$strings['User'] = "User";
$strings['Program'] = "Program";
$strings['Responsible'] = "Assigned to";
$strings['Status'] = "Status";
$strings['Message'] = "Messages";
$strings['Description'] = "Description";
$strings['MyTickets'] = "My Tickets";
$strings['MsgWelcome'] = "Welcome to YOUR tickets section. Here, you'll be able to track the state of all the tickets you created in the main tickets section";
<?php
$strings['plugin_title'] = "Support tickets";
$strings['plugin_comment'] = "Plugin to include a support tickets system inside Chamilo.";
$strings['tool_enable'] = "Enable Ticket plugin";
$strings['tool_enable_help'] = "Enabling the ticket tool will make a new tab available in the main horizontal menu. This tab will appear for all users and will lead them to the tickets management system where they can check the status of their tickets.";
$strings['TabsTickets'] = "Tickets tab";
$strings['TicketNum'] = "Ticket #";
$strings['Date'] = "Date";
$strings['Category'] = "Category";
$strings['User'] = "User";
$strings['Program'] = "Program";
$strings['Responsible'] = "Assigned to";
$strings['Status'] = "Status";
$strings['Message'] = "Messages";
$strings['Description'] = "Description";
$strings['Tickets'] = "Tickets";
$strings['MyTickets'] = "My Tickets";
$strings['MsgWelcome'] = "Welcome to YOUR tickets section. Here, you'll be able to track the state of all the tickets you created in the main tickets section";
$strings['TckSuccessSave'] = "Your ticket has been created successfully";
$strings['ValidUser'] = "Please select a user";
$strings['ValidType'] = "Please select a type";
$strings['ValidSubject'] = "Please select a topic";
$strings['ValidCourse'] = "Please select a course";
$strings['ValidEmail'] = "The e-mail address must be valid";
$strings['ValidMessage'] = "You must enter a message";
$strings['Presential'] = "Presential";
$strings['PersonalEmail'] = "Personal e-mail";
$strings['Optional'] = "Optional";
$strings['TckClose'] = "Close the ticket";
$strings['TckNew'] = "New ticket";
$strings['TcksNew'] = "New tickets";
$strings['Unassigned'] = "Not assigned";
$strings['Unassign'] = "Unassigned";
$strings['Read'] = "Read";
$strings['Unread'] = "Not read";
$strings['RegisterDate'] = "Registration date";
$strings['AssignedTo'] = "Assigned to";
$strings['ValidUser'] = "Please select a user";
$strings['ValidType'] = "Please select a type";
$strings['ValidSubject'] = "Please select a topic";
$strings['ValidCourse'] = "Please select a course";
$strings['ValidEmail'] = "The e-mail address must be valid";
$strings['ValidMessage'] = "You must enter a message";
$strings['PersonalEmail'] = "Personal e-mail";
$strings['Optional'] = "Optional";
$strings['ErrorRegisterMessage'] = "The ticket could not be created";
$strings['Source'] = "Source";
$strings['Source'] = "Source";
$strings['DeniedAccess'] = "Unauthorized access.";
$strings['StsNew'] = "New";
$strings['StsPending'] = "Pending";
$strings['StsUnconfirmed'] = "Unconfirmed";
$strings['StsClose'] = "Closed";
$strings['StsForwarded'] = "Resent";
$strings['Priority'] = "Priority";
$strings['PriorityHigh'] = "High";
$strings['PriorityNormal'] = "Normal";
$strings['PriorityLow'] = "Low";
$strings['SrcEmail'] = "E-mail";
$strings['SrcPhone'] = "Phone";
$strings['SrcPresential'] = "In-person";
$strings['TicketAssignedMsg'] = "<p>Dear %s</p><p><a href='%s'>Ticket %s</a> has been assigned to you.</p><p>Message sent from the support ticket system</p>";
$strings['TicketAssignX'] = "[TICKETS] Assignation of ticket #%s";
$strings['AreYouSureYouWantToCloseTheTicket'] = "Are you sure you want to close this ticket?";
$strings['AreYouSureYouWantToUnassignTheTicket'] = "Are you sure you want to unassign this ticket?";
$strings['YouMustWriteAMessage'] = "You have to enter a message";
$strings['LastResponse'] = "Last reponse";
$strings['AssignTicket'] = "Assign ticket";
$strings['AttendedBy'] = "Attended by";
$strings['IfYouAreSureTheTicketWillBeClosed'] = "If you are certain, the ticket will be closed";
$strings['YourQuestionWasSentToTheResponableAreaX'] = "<p>Your support request was sent to the area manager: <a href='mailto:%s'>%s</a></p>";
$strings['YourAnswerToTheQuestionWillBeSentToX'] = "<p>The answer to your support ticket was sent to the following e-mail: <a href='#'>%s</a></p>";
$strings['VirtualSupport'] = "Virtual support";
$strings['IncidentResentToVirtualSupport'] = "The incident was sent to virtual support";
$strings['DateLastEdition'] = "Last edition date";
$strings['GeneralInformation'] = "General information";
$strings['TicketsAboutGeneralInformation'] = "Tickets about general information";
$strings['Enrollment'] = "Enrollment";
$strings['TicketsAboutEnrollment'] = "Tickets about enrollment";
$strings['RequestAndPapework'] = "Requests and paperwork";
$strings['TicketsAboutRequestAndPapework'] = "Tickets about requests and paperwork";
$strings['AcademicIncidence'] = "Academic Incidents";
$strings['TicketsAboutAcademicIncidence'] = "Tickets about academic incidents, like exams, practices, tasks, etc.";
$strings['VirtualCampus'] = "Virtual campus";
$strings['TicketsAboutVirtualCampus'] = "Tickets about virtual campus";
$strings['OnlineEvaluation'] = "Online evaluation";
$strings['TicketsAboutOnlineEvaluation'] = "Tickets about online evaluation";
$strings['ToBeAssigned'] = "To be assigned";
$strings['Untill'] = "Until";
$strings['TicketWasThisAnswerSatisfying'] = "Was this answer satisfactory?";
$strings['TicketDetail'] = "Ticket details";
$strings['AreYouSure'] = "Are you sure?";
$strings['allow_student_add'] = "Allow students to generate tickets";
?>

@ -1,35 +1,84 @@
<?php /* License: see /license.txt */
//Needed in order to show the plugin title
$strings['plugin_title'] = "Tickets de support";
$strings['plugin_comment'] = "Plugin de gestion des tickets de support.";
$strings['tool_enable'] = "Activer le plugin de tickets";
$strings['tool_enable_help'] = "Activer l'outil de tickets activera un nouvel onglet dans le même menu horizontal. Cet onglet apparaîtra pour tous les utilisateurs et les mènera au système de gestion de tickets où ils pourront vérifier l'état de leurs tickets.";
$strings['TabsTickets'] = "Onglet tickets";
$strings['TicketNum'] = "Ticket #";
$strings['Date'] = "Date";
$strings['Category'] = "Catégorie";
$strings['User'] = "Utilisateur";
$strings['Program'] = "Programme";
$strings['Responsible'] = "Assigné à";
$strings['Status'] = "Statut";
$strings['Message'] = "Messages";
$strings['Description'] = "Description";
$strings['MyTickets'] = "Mes tickets";
$strings['MsgWelcome'] = "Ceci est la section MES Tickets, où vous pouvez suivre l'évolution des tickets que vous avez créé";
<?php
$strings['plugin_title'] = "Tickets de support";
$strings['plugin_comment'] = "Plugin de gestion des tickets de support.";
$strings['tool_enable'] = "Activer le plugin de tickets";
$strings['tool_enable_help'] = "Activer l'outil de tickets activera un nouvel onglet dans le même menu horizontal. Cet onglet apparaîtra pour tous les utilisateurs et les mènera au système de gestion de tickets où ils pourront vérifier l'état de leurs tickets.";
$strings['TabsTickets'] = "Onglet tickets";
$strings['TicketNum'] = "Ticket #";
$strings['Date'] = "Date";
$strings['Category'] = "Catégorie";
$strings['User'] = "Utilisateur";
$strings['Program'] = "Programme";
$strings['Responsible'] = "Assigné à";
$strings['Status'] = "État";
$strings['Message'] = "Messages";
$strings['Description'] = "Description";
$strings['Tickets'] = "Tickets";
$strings['MyTickets'] = "Mes tickets";
$strings['MsgWelcome'] = "Ceci est la section MES Tickets, où vous pouvez suivre l'évolution des tickets que vous avez créé";
$strings['TckSuccessSave'] = "Votre ticket a été enregistré";
$strings['ValidUser'] = "Veuillez sélectionner un utilisateur";
$strings['ValidType'] = "Veuillez sélectionner un type";
$strings['ValidSubject'] = "Veuillez sélectionner un sujet";
$strings['ValidCourse'] = "Veuillez sélectionner un cours";
$strings['ValidEmail'] = "L'adresse e-mail doit être correcte";
$strings['ValidMessage'] = "Veuillez introduire un message";
$strings['Presential'] = "Présentiel";
$strings['PersonalEmail'] = "E-mail personnel";
$strings['Optional'] = "Optionnel";
$strings['TckClose'] = "Fermer le ticket";
$strings['TckNew'] = "Nouveau ticket";
$strings['TcksNew'] = "Nouveaux tickets";
$strings['Unassigned'] = "Non assignés";
$strings['Unassign'] = "Désassigné";
$strings['Read'] = "Lus";
$strings['Unread'] = "Non lus";
$strings['RegisterDate'] = "Date d'enregistrement";
$strings['AssignedTo'] = "Assigné à";
$strings['ValidUser'] = "Veuillez sélectionner un utilisateur";
$strings['ValidType'] = "Veuillez sélectionner un type";
$strings['ValidSubject'] = "Veuillez sélectionner un sujet";
$strings['ValidCourse'] = "Veuillez sélectionner un cours";
$strings['ValidEmail'] = "L'adresse e-mail doit être correcte";
$strings['ValidMessage'] = "Veuillez introduire un message";
$strings['PersonalEmail'] = "E-mail personnel";
$strings['Optional'] = "Optionnel";
$strings['ErrorRegisterMessage'] = "Le ticket n'a pas pu être enregistré";
$strings['Source'] = "Source";
$strings['Source'] = "Source";
$strings['DeniedAccess'] = "Accès non autorisé.";
$strings['StsNew'] = "Nouveau";
$strings['StsPending'] = "En attente";
$strings['StsUnconfirmed'] = "À confirmer";
$strings['StsClose'] = "Fermé";
$strings['StsForwarded'] = "Réenvoyé";
$strings['Priority'] = "Priorité";
$strings['PriorityHigh'] = "Haute";
$strings['PriorityNormal'] = "Normale";
$strings['PriorityLow'] = "Basse";
$strings['SrcEmail'] = "E-mail";
$strings['SrcPhone'] = "Téléphone";
$strings['SrcPresential'] = "En personne";
$strings['TicketAssignedMsg'] = "<p>Cher/Chère %s </p><p>Le <a href='%s'>ticket %s</a> vous a été assigné.</p><p>Message envoyé depuis le système de support.</p>";
$strings['TicketAssignX'] = "[TICKETS] Assignation de ticket #%s";
$strings['AreYouSureYouWantToCloseTheTicket'] = "Êtes-vous certain de vouloir fermer ce ticket?";
$strings['AreYouSureYouWantToUnassignTheTicket'] = "Êtes-vous certain de vouloir désassigner le ticket?";
$strings['YouMustWriteAMessage'] = "Vous devez introduire un message";
$strings['LastResponse'] = "Dernière réponse";
$strings['AssignTicket'] = "Assigner ticket";
$strings['AttendedBy'] = "Pris en charge par";
$strings['IfYouAreSureTheTicketWillBeClosed'] = "Si vous êtes certain, le ticket sera clôturé";
$strings['YourQuestionWasSentToTheResponableAreaX'] = "<p>Votre demande de support a été réenvoyée au responsable du département: <a href='mailto:%s'>%s</a></p>";
$strings['YourAnswerToTheQuestionWillBeSentToX'] = "<p>La réponse à votre demande de support sera envoyée à l'e-mail:<a href='#'>%s</a></p>";
$strings['VirtualSupport'] = "Support virtuel";
$strings['IncidentResentToVirtualSupport'] = "L'incident a été envoyé au support virtuel";
$strings['DateLastEdition'] = "Date de la dernière édition";
$strings['GeneralInformation'] = "Information générale";
$strings['TicketsAboutGeneralInformation'] = "Tickets liés à information générale.";
$strings['Enrollment'] = "Inscription";
$strings['TicketsAboutEnrollment'] = "Tickets liés à l'inscription.";
$strings['RequestAndPapework'] = "Questions précédentes et procédures";
$strings['TicketsAboutRequestAndPapework'] = "Tickets liés aux questions précédentes et procédures.";
$strings['AcademicIncidence'] = "Incidences académiques";
$strings['TicketsAboutAcademicIncidence'] = "Tickets liés aux incidences académiques, comme les examens, les pratiques, tâches, etc.";
$strings['VirtualCampus'] = "Campus virtuel";
$strings['TicketsAboutVirtualCampus'] = "Tickets liés au campus virtuel";
$strings['OnlineEvaluation'] = "Évaluation en ligne";
$strings['TicketsAboutOnlineEvaluation'] = "Tickets liés aux évaluations en ligne";
$strings['ToBeAssigned'] = "À assigner";
$strings['Untill'] = "Jusqu'au";
$strings['TicketWasThisAnswerSatisfying'] = "La réponse au ticket est-elle satisfaisante?";
$strings['TicketDetail'] = "Détails du ticket";
$strings['AreYouSure'] = "Êtes-vous certain?";
$strings['allow_student_add'] = "Permettre à l'étudiant de générer des tickets";
?>

@ -23,21 +23,23 @@ $id = intval($_GET['id']);
$tblWeeklyReport = Database::get_main_table('rp_reporte_semanas');
$sql ="SELECT * FROM $tblWeeklyReport WHERE id = '$id'";
$sql_tasks = "SELECT id AS colid, title as coltitle
FROM ".Database::get_course_table(TABLE_STUDENT_PUBLICATION , $course_info['dbName'])."
FROM ".Database::get_course_table(TABLE_STUDENT_PUBLICATION)."
WHERE parent_id = 0
AND id NOT IN (
SELECT work_id
FROM $tblWeeklyReport
WHERE course_code = '$course_code'
AND id != '$id'
WHERE
course_code = '$course_code' AND
id != '$id'
)";
$sql_forum = "SELECT thread_id AS colid, thread_title AS coltitle
FROM ".Database::get_course_table(TABLE_FORUM_THREAD, $course_info['dbName'])."
FROM ".Database::get_course_table(TABLE_FORUM_THREAD)."
WHERE thread_id NOT IN (
SELECT forum_id
FROM $tblWeeklyReport
WHERE course_code = '$course_code'
AND id != '$id'
WHERE
course_code = '$course_code' AND
id != '$id'
)";
$rs = Database::fetch_object(Database::query($sql));
$result_tareas = Database::query($sql_tasks);
@ -63,6 +65,8 @@ while ($row = Database::fetch_assoc($result_forum)) {
}
echo '</select></div><div>';
echo '<div class="row">
<div class="formw"><button class="save" name="edit" type="button" value="' . get_lang('Edit') . '" onClick="save(' . "$id" . ');">' . get_lang('Edit') . '</button></div>
<div class="formw">
<button class="save" name="edit" type="button" value="' . get_lang('Edit') . '" onClick="save(' . "$id" . ');">' . get_lang('Edit') . '</button>
</div>
</div>';
echo '</form>';

@ -1,13 +1,11 @@
<?php
/* For licensing terms, see /license.txt */
/**
*
* @package chamilo.plugin.ticket
*/
/**
* Init section
*/
require_once '../config.php';
$plugin = TicketPlugin::create();
@ -20,6 +18,7 @@ $user_id = api_get_user_id();
if (!isset($_GET['file']) || !isset($_GET['title']) || !isset($_GET['ticket_id'])) {
api_not_allowed();
}
if (!api_is_platform_admin()) {
$ticket_id = intval($_GET['ticket_id']);
$table_support_messages = Database::get_main_table(TABLE_TICKET_MESSAGE);

@ -9,3 +9,4 @@
*/
require_once '../config.php';
header('location:' . api_get_path(WEB_PLUGIN_PATH) . PLUGIN_NAME . '/src/myticket.php?message=success');
exit;

@ -1,6 +1,6 @@
<?php
/* For licensing terms, see /license.txt */
/**
* This script is the Tickets plugin main entry point
* @package chamilo.plugin.ticket
@ -10,8 +10,8 @@
*/
$language_file = array('messages', 'userInfo', 'admin');
$cidReset = true;
$course_plugin = 'ticket'; //needed in order to load the plugin lang variables
//needed in order to load the plugin lang variables
$course_plugin = 'ticket';
require_once '../config.php';
$plugin = TicketPlugin::create();
@ -43,12 +43,12 @@ function clear_course_list (div_course) {
$("div#"+div_course).html("&nbsp;");
$("div#"+div_course).hide("");
}
$(function() {
$( "#keyword_start_date_start" ).datepicker({ dateFormat: ' . "'dd/mm/yy'" . ' });
$( "#keyword_start_date_end" ).datepicker({ dateFormat: ' . "'dd/mm/yy'" . ' });
});
$(document).ready(function() {
$("#advanced_search_form").css("display","none");
});
@ -97,7 +97,7 @@ function display_advanced_search_form () {
border: 1px solid black;
width: 350px;
background-color: white;
z-index: 99;
z-index: 99;
padding: 3px;
display: inline;
}
@ -130,7 +130,15 @@ function display_advanced_search_form () {
$this_section = 'tickets';
unset($_SESSION['this_section']);
$table = new SortableTable('Tickets', array('TicketManager', 'get_total_tickets_by_user_id'), array('TicketManager', 'get_tickets_by_user_id'), 2, 20, 'DESC');
$table = new SortableTable(
'Tickets',
array('TicketManager', 'get_total_tickets_by_user_id'),
array('TicketManager', 'get_tickets_by_user_id'),
2,
20,
'DESC'
);
if ($table->per_page == 0) {
$table->per_page = 20;
}
@ -153,32 +161,32 @@ if (isset($_GET['action'])) {
break;
case 'export':
$data = array(
array(
$plugin->get_lang('TicketNum'),
$plugin->get_lang('Date'),
$plugin->get_lang('DateLastEdition'),
$plugin->get_lang('Category'),
$plugin->get_lang('User'),
$plugin->get_lang('Program'),
$plugin->get_lang('Responsible'),
$plugin->get_lang('Status'),
$plugin->get_lang('Description')
)
);
array(
$plugin->get_lang('TicketNum'),
$plugin->get_lang('Date'),
$plugin->get_lang('DateLastEdition'),
$plugin->get_lang('Category'),
$plugin->get_lang('User'),
$plugin->get_lang('Program'),
$plugin->get_lang('Responsible'),
$plugin->get_lang('Status'),
$plugin->get_lang('Description')
)
);
$datos = $table->get_clean_html();
foreach ($datos as $ticket) {
$ticket[0] = substr(strip_tags($ticket[0]), 0, 12);
$ticket_rem = array(
utf8_decode(strip_tags($ticket[0])),
utf8_decode(api_html_entity_decode($ticket[1])),
utf8_decode(strip_tags($ticket[2])),
utf8_decode(strip_tags($ticket[3])),
utf8_decode(strip_tags($ticket[4])),
utf8_decode(strip_tags($ticket[5])),
utf8_decode(strip_tags($ticket[6])),
utf8_decode(strip_tags($ticket[7])),
utf8_decode(strip_tags($ticket[0])),
utf8_decode(api_html_entity_decode($ticket[1])),
utf8_decode(strip_tags($ticket[2])),
utf8_decode(strip_tags($ticket[3])),
utf8_decode(strip_tags($ticket[4])),
utf8_decode(strip_tags($ticket[5])),
utf8_decode(strip_tags($ticket[6])),
utf8_decode(strip_tags($ticket[7])),
utf8_decode(strip_tags(str_replace('&nbsp;', ' ', $ticket[9])))
);
);
$data[] = $ticket_rem;
}
Export::export_table_xls($data, $plugin->get_lang('Tickets'));
@ -197,9 +205,9 @@ $isAdmin = api_is_platform_admin();
Display::display_header($plugin->get_lang('MyTickets'));
if ($isAdmin) {
$get_parameter = '&keyword=' . $_GET['keyword'] . '&keyword_status=' . $_GET['keyword_status'] . '&keyword_category=' . $_GET['keyword_category'] . '&keyword_request_user=' . $_GET['keyword_request_user'];
$get_parameter .= '&keyword_admin=' . $_GET['keyword_admin'] . '&keyword_start_date=' . $_GET['keyword_start_date'] . '&keyword_unread=' . $_GET['keyword_unread'];
$get_parameter2 = '&Tickets_per_page=' . $_GET['Tickets_per_page'] . '&Tickets_column=' . $_GET['Tickets_column'];
$get_parameter = '&keyword=' . Security::remove_XSS($_GET['keyword']) . '&keyword_status=' . Security::remove_XSS($_GET['keyword_status']) . '&keyword_category=' .Security::remove_XSS($_GET['keyword_category']). '&keyword_request_user=' . Security::remove_XSS($_GET['keyword_request_user']);
$get_parameter .= '&keyword_admin=' . Security::remove_XSS($_GET['keyword_admin']) . '&keyword_start_date=' . Security::remove_XSS($_GET['keyword_start_date']) . '&keyword_unread=' . Security::remove_XSS($_GET['keyword_unread']);
$get_parameter2 = '&Tickets_per_page=' . Security::remove_XSS($_GET['Tickets_per_page']) . '&Tickets_column=' . Security::remove_XSS($_GET['Tickets_column']);
if (isset($_GET['submit_advanced'])) {
$get_parameter .= "&submit_advanced=";
}
@ -251,7 +259,7 @@ if ($isAdmin) {
$renderer->setElementTemplate('<span>{element}</span> ');
$form->addElement('text', 'keyword', get_lang('keyword'), 'size="25"');
$form->addElement('style_submit_button', 'submit_simple', get_lang('Search'), 'class="search"');
$form->addElement('static', 'search_advanced_link', null,
$form->addElement('static', 'search_advanced_link', null,
'<a href="javascript://" class = "advanced-parameters" onclick="display_advanced_search_form();">'
. '<span id="img_plus_and_minus">&nbsp;'
. Display::return_icon('div_show.gif', get_lang('Show')) . ' '
@ -262,7 +270,7 @@ if ($isAdmin) {
echo '<span class="fleft">' .
'<a href="' . api_get_path(WEB_PLUGIN_PATH) . 'ticket/src/new_ticket.php">' .
Display::return_icon('add.png', $plugin->get_lang('TckNew'), '', '32') . '</a>' .
'<a href="' . api_get_self() . '?action=export' . $get_parameter . $get_parameter2 . '">' .
'<a href="' . api_get_self() . '?action=export' . $get_parameter . $get_parameter2 . '">' .
Display::return_icon('export_excel.png', get_lang('Export'), '', '32') . '</a>' .
'</span>';
}
@ -354,7 +362,7 @@ if ($isAdmin) {
echo '<div class="actions" >';
echo '<span style="float:right;">' .
'<a href="' . api_get_path(WEB_PLUGIN_PATH) . 'ticket/src/new_ticket.php">' .
Display::return_icon('add.png', $plugin->get_lang('TckNew'), '', '32') .
Display::return_icon('add.png', $plugin->get_lang('TckNew'), '', '32') .
'</a>' .
'</span>';
echo '<span style="float:right;">' .

@ -30,7 +30,7 @@ function load_course_list (div_course, my_user_id, user_email) {
url: "course_user_list.php",
data: "user_id="+my_user_id,
success: function(datos) {
$("div#user_request").html(datos);
$("div#user_request").html(datos);
$("#user_id_request").val(my_user_id);
$("#personal_email").val(user_email);
$("#btnsubmit").attr("disabled", false);
@ -44,14 +44,14 @@ function changeType() {
$("#other_area").val(other_area[id]);
$("#email").val(email[id]);
if(parseInt(course_required[id]) == 0){
$("#divCourse").css("display", "none");
$("#divCourse").css("display", "none");
if( id != "CUR"){
$("#divEmail").css("display", "block");
$("#personal_email").attr("required","required");
}
$("#course_id").disabled = true;
$("#course_id").value = 0;
}else{
}
$("#course_id").disabled = true;
$("#course_id").value = 0;
}else{
$("#divCourse").css("display", "block");
$("#course_id").prop("disabled", false);
$("#course_id").val(0);
@ -63,7 +63,7 @@ function handleClick2(myRadio) {
alert(document.getElementById("user_id_request").value);
}
function validate() {
var re = /^([a-zA-Z0-9_.-])+@(([a-zA-Z0-9-])+.)+([a-zA-Z0-9]{2,4})+$/;
var re = /^([a-zA-Z0-9_.-])+@(([a-zA-Z0-9-])+.)+([a-zA-Z0-9]{2,4})+$/;
fckEditor1val = FCKeditorAPI.__Instances["content"].GetHTML();
document.getElementById("content").value= fckEditor1val;
var selected = document.getElementById("category_id").selectedIndex;
@ -131,7 +131,7 @@ div.divTicket {
width: 70%;
float: center;
margin-left: 15%;
}
</style>';
$types = TicketManager::get_all_tickets_categories();
@ -161,11 +161,11 @@ function js_str($s)
*/
function js_array($array, $name, $key)
{
$temp = array();
$return = "new Array(); ";
foreach ($array as $value) {
$return .= $name . "['" . $value['category_id'] . "'] ='" . $value[$key] . "'; ";
}
return $return;
}
@ -193,8 +193,6 @@ function show_form_send_ticket()
$select_types .= '</div></div>';
echo $select_types;
// Course
$courses_list = CourseManager::get_courses_list_by_user_id($user_id, false, true);
$select_course = '<div id="user_request" >
</div>';
echo $select_course;
@ -240,7 +238,7 @@ function show_form_send_ticket()
$showBlock = "style='display: none;'";
$source[SRC_PLATFORM] = $plugin->get_lang('SrcPlatform');
}
$select_source = '
<div class="row" ' . $showBlock . '>
<div class="label2">' . $plugin->get_lang('Source') . ':</div>
@ -273,8 +271,8 @@ function show_form_send_ticket()
<div class="label2">' . get_lang('Message') . ':</div>
<div class="formw2">
<input type="hidden" id="content" name="content" value="" style="display:none">
<input type="hidden" id="content___Config" value="ToolbarSet=Messages&amp;Width=95%25&amp;Height=250&amp;ToolbarSets={ %22Messages%22: [ [ %22Bold%22,%22Italic%22,%22-%22,%22InsertOrderedList%22,%22InsertUnorderedList%22,%22Link%22,%22RemoveLink%22 ] ], %22MessagesMaximized%22: [ ] }&amp;LoadPlugin=[%22customizations%22]&amp;EditorAreaStyles=body { background: #ffffff; }&amp;ToolbarStartExpanded=false&amp;CustomConfigurationsPath=/main/inc/lib/fckeditor/myconfig.js&amp;EditorAreaCSS=/main/css/chamilo/default.css&amp;ToolbarComboPreviewCSS=/main/css/chamilo/default.css&amp;DefaultLanguage=es&amp;ContentLangDirection=ltr&amp;AdvancedFileManager=true&amp;BaseHref=' . api_get_path(WEB_PLUGIN_PATH) . PLUGIN_NAME . '/s/&amp;&amp;UserIsCourseAdmin=true&amp;UserIsPlatformAdmin=true" style="display:none">
<iframe id="content___Frame" src="/main/inc/lib/fckeditor/editor/fckeditor.html?InstanceName=content&amp;Toolbar=Messages" width="95%" height="250" frameborder="0" scrolling="no" style="margin: 0px; padding: 0px; border: 0px; background-color: transparent; background-image: none; width: 95%; height: 250px;">
<input type="hidden" id="content___Config" value="&amp;Width=95%25&amp;Height=250&amp;ToolbarSets={ %22Messages%22: [ [ %22Bold%22,%22Italic%22,%22-%22,%22InsertOrderedList%22,%22InsertUnorderedList%22,%22Link%22,%22RemoveLink%22 ] ], %22MessagesMaximized%22: [ ] }&amp;LoadPlugin=[%22customizations%22]&amp;EditorAreaStyles=body { background: #ffffff; }&amp;ToolbarStartExpanded=false&amp;CustomConfigurationsPath='.api_get_path(WEB_CODE_PATH).'inc/lib/fckeditor/myconfig.js&amp;EditorAreaCSS=/main/css/chamilo/default.css&amp;ToolbarComboPreviewCSS='.api_get_path(WEB_CODE_PATH).'main/css/chamilo/default.css&amp;DefaultLanguage=es&amp;ContentLangDirection=ltr&amp;AdvancedFileManager=true&amp;BaseHref=' . api_get_path(WEB_PLUGIN_PATH) . PLUGIN_NAME . '/s/&amp;&amp;UserIsCourseAdmin=true&amp;UserIsPlatformAdmin=true" style="display:none">
<iframe id="content___Frame" src="'.api_get_path(WEB_CODE_PATH).'inc/lib/fckeditor/editor/fckeditor.html?InstanceName=content&amp;Toolbar=Messages" width="95%" height="250" frameborder="0" scrolling="no" style="margin: 0px; padding: 0px; border: 0px; background-color: transparent; background-image: none; width: 95%; height: 250px;">
</iframe>
</div>
</div>';
@ -341,7 +339,7 @@ function save_ticket()
$category_id = $_POST['category_id'];
$content = $_POST['content'];
if ($_POST['phone'] != "") {
$content .= '<p style="color:red">&nbsp;' . get_lang('Phone') . ': ' . $_POST['phone'] . '</p>';
$content .= '<p style="color:red">&nbsp;' . get_lang('Phone') . ': ' . Security::remove_XSS($_POST['phone']). '</p>';
}
$course_id = $_POST['course_id'];
$project_id = $_POST['project_id'];
@ -356,12 +354,24 @@ function save_ticket()
$file_attachments = $_FILES;
$responsible = (api_is_platform_admin() ? api_get_user_id() : 0);
if (TicketManager::insert_new_ticket(
$category_id, $course_id, $project_id,
$other_area, $email, $subject, $content,
$personal_email, $file_attachments,
$source, $priority, $status, $user_id,
$responsible)) {
$category_id,
$course_id,
$project_id,
$other_area,
$email,
$subject,
$content,
$personal_email,
$file_attachments,
$source,
$priority,
$status,
$user_id,
$responsible
)
) {
header('location:' . api_get_path(WEB_PLUGIN_PATH) . PLUGIN_NAME . '/src/myticket.php?message=success');
exit;
} else {
Display::display_header(get_lang('ComposeMessage'));
Display::display_error_message($plugin->get_lang('ErrorRegisterMessage'));
@ -382,12 +392,12 @@ function get_number_of_users()
}
if (isset($_GET['keyword'])) {
$keyword = Database::escape_string(trim($_GET['keyword']));
$sql .= " WHERE (u.firstname LIKE '%$keyword%' OR
u.lastname LIKE '%$keyword%' OR
concat(u.firstname,' ',u.lastname) LIKE '%$keyword%' OR
concat(u.lastname,' ',u.firstname) LIKE '%$keyword%' OR
u.username LIKE '%$keyword%' OR
u.email LIKE '%$keyword%' OR
$sql .= " WHERE (u.firstname LIKE '%$keyword%' OR
u.lastname LIKE '%$keyword%' OR
concat(u.firstname,' ',u.lastname) LIKE '%$keyword%' OR
concat(u.lastname,' ',u.firstname) LIKE '%$keyword%' OR
u.username LIKE '%$keyword%' OR
u.email LIKE '%$keyword%' OR
u.official_code LIKE '%$keyword%') ";
}
$res = Database::query($sql);
@ -406,8 +416,7 @@ function get_number_of_users()
function get_user_data($from, $number_of_items, $column, $direction)
{
$user_table = Database :: get_main_table(TABLE_MAIN_USER);
$admin_table = Database :: get_main_table(TABLE_MAIN_ADMIN);
if (api_is_western_name_order()) {
$col34 = "u.firstname AS col3,
u.lastname AS col4,";
@ -415,7 +424,7 @@ function get_user_data($from, $number_of_items, $column, $direction)
$col34 = "u.lastname AS col3,
u.firstname AS col4,";
}
$sql = "SELECT
u.user_id AS col0,
u.official_code AS col2,
@ -424,18 +433,18 @@ function get_user_data($from, $number_of_items, $column, $direction)
u.email AS col6,
u.status AS col7,
u.active AS col8,
u.user_id AS col9 ,
u.user_id AS col9 ,
u.expiration_date AS exp
FROM $user_table u ";
if (isset($_GET['keyword'])) {
$keyword = Database::escape_string(trim($_GET['keyword']));
$sql .= " WHERE (u.firstname LIKE '%$keyword%' OR
u.lastname LIKE '%$keyword%' OR
concat(u.firstname,' ',u.lastname) LIKE '%$keyword%' OR
concat(u.lastname,' ',u.firstname) LIKE '%$keyword%' OR
u.username LIKE '%$keyword%' OR
u.official_code LIKE '%$keyword%' OR
$sql .= " WHERE (u.firstname LIKE '%$keyword%' OR
u.lastname LIKE '%$keyword%' OR
concat(u.firstname,' ',u.lastname) LIKE '%$keyword%' OR
concat(u.lastname,' ',u.firstname) LIKE '%$keyword%' OR
u.username LIKE '%$keyword%' OR
u.official_code LIKE '%$keyword%' OR
u.email LIKE '%$keyword%' )";
}
if (!in_array($direction, array('ASC', 'DESC'))) {
@ -451,7 +460,6 @@ function get_user_data($from, $number_of_items, $column, $direction)
$res = Database::query($sql);
$users = array();
$t = time();
while ($user = Database::fetch_row($res)) {
$user_id = $user[0];
$image_path = UserManager::get_user_picture_path_by_id($user_id, 'web', false, true);

@ -67,7 +67,7 @@ div.ticket-form {
width: 70%;
float: center;
margin-left: 15%;
}
</style>';
@ -110,8 +110,6 @@ function show_form()
echo '<div class="ticket-form">';
echo '<form enctype="multipart/form-data" action="' . api_get_self() . '" method="post" name="send_ticket" id="send_ticket"
onsubmit="return validate()" style="width:100%">';
$courses_list = CourseManager::get_courses_list_by_user_id($user_id, false, true);
$select_course = '<div id="user_request" >
</div>';
echo $select_course;
@ -120,7 +118,7 @@ function show_form()
<div class="label2" >' . get_lang('Tool') .':</div>
<div class="formw2">';
$select_tool .= '<select style="width: 95%; " name = "tool" id="tool" >';
foreach ($tools as $tool) {
$select_tool .= "<option value = '" . $tool['id'] . "' selected >" . $tool['name'] . "</option>";
}
@ -139,7 +137,7 @@ function show_form()
echo '<div class="row">
<div class="label2">
</div>
<div class="formw2">
<div class="formw2">
<button class="save" name="report" type="submit" id="btnsubmit" disabled="disabled">' . get_lang('CompleteReport') .'</button>
</div>
</div>';
@ -159,12 +157,12 @@ function get_number_of_users()
}
if (isset($_GET['keyword'])) {
$keyword = Database::escape_string(trim($_GET['keyword']));
$sql .= " WHERE (u.firstname LIKE '%$keyword%' OR
u.lastname LIKE '%$keyword%' OR
concat(u.firstname,' ',u.lastname) LIKE '%$keyword%' OR
concat(u.lastname,' ',u.firstname) LIKE '%$keyword%' OR
u.username LIKE '%$keyword%' OR
u.email LIKE '%$keyword %' OR
$sql .= " WHERE (u.firstname LIKE '%$keyword%' OR
u.lastname LIKE '%$keyword%' OR
concat(u.firstname,' ',u.lastname) LIKE '%$keyword%' OR
concat(u.lastname,' ',u.firstname) LIKE '%$keyword%' OR
u.username LIKE '%$keyword%' OR
u.email LIKE '%$keyword %' OR
u.official_code LIKE '%$keyword%') ";
}
$res = Database::query($sql);
@ -183,8 +181,7 @@ function get_number_of_users()
function get_user_data($from, $number_of_items, $column, $direction)
{
$user_table = Database :: get_main_table(TABLE_MAIN_USER);
$admin_table = Database :: get_main_table(TABLE_MAIN_ADMIN);
if (api_is_western_name_order()) {
$col34 = "u.firstname AS col3,
u.lastname AS col4,";
@ -192,27 +189,27 @@ function get_user_data($from, $number_of_items, $column, $direction)
$col34 = "u.lastname AS col3,
u.firstname AS col4,";
}
$sql = "SELECT
u.user_id AS col0,
u.official_code AS col2,
$col34
u.username AS col5,
u.email AS col6,
u.status AS col7,
u.active AS col8,
u.user_id AS col9,
u.expiration_date AS exp
u.user_id AS col0,
u.official_code AS col2,
$col34
u.username AS col5,
u.email AS col6,
u.status AS col7,
u.active AS col8,
u.user_id AS col9,
u.expiration_date AS exp
FROM $user_table u ";
if (isset($_GET['keyword'])) {
$keyword = Database::escape_string(trim($_GET['keyword']));
$sql .= " WHERE (u.firstname LIKE '%$keyword%' OR
u.lastname LIKE '%$keyword%' OR
concat(u.firstname,' ',u.lastname) LIKE '%$keyword%' OR
concat(u.lastname,' ',u.firstname) LIKE '%$keyword%' OR
u.username LIKE '%$keyword%' OR
u.official_code LIKE '%$keyword%'
u.lastname LIKE '%$keyword%' OR
concat(u.firstname,' ',u.lastname) LIKE '%$keyword%' OR
concat(u.lastname,' ',u.firstname) LIKE '%$keyword%' OR
u.username LIKE '%$keyword%' OR
u.official_code LIKE '%$keyword%'
OR u.email LIKE '%$keyword%' )";
}
if (!in_array($direction, array('ASC', 'DESC'))) {
@ -273,16 +270,16 @@ if (isset($_GET['keyword'])) {
$table->set_header(6, get_lang('Action'));
$table->display();
}
//if(isset($_GET['user_request']))
if (isset($_POST['report'])) {
$course_id = $_POST['course_id'];
$tool = $_POST['tool'];
$course_info = api_get_course_info_by_id($course_id);
$user_id = $_POST['user_id_request'];
$sql = "SELECT
u.username , CONCAT(u.lastname, ' ', u.firstname) AS fullname,
DATE_SUB(access.access_date,INTERVAL 5 HOUR) AS access_date,
$course_id = Database::escape_string($_POST['course_id']);
$tool = Database::escape_string($_POST['tool']);
$user_id = intval($_POST['user_id_request']);
$sql = "SELECT
u.username , CONCAT(u.lastname, ' ', u.firstname) AS fullname,
DATE_SUB(access.access_date,INTERVAL 5 HOUR) AS access_date,
c.title AS course, access_tool AS tool
FROM " . Database::get_statistic_table(TABLE_STATISTIC_TRACK_E_ACCESS) . " access
LEFT JOIN " . Database::get_main_table(TABLE_MAIN_USER) . " u ON access.access_user_id = u.user_id
@ -291,10 +288,10 @@ if (isset($_POST['report'])) {
if ($tool != '') {
$sql.="AND access.access_tool = '$tool' ";
}
$start_date = $_POST['keyword_start_date_start'];
$end_date = $_POST['keyword_start_date_end'];
$start_date = Database::escape_string($_POST['keyword_start_date_start']);
$end_date = Database::escape_string($_POST['keyword_start_date_end']);
if ($start_date != '' || $end_date != '') {
$sql .= " HAVING ";
if ($start_date != '')

@ -32,14 +32,14 @@ var id = document.getElementById("category_id").options[selected].value ;
document.getElementById("email").value= email[id];
document.getElementById("divEmail").style.display="none";
if(parseInt(course_required[id]) == 0){
document.getElementById("divCourse").style.display="none";
document.getElementById("divCourse").style.display="none";
if( id != "CUR"){
document.getElementById("divEmail").style.display="";
document.getElementById("personal_email").required="required";
}
document.getElementById("course_id").disabled=true;
document.getElementById("course_id").value=0;
}else{
document.getElementById("personal_email").required="required";
}
document.getElementById("course_id").disabled=true;
document.getElementById("course_id").value=0;
}else{
document.getElementById("divCourse").style.display = "";
document.getElementById("course_id").disabled=false;
document.getElementById("course_id").value=0;
@ -48,7 +48,7 @@ var id = document.getElementById("category_id").options[selected].value ;
}
function validate() {
var re = /^([a-zA-Z0-9_.-])+@(([a-zA-Z0-9-])+.)+([a-zA-Z0-9]{2,4})+$/;
var re = /^([a-zA-Z0-9_.-])+@(([a-zA-Z0-9-])+.)+([a-zA-Z0-9]{2,4})+$/;
fckEditor1val = FCKeditorAPI.__Instances["content"].GetHTML();
document.getElementById("content").value= fckEditor1val;
var selected = document.getElementById("category_id").selectedIndex;
@ -101,12 +101,12 @@ function add_image_form() {
function show_question(questionid){
if(document.getElementById("C"+questionid)){
if(document.getElementById("A"+questionid).style.display == "none"){
document.getElementById("A"+questionid).style.display = "";
document.getElementById("A"+questionid).style.display = "";
}
else if(document.getElementById("A"+questionid).style.display == ""){
document.getElementById("A"+questionid).style.display = "none";
document.getElementById("A"+questionid).style.display = "none";
}
}
}
}
</script>
@ -123,7 +123,7 @@ div.divTicket {
width: 70%;
float: center;
margin-left: 15%;
}
</style>';
$types = TicketManager::get_all_tickets_categories();
@ -132,7 +132,7 @@ $htmlHeadXtra[] = '<script language="javascript">
var course_required = ' . js_array($types, 'course_required', 'course_required') . '
var other_area = ' . js_array($types, 'other_area', 'other_area') . '
var email = ' . js_array($types, 'email', 'email') . '
document.getElementById("divCourse").style.display="none";
document.getElementById("divCourse").style.display="none";
</script>';
$htmlHeadXtra[] = '<script src="' . api_get_path(WEB_LIBRARY_PATH) . 'javascript/tag/jquery.fcbkcomplete.js" type="text/javascript" language="javascript"></script>';
$htmlHeadXtra[] = '<link href="' . api_get_path(WEB_LIBRARY_PATH) . 'javascript/tag/style.css" rel="stylesheet" type="text/css" />';
@ -165,7 +165,7 @@ function js_array($array, $name, $key)
}
/**
*
*
* @global array $types
* @global object $plugin
*/
@ -211,8 +211,8 @@ function show_form_send_ticket()
<div class="label2">' . get_lang('Message') . '</div>
<div class="formw2">
<input type="hidden" id="content" name="content" value="" style="display:none">
<input type="hidden" id="content___Config" value="ToolbarSet=Messages&amp;Width=95%25&amp;Height=250&amp;ToolbarSets={ %22Messages%22: [ [ %22Bold%22,%22Italic%22,%22-%22,%22InsertOrderedList%22,%22InsertUnorderedList%22,%22Link%22,%22RemoveLink%22 ] ], %22MessagesMaximized%22: [ ] }&amp;LoadPlugin=[%22customizations%22]&amp;EditorAreaStyles=body { background: #ffffff; }&amp;ToolbarStartExpanded=false&amp;CustomConfigurationsPath=/main/inc/lib/fckeditor/myconfig.js&amp;EditorAreaCSS=/main/css/chamilo/default.css&amp;ToolbarComboPreviewCSS=/main/css/chamilo/default.css&amp;DefaultLanguage=es&amp;ContentLangDirection=ltr&amp;AdvancedFileManager=true&amp;BaseHref=' . api_get_path(WEB_PLUGIN_PATH) . PLUGIN_NAME . '/s/&amp;&amp;UserIsCourseAdmin=true&amp;UserIsPlatformAdmin=true" style="display:none">
<iframe id="content___Frame" src="/main/inc/lib/fckeditor/editor/fckeditor.html?InstanceName=content&amp;Toolbar=Messages" width="95%" height="250" frameborder="0" scrolling="no" style="margin: 0px; padding: 0px; border: 0px; background-color: transparent; background-image: none; width: 95%; height: 250px;">
<input type="hidden" id="content___Config" value="ToolbarSet=Messages&amp;Width=95%25&amp;Height=250&amp;ToolbarSets={ %22Messages%22: [ [ %22Bold%22,%22Italic%22,%22-%22,%22InsertOrderedList%22,%22InsertUnorderedList%22,%22Link%22,%22RemoveLink%22 ] ], %22MessagesMaximized%22: [ ] }&amp;LoadPlugin=[%22customizations%22]&amp;EditorAreaStyles=body { background: #ffffff; }&amp;ToolbarStartExpanded=false&amp;CustomConfigurationsPath='.api_get_path(WEB_CODE_PATH).'inc/lib/fckeditor/myconfig.js&amp;EditorAreaCSS=/main/css/chamilo/default.css&amp;ToolbarComboPreviewCSS='.api_get_path(WEB_CODE_PATH).'css/chamilo/default.css&amp;DefaultLanguage=es&amp;ContentLangDirection=ltr&amp;AdvancedFileManager=true&amp;BaseHref=' . api_get_path(WEB_PLUGIN_PATH) . PLUGIN_NAME . '/s/&amp;&amp;UserIsCourseAdmin=true&amp;UserIsPlatformAdmin=true" style="display:none">
<iframe id="content___Frame" src="'.api_get_path(WEB_CODE_PATH).'inc/lib/fckeditor/editor/fckeditor.html?InstanceName=content&amp;Toolbar=Messages" width="95%" height="250" frameborder="0" scrolling="no" style="margin: 0px; padding: 0px; border: 0px; background-color: transparent; background-image: none; width: 95%; height: 250px;">
</iframe>
</div>
</div>';
@ -252,7 +252,7 @@ function save_ticket()
$category_id = $_POST['category_id'];
$content = $_POST['content'];
if ($_POST['phone'] != "")
$content.= '<p style="color:red">&nbsp;' . get_lang('Phone') . ': ' . $_POST['phone'] . '</p>';
$content.= '<p style="color:red">&nbsp;' . get_lang('Phone') . ': ' . Security::remove_XSS($_POST['phone']). '</p>';
$course_id = $_POST['course_id'];
$project_id = $_POST['project_id'];
$subject = $_POST['subject'];
@ -260,8 +260,21 @@ function save_ticket()
$email = $_POST['email'];
$personal_email = $_POST['personal_email'];
$file_attachments = $_FILES;
if (TicketManager::insert_new_ticket($category_id, $course_id, $project_id, $other_area, $email, $subject, $content, $personal_email, $file_attachments)) {
if (TicketManager::insert_new_ticket(
$category_id,
$course_id,
$project_id,
$other_area,
$email,
$subject,
$content,
$personal_email,
$file_attachments
)
) {
header('location:' . api_get_path(WEB_PLUGIN_PATH) . PLUGIN_NAME . '/src/myticket.php?message=success');
exit;
} else {
Display::display_header(get_lang('ComposeMessage'));
Display::display_error_message($plugin->get_lang('ErrorRegisterMessage'));

File diff suppressed because it is too large Load Diff

@ -3,9 +3,6 @@
/**
* @package chamilo.plugin.ticket
*/
/**
*
*/
$language_file = array('registration');
require_once '../config.php';
$plugin = TicketPlugin::create();
@ -30,4 +27,4 @@ $history = TicketManager::get_assign_log($ticket_id);
<td width="125px"><?php echo api_convert_encoding($history[$k]['insertuser'], 'UTF-8', $charset); ?></td>
</tr>
<?php } ?>
</table>
</table>

@ -38,21 +38,20 @@ $(document).ready(function(){
Asignar: function(){
$("#genesis").submit()
},
Close: function() {
$( this ).dialog( "close" );
}
Close: function() {
$( this ).dialog( "close" );
}
}
});
$("a#assign").click(function () {
$( "#dialog-form" ).dialog( "open" );
});
$("input#responseyes").click(function () {
if(!confirm("' . $plugin->get_lang('AreYouSure') . ' : ' . strtoupper(get_lang('Yes')) . '. ' . $plugin->get_lang('IfYouAreSureTheTicketWillBeClosed') . '")){
return false;
}
});
$("a#assign").click(function () {
$( "#dialog-form" ).dialog( "open" );
});
$("input#responseyes").click(function () {
if(!confirm("' . $plugin->get_lang('AreYouSure') . ' : ' . strtoupper(get_lang('Yes')) . '. ' . $plugin->get_lang('IfYouAreSureTheTicketWillBeClosed') . '")){
return false;
}
});
$("input#responseno").click(function () {
if(!confirm("' . $plugin->get_lang('AreYouSure') . ' : ' . strtoupper(get_lang('No')) . '")){
return false;
@ -60,20 +59,20 @@ $(document).ready(function(){
});
$("#unassign").click(function () {
if (!confirm("' . $plugin->get_lang('AreYouSureYouWantToUnassignTheTicket') . '")) {
return false
return false
}
});
});
$("#close").click(function () {
if (!confirm("' . $plugin->get_lang('AreYouSureYouWantToCloseTheTicket') . '")) {
return false
return false
}
});
' . $disableReponseButtons . '
});
function validate() {
fckEditor1val = FCKeditorAPI.__Instances["content"].GetHTML();
function validate() {
fckEditor1val = FCKeditorAPI.__Instances["content"].GetHTML();
document.getElementById("content").value= fckEditor1val;
if(fckEditor1val == ""){
alert("' . $plugin->get_lang('YouMustWriteAMessage') . '");
@ -117,8 +116,8 @@ div.row div.label2 {
width:22%;
}
div.row div.formw2 {
width:50%;
margin-left: 2%;
width:50%;
margin-left: 2%;
margin-right: 16%;
float:left;
}
@ -128,14 +127,14 @@ div.row div.formw2 {
padding:15px 10px 15px 50px;
background-repeat: no-repeat;
background-position: 10px center;
width:50%;
width:50%;
behavior: url(/pie/PIE.htc);
}
.messageuser {
color: #00529B;
-moz-border-radius: 15px 15px 15px 15px;
-webkit-border-radius: 15px 15px 15px 15px;
background-color: #BDE5F8;
background-color: #BDE5F8;
margin-left:20%;
border-radius:15px;
float: left;
@ -159,6 +158,7 @@ if (!isset($ticket['ticket'])) {
}
if (!isset($_GET['ticket_id'])) {
header('location:myticket.php');
exit;
}
if (isset($_POST['response'])) {
if ($user_id == $ticket['ticket']['request_user']) {
@ -225,7 +225,7 @@ if (!isset($_POST['compose'])) {
}
}
$bold = '';
if ($ticket['ticket']['status_id'] == 'CLS') {
$bold = 'style = "font-weight: bold;"';
echo "<style>
@ -234,7 +234,7 @@ if (!isset($_POST['compose'])) {
}
</style>";
}
echo '<div style="margin-left:20%;margin-right:20%;">
<table width="100%" >
<tr>
@ -287,7 +287,7 @@ if (!isset($_POST['compose'])) {
<div>
<div class="label">' . get_lang('Responsable') . ':</div>
<div class="formw">' . $select_admins . '</div>
</div>
</div>
</form>';
echo '</div>';
echo '</table></div>';
@ -349,8 +349,8 @@ function show_form_send_message()
</div>
<div class="formw2">
<input type="hidden" id="content" name="content" value="" style="display:none">
<input type="hidden" id="content___Config" value="ToolbarSet=Messages&amp;Width=95%25&amp;Height=250&amp;ToolbarSets={ %22Messages%22: [ [ %22Bold%22,%22Italic%22,%22-%22,%22InsertOrderedList%22,%22InsertUnorderedList%22,%22Link%22,%22RemoveLink%22 ] ], %22MessagesMaximized%22: [ ] }&amp;LoadPlugin=[%22customizations%22]&amp;EditorAreaStyles=body { background: #ffffff; }&amp;ToolbarStartExpanded=false&amp;CustomConfigurationsPath=/main/inc/lib/fckeditor/myconfig.js&amp;EditorAreaCSS=/main/css/chamilo/default.css&amp;ToolbarComboPreviewCSS=/main/css/chamilo/default.css&amp;DefaultLanguage=es&amp;ContentLangDirection=ltr&amp;AdvancedFileManager=true&amp;BaseHref=' . api_get_path(WEB_PLUGIN_PATH) . PLUGIN_NAME . '/s/&amp;&amp;UserIsCourseAdmin=true&amp;UserIsPlatformAdmin=true" style="display:none">
<iframe id="content___Frame" src="/main/inc/lib/fckeditor/editor/fckeditor.html?InstanceName=content&amp;Toolbar=Messages" width="95%" height="250" frameborder="0" scrolling="no" style="margin: 0px; padding: 0px; border: 0px; background-color: transparent; background-image: none; width: 95%; height: 250px;">
<input type="hidden" id="content___Config" value="ToolbarSet=Messages&amp;Width=95%25&amp;Height=250&amp;ToolbarSets={ %22Messages%22: [ [ %22Bold%22,%22Italic%22,%22-%22,%22InsertOrderedList%22,%22InsertUnorderedList%22,%22Link%22,%22RemoveLink%22 ] ], %22MessagesMaximized%22: [ ] }&amp;LoadPlugin=[%22customizations%22]&amp;EditorAreaStyles=body { background: #ffffff; }&amp;ToolbarStartExpanded=false&amp;CustomConfigurationsPath='.api_get_path(WEB_CODE_PATH).'inc/lib/fckeditor/myconfig.js&amp;EditorAreaCSS=/main/css/chamilo/default.css&amp;ToolbarComboPreviewCSS=/main/css/chamilo/default.css&amp;DefaultLanguage=es&amp;ContentLangDirection=ltr&amp;AdvancedFileManager=true&amp;BaseHref=' . api_get_path(WEB_PLUGIN_PATH) . PLUGIN_NAME . '/s/&amp;&amp;UserIsCourseAdmin=true&amp;UserIsPlatformAdmin=true" style="display:none">
<iframe id="content___Frame" src="'.api_get_path(WEB_CODE_PATH).'inc/lib/fckeditor/editor/fckeditor.html?InstanceName=content&amp;Toolbar=Messages" width="95%" height="250" frameborder="0" scrolling="no" style="margin: 0px; padding: 0px; border: 0px; background-color: transparent; background-image: none; width: 95%; height: 250px;">
</iframe>
</div>
</div>
@ -375,7 +375,7 @@ function show_form_send_message()
echo '<div class="row">
<div class="label"></div>
<div class="formw">
<button class="save" name="compose" type="submit">' . get_lang('SendMessage') . '</button>' .
<button class="save" name="compose" type="submit">' . get_lang('SendMessage') . '</button>' .
($isAdmin ? '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="checkbox" name="confirmation"/>Solicitar confirmaci&oacute;n' : "") .
'</div>
</div>';
@ -383,4 +383,3 @@ function show_form_send_message()
}
Display::display_footer();
?>

@ -1,11 +1,10 @@
<?php
/* For licensing terms, see /license.txt */
/**
* Class TicketPlugin definition file
* @package chamilo.plugin.ticket
*/
/**
* Class TicketPlugin
*
* @package chamilo.plugin.ticket
*
*/
class TicketPlugin extends Plugin
{
@ -19,6 +18,7 @@ class TicketPlugin extends Plugin
static $result = null;
return $result ? $result : $result = new self();
}
protected function __construct()
{
$settings = array(
@ -35,8 +35,9 @@ class TicketPlugin extends Plugin
{
// Create database tables and insert a Tab
require_once api_get_path(SYS_PLUGIN_PATH) . PLUGIN_NAME . '/database.php';
}
/**
* Uninstall the ticket plugin
*/
@ -55,11 +56,11 @@ class TicketPlugin extends Plugin
$tblTicketAssgLog = Database::get_main_table(TABLE_TICKET_ASSIGNED_LOG);
$settings = $this->get_settings();
$plugSetting = current($settings);
//Delete settings
$sql = "DELETE FROM $tblSettings WHERE variable = 'ticket_tool_enable'";
Database::query($sql);
$sql = "DROP TABLE IF EXISTS $tblTicketTicket";
Database::query($sql);
$sql = "DROP TABLE IF EXISTS $tblTicketStatus";
@ -78,11 +79,11 @@ class TicketPlugin extends Plugin
Database::query($sql);
$sql = "DROP TABLE IF EXISTS $tblTicketTicket";
Database::query($sql);
$rsTab = $this->deleteTab($plugSetting['comment']);
if ($rsTab) {
echo "<script>location.href = '" . $_SERVER['REQUEST_URI'] . "';</script>";
}
}
}
}

@ -1,13 +1,10 @@
<?php
/* For licensing terms, see /license.txt */
/**
*
* @package chamilo.plugin.ticket
*/
/**
*
*/
require_once '../config.php';
$plugin = TicketPlugin::create();
@ -25,21 +22,21 @@ $(document).ready(function (){
// load remote content
dialog.load(
url,
url,
{},
function(responseText, textStatus, XMLHttpRequest) {
dialog.dialog({
modal : true,
width : 540,
height : 400
});
modal : true,
width : 540,
height : 400
});
});
//prevent the browser to follow the link
return false;
});
});
});
function showContent(div){
if($("div#"+div).attr("class")=="blackboard_hide"){
$("div#"+div).attr("class","blackboard_show");
@ -48,9 +45,9 @@ function showContent(div){
$("div#"+div).attr("class","blackboard_hide");
$("div#"+div).attr("style","");
}
}
function save() {
work_id = $("#work_id").val();
forum_id = $("#forum_id").val();
@ -83,14 +80,14 @@ function save() {
display: none;
}
.reports{
border:1px ;
border:1px ;
}
.reports th {
border-bottom: 1px solid #DDDDDD;
line-height: normal;
text-align: center;
vertical-align: middle;
background-color: #F2F2F2;
background-color: #F2F2F2;
}
</style>';
@ -107,4 +104,3 @@ if (isset($_GET['action'])) {
echo $results['show'];
Display::display_footer();
}
?>

@ -19,12 +19,14 @@ function initializeReport($course_code)
$table_course_rel_user = Database::get_main_table(TABLE_MAIN_COURSE_USER);
$table_post = Database::get_course_table(TABLE_FORUM_POST, $course_info['dbName']);
$table_work = Database::get_course_table(TABLE_STUDENT_PUBLICATION, $course_info['dbName']);
$course_code = Database::escape_string($course_code);
$res = Database::query("SELECT COUNT(*) as cant FROM $table_reporte_semanas WHERE course_code = '" . $course_code . "'");
$sqlWeeks = "SELECT semanas FROM $table_semanas_curso WHERE course_code = '$course_code'";
$resWeeks = Database::query($sqlWeeks);
$weeks = Database::fetch_object($resWeeks);
$obj = Database::fetch_object($res);
$weeksCount = (!isset($_POST['weeksNumber'])) ? (($weeks->semanas == 0) ? 7 : $weeks->semanas) : $_POST['weeksNumber'];
$weeksCount = Database::escape_string($weeksCount);
Database::query("REPLACE INTO $table_semanas_curso (course_code , semanas) VALUES ('$course_code','$weeksCount')");
if (intval($obj->cant) != $weeksCount) {
@ -51,6 +53,7 @@ function initializeReport($course_code)
return false;
} else {
$page = (!isset($_GET['page'])) ? 1 : $_GET['page'];
Database::query("UPDATE $table_students_report sr SET sr.work_ok = 1
WHERE CONCAT (sr.user_id,',',sr.week_report_id)
IN (SELECT DISTINCT CONCAT(w.user_id,',',rs.id)
@ -73,21 +76,24 @@ function initializeReport($course_code)
function showResults($courseInfo, $weeksCount, $page)
{
$course_code = $courseInfo['code'];
$page = intval($page);
$weeksCount = intval($weeksCount);
$tableWeeklyReport = Database::get_main_table('rp_reporte_semanas');
$tableStudentsReport = Database::get_main_table('rp_students_report');
//$table_course_rel_user = Database::get_main_table(TABLE_MAIN_COURSE_USER);
$tableUser = Database::get_main_table(TABLE_MAIN_USER);
$tableThread = Database::get_course_table(TABLE_FORUM_THREAD, $courseInfo['dbName']);
$tableWork = Database::get_course_table(TABLE_STUDENT_PUBLICATION, $courseInfo['dbName']);
$tableThread = Database::get_course_table(TABLE_FORUM_THREAD);
$tableWork = Database::get_course_table(TABLE_STUDENT_PUBLICATION);
$results = array();
$tableExport = array();
$sqlHeader = "SELECT rs.id as id,rs.week_id, w.title AS work_title, t.thread_title ,'EVALUATION' as eval_title ,'QUIZ' as pc_title
FROM $tableWeeklyReport rs
LEFT JOIN $tableThread t ON t.thread_id = rs.forum_id
LEFT JOIN $tableWork w ON w.id = rs.work_id
WHERE rs.course_code = '$course_code'
ORDER BY rs.week_id";
FROM $tableWeeklyReport rs
LEFT JOIN $tableThread t ON t.thread_id = rs.forum_id
LEFT JOIN $tableWork w ON w.id = rs.work_id
WHERE rs.course_code = '$course_code'
ORDER BY rs.week_id";
$resultHeader = Database::query($sqlHeader);
$ids = array();
$line = '<tr>

Loading…
Cancel
Save