<li>The mails sent in exercises tool are sent from the address defined in admin (FS#2712)</li>
<li>"Next" and "Previous" page now works when searching a session (FS#2721)</li>
<li>Fixed bug when launching a quiz with one question per page (FS#2738)</li>
<li>fix a javascript bug with swap menu in ie6 (FS#2815)</li>
<li>Fix a bug in surveys when we want to display answers of an invited person (FS#2731)</li>
<li>Fix a bug when copying a course with surveys. There is now a check for existing surveys with the same code and language (FS#2734)</li>
<li>Fix a bug when seeing matching results in quiz tool (SVN#15987)</li>
<li>Fixed javascript bug with swap menu in ie6 (FS#2815)</li>
<li>Fixed bug in surveys when we want to display answers of an invited person (FS#2731)</li>
<li>Fixed bug when copying a course with surveys. There is now a check for existing surveys with the same code and language (FS#2734)</li>
<li>Fixed bug when seeing matching results in quiz tool (SVN#15987)</li>
<li>Added filtering of SCORM objectives when writing to DB (SVN#16437)</li>
<li>Removed duplication of database write operations for SCORM objectives (SVN#16438)</li>
<li>Fixed HTTP_REFERER bug in ical_export (FS#3041)</li>
<li>Fix a bug in SQL queries for new installs, preventing the creation of the course_module table (FS#3040)</li>
<li>Fix the fact that the password was never sent by e-mail when encrypted, even when it had just been changed for a user, causing a useless e-mail to be sent (SVN#16673)</li>
<li>Fix a bug in users pictures display when using the tuning setting of splitting users dirs (SVN#16673)</li>
<li>Fix a bug in documents picture gallery preventing uppercase image extensions to be seen (SVN#16755)</li>
<li>Fix a bug whereby the repeated agenda items in groups were visible to all (FS#3095)</li>
<li>Fix a bug whereby e-mails sent did not have the standard syntax (SVN#16708)</li>
<li>Fix a bug whereby an empty institution name gave a useless output in the header (SVN#16710)</li>
<li>Fixed bug in SQL queries for new installs, preventing the creation of the course_module table (FS#3040)</li>
<li>Fixed the fact that the password was never sent by e-mail when encrypted, even when it had just been changed for a user, causing a useless e-mail to be sent (SVN#16673)</li>
<li>Fixed bug in users pictures display when using the tuning setting of splitting users dirs (SVN#16673)</li>
<li>Fixed bug in documents picture gallery preventing uppercase image extensions to be seen (SVN#16755)</li>
<li>Fixed bug whereby the repeated agenda items in groups were visible to all (FS#3095)</li>
<li>Fixed bug whereby e-mails sent did not have the standard syntax (SVN#16708)</li>
<li>Fixed bug whereby an empty institution name gave a useless output in the header (SVN#16710)</li>
<li>Fixed bug whereby questions ordering was broken when deleting one question in the middle (SVN#16879)</li>
// deletes the position in the array containing the wanted exercise ID
unset($this->exerciseList[$pos]);
//update order of other elements
$sql = "SELECT question_order FROM $TBL_EXERCICE_QUESTION WHERE question_id='".Database::escape_string($id)."' AND exercice_id='".Database::escape_string($exerciseId)."'";
$res = api_sql_query($sql,__FILE__,__LINE__);
if (Database::num_rows($res)>0) {
$row = Database::fetch_array($res);
if (!empty($row['question_order'])) {
$sql = "UPDATE $TBL_EXERCICE_QUESTION SET question_order = question_order-1 WHERE exercice_id='".Database::escape_string($exerciseId)."' AND question_order > ".$row['question_order'];
$res = api_sql_query($sql,__FILE__,__LINE__);
}
}
$sql="DELETE FROM $TBL_EXERCICE_QUESTION WHERE question_id='".Database::escape_string($id)."' AND exercice_id='".Database::escape_string($exerciseId)."'";
api_sql_query($sql,__FILE__,__LINE__);
@ -693,6 +703,17 @@ abstract class Question
// if the question must be removed from all exercises
if(!$deleteFromEx)
{
//update the question_order of each question to avoid inconsistencies
$sql = "SELECT exercice_id, question_order FROM $TBL_EXERCICE_QUESTION WHERE question_id='".Database::escape_string($id)."'";
$res = api_sql_query($sql,__FILE__,__LINE__);
if (Database::num_rows($res)>0) {
while ($row = Database::fetch_array($res)) {
if (!empty($row['question_order'])) {
$sql = "UPDATE $TBL_EXERCICE_QUESTION SET question_order = question_order-1 WHERE exercice_id='".Database::escape_string($row['exercice_id'])."' AND question_order > ".$row['question_order'];
$res = api_sql_query($sql,__FILE__,__LINE__);
}
}
}
$sql="DELETE FROM $TBL_EXERCICE_QUESTION WHERE question_id='".Database::escape_string($id)."'";