Skip to content

Commit d5fc0aa

Browse files
committed
Merge branch '1.10.x' of github.com:chamilo/chamilo-lms into 1.10.x
2 parents 1abce50 + e121e28 commit d5fc0aa

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+461
-303
lines changed
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
<?php
2+
/* For licensing terms, see /license.txt */
3+
4+
namespace Application\Migrations\Schema\V110;
5+
6+
use Application\Migrations\AbstractMigrationChamilo;
7+
use Doctrine\DBAL\Schema\Schema;
8+
9+
/**
10+
* Fix c_quiz_answer's correct field for id_auto
11+
*/
12+
class Version20151221150100 extends AbstractMigrationChamilo
13+
{
14+
/**
15+
* @param Schema $schema
16+
*/
17+
public function up(Schema $schema)
18+
{
19+
$this->addSql("
20+
UPDATE track_e_attempt a
21+
INNER JOIN c_quiz_answer qa
22+
ON a.question_id = qa.question_id
23+
INNER JOIN c_quiz_question q
24+
ON qa.question_id = q.id
25+
SET a.answer = qa.id_auto
26+
WHERE
27+
a.answer = qa.id AND
28+
q.c_id = a.c_id AND
29+
q.type IN (" . MATCHING . ", " . DRAGGABLE . ", " . MATCHING_DRAGGABLE . ")
30+
");
31+
32+
$this->addSql("
33+
UPDATE c_quiz_answer a
34+
INNER JOIN c_quiz_answer b
35+
ON a.question_id = b.question_id
36+
INNER JOIN c_quiz_question q
37+
ON b.question_id = q.id
38+
SET a.correct = b.id_auto
39+
WHERE
40+
a.correct = b.id AND
41+
q.c_id = a.c_id AND
42+
q.type IN (" . MATCHING . ", " . DRAGGABLE . ", " . MATCHING_DRAGGABLE . ")
43+
");
44+
}
45+
46+
/**
47+
* @param Schema $schema
48+
*/
49+
public function down(Schema $schema)
50+
{
51+
}
52+
}

documentation/changelog.html

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ <h1>Chamilo&nbsp;Changelog</h1>
4848

4949
<a name="1.10.2"></a>
5050

51-
<h1>Chamilo 1.10.2 - Alsted, 21st of December 2015</h1>
51+
<h1>Chamilo 1.10.2 - Alsted, 22nd of December 2015</h1>
5252
<h3>Release notes - summary</h3>
5353
<p>Chamilo 1.10.2 is a minor, bugfix version of the 1.10.x branch, with a few new features and bugfixes on top of 1.10.0. Notably, this version enables the migration from 1.9.x to 1.10.2 (many bugs were reported in the migration from 1.9.x to 1.10.0, which were fixed within the 2 months to this minor version).</p>
5454
<h3>Release name</h3>
@@ -64,7 +64,7 @@ <h3>Possibly breaking changes</h3>
6464
<h3>Notable new Features</h3>
6565
<h4>For end-users, teachers and Chamilo admins</h4>
6666
<ul>
67-
<li>Migrations from 1.9.x is now possible without major issues.</li>
67+
<li>Migrations from 1.9.x is now possible without major issue (that we know of).</li>
6868
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/90e2852223d5aad04802f282b7919379084ec624">90e28522</a>) If chamilo exercise added in LP has pass % then change status to passed/failed</li>
6969
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/edf83bdc0d778d347dcf3e37425369eaaecb1335">edf83bdc</a> - <a href="https://support.chamilo.org/issues/7768">#7768</a>) Add filter by user on sales report</li>
7070
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/5b26584ff2b2db0b5a33a5c642a431b80ecb2c5b">5b26584f</a> - <a href="https://support.chamilo.org/issues/7768">#7768</a>) Display payment method on sale report</li>
@@ -94,7 +94,7 @@ <h4>For developers and sysadmins</h4>
9494
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/5ac54cf549bd9dfe15fb3f5b9ec977e24afe8c7c">5ac54cf5</a>) Remove deprecated javascript_service_displayed variable to avoid notice</li>
9595
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/c8bc145b1bbebe0e8c2fdfd56e17fcfeebbffe98">c8bc145b</a>) Delete courses folder after migration if folder is empty.</li>
9696
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/2b95a8c296a0bf9d2552c775c7a71fec7b574b1a">2b95a8c2</a>) Add "I am a {language} user" and expose background context for tests</li>
97-
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/b6d11076a24ac3005ea0b5963b9f5e1ce1f34cc5">b6d11076</a> - <a href="https://support.chamilo.org/issues/7898">#7898</a>) Change of <i> to <em> for WCAG support</li>
97+
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/b6d11076a24ac3005ea0b5963b9f5e1ce1f34cc5">b6d11076</a> - <a href="https://support.chamilo.org/issues/7898">#7898</a>) Change of &lt;i&gt; to &lt;em&gt; for WCAG support</li>
9898
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/775ef96c85f853daedd93fb05118fcd936315953">775ef96c</a> - <a href="https://support.chamilo.org/issues/7910">#7910</a>) Add curl dependency</li>
9999
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/a380a6905be8086ea6d22c1194bd5a40bf249852">a380a690</a>) Add possibility to use SVG logo for the platform</li>
100100
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/2776c37887aa3b3d646a8a4501e823264f6de5cb">2776c378</a> - <a href="https://support.chamilo.org/issues/7909">#7909</a>) Add temporary indexes to speed up migration queries</li>
@@ -246,6 +246,9 @@ <h3>Improvements (minor features) and debug</h3>
246246
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/d16ecc995ba6c9ca067f71002f04c01fb7e8b30a">d16ecc99</a> - <a href="https://support.chamilo.org/issues/8007">#8007</a>) Set Mozilla Firefox as able to play MP3 files</li>
247247
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/d712139fd837eabf397695390fb34cbecb1fb3a5">d712139f</a> - <a href="https://support.chamilo.org/issues/8004">#8004</a>) fix scroll items forum lpview CT#8004</li>
248248
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/6645ea2f74eb2c0e88fe34ac559f6caa7fa8b8a0">6645ea2f</a>) Add User Access Overview report</li>
249+
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/ac29dcda0be27d206cdf50904a4d575cc5351a6c">ac29dcda</a> - <a href="https://support.chamilo.org/issues/8003">#8003</a>) Avoid the filter the Gravatar URL when images are displayed </li>
250+
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/b9fe27560b89251ff7409ecbfaeb8f1cd7abcd2e">b9fe2756</a> - <a href="https://support.chamilo.org/issues/8013">#8013</a>) Fix SQL queries related to fulltext search engine</li>
251+
<li>(<a href="https://github.com/chamilo/chamilo-lms/commit/4c6d2e9e4899d2544cb7c7ee1aae362c93fb28f7">4c6d2e9e</a>) Fix c_quiz_answer's correct field with id_auto</li>
249252
</ul>
250253
<h3>Stylesheets and theming</h3>
251254
<ul>

documentation/installation_guide.html

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -315,6 +315,13 @@ <h3>3.1 Upgrading from Chamilo 1.10.x (minor upgrade)</h3>
315315
<li> you're done! No other upgrade procedure is required</li>
316316
</ul>
317317

318+
Please note that if you (unluckily) upgraded from any of the 1.9 versions to 1.10.0 against our recommendations, we
319+
provide a patch script that should get most of it in order. The script is available here:<br />
320+
<a href="https://raw.githubusercontent.com/chamilo/chamilo-lms/1.10.x/tests/scripts/fix_migrations_1.9.x_1.10.0.php">https://raw.githubusercontent.com/chamilo/chamilo-lms/1.10.x/tests/scripts/fix_migrations_1.9.x_1.10.0.php</a> or, if
321+
you are using a development version of Chamilo, directly into you tests/scripts/ folder. You should place the file
322+
in the /tests/scripts/ folder, then edit it to remove the "die();" line, then launch it from your browser (after
323+
connecting to your Chamilo site as admin). You should also remove the scripts afterwards.<br />
324+
This script is provided without warranty. Please *always* take a backup before you use it.
318325
<br />
319326

320327

main/admin/course_list.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -256,19 +256,19 @@ function get_course_visibility_icon($v) {
256256
$style = 'margin-bottom:0;margin-right:5px;';
257257
switch($v) {
258258
case 0:
259-
return Display::return_icon('bullet_red.gif', get_lang('CourseVisibilityClosed'), array('style' => $style));
259+
return Display::return_icon('bullet_red.png', get_lang('CourseVisibilityClosed'), array('style' => $style));
260260
break;
261261
case 1:
262-
return Display::return_icon('bullet_orange.gif', get_lang('Private'), array('style' => $style));
262+
return Display::return_icon('bullet_orange.png', get_lang('Private'), array('style' => $style));
263263
break;
264264
case 2:
265-
return Display::return_icon('bullet_green.gif', get_lang('OpenToThePlatform'), array('style' => $style));
265+
return Display::return_icon('bullet_green.png', get_lang('OpenToThePlatform'), array('style' => $style));
266266
break;
267267
case 3:
268-
return Display::return_icon('bullet_blue.gif', get_lang('OpenToTheWorld'), array('style' => $style));
268+
return Display::return_icon('bullet_blue.png', get_lang('OpenToTheWorld'), array('style' => $style));
269269
break;
270270
case 4:
271-
return Display::return_icon('bullet_grey.gif', get_lang('CourseVisibilityHidden'), array('style' => $style));
271+
return Display::return_icon('bullet_grey.png', get_lang('CourseVisibilityHidden'), array('style' => $style));
272272
break;
273273
default:
274274
return '';

main/admin/languages.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -246,15 +246,15 @@
246246
$verified_if_is_father = SubLanguageManager::check_if_language_is_father($row['id']);
247247
$allow_use_sub_language = "&nbsp;<a href='sub_language_add.php?action=definenewsublanguage&id=" . $row['id'] . "'>" . Display::return_icon('new_language.png', get_lang('CreateSubLanguage'), array(), ICON_SIZE_SMALL) . "</a>";
248248
if ($verified_if_is_father === true) {
249-
//$allow_add_term_sub_language = "&nbsp;<a href='sub_language.php?action=registersublanguage&id=".$row['id']."'>".Display::return_icon('2rightarrow.gif', get_lang('AddWordForTheSubLanguage'),array('width'=>ICON_SIZE_SMALL,'height'=>ICON_SIZE_SMALL))."</a>";
249+
//$allow_add_term_sub_language = "&nbsp;<a href='sub_language.php?action=registersublanguage&id=".$row['id']."'>".Display::return_icon('2rightarrow.png', get_lang('AddWordForTheSubLanguage'),array('width'=>ICON_SIZE_SMALL,'height'=>ICON_SIZE_SMALL))."</a>";
250250
$allow_add_term_sub_language = '';
251251
} else {
252252
$allow_add_term_sub_language = '';
253253
}
254254
} else {
255255
$allow_use_sub_language = '';
256256
$all_information_of_sub_language = SubLanguageManager::get_all_information_of_language($row['id']);
257-
$allow_add_term_sub_language = "&nbsp;<a href='sub_language.php?action=registersublanguage&id=" . Security::remove_XSS($all_information_of_sub_language['parent_id']) . "&sub_language_id=" . Security::remove_XSS($row['id']) . "'>" . Display::return_icon('2rightarrow.gif', get_lang('AddWordForTheSubLanguage'), array('width' => ICON_SIZE_SMALL, 'height' => ICON_SIZE_SMALL)) . "</a>";
257+
$allow_add_term_sub_language = "&nbsp;<a href='sub_language.php?action=registersublanguage&id=" . Security::remove_XSS($all_information_of_sub_language['parent_id']) . "&sub_language_id=" . Security::remove_XSS($row['id']) . "'>" . Display::return_icon('2rightarrow.png', get_lang('AddWordForTheSubLanguage'), array('width' => ICON_SIZE_SMALL, 'height' => ICON_SIZE_SMALL)) . "</a>";
258258
$allow_delete_sub_language = "&nbsp;<a href='sub_language_add.php?action=deletesublanguage&id=" . Security::remove_XSS($all_information_of_sub_language['parent_id']) . "&sub_language_id=" . Security::remove_XSS($row['id']) . "'>" . Display::return_icon('delete.png', get_lang('DeleteSubLanguage'), array('width' => ICON_SIZE_SMALL, 'height' => ICON_SIZE_SMALL)) . "</a>";
259259
}
260260
} else {

main/admin/settings.lib.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -719,26 +719,26 @@ function handle_search()
719719
}
720720
*/
721721

722-
$xapian_loaded = Display::return_icon('bullet_green.gif', get_lang('Ok'));
723-
$dir_exists = Display::return_icon('bullet_green.gif', get_lang('Ok'));
724-
$dir_is_writable = Display::return_icon('bullet_green.gif', get_lang('Ok'));
725-
$specific_fields_exists = Display::return_icon('bullet_green.gif', get_lang('Ok'));
722+
$xapian_loaded = Display::return_icon('bullet_green.png', get_lang('Ok'));
723+
$dir_exists = Display::return_icon('bullet_green.png', get_lang('Ok'));
724+
$dir_is_writable = Display::return_icon('bullet_green.png', get_lang('Ok'));
725+
$specific_fields_exists = Display::return_icon('bullet_green.png', get_lang('Ok'));
726726

727727
//Testing specific fields
728728
if (empty($specific_fields)) {
729-
$specific_fields_exists = Display::return_icon('bullet_red.gif', get_lang('AddSpecificSearchField'));
729+
$specific_fields_exists = Display::return_icon('bullet_red.png', get_lang('AddSpecificSearchField'));
730730
}
731731
//Testing xapian extension
732732
if (!extension_loaded('xapian')) {
733-
$xapian_loaded = Display::return_icon('bullet_red.gif', get_lang('Error'));
733+
$xapian_loaded = Display::return_icon('bullet_red.png', get_lang('Error'));
734734
}
735735
//Testing xapian searchdb path
736736
if (!is_dir($xapian_path)) {
737-
$dir_exists = Display::return_icon('bullet_red.gif', get_lang('Error'));
737+
$dir_exists = Display::return_icon('bullet_red.png', get_lang('Error'));
738738
}
739739
//Testing xapian searchdb path is writable
740740
if (!is_writable($xapian_path)) {
741-
$dir_is_writable = Display::return_icon('bullet_red.gif', get_lang('Error'));
741+
$dir_is_writable = Display::return_icon('bullet_red.png', get_lang('Error'));
742742
}
743743

744744
$data[] = array(get_lang('XapianModuleInstalled'),$xapian_loaded);
@@ -759,9 +759,9 @@ function handle_search()
759759
foreach($list_of_programs as $program) {
760760
$output = $ret_val = null;
761761
exec("which $program", $output, $ret_val);
762-
$icon = Display::return_icon('bullet_red.gif', get_lang('NotInstalled'));
762+
$icon = Display::return_icon('bullet_red.png', get_lang('NotInstalled'));
763763
if (!empty($output[0])) {
764-
$icon = Display::return_icon('bullet_green.gif', get_lang('Installed'));
764+
$icon = Display::return_icon('bullet_green.png', get_lang('Installed'));
765765
}
766766
$data2[]= array($program, $output[0], $icon);
767767
}

main/document/downloadfolder.inc.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ function fixDocumentNameCallback($p_event, &$p_header)
198198
1st: Get all files that are visible in the given path
199199
*/
200200
$querypath = Database::escape_string($querypath);
201-
$sql = "SELECT path, session_id, docs.id, props.to_group_id, docs.c_id
201+
$sql = "SELECT path, docs.session_id, docs.id, props.to_group_id, docs.c_id
202202
FROM $doc_table AS docs
203203
INNER JOIN $prop_table AS props
204204
ON
@@ -235,7 +235,7 @@ function fixDocumentNameCallback($p_event, &$p_header)
235235
}
236236

237237
// 2nd: Get all folders that are invisible in the given path
238-
$sql = "SELECT path, session_id, docs.id, props.to_group_id, docs.c_id
238+
$sql = "SELECT path, docs.session_id, docs.id, props.to_group_id, docs.c_id
239239
FROM $doc_table AS docs INNER JOIN $prop_table AS props
240240
ON
241241
docs.id = props.ref AND

main/exercice/hotspot.class.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public function createForm (&$form, $fck_config=0)
3434
parent::createForm($form, $fck_config);
3535

3636
if (!isset($_GET['editQuestion'])) {
37-
$form->addElement('file','imageUpload',array('<img src="../img/hotspots.png" />', get_lang('UploadJpgPicture')) );
37+
$form->addElement('file','imageUpload',array('<img src="../img/icons/22/hotspots.png" />', get_lang('UploadJpgPicture')) );
3838

3939
// setting the save button here and not in the question class.php
4040
// Saving a question

main/exercice/question.class.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -965,7 +965,7 @@ public function search_engine_edit($exerciseId, $addQs=false, $rmQs=false)
965965
$tbl_se_ref = Database::get_main_table(TABLE_MAIN_SEARCH_ENGINE_REF);
966966
if ($addQs || $rmQs) {
967967
//there's only one row per question on normal db and one document per question on search engine db
968-
$sql = 'SELECT * FROM %
968+
$sql = 'SELECT * FROM %s
969969
WHERE course_code=\'%s\' AND tool_id=\'%s\' AND ref_id_second_level=%s LIMIT 1';
970970
$sql = sprintf($sql, $tbl_se_ref, $course_id, TOOL_QUIZ, $this->id);
971971
} else {

main/forum/viewthread.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,6 @@
219219
echo $my_url . '&view=flat">'
220220
. Display::return_icon('forum_listview.png', get_lang('FlatView'), null, ICON_SIZE_MEDIUM)
221221
. '</a>';
222-
//echo $my_url.'&view=threaded">'.Display::return_icon('forum_threadedview.gif', get_lang('ThreadedView')).get_lang('ThreadedView').'</a>';
223222
echo $my_url . '&view=nested">'
224223
. Display::return_icon('forum_nestedview.png', get_lang('NestedView'), null, ICON_SIZE_MEDIUM)
225224
. '</a>';

0 commit comments

Comments
 (0)