<li>Quiz tool: Answer list fixed when using "matching" question type (BT#801). Reported by Noa Orizales</li>
<li>Quiz tool: Answer list fixed when using "matching" question type (BT#801). Reported by Noa Orizales</li>
<li>Quiz tool + LP : Fixed bug when adding a exercise twice in the same LP with multiple attempts or not.</li>
<li>Quiz tool + LP : Fixed bug when adding a exercise twice in the same LP with multiple attempts or not.</li>
<li>Quiz tool + LP + Multiple attempts : Pre requisites will work the first time a student pass the LP.
<li>Quiz tool + LP + Multiple attempts : Pre requisites will work the first time a student pass the LP.
If an student finished all steps correctly he will view all steps, prerequisites will not work here.</li>
If a student finished all steps correctly he will view all steps, prerequisites will not work here.</li>
<li>Learning Path (Courses): PHP sessions of a LP are destroyed when visiting the main course page.</li>
<li>Learning Path (Courses): PHP sessions of a LP are destroyed when visiting the main course page.</li>
<li>Assignment tool: Work.php deletes all homeworks bugs fixed. Reported and fixed by carlosbrolotobar <ahref="http://www.chamilo.org/node/143"target="_blank">http://www.chamilo.org/node/143</a></li>
<li>Assignment tool: Work.php deletes all homeworks bugs fixed. Reported and fixed by carlosbrolotobar <ahref="http://www.chamilo.org/node/143"target="_blank">http://www.chamilo.org/node/143</a></li>
<li>Core API: Support has been implemented for json_encode() function for PHP version <5.2.Thecorrespondentbug-report"Hideandshownotworking"andtestinghavebeendonebyHubertBorderiou<ahref="http://support.chamilo.org/issues/761"target="_blank">http://support.chamilo.org/issues/761</a></li>
<li>Core API: Support has been implemented for json_encode() function for PHP version <5.2.Thecorrespondentbug-report"Hideandshownotworking"andtestinghavebeendonebyHubertBorderiou<ahref="http://support.chamilo.org/issues/761"target="_blank">http://support.chamilo.org/issues/761</a></li>
<li>Fixed target problems in links tool link edition</li>
<li>Fixed target problems in links tool link edition</li>
<li>Fixed minor bug in online mail editor in order to show the sender's name and e-mail</li>
<li>Fixed minor bug in online mail editor in order to show the sender's name and e-mail</li>
<li>Fixing a bug that prevented importing SCORM resource from course archives (Bug #872)</li>
<li>A bug that prevented importing SCORM resource from course archives has been fixed (Bug #872)</li>
<li>A bug that prevented proper importing tests from course zip-archives created on systems prior Chamilo 1.8.6.2 has been fixed (Bug #879)</li>
$sql .= " AND (user.username LIKE '%".$keyword."%' OR default_event_type LIKE '%".$keyword."%' OR default_value_type LIKE '%".$keyword."%' OR default_value LIKE '%".$keyword."%') ";
$sql .= " AND (user.username LIKE '%".$keyword."%' OR default_event_type LIKE '%".$keyword."%' OR default_value_type LIKE '%".$keyword."%' OR default_value LIKE '%".$keyword."%') ";
}
}
if (!empty($column) && !empty($direction)) {
if (!empty($column) && !empty($direction)) {
@ -132,14 +125,12 @@ class Statistics
* Get all course categories
* Get all course categories
* @return array All course categories (code => name)
* @return array All course categories (code => name)
$sql = "SELECT access_tool, count( access_id ) AS number_of_logins FROM $table WHERE access_tool IN ('".implode("','",$tools)."') GROUP BY access_tool ";
$sql = "SELECT access_tool, count( access_id )
AS number_of_logins FROM $table
WHERE access_tool IN ('".implode("','",$tools)."')
$sql='SELECT path_certificate FROM '.$table_certificate.' WHERE cat_id="'.Database::escape_string($cat_id).'" AND user_id="'.Database::escape_string($user_id).'" ';
$sql='SELECT path_certificate FROM '.$table_certificate.' WHERE cat_id="'.Database::escape_string($cat_id).'" AND user_id="'.Database::escape_string($user_id).'" ';
$rs=Database::query($sql,__FILE__,__LINE__);
$rs=Database::query($sql,__FILE__,__LINE__);
@ -3054,7 +3054,7 @@ class UserManager
* @param int The user id
* @param int The user id
* @return array if there is not information return false
* @return array if there is not information return false
*/
*/
function get_info_gradebook_certificate($course_code,$user_id) {
public function get_info_gradebook_certificate($course_code,$user_id) {
$sql='SELECT * FROM '.$tbl_grade_certificate.' WHERE cat_id= (SELECT id FROM '.$tbl_grade_category.' WHERE course_code = "'.Database::escape_string($course_code).'" ) AND user_id="'.Database::escape_string($user_id).'" ';
$sql='SELECT * FROM '.$tbl_grade_certificate.' WHERE cat_id= (SELECT id FROM '.$tbl_grade_category.' WHERE course_code = "'.Database::escape_string($course_code).'" ) AND user_id="'.Database::escape_string($user_id).'" ';
@ -3071,7 +3071,7 @@ class UserManager
* @param int The user id
* @param int The user id
* @return array containing path_certificate and cat_id
* @return array containing path_certificate and cat_id
*/
*/
function get_user_path_certificate($user_id) {
public function get_user_path_certificate($user_id) {
$sql = "SELECT id_session FROM $tbl_session_course_rel_user WHERE id_session=$session_id AND course_code='$course_code' AND id_user = $user_id AND status=2 ";
@ -215,4 +215,7 @@ $HelpDefaultDirDocuments = "Тази директория е създадена
$HelpSharedFolder = "Тази директория съдържа файлове, които са създадени от курсистите при използване на текстовия редактор (това не важи за групи). По подразбиране вложените папки и файлове са видими за всеки инструктор, но са скрити за курсистите. Ако направите някоя от папките на курсистите видима, то останалите курсисти ще могат да видят нейното съдържание.";
$HelpSharedFolder = "Тази директория съдържа файлове, които са създадени от курсистите при използване на текстовия редактор (това не важи за групи). По подразбиране вложените папки и файлове са видими за всеки инструктор, но са скрити за курсистите. Ако направите някоя от папките на курсистите видима, то останалите курсисти ще могат да видят нейното съдържание.";
$TemplateImage = "Изображение на шаблона";
$TemplateImage = "Изображение на шаблона";
$MoveElement = "Преместване";
$MoveElement = "Преместване";
$CertificateName = "Име на сертификата";
$CreateCertificate = "Създаване на сертификат";
$CertificateOverview = "списъка със сертификатите";
$HelpSharedFolder = "Este directorio contiene los archivos que los estudiantes (y Ud.) envían a un curso a través del editor si no lo hacen desde la herramienta grupos. Por defecto serán visibles por cualquier profesor, pero estarán ocultos para otros estudiantes salvo que accedan a ellos mediante un acceso directo. Si hace visible el directorio de un estudiante otros estudiantes podrán ver todo lo que contenga.";
$HelpSharedFolder = "Este directorio contiene los archivos que los estudiantes (y Ud.) envían a un curso a través del editor si no lo hacen desde la herramienta grupos. Por defecto serán visibles por cualquier profesor, pero estarán ocultos para otros estudiantes salvo que accedan a ellos mediante un acceso directo. Si hace visible el directorio de un estudiante otros estudiantes podrán ver todo lo que contenga.";
@ -1064,8 +1065,8 @@ function update_work_url($id, $new_path) {
} else {
} else {
$row = Database::fetch_array($res);
$row = Database::fetch_array($res);
$filename = basename($row['url']);
$filename = basename($row['url']);
$new_url = $new_path.$filename;
$new_url = $new_path.$filename;
$sql2 = "UPDATE $table SET url = '$new_url' WHERE id=$id";
$sql2 = "UPDATE $table SET url = '$new_url', parent_id = '$parent_id' WHERE id=$id";
$res2 = Database::query($sql2);
$res2 = Database::query($sql2);
return $res2;
return $res2;
}
}
@ -1429,9 +1430,10 @@ function get_list_users_without_publication($task_id) {
$session_id = api_get_session_id();
$session_id = api_get_session_id();
if (!empty($session_id)){
if (!empty($session_id)){
$sql = "SELECT C.id_user as id FROM $work_table AS S, $session_course_rel_user AS C, $iprop_table AS I WHERE C.id_user=I.insert_user_id and S.id=I.ref and S.parent_id='$task_id' and course_code='".api_get_course_id()."' and S.session_id='".$session_id."'";
$sql = "SELECT user_id as id FROM $work_table WHERE parent_id='$task_id' and session_id='".$session_id."'";
} else {
} else {
$sql = "SELECT C.user_id as id FROM $work_table AS S, $table_course_user AS C, $iprop_table AS I WHERE C.user_id=I.insert_user_id and S.id=I.ref and C.status=5 and S.parent_id='$task_id' and course_code='".api_get_course_id()."'";
$sql = "SELECT user_id as id FROM $work_table WHERE parent_id='$task_id'";
}
}
$result = Database::query($sql);
$result = Database::query($sql);
$users_with_tasks = array();
$users_with_tasks = array();
@ -1440,10 +1442,11 @@ function get_list_users_without_publication($task_id) {
}
}
if (!empty($session_id)){
if (!empty($session_id)){
$sql_users = "SELECT cu.id_user, u.lastname, u.firstname, u.email FROM $session_course_rel_user AS cu, $table_user AS u WHERE cu.status!=1 and cu.course_code='".api_get_course_id()."' AND u.user_id=cu.id_user and cu.id_session='".$session_id."'";
$sql_users = "SELECT cu.id_user, u.lastname, u.firstname, u.email FROM $session_course_rel_user AS cu, $table_user AS u WHERE u.status!=1 and cu.course_code='".api_get_course_id()."' AND u.user_id=cu.id_user and cu.id_session='".$session_id."'";
} else {
} else {
$sql_users = "SELECT cu.user_id, u.lastname, u.firstname, u.email FROM $table_course_user AS cu, $table_user AS u WHERE cu.status!=1 and cu.course_code='".api_get_course_id()."' AND u.user_id=cu.user_id";
$sql_users = "SELECT cu.user_id, u.lastname, u.firstname, u.email FROM $table_course_user AS cu, $table_user AS u WHERE u.status!=1 and cu.course_code='".api_get_course_id()."' AND u.user_id=cu.user_id";
}
}
$result_users = Database::query($sql_users);
$result_users = Database::query($sql_users);
$users_without_tasks = array();
$users_without_tasks = array();
while ($row_users = Database::fetch_row($result_users)) {
while ($row_users = Database::fetch_row($result_users)) {
@ -674,10 +675,13 @@ if (!empty($_REQUEST['delete2'])) {
if (!empty ($_REQUEST['move'])) {
if (!empty ($_REQUEST['move'])) {
$folders = array();
$folders = array();
$sql = "SELECT url FROM $work_table WHERE url LIKE '/%' AND post_group_id = '".(empty($_SESSION['toolgroup'])?0:intval($_SESSION['toolgroup']))."'";
$session_id = api_get_session_id();
$session_id == 0 ? $withsession = " AND session_id = 0 " : $withsession = " AND session_id='".$session_id."'";
$sql = "SELECT id, url FROM $work_table WHERE url LIKE '/%' AND post_group_id = '".(empty($_SESSION['toolgroup'])?0:intval($_SESSION['toolgroup']))."'".$withsession;
// update all the parents in the table item propery
// update all the parents in the table item propery
$list_id = get_parent_directories($cur_dir_path);
$list_id = get_parent_directories($cur_dir_path);
@ -875,6 +886,8 @@ if ($ctok == $_POST['sec_token']) { //check the token inserted into the form
$current_date = date('Y-m-d H:i:s');
$current_date = date('Y-m-d H:i:s');
$parent_id = '';
$parent_id = '';
$active = '';
$active = '';
$user_id = api_get_user_id();
$sql = Database::query('SELECT id FROM '.Database::get_course_table(TABLE_STUDENT_PUBLICATION).' WHERE url = '."'/".Database::escape_string($_GET['curdirpath'])."' AND filetype='folder' LIMIT 1");
$sql = Database::query('SELECT id FROM '.Database::get_course_table(TABLE_STUDENT_PUBLICATION).' WHERE url = '."'/".Database::escape_string($_GET['curdirpath'])."' AND filetype='folder' LIMIT 1");
if (Database::num_rows($sql) > 0) {
if (Database::num_rows($sql) > 0) {
$dir_row = Database::fetch_array($sql);
$dir_row = Database::fetch_array($sql);
@ -890,7 +903,8 @@ if ($ctok == $_POST['sec_token']) { //check the token inserted into the form
post_group_id = '" . $post_group_id . "',
post_group_id = '" . $post_group_id . "',
sent_date = '".$current_date ."',
sent_date = '".$current_date ."',
parent_id = '".$parent_id ."' ,
parent_id = '".$parent_id ."' ,
session_id = ".intval($id_session);
session_id = '".intval($id_session)."' ,
user_id = '".$user_id."'";
Database::query($sql_add_publication);
Database::query($sql_add_publication);
@ -935,7 +949,8 @@ if ($ctok == $_POST['sec_token']) { //check the token inserted into the form