From fc52a7ae20ac66fbca740ff3e836712f399478f5 Mon Sep 17 00:00:00 2001 From: Julio Montoya Date: Tue, 15 Dec 2009 13:40:26 -0500 Subject: [PATCH 01/10] Fixing email sent when user finish an quiz with an open question see DT#5673 --- main/exercice/exercise_result.php | 78 ++++++++++++++++++------------- main/inc/lib/mail.lib.inc.php | 20 +++----- 2 files changed, 52 insertions(+), 46 deletions(-) diff --git a/main/exercice/exercise_result.php b/main/exercice/exercise_result.php index 23406bd720..de85b31afe 100755 --- a/main/exercice/exercise_result.php +++ b/main/exercice/exercise_result.php @@ -1094,6 +1094,7 @@ if ($origin != 'learnpath') { } if(count($arrques)>0) { + $mycharset = api_get_setting('platform_charset'); $msg = ' @@ -1102,7 +1103,7 @@ if(count($arrques)>0) {

'.get_lang('OpenQuestionsAttempted').' :

-

'.get_lang('AttemptDetails').' : >
+

'.get_lang('AttemptDetails').' :

@@ -1123,6 +1124,7 @@ if(count($arrques)>0) {


'.get_lang('OpenQuestionsAttemptedAre').' :

'; + for($i=0;$i
- '.get_lang('ClickToCommentAndGiveFeedback').',
- #url#
'; - - $msg1= str_replace("#url#",$url,$msg); - $mail_content = $msg1; - $student_name = api_get_person_name($_SESSION['_user']['firstName'], $_SESSION['_user']['lastName']); - $subject = get_lang('OpenQuestionsAttempted'); - - $from = api_get_setting('noreply_email_address'); - if($from == '') { - if(isset($_SESSION['id_session']) && $_SESSION['id_session'] != ''){ - $sql = 'SELECT user.email,user.lastname,user.firstname FROM '.TABLE_MAIN_SESSION.' as session, '.TABLE_MAIN_USER.' as user - WHERE session.id_coach = user.user_id - AND session.id = "'.Database::escape_string($_SESSION['id_session']).'" - '; - $result=Database::query($sql,__FILE__,__LINE__); - $from = Database::result($result,0,'email'); - $from_name = api_get_person_name(Database::result($result,0,'firstname'), Database::result($result,0,'lastname'), null, PERSON_NAME_EMAIL_ADDRESS); - } else { - $array = explode(' ',$_SESSION['_course']['titular']); - $firstname = $array[1]; - $lastname = $array[0]; - $sql = 'SELECT email,lastname,firstname FROM '.TABLE_MAIN_USER.' - WHERE firstname = "'.Database::escape_string($firstname).'" - AND lastname = "'.Database::escape_string($lastname).'" - '; - $result=Database::query($sql,__FILE__,__LINE__); - $from = Database::result($result,0,'email'); - $from_name = api_get_person_name(Database::result($result,0,'firstname'), Database::result($result,0,'lastname'), null, PERSON_NAME_EMAIL_ADDRESS); - } + + $msg.='

+ '.get_lang('ClickToCommentAndGiveFeedback').',
+ #url#
'; + + $msg1= str_replace("#url#",$url,$msg); + $mail_content = $msg1; + +/* + $student_name = api_get_person_name($_SESSION['_user']['firstName'], $_SESSION['_user']['lastName']); + $subject = get_lang('OpenQuestionsAttempted'); + + $from = api_get_setting('noreply_email_address'); + if($from == '') { + if(isset($_SESSION['id_session']) && $_SESSION['id_session'] != ''){ + $sql = 'SELECT user.email,user.lastname,user.firstname FROM '.TABLE_MAIN_SESSION.' as session, '.TABLE_MAIN_USER.' as user + WHERE session.id_coach = user.user_id + AND session.id = "'.Database::escape_string($_SESSION['id_session']).'" + '; + $result=Database::query($sql,__FILE__,__LINE__); + $from = Database::result($result,0,'email'); + $from_name = api_get_person_name(Database::result($result,0,'firstname'), Database::result($result,0,'lastname'), null, PERSON_NAME_EMAIL_ADDRESS); + } else { + $array = explode(' ',$_SESSION['_course']['titular']); + $firstname = $array[1]; + $lastname = $array[0]; + $sql = 'SELECT email,lastname,firstname FROM '.TABLE_MAIN_USER.' + WHERE firstname = "'.Database::escape_string($firstname).'" + AND lastname = "'.Database::escape_string($lastname).'" + '; + $result=Database::query($sql,__FILE__,__LINE__); + $from = Database::result($result,0,'email'); + $from_name = api_get_person_name(Database::result($result,0,'firstname'), Database::result($result,0,'lastname'), null, PERSON_NAME_EMAIL_ADDRESS); } - api_mail_html($student_name, $to, $subject, $mail_content, $from_name, $from, array('encoding'=>$mycharset,'charset'=>$mycharset)); + } + api_mail_html($student_name, $to, $subject, $mail_content, $from_name, $from, array('encoding'=>$mycharset,'charset'=>$mycharset));*/ + + + $sender_name = api_get_person_name(api_get_setting('administratorName'), api_get_setting('administratorSurname'), null, PERSON_NAME_EMAIL_ADDRESS); + $email_admin = api_get_setting('emailAdministrator'); + + $subject = get_lang('OpenQuestionsAttempted'); + $result = api_mail_html('', $to, $subject, $mail_content, $sender_name, $email_admin, array('charset'=>$mycharset)); } ?> diff --git a/main/inc/lib/mail.lib.inc.php b/main/inc/lib/mail.lib.inc.php index 926378d931..2cf58fa873 100755 --- a/main/inc/lib/mail.lib.inc.php +++ b/main/inc/lib/mail.lib.inc.php @@ -173,22 +173,16 @@ function api_mail_html($recipient_name, $recipient_email, $subject, $message, $s if (!empty($data_file)) { $mail->AddAttachment($data_file['path'], $data_file['filename']); } - + // only valid address - if(is_array($recipient_email)) - { - $i = 0; - foreach($recipient_email as $dest) - { - if(eregi( $regexp, $dest )) - { - $mail->AddAddress($dest, ($i>1?'':$recipient_name)); + if(is_array($recipient_email)) { + foreach($recipient_email as $dest) { + if(eregi( $regexp, $dest )) { + $mail->AddAddress($dest, $recipient_name); + //$mail->AddAddress($dest, ($i>1?'':$recipient_name)); } - $i++; } - } - else - { + } else { if(eregi( $regexp, $recipient_email )) { $mail->AddAddress($recipient_email, $recipient_name); From fb6599272d976d7dcadebc6f7c1e154793a07f18 Mon Sep 17 00:00:00 2001 From: Cristian Fasanando Date: Tue, 15 Dec 2009 15:18:12 -0500 Subject: [PATCH 02/10] message for group is now sent only a message - partial BT#190 --- main/inc/lib/message.lib.php | 165 +++++++++++++-------- main/messages/download.php | 11 +- main/social/group_invitation.php | 3 +- main/social/groups.php | 18 ++- main/social/message_for_group_form.inc.php | 1 + 5 files changed, 126 insertions(+), 72 deletions(-) diff --git a/main/inc/lib/message.lib.php b/main/inc/lib/message.lib.php index 67ca42aaf5..a5743aef43 100755 --- a/main/inc/lib/message.lib.php +++ b/main/inc/lib/message.lib.php @@ -22,7 +22,8 @@ require_once api_get_path(LIBRARY_PATH).'group_portal_manager.lib.php'; */ define('MESSAGE_STATUS_NEW', '0'); define('MESSAGE_STATUS_UNREAD', '1'); -define('MESSAGE_STATUS_DELETED', '2'); +define('MESSAGE_STATUS_DELETED', '3'); +define('MESSAGE_STATUS_OUTBOX', '4'); define('MESSAGE_STATUS_INVITATION_PENDING', '5'); define('MESSAGE_STATUS_INVITATION_ACCEPTED','6'); @@ -192,10 +193,33 @@ class MessageManager $content = api_convert_encoding($content,$charset,'UTF-8'); $content = Database::escape_string($content); //message in inbox - $sql = "SELECT COUNT(*) as count FROM $table_message WHERE user_sender_id = ".$user_sender_id." AND user_receiver_id='$receiver_user_id' AND title = '$title' AND content ='$content' AND group_id = '$group_id' AND parent_id = '$parent_id'"; - $res_exist = Database::query($sql,__FILE__,__LINE__); - $row_exist = Database::fetch_array($res_exist,'ASSOC'); - if ($row_exist['count'] == 0) { + + //useless query + //echo $sql = "SELECT COUNT(*) as count FROM $table_message WHERE user_sender_id = ".$user_sender_id." AND user_receiver_id='$receiver_user_id' AND title = '$title' AND content ='$content' AND group_id = '$group_id' AND parent_id = '$parent_id'"; + //$res_exist = Database::query($sql,__FILE__,__LINE__); + //$row_exist = Database::fetch_array($res_exist,'ASSOC'); + + //We should ALWAYS sent emails + //if ($row_exist['count'] == 0) { + + //message in inbox for user friend + $query = "INSERT INTO $table_message(user_sender_id, user_receiver_id, msg_status, send_date, title, content, group_id, parent_id ) ". + " VALUES ('$user_sender_id', '$receiver_user_id', '1', '".date('Y-m-d H:i:s')."','$title','$content','$group_id','$parent_id')"; + $result = Database::query($query,__FILE__,__LINE__); + $inbox_last_id = Database::insert_id(); + + // save attachment file for inbox messages + if (is_array($file_attachments)) { + $i = 0; + foreach ($file_attachments as $file_attach) { + if ($file_attach['error'] == 0) { + self::save_message_attachment_file($file_attach,$file_comments[$i],$inbox_last_id,null,$receiver_user_id,$group_id); + } + $i++; + } + } + + if (empty($group_id)) { //message in outbox for user friend or group $sql = "INSERT INTO $table_message(user_sender_id, user_receiver_id, msg_status, send_date, title, content, group_id, parent_id ) ". " VALUES ('$user_sender_id', '$receiver_user_id', '4', '".date('Y-m-d H:i:s')."','$title','$content', '$group_id', '$parent_id')"; @@ -212,54 +236,56 @@ class MessageManager $o++; } } - - if (!empty($group_id)) { - //message in inbox for group - $users_by_group = GroupPortalManager::get_all_users_by_group($group_id); - $users_ids = array_keys($users_by_group); - if (is_array($users_ids) && count($users_ids) > 0) { - foreach ($users_ids as $user_id) { - $receiver_user_id = $user_id; - $query = "INSERT INTO $table_message(user_sender_id, user_receiver_id, msg_status, send_date, title, content, group_id, parent_id ) ". - " VALUES ('$user_sender_id', '$receiver_user_id', '1', '".date('Y-m-d H:i:s')."','$title','$content','$group_id','$parent_id')"; - $result = Database::query($query,__FILE__,__LINE__); - $inbox_last_id = Database::insert_id(); - // save attachment file for inbox messages - if (is_array($file_attachments)) { - $i = 0; - foreach ($file_attachments as $file_attach) { - if ($file_attach['error'] == 0) { - self::save_message_attachment_file($file_attach,$file_comments[$i],$inbox_last_id,null,$receiver_user_id); - } - $i++; + } + /* + if (!empty($group_id)) { + //message in inbox for group + $users_by_group = GroupPortalManager::get_all_users_by_group($group_id); + $users_ids = array_keys($users_by_group); + if (is_array($users_ids) && count($users_ids) > 0) { + foreach ($users_ids as $user_id) { + $receiver_user_id = $user_id; + $query = "INSERT INTO $table_message(user_sender_id, user_receiver_id, msg_status, send_date, title, content, group_id, parent_id ) ". + " VALUES ('$user_sender_id', '$receiver_user_id', '1', '".date('Y-m-d H:i:s')."','$title','$content','$group_id','$parent_id')"; + $result = Database::query($query,__FILE__,__LINE__); + $inbox_last_id = Database::insert_id(); + // save attachment file for inbox messages + if (is_array($file_attachments)) { + $i = 0; + foreach ($file_attachments as $file_attach) { + if ($file_attach['error'] == 0) { + self::save_message_attachment_file($file_attach,$file_comments[$i],$inbox_last_id,null,$receiver_user_id); } - } - // update parent id for other receiver users belongs the group - if (!empty($parent_id)) { - self::update_parent_ids_from_reply($parent_id, $receiver_user_id, $inbox_last_id); - } - } - } - } else { - - //message in inbox for user friend - $query = "INSERT INTO $table_message(user_sender_id, user_receiver_id, msg_status, send_date, title, content, group_id, parent_id ) ". - " VALUES ('$user_sender_id', '$receiver_user_id', '1', '".date('Y-m-d H:i:s')."','$title','$content','$group_id','$parent_id')"; - $result = Database::query($query,__FILE__,__LINE__); - $inbox_last_id = Database::insert_id(); - // save attachment file for inbox messages - if (is_array($file_attachments)) { - $i = 0; - foreach ($file_attachments as $file_attach) { - if ($file_attach['error'] == 0) { - self::save_message_attachment_file($file_attach,$file_comments[$i],$inbox_last_id,null,$receiver_user_id); + $i++; } - $i++; + } + // update parent id for other receiver users belongs the group + if (!empty($parent_id)) { + self::update_parent_ids_from_reply($parent_id, $receiver_user_id, $inbox_last_id); + } + } + } + } else { + + //message in inbox for user friend + $query = "INSERT INTO $table_message(user_sender_id, user_receiver_id, msg_status, send_date, title, content, group_id, parent_id ) ". + " VALUES ('$user_sender_id', '$receiver_user_id', '1', '".date('Y-m-d H:i:s')."','$title','$content','$group_id','$parent_id')"; + $result = Database::query($query,__FILE__,__LINE__); + $inbox_last_id = Database::insert_id(); + // save attachment file for inbox messages + if (is_array($file_attachments)) { + $i = 0; + foreach ($file_attachments as $file_attach) { + if ($file_attach['error'] == 0) { + self::save_message_attachment_file($file_attach,$file_comments[$i],$inbox_last_id,null,$receiver_user_id); } - } - } - return $result; - } + $i++; + } + } + } + */ + return $result; + //} } return false; } @@ -344,7 +370,7 @@ class MessageManager return false; } - public static function save_message_attachment_file($file_attach,$file_comment,$message_id,$receiver_user_id=0,$sender_user_id=0) { + public static function save_message_attachment_file($file_attach,$file_comment,$message_id,$receiver_user_id=0,$sender_user_id=0,$group_id=0) { $tbl_message_attach = Database::get_main_table(TABLE_MESSAGE_ATTACHMENT); @@ -367,7 +393,13 @@ class MessageManager } // User-reserved directory where photos have to be placed. - $path_user_info = UserManager::get_user_picture_path_by_id($message_user_id, 'system', true); + + if (!empty($group_id)) { + $path_user_info = GroupPortalManager::get_group_picture_path_by_id($group_id, 'system', true); + } else { + $path_user_info = UserManager::get_user_picture_path_by_id($message_user_id, 'system', true); + } + $path_message_attach = $path_user_info['dir'].'message_attachments/'; // If this directory does not exist - we create it. @@ -398,7 +430,7 @@ class MessageManager * @param int message user id (receiver user id or sender user id) * @return void */ - public static function delete_message_attachment_file($message_id,$message_uid) { + public static function delete_message_attachment_file($message_id,$message_uid,$group_id=0) { $message_id = intval($message_id); $message_uid = intval($message_uid); @@ -411,7 +443,13 @@ class MessageManager $path = $row['path']; $attach_id = $row['id']; $new_path = $path.'_DELETED_'.$attach_id; - $path_user_info = UserManager::get_user_picture_path_by_id($message_uid, 'system', true); + + if (!empty($group_id)) { + $path_user_info = GroupPortalManager::get_group_picture_path_by_id($group_id, 'system', true); + } else { + $path_user_info = UserManager::get_user_picture_path_by_id($message_uid, 'system', true); + } + $path_message_attach = $path_user_info['dir'].'message_attachments/'; if (is_file($path_message_attach.$path)) { if(rename($path_message_attach.$path, $path_message_attach.$new_path)) { @@ -442,7 +480,7 @@ class MessageManager $table_message = Database::get_main_table(TABLE_MESSAGE); $current_uid = api_get_user_id(); $group_id = intval($group_id); - $query = "SELECT * FROM $table_message WHERE group_id='$group_id' AND msg_status <> 4 AND user_receiver_id = '$current_uid' ORDER BY id"; + $query = "SELECT * FROM $table_message WHERE group_id='$group_id' AND msg_status <> 4 ORDER BY id"; $rs = Database::query($query,__FILE__,__LINE__); $data = array(); if (Database::num_rows($rs) > 0) { @@ -573,7 +611,7 @@ class MessageManager $row = Database::fetch_array($result); // get file attachments by message id - $files_attachments = self::get_links_message_attachment_files($message_id); + $files_attachments = self::get_links_message_attachment_files($message_id,$source); $user_con = self::users_connected_by_id(); $band=0; @@ -659,7 +697,7 @@ class MessageManager $path='outbox.php'; // get file attachments by message id - $files_attachments = self::get_links_message_attachment_files($message_id); + $files_attachments = self::get_links_message_attachment_files($message_id,'outbox'); $row = Database::fetch_array($result); $user_con = self::users_connected_by_id(); @@ -821,9 +859,10 @@ class MessageManager /** * Get array of links (download) for message attachment files * @param int message id + * @param string type message list (inbox/outbox) * @return array */ - public static function get_links_message_attachment_files($message_id) { + public static function get_links_message_attachment_files($message_id,$type='') { $tbl_message_attach = Database::get_main_table(TABLE_MESSAGE_ATTACHMENT); $message_id = intval($message_id); @@ -831,11 +870,15 @@ class MessageManager // get file attachments by message id $links_attach_file = array(); if (!empty($message_id)) { - $sql = "SELECT * FROM $tbl_message_attach WHERE message_id = '$message_id'"; + + $sql = "SELECT * FROM $tbl_message_attach WHERE message_id = '$message_id'"; + $rs_file = Database::query($sql,__FILE__,__LINE__); if (Database::num_rows($rs_file) > 0) { - $attach_icon = Display::return_icon('attachment.gif'); - $archiveURL=api_get_path(WEB_CODE_PATH).'messages/download.php?type=inbox&file='; + $attach_icon = Display::return_icon('attachment.gif'); + + $archiveURL=api_get_path(WEB_CODE_PATH).'messages/download.php?type='.$type.'&file='; + while ($row_file = Database::fetch_array($rs_file)) { $archiveFile= $row_file['path']; $filename = $row_file['filename']; diff --git a/main/messages/download.php b/main/messages/download.php index 27fcf112d0..e5e5844811 100755 --- a/main/messages/download.php +++ b/main/messages/download.php @@ -21,6 +21,7 @@ session_cache_limiter('public'); require_once '../inc/global.inc.php'; require_once api_get_path(LIBRARY_PATH).'usermanager.lib.php'; +require_once api_get_path(LIBRARY_PATH).'group_portal_manager.lib.php'; require_once api_get_path(LIBRARY_PATH).'document.lib.php'; // IMPORTANT to avoid caching of documents @@ -46,10 +47,9 @@ $title = str_replace(' ','_', $row['filename']); $message_id = $row['message_id']; // allow download only for user sender and user receiver -$sql = "SELECT user_sender_id, user_receiver_id FROM $tbl_messsage WHERE id = '$message_id'"; +$sql = "SELECT user_sender_id, user_receiver_id, group_id FROM $tbl_messsage WHERE id = '$message_id'"; $rs= Database::query($sql, __FILE__, __LINE__); $row_users= Database::fetch_row($rs); - $current_uid = api_get_user_id(); if (!in_array($current_uid,$row_users)) { api_not_allowed(); @@ -66,7 +66,12 @@ if (in_array($_GET['type'],$message_type)) { } } -$path_user_info = UserManager::get_user_picture_path_by_id($message_uid, 'system', true); +if (!empty($row_users[2])) { + $path_user_info = GroupPortalManager::get_group_picture_path_by_id($row_users[2], 'system', true); +} else { + $path_user_info = UserManager::get_user_picture_path_by_id($message_uid, 'system', true); +} + $full_file_name = $path_user_info['dir'].'message_attachments/'.$file_url; // launch event diff --git a/main/social/group_invitation.php b/main/social/group_invitation.php index d6eb2100b7..7cca0f0417 100755 --- a/main/social/group_invitation.php +++ b/main/social/group_invitation.php @@ -14,6 +14,7 @@ $cidReset=true; // including some necessary dokeos files require('../inc/global.inc.php'); require_once ('../inc/lib/xajax/xajax.inc.php'); + api_block_anonymous_users(); $xajax = new xajax(); @@ -354,7 +355,7 @@ if ($add_type=='multiple') { ?> - + '; $htmlHeadXtra[] = ''; -//$htmlHeadXtra[] = ''; $htmlHeadXtra[] = ''; $htmlHeadXtra[] = ''; $interbreadcrumb[] = array('url' => '../auth/profile.php', 'name' => get_lang('ModifyProfile')); @@ -421,7 +433,7 @@ if (api_get_setting('profile', 'apikeys') == 'true') { $form->addElement('html', '
'); $form->addElement('text', 'api_key_generate', get_lang('MyApiKey'), array('size' => 40, 'id' => 'id_api_key_generate')); $form->addElement('html', '
'); - $form->addElement('button', 'generate_api_key', get_lang('GenerateApiKey'), array('id' => 'id_generate_api_key', 'onclick' => 'javascript: generate_open_id_form();')); //generate_open_id_form() + $form->addElement('button', 'generate_api_key', get_lang('GenerateApiKey'), array('id' => 'id_generate_api_key', 'onclick' => 'generate_open_id_form()')); //generate_open_id_form() } // SUBMIT if (is_profile_editable()) { From 0e62492b88e652583571e2679d024c7a730b9403 Mon Sep 17 00:00:00 2001 From: Arthur Portugal Date: Wed, 16 Dec 2009 09:36:46 -0500 Subject: [PATCH 05/10] Changed the type of the field for RSS CT#444 --- main/install/dokeos_main.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main/install/dokeos_main.sql b/main/install/dokeos_main.sql index 1dc8a5f048..c3363492c6 100755 --- a/main/install/dokeos_main.sql +++ b/main/install/dokeos_main.sql @@ -2365,4 +2365,4 @@ CREATE TABLE IF NOT EXISTS message_attachment ( ); INSERT INTO user_field (field_type, field_variable, field_display_text, field_visible, field_changeable) values (10, 'tags','tags',0,0); -INSERT INTO user_field (field_type, field_variable, field_display_text, field_visible, field_changeable) values (9, 'rssfeeds','RSS',0,0); \ No newline at end of file +INSERT INTO user_field (field_type, field_variable, field_display_text, field_visible, field_changeable) values (1, 'rssfeeds','RSS',0,0); From e74e31651b93442c754686dfe065cf7dcdb63e35 Mon Sep 17 00:00:00 2001 From: Cristian Fasanando Date: Wed, 16 Dec 2009 10:02:34 -0500 Subject: [PATCH 06/10] Fixed matching exercise with response random --- main/exercice/answer.class.php | 17 +++++++++ main/exercice/exercice_submit.php | 40 ++++++--------------- main/exercice/exercise.lib.php | 36 +++++++++++++------ main/exercice/exercise_result.php | 30 ++++++---------- main/exercice/exercise_show.php | 58 +++++++++++++------------------ 5 files changed, 88 insertions(+), 93 deletions(-) diff --git a/main/exercice/answer.class.php b/main/exercice/answer.class.php index 7cea53d3dd..6a548391e1 100755 --- a/main/exercice/answer.class.php +++ b/main/exercice/answer.class.php @@ -252,6 +252,23 @@ class Answer { return $this->answer[$id]; } + + + function selectAnswerByAutoId($auto_id) { + + $TBL_ANSWER = Database::get_course_table(TABLE_QUIZ_ANSWER); + $auto_id = intval($auto_id); + $sql="SELECT id, answer FROM $TBL_ANSWER WHERE id_auto='$auto_id'"; + $rs = Database::query($sql, __FILE__, __LINE__); + + if (Database::num_rows($rs)>0) { + $row = Database::fetch_array($rs); + return $row; + } + return false; + + } + /** * returns the answer title from an answer's position * diff --git a/main/exercice/exercice_submit.php b/main/exercice/exercice_submit.php index 4b7a4fc1e4..54b68ff0f5 100755 --- a/main/exercice/exercice_submit.php +++ b/main/exercice/exercice_submit.php @@ -576,19 +576,15 @@ if ($formSent) { break; // for matching case MATCHING : - if ($answerCorrect) { - if ($answerCorrect == $choice[$answerId]) { - $questionScore += $answerWeighting; - $totalScore += $answerWeighting; - $choice[$answerId] = $matching[$choice[$answerId]]; - } - elseif (!$choice[$answerId]) { - $choice[$answerId] = '   '; - } else { - $choice[$answerId] = '' . $matching[$choice[$answerId]] . ''; + + $numAnswer=$objAnswerTmp->selectAutoId($answerId); + + if ($answerCorrect) { + if ($answerCorrect == $choice[$numAnswer]) { + $questionScore+=$answerWeighting; + $totalScore+=$answerWeighting; } - } else { - $matching[$answerId] = $answer; + $matching[$numAnswer] = $choice[$numAnswer]; } break; // for hotspot with no order @@ -642,25 +638,11 @@ if ($formSent) { } } elseif ($answerType == MATCHING) { - $j = sizeof($matching) + 1; - - for ($i = 0; $i < sizeof($choice); $i++, $j++) { - $val = $choice[$j]; - if (preg_match_all('#([0-9a-z ]*)#', $val, $arr1)) { - $val = $arr1[1][0]; - } - $val = $val; - $val = strip_tags($val); - $sql = "select position from $table_ans where question_id='" . Database :: escape_string($questionId) . "' and answer='" . Database :: escape_string($val) . "' AND correct=0"; - $res = Database::query($sql, __FILE__, __LINE__); - if (Database :: num_rows($res) > 0) { - $answer = Database :: result($res, 0, "position"); - } else { - $answer = ''; - } - exercise_attempt($questionScore, $answer, $quesId, $exeId, $j); + foreach ($matching as $j => $val) { + exercise_attempt($questionScore, $val, $quesId, $exeId, $j); } + } elseif ($answerType == FREE_ANSWER) { $answer = $choice; exercise_attempt($questionScore, $answer, $quesId, $exeId, 0); diff --git a/main/exercice/exercise.lib.php b/main/exercice/exercise.lib.php index c9828df92c..819d63cbed 100755 --- a/main/exercice/exercise.lib.php +++ b/main/exercice/exercise.lib.php @@ -110,9 +110,30 @@ function showQuestion($questionId, $onlyAnswers=false, $origin=false,$current_it // only used for the answer type "Matching" if($answerType == MATCHING) { - $cpt1='A'; + $x = 1; + $letter = 'A'; $cpt2=1; $Select=array(); + $answer_matching = $cpt1 = array(); + + for($answerId=1;$answerId <= $nbrAnswers;$answerId++) { + $answerCorrect = $objAnswerTmp->isCorrect($answerId); + $numAnswer = $objAnswerTmp->selectAutoId($answerId); + $answer=$objAnswerTmp->selectAnswer($answerId); + if(!$answerCorrect) { + // options (A, B, C, ...) that will be put into the list-box + $cpt1[$x] = $letter; + $answer_matching[$x]=$objAnswerTmp->selectAnswerByAutoId($numAnswer); + $x++; + $letter++; + } + } + + foreach($answer_matching as $value) { + $Select[$value['id']]['Lettre'] = $cpt1[$value['id']]; + $Select[$value['id']]['Reponse'] = $value['answer']; + } + } elseif($answerType == FREE_ANSWER) { @@ -236,13 +257,8 @@ function showQuestion($questionId, $onlyAnswers=false, $origin=false,$current_it // matching // TODO: replace $answerId by $numAnswer else { - if(!$answerCorrect) { - // options (A, B, C, ...) that will be put into the list-box - $Select[$answerId]['Lettre']=$cpt1++; - // answers that will be shown at the right side - $answer = api_parse_tex($answer); - $Select[$answerId]['Reponse']=$answer; - } else { + + if ($answerCorrect) { $s.=" @@ -252,7 +268,7 @@ function showQuestion($questionId, $onlyAnswers=false, $origin=false,$current_it $s.=' '.$cpt2.' '.$answer.''; - $s.="   "; // fills the list-box @@ -296,8 +312,6 @@ function showQuestion($questionId, $onlyAnswers=false, $origin=false,$current_it "; - - $cpt2++; } // end while() } // end if() diff --git a/main/exercice/exercise_result.php b/main/exercice/exercise_result.php index de85b31afe..00e2c63a0a 100755 --- a/main/exercice/exercise_result.php +++ b/main/exercice/exercise_result.php @@ -798,25 +798,17 @@ foreach ($questionList as $questionId) { break; // for matching TODO: replace $answerId id by $numAnswer case MATCHING : - if($answerCorrect) - { - if($answerCorrect == $choice[$answerId]) - { + if ($answerCorrect) { + if ($answerCorrect == $choice[$numAnswer]) { $questionScore+=$answerWeighting; - $totalScore+=$answerWeighting; - $choice[$answerId]=$matching[$choice[$answerId]]; - } - elseif(!$choice[$answerId]) - { - $choice[$answerId]='   '; - } - else - { - $choice[$answerId]=''.$matching[$choice[$answerId]].''; - } - } - else - { + $totalScore+=$answerWeighting; + $choice[$numAnswer]=$matching[$choice[$numAnswer]]; + } elseif(!$choice[$numAnswer]) { + $choice[$numAnswer]='   '; + } else { + $choice[$numAnswer]=''.$matching[$choice[$numAnswer]].''; + } + } else { $matching[$answerId]=$answer; } break; @@ -917,7 +909,7 @@ foreach ($questionList as $questionId) { echo $answer; ?> - / + / diff --git a/main/exercice/exercise_show.php b/main/exercice/exercise_show.php index 478977d2cd..5e5aec2035 100755 --- a/main/exercice/exercise_show.php +++ b/main/exercice/exercise_show.php @@ -843,16 +843,15 @@ if ($show_results) { $objAnswerTmp=new Answer($questionId); $table_ans = Database :: get_course_table(TABLE_QUIZ_ANSWER); $TBL_TRACK_ATTEMPT= Database::get_statistic_table(TABLE_STATISTIC_TRACK_E_ATTEMPT); - - $sql_select_answer = 'SELECT id, answer, correct, position FROM '.$table_ans.' WHERE question_id="'.Database::escape_string($questionId).'" AND correct<>0'; - $sql_answer = 'SELECT position, answer FROM '.$table_ans.' WHERE question_id="'.Database::escape_string($questionId).'" AND correct=0'; + $sql_answer = 'SELECT id, answer FROM '.$table_ans.' WHERE question_id="'.Database::escape_string($questionId).'" AND correct=0'; $res_answer = Database::query($sql_answer, __FILE__, __LINE__); // getting the real answer $real_list =array(); while ($real_answer = Database::fetch_array($res_answer)) { - $real_list[$real_answer['position']]= $real_answer['answer']; + $real_list[$real_answer['id']]= $real_answer['answer']; } + $sql_select_answer = 'SELECT id, answer, correct, id_auto FROM '.$table_ans.' WHERE question_id="'.Database::escape_string($questionId).'" AND correct<>0'; $res_answers = Database::query($sql_select_answer, __FILE__, __LINE__); echo ''; @@ -866,46 +865,37 @@ if ($show_results) { $questionScore=0; while ($a_answers = Database::fetch_array($res_answers)) { + $i_answer_id = $a_answers['id']; //3 $s_answer_label = $a_answers['answer']; // your dady - you mother $i_answer_correct_answer = $a_answers['correct']; //1 - 2 - $i_answer_position = $a_answers['position']; // 3 - 4 - - $sql_user_answer = - 'SELECT answers.answer - FROM '.$TBL_TRACK_ATTEMPT.' as track_e_attempt - INNER JOIN '.$table_ans.' as answers - ON answers.position = track_e_attempt.answer - AND track_e_attempt.question_id=answers.question_id - WHERE answers.correct = 0 - AND track_e_attempt.exe_id = "'.Database::escape_string($id).'" - AND track_e_attempt.question_id = "'.Database::escape_string($questionId).'" - AND track_e_attempt.position="'.Database::escape_string($i_answer_position).'"'; - - - $res_user_answer = Database::query($sql_user_answer, __FILE__, __LINE__); + $i_answer_id_auto = $a_answers['id_auto']; // 3 - 4 + + $sql_user_answer = "SELECT answer + FROM $TBL_TRACK_ATTEMPT + WHERE exe_id = '$id' AND question_id = '$questionId' AND position='$i_answer_id_auto'"; + $res_user_answer = Database::query($sql_user_answer, __FILE__, __LINE__); + if (Database::num_rows($res_user_answer)>0 ) { $s_user_answer = Database::result($res_user_answer,0,0); // rich - good looking } else { - $s_user_answer = ''; + $s_user_answer = 0; } - - //$s_correct_answer = $s_answer_label; // your ddady - your mother - $s_correct_answer = $real_list[$i_answer_correct_answer]; - + $i_answerWeighting=$objAnswerTmp->selectWeighting($i_answer_id); - - //if($s_user_answer == $s_correct_answer) // rich == your ddady?? wrong - //echo $s_user_answer.' - '.$real_list[$i_answer_correct_answer]; - - if ($s_user_answer == $real_list[$i_answer_correct_answer]) { // rich == your ddady?? wrong - $questionScore+=$i_answerWeighting; - $totalScore+=$i_answerWeighting; - } else { - $s_user_answer = ''.$s_user_answer.''; + + $user_answer = ''; + if (!empty($s_user_answer)) { + if ($s_user_answer == $i_answer_correct_answer) { + $questionScore+=$i_answerWeighting; + $totalScore+=$i_answerWeighting; + $user_answer = ''.$real_list[$i_answer_correct_answer].''; + } else { + $user_answer = ''.$real_list[$s_user_answer].''; + } } echo ''; - echo ''; + echo ''; echo ''; } echo '
'.$s_answer_label.''.$s_user_answer.' / '.$s_correct_answer.''.$s_answer_label.''.$user_answer.' / '.$real_list[$i_answer_correct_answer].'
'; From bfd7367c5281594d9be715e79441ed22758de5a1 Mon Sep 17 00:00:00 2001 From: Arthur Portugal Date: Wed, 16 Dec 2009 10:11:39 -0500 Subject: [PATCH 07/10] Changed text static using get lang CT#444 --- main/inc/lib/usermanager.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main/inc/lib/usermanager.lib.php b/main/inc/lib/usermanager.lib.php index 65ef9896b7..07f191c74c 100644 --- a/main/inc/lib/usermanager.lib.php +++ b/main/inc/lib/usermanager.lib.php @@ -2665,7 +2665,7 @@ class UserManager
- Search (Users, Groups) + '.get_lang('Search').' ('.get_lang('UsersGroups').')
From c6cd69c9a23ca47a480b6ef38074b8ad42e7e8f9 Mon Sep 17 00:00:00 2001 From: Cristian Fasanando Date: Wed, 16 Dec 2009 11:57:48 -0500 Subject: [PATCH 08/10] Fixed - the picture is not showing in groups, but in the profile show - partial CT#190 --- main/inc/lib/group_portal_manager.lib.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/main/inc/lib/group_portal_manager.lib.php b/main/inc/lib/group_portal_manager.lib.php index a2928e2fc7..28a51fef71 100755 --- a/main/inc/lib/group_portal_manager.lib.php +++ b/main/inc/lib/group_portal_manager.lib.php @@ -343,9 +343,11 @@ class GroupPortalManager $result=Database::query($sql,__FILE__,__LINE__); $array = array(); while ($row = Database::fetch_array($result, 'ASSOC')) { + $image_path = UserManager::get_user_picture_path_by_id($row['user_id'], 'web', false, true); + $user_profile = UserManager::get_picture_user($row['user_id'], $image_path['file'], 60, 'medium_'); if ($with_image == true) { $picture = UserManager::get_picture_user($row['user_id'], $row['picture_uri'],$image_conf['height'],$image_conf['size']); - $row['image'] = ''; + $row['image'] = ''; } $array[$row['user_id']] = $row; } From 5392527466b459a9e700ac0be5703aae2a9b0a03 Mon Sep 17 00:00:00 2001 From: Cristian Fasanando Date: Wed, 16 Dec 2009 12:14:56 -0500 Subject: [PATCH 09/10] =?UTF-8?q?Fixed=20-=20the=20specials=20characters?= =?UTF-8?q?=20is=20not=20validated=20like=20(=C3=B1,=20`=20)=20in=20group?= =?UTF-8?q?=20messages=20-=20partial=20CT#190?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main/inc/lib/message.lib.php | 54 ++---------------------------------- 1 file changed, 3 insertions(+), 51 deletions(-) diff --git a/main/inc/lib/message.lib.php b/main/inc/lib/message.lib.php index a5743aef43..7d2687bdf6 100755 --- a/main/inc/lib/message.lib.php +++ b/main/inc/lib/message.lib.php @@ -188,9 +188,9 @@ class MessageManager if (!empty($receiver_user_id) || !empty($group_id)) { // message for user friend - $title = api_convert_encoding($title,$charset,'UTF-8'); + $title = api_convert_encoding($title,$charset); $title = Database::escape_string($title); - $content = api_convert_encoding($content,$charset,'UTF-8'); + $content = api_convert_encoding($content,$charset); $content = Database::escape_string($content); //message in inbox @@ -237,56 +237,8 @@ class MessageManager } } } - /* - if (!empty($group_id)) { - //message in inbox for group - $users_by_group = GroupPortalManager::get_all_users_by_group($group_id); - $users_ids = array_keys($users_by_group); - if (is_array($users_ids) && count($users_ids) > 0) { - foreach ($users_ids as $user_id) { - $receiver_user_id = $user_id; - $query = "INSERT INTO $table_message(user_sender_id, user_receiver_id, msg_status, send_date, title, content, group_id, parent_id ) ". - " VALUES ('$user_sender_id', '$receiver_user_id', '1', '".date('Y-m-d H:i:s')."','$title','$content','$group_id','$parent_id')"; - $result = Database::query($query,__FILE__,__LINE__); - $inbox_last_id = Database::insert_id(); - // save attachment file for inbox messages - if (is_array($file_attachments)) { - $i = 0; - foreach ($file_attachments as $file_attach) { - if ($file_attach['error'] == 0) { - self::save_message_attachment_file($file_attach,$file_comments[$i],$inbox_last_id,null,$receiver_user_id); - } - $i++; - } - } - // update parent id for other receiver users belongs the group - if (!empty($parent_id)) { - self::update_parent_ids_from_reply($parent_id, $receiver_user_id, $inbox_last_id); - } - } - } - } else { - - //message in inbox for user friend - $query = "INSERT INTO $table_message(user_sender_id, user_receiver_id, msg_status, send_date, title, content, group_id, parent_id ) ". - " VALUES ('$user_sender_id', '$receiver_user_id', '1', '".date('Y-m-d H:i:s')."','$title','$content','$group_id','$parent_id')"; - $result = Database::query($query,__FILE__,__LINE__); - $inbox_last_id = Database::insert_id(); - // save attachment file for inbox messages - if (is_array($file_attachments)) { - $i = 0; - foreach ($file_attachments as $file_attach) { - if ($file_attach['error'] == 0) { - self::save_message_attachment_file($file_attach,$file_comments[$i],$inbox_last_id,null,$receiver_user_id); - } - $i++; - } - } - } - */ return $result; - //} - } + } return false; } From 37eaa0f0c7bb358f526f3396c3191b9482f0c156 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Carlos=20Ra=C3=B1a?= Date: Thu, 17 Dec 2009 20:03:15 +0100 Subject: [PATCH 10/10] update langs --- main/lang/asturian/exercice.inc.php | 1 + main/lang/english/exercice.inc.php | 1 + main/lang/english/index.inc.php | 3 ++ main/lang/english/trad4all.inc.php | 2 +- main/lang/english/userInfo.inc.php | 50 ++++++++++++++++++++++ main/lang/italian/exercice.inc.php | 1 + main/lang/serbian/admin.inc.php | 66 +++++++++++++++++++++++++++++ main/lang/serbian/agenda.inc.php | 10 +++++ main/lang/serbian/blog.inc.php | 2 + main/lang/serbian/exercice.inc.php | 1 + main/lang/serbian/trad4all.inc.php | 26 ++++++++++++ main/lang/serbian/userInfo.inc.php | 16 +++++++ main/lang/serbian/videoconf.inc.php | 28 ++++++++++++ main/lang/serbian/wiki.inc.php | 6 +++ main/lang/serbian/work.inc.php | 13 ++++++ main/lang/spanish/exercice.inc.php | 5 ++- main/lang/spanish/index.inc.php | 3 ++ main/lang/spanish/trad4all.inc.php | 6 +-- main/lang/spanish/userInfo.inc.php | 50 ++++++++++++++++++++++ 19 files changed, 284 insertions(+), 6 deletions(-) diff --git a/main/lang/asturian/exercice.inc.php b/main/lang/asturian/exercice.inc.php index dc9bf3a64c..788fc2f5f0 100755 --- a/main/lang/asturian/exercice.inc.php +++ b/main/lang/asturian/exercice.inc.php @@ -351,4 +351,5 @@ $SessionIsReadOnly = "La sesi $EnableTimerControl = "Activar control de tiempu"; $ExerciseTotalDurationInMinutes = "Duración total en minutos del exerciciu"; $ToContinueUseMenu = "Pa siguir esta lleición, por favor, usa\'l menú llateral"; +$RandomAnswers = "Rempuestes al debalu"; ?> \ No newline at end of file diff --git a/main/lang/english/exercice.inc.php b/main/lang/english/exercice.inc.php index 01fdeeb5ad..8be0602a98 100755 --- a/main/lang/english/exercice.inc.php +++ b/main/lang/english/exercice.inc.php @@ -351,4 +351,5 @@ $SessionIsReadOnly = "The session is read only"; $EnableTimerControl = "Enable time control"; $ExerciseTotalDurationInMinutes = "Total duration in minutes of the test"; $ToContinueUseMenu = "To continue this course, please use the side-menu."; +$RandomAnswers = "Shuffle answers"; ?> \ No newline at end of file diff --git a/main/lang/english/index.inc.php b/main/lang/english/index.inc.php index 537f8fe039..cf892ab5cd 100755 --- a/main/lang/english/index.inc.php +++ b/main/lang/english/index.inc.php @@ -66,4 +66,7 @@ $LinkAdded = "New link added"; $AnnouncementAdded = "Announcement added"; $AgendaAdded = "Event added"; $YouDoNotHaveAnySessionInItsHistory = "You do not have any training session in its history"; +$Messages = "Messages"; +$Inbox = "Inbox"; +$Comppose = "Comppose"; ?> \ No newline at end of file diff --git a/main/lang/english/trad4all.inc.php b/main/lang/english/trad4all.inc.php index ad31b38b92..5fef7e0387 100755 --- a/main/lang/english/trad4all.inc.php +++ b/main/lang/english/trad4all.inc.php @@ -749,7 +749,7 @@ $WikiAdded = "Wiki added"; $ReadOnly = "Read only"; $Unacceptable = "Unacceptable"; $DisplayTrainingList = "Display training list"; -$HistoryTrainingSession = "History training session"; +$HistoryTrainingSession = "History training "; $Until = "Until"; $FirstPage = "First Page"; $LastPage = "Last Page"; diff --git a/main/lang/english/userInfo.inc.php b/main/lang/english/userInfo.inc.php index 5616325673..3b8ac5afeb 100755 --- a/main/lang/english/userInfo.inc.php +++ b/main/lang/english/userInfo.inc.php @@ -94,4 +94,54 @@ $MyCertificates = "My certificates"; $ToChangeYourEmailMustTypeYourPassword = "To Change Your Email Must Type Your Password"; $Invitations = "Invitations"; $MyGroups = "My groups"; +$EditProfile = "Edit profile"; +$Social = "Social"; +$Profile = "Profile"; +$MyFriends = "My friends"; +$Messages = "Messages"; +$CreateAgroup = "Create a group"; +$UsersGroups = "Users, Groups"; +$SorryNoResults = "Sorry no results"; +$URL = "URL"; +$AddPicture = "Add picture"; +$GroupPermissions = "Group permissions"; +$Closed = "Closed"; +$AddGroup = "Add group"; +$Privacy = "Privacy"; +$ThisIsAnOpenGroup = "This is an open group"; +$YouShouldCreateATopic = "You should create a topic"; +$IamAnAdmin = "I am an admin"; +$NewTopic = "New topic"; +$MessageList = "Message list"; +$EditGroup = "Edit group"; +$MemberList = "Member list"; +$WaitingList = "Waiting list"; +$InviteFriends = "Invite friends"; +$Members = "Members"; +$Admin = "Administrator"; +$AttachmentFiles = "Attachment files"; +$AddOneMoreFile = "Add one more file"; +$MaximunFileSizeXMB = "Maximun file size %s MB"; +$ModifyInformation = "Modify information"; +$GroupList = "Group list"; +$GroupEdit = "Group edit"; +$ThereAreNotUsersInTheWaitingList = "There are not users in the waiting list"; +$SendInvitationTo = "Send invitation to"; +$InviteUsersToGroup = "Invite users to group"; +$PostIn = "It posted"; +$Reply = "Reply"; +$Newest = "Newest"; +$Popular = "Popular"; +$Moderator = "Moderator"; +$DeleteModerator = "DeleteModerator"; +$UserChangeToModerator = "User change to moderator"; +$IamAModerator = "I am a moderator"; +$ThisIsACloseGroup = "This is a close group"; +$IamAReader = "I am a reader"; +$UserChangeToReader = "User change to reader"; +$AddModerator = "Add moderator"; +$UserDeleted = "User deleted"; +$JoinGroup = "Join group"; +$YouShouldJoinTheGroup = "You should join the group"; +$WaitingForAdminResponse = "Waiting for admin response"; ?> \ No newline at end of file diff --git a/main/lang/italian/exercice.inc.php b/main/lang/italian/exercice.inc.php index 5a57239c38..1495432061 100755 --- a/main/lang/italian/exercice.inc.php +++ b/main/lang/italian/exercice.inc.php @@ -351,4 +351,5 @@ $SessionIsReadOnly = "La sessione $EnableTimerControl = "Abilita il controllo del tempo"; $ExerciseTotalDurationInMinutes = "Durata totale del test in minuti"; $ToContinueUseMenu = "Per procedere usa il menů a lato"; +$RandomAnswers = "Mescola le risposte"; ?> \ No newline at end of file diff --git a/main/lang/serbian/admin.inc.php b/main/lang/serbian/admin.inc.php index 8b8e36b1f8..cb03cc7eeb 100755 --- a/main/lang/serbian/admin.inc.php +++ b/main/lang/serbian/admin.inc.php @@ -26,8 +26,11 @@ $SearchUsers = "Pretra $CreateUser = "Kreiraj korisnika"; $ModifyInformation = "Izmeni informaciju"; $ModifyUser = "Izmeni polaznika"; +$buttonEditUserField = "Uredi korisničko polje "; $ModifyCoach = "Ažuriraj trenera"; $ModifyThisSession = "Izmeni ovu sesiju"; +$ExportSession = "Izvezi sesiju"; +$ImportSession = "Uvezi sesiju"; $langCourseBackup = "Napravi back-up ovog kursa"; $langCourseTitular = "Predavač"; $langCourseTitle = "Ime kursa"; @@ -165,6 +168,8 @@ $GeneralCoach = "Glavni tutor"; $GeneralProperties = "Glavne postavke"; $CourseCoach = "Tutor kursa"; $UsersNumber = "Korisnički broj"; +$DokeosClassic = "Dokeos klasični"; +$PublicAdmin = "Javni administrator"; $PageAfterLoginTitle = "Stranica nakon prijave"; $PageAfterLoginComment = "Stranica koja je vidljiva korisniku nakon prijave"; $DokeosAdminWebLinks = "Dokeos Web linkovi"; @@ -222,6 +227,8 @@ $Guest = "Gost"; $langLoginAsThisUserColumnName = "Prijavi se kao "; $langLoginAsThisUser = "Korisničko ime"; $SelectPicture = "Izaberi sliku..."; +$DontResetPassword = "Nemoj poništiti šifru"; +$ParticipateInCommunityDevelopment = "Učestvuj u razvoju"; $langCourseAdmin = "Menadžer kursa"; $langOtherCourses = "drugi kursevi"; $PlatformLanguageTitle = "Izbor jezika"; @@ -285,6 +292,8 @@ $AllowRegistrationComment = "Da li je registracija novog korisnika dozvoljena? M $AllowRegistrationAsTeacherTitle = "Registracija za predavača"; $AllowRegistrationAsTeacherComment = "Može li neko da se registruje kao predavač (koji može da kreira kurseve)?"; $PlatformLanguage = "Platforma za jezike"; +$Tuning = "Podešavanje "; +$SplitUsersUploadDirectory = "Podeli korisnički direktorijum za učitavanje datoteka "; $CourseQuota = "Kvota kursa"; $EditNotice = "Izmeni obaveštenje"; $General = "opšte"; @@ -428,6 +437,63 @@ $RightValueModified = "Vrednost je izmenjena."; $MakeAvailable = "Omogućiti"; $MakeUnavailable = "Onemogućiti"; $DefaultDokeosStyle = "Podrazumevani Dokeos stil"; +$ShowIconsInNavigationsMenuComment = "Da li navigacioni meni treba da prikazuje različite ikone alata? "; +$Plugin = "Plugin"; $MainMenu = "Glavni meni"; +$MainMenuLogged = "Glavni menu nakon prijave"; +$Banner = "Banner"; +$ImageResizeTitle = "Promeni veličinu prenesene korisničke slike"; +$YourVersionNotUpToDate = "Vaša verzija nije ažurna"; +$YourVersionIs = "Vaša verzija je "; +$VersionUpToDate = "Vaša verzija je ažurna"; +$langphone = "Telefon "; +$LatestVersionIs = "Poslednja verzija je"; +$langConfigureExtensions = "Podešavanje ekstenzija"; $langConfigureExtensions = "Dokeos PRO"; +$langActiveExtensions = "Aktivirajte ovu uslugu"; +$langVisioconf = "Visio-konferencija"; +$langListSession = "Lista sesija"; +$AddSession = "Dodaj trening sesiju"; +$langImportSessionListXMLCSV = "Uvezi listu sesija"; +$SessionName = "Naziv sesije"; +$langNbCourses = "Trening"; +$DateStart = "Datum početka"; +$DateEnd = "Datum završetka"; +$CoachName = "Naziv trenera"; +$NoTimeLimits = "Bez vremenskog ograničenja"; +$NextStep = "Sledeći korak"; +$keyword = "Ključna reč "; +$Confirm = "Potvrdi"; +$AfterApproval = "Nakon odobrenja"; +$IconsOnly = "Samo ikone"; +$TextOnly = "Samo tekst"; +$IconsText = "Ikone i tekst"; +$Comment = "Komentar"; +$Version = "Verzija"; +$LoginPageMainArea = "Osnovno područje prijavne strane "; +$LoginPageMenu = "Meni prijavne strane"; +$MyCoursesMainArea = "Osnovna stranica kursa"; +$MyCoursesMenu = "Meni kurseva"; +$Header = "Zaglavlje - Glava"; +$Footer = "Zaglavlje - Noga"; +$VersionCheck = "Provera verzije"; +$Active = "Aktivan"; +$Inactive = "Neaktivan"; +$SessionOverview = "Pregled sesije"; +$Host = "Server"; +$UserOnHost = "Korisničko ime"; +$DateStartSession = "Početni datum"; +$ReconfigureExtension = "Rekonfiguriši ekstenzije"; +$ChooseNewsLanguage = "Izaberite novi jezik"; +$EditLink = "Edituj link"; +$RegistrationDate = "Datum registracije"; +$UserUpdated = "Korisnik ažuriran"; +$Choose = "Odaberi"; +$UserNameTooLong = "Korisničko ime je predugo"; +$Remove = "Ukloni"; +$Rename = "Preimenuj"; +$VisioPassword = "Šifra za server videokonferencije"; +$Port = "Port"; +$AddUserField = "Dodaj korisničko polje"; +$AddUserFields = "Dodaj korisnicko polje"; ?> \ No newline at end of file diff --git a/main/lang/serbian/agenda.inc.php b/main/lang/serbian/agenda.inc.php index 656c001fb9..9c6fad0d69 100755 --- a/main/lang/serbian/agenda.inc.php +++ b/main/lang/serbian/agenda.inc.php @@ -64,4 +64,14 @@ $RepeatMonthlyByDayR = "Mesečno, po danu, ograničen"; $RepeatYearly = "Godišnje"; $RepeatEnd = "Ponovi završni datum"; $RepeatedEventViewOriginalEvent = "Pogledaj originalni događaj"; +$ICalFileImport = "Uvezi iCal/ics Outlook dokument "; +$AllUsersOfThePlatform = "Svi korisnici sistema"; +$GlobalEvent = "Globalni dogadjaj"; +$ModifyEvent = "Uredi dogadjaj"; +$EndDateCannotBeBeforeTheStartDate = "Datum kraja ne može biti pre datuma početka "; +$AgendaSortChronologicallyUp = "Sortiraj zapise rasporeda po rastucem nizu"; +$AgendaSortChronologicallyDown = "Sortiraj zapise rasporeda po opadajucem"; +$ItemForUserSelection = "Selekcija korisnika"; +$IsNotiCalFormatFile = "Ova datoteka nije u formatu iCal "; +$RepeatEvent = "Ponovi dogadjaj"; ?> \ No newline at end of file diff --git a/main/lang/serbian/blog.inc.php b/main/lang/serbian/blog.inc.php index 35b3a9886a..5da5854901 100755 --- a/main/lang/serbian/blog.inc.php +++ b/main/lang/serbian/blog.inc.php @@ -1,4 +1,6 @@ \ No newline at end of file diff --git a/main/lang/serbian/exercice.inc.php b/main/lang/serbian/exercice.inc.php index 6cc0411d03..9e260001d5 100755 --- a/main/lang/serbian/exercice.inc.php +++ b/main/lang/serbian/exercice.inc.php @@ -155,4 +155,5 @@ $langUseExistantQuestion = "Upotreba postojećeg pitanja"; $freeAnswer = "Slobodan odgovor"; $notCorrectedYet = "Ovaj odgovor još nije ispravljan. U međuvremenu rezultat za ovo pitanje je podešen na 0 i utuče na konačan rezultat."; $adminHP = "Hot Potatoes administracija"; +$ResultsDisabled = "Prikazivanje rezultata nije vidljivo za polaznike "; ?> \ No newline at end of file diff --git a/main/lang/serbian/trad4all.inc.php b/main/lang/serbian/trad4all.inc.php index 8d12a68881..8be7e1fa84 100755 --- a/main/lang/serbian/trad4all.inc.php +++ b/main/lang/serbian/trad4all.inc.php @@ -319,5 +319,31 @@ $Phone = "Telefon"; $CourseSettings = "Podešavanja kursa"; $EmailNotifications = "Obaveštenja e-mailom"; $UserRights = "Dozvole polaznicima"; +$langNameOfLang['bosnian'] = "bosanski"; +$langNameOfLang['czech'] = "češki"; +$langNameOfLang['dutch_corporate'] = "holandski korporativni"; +$langNameOfLang['english_org'] = "engleski za organizacije"; +$langNameOfLang['georgian'] = "gruzijski"; +$langNameOfLang['hebrew'] = "hebrejski"; +$langNameOfLang['korean'] = "korejski"; +$langNameOfLang['latvian'] = "latvijski"; +$langNameOfLang['lithuanian'] = "litvanski"; +$langNameOfLang['macedonian'] = "makedonski"; +$langNameOfLang['norwegian'] = "norveški"; +$langNameOfLang['pashto'] = "pashto"; +$langNameOfLang['persian'] = "persijski"; +$langNameOfLang['romanian'] = "rumunski"; +$langNameOfLang['serbian'] = "srpski"; +$langNameOfLang['slovak'] = "slovački"; +$langNameOfLang['swahili'] = "svahili"; +$langNameOfLang['trad_chinese'] = "tradicionalni kineski"; +$langNameOfLang['turkce'] = "turski"; +$langNameOfLang['ukrainian'] = "ukrajinski"; +$Validate = "Potvrdi"; +$Top = "Na vrh "; +$YourTextHere = "Vaš tekst ..."; +$OrderBy = "Sortiraj po "; +$Notebook = "Beležnica "; +$FieldRequired = "Obavezno polje "; $Image = "Slika"; ?> \ No newline at end of file diff --git a/main/lang/serbian/userInfo.inc.php b/main/lang/serbian/userInfo.inc.php index 4c4c690556..a9d50c7832 100755 --- a/main/lang/serbian/userInfo.inc.php +++ b/main/lang/serbian/userInfo.inc.php @@ -28,4 +28,20 @@ $langUnreg = "Odjavi"; $langGroupUserManagement = "Administrator grupe"; $langUnregister = "Pdjava"; $langAddAUser = "Dodaj korisnike"; +$AddToFriends = "Da li ste sigurni da želite da dodate ovaj kontakt u svoje prijatelje ? "; +$AddPersonalMessage = "Dodaj sopstvenu poruku"; +$Friends = "Prijatelji "; +$PersonalData = "Profil"; +$Contacts = "Kontakti"; +$ContactsList = "Kontakti"; +$SelectOneContact = "Izaberite kontakt"; +$SelectOneGroup = "Izaberite jednu grupu"; +$SelectTheCheckbox = "Izaberite polje za potvrdu"; +$DateSend = "Datum slanja"; +$SocialParent = "Moji roditelji"; +$SocialFriend = "Moji prijatelji"; +$SocialGoodFriend = "Moji pravi prijatelji"; +$MyInbox = "Moja pošta"; +$SeeAll = "Prikaži sve "; +$SearchContacts = "Pretraži kontakte"; ?> \ No newline at end of file diff --git a/main/lang/serbian/videoconf.inc.php b/main/lang/serbian/videoconf.inc.php index 35b3a9886a..f97dd1a420 100755 --- a/main/lang/serbian/videoconf.inc.php +++ b/main/lang/serbian/videoconf.inc.php @@ -1,4 +1,32 @@ \ No newline at end of file diff --git a/main/lang/serbian/wiki.inc.php b/main/lang/serbian/wiki.inc.php index 35b3a9886a..6952c901ab 100755 --- a/main/lang/serbian/wiki.inc.php +++ b/main/lang/serbian/wiki.inc.php @@ -1,4 +1,10 @@ \ No newline at end of file diff --git a/main/lang/serbian/work.inc.php b/main/lang/serbian/work.inc.php index 24007a616a..6482ce98cd 100755 --- a/main/lang/serbian/work.inc.php +++ b/main/lang/serbian/work.inc.php @@ -28,4 +28,17 @@ $CreateDirectory = "Kreiraj direktorijum"; $langCurrentDir = "tekući folder"; $UploadADocument = "Učitaj dokument"; $EditToolOptions = "Izmeni opcije alata"; +$AddToCalendar = "Dodaj u kalendar "; +$MoveXTo = "Premesti %s u "; +$ModifyDirectory = "Potvrdi izmenu direktorijuma"; +$DeleteAllFiles = "Obriši sve dokumente"; +$BackToWorksList = "Povratak na popis zadataka "; +$FileInvisible = "Datoteka je sakrivena "; +$CreateAssignment = "Kreirajte zadatak"; +$UpdateWork = "Ažuriraj trenutni zadatak "; +$MakeAllPapersInvisible = "Sakrij sve dokumente"; +$MakeAllPapersVisible = "Postavi sve dokumente da su vidljivi"; +$TheDocumentHasBeenDeleted = "Dokument je obrisan"; +$YouAreNotAllowedToDeleteThisDocument = "Nemate autorizaciju da obrišete ovaj dokument"; +$ConfirmYourChoiceDeleteAllfiles = "Potvrdjivanjem vašeg izbora će obrisati sve fajlove i to neće biti moguće naknadno ispraviti"; ?> \ No newline at end of file diff --git a/main/lang/spanish/exercice.inc.php b/main/lang/spanish/exercice.inc.php index 7d3aebaf11..f64d082dd7 100755 --- a/main/lang/spanish/exercice.inc.php +++ b/main/lang/spanish/exercice.inc.php @@ -291,7 +291,7 @@ $ShowResultsToStudents = "Mostrar los resultados a los estudiantes"; $ProcedToQuestions = "Preparar preguntas"; $AddQuestionToExercise = "Ańadir pregunta"; $PresentationQuestions = "Presentación de las preguntas"; -$UniqueAnswer = "Respuesta única"; +$UniqueAnswer = "Elección múltiple"; $MultipleAnswer = "Respuesta multiple"; $FreeAnswer = "Respuesta abierta"; $HotSpot = "Zonas de imagen"; @@ -349,6 +349,7 @@ $Delineation = "Delineaci $QuestionTypeDoesNotBelongToFeedbackTypeInExercise = "Tipo de pregunta no pertenece al tipo de retroalimentación en ejercicios"; $SessionIsReadOnly = "La sesión es de sólo lectura"; $EnableTimerControl = "Habilitar control de tiempo"; -$ExerciseTotalDurationInMinutes = "Duración total en minutos del ejercicio"; +$ExerciseTotalDurationInMinutes = "Duración del ejercicio (en minutos)"; $ToContinueUseMenu = "Para continuar esta lección, por favor use el menú lateral."; +$RandomAnswers = "Barajar respuestas"; ?> \ No newline at end of file diff --git a/main/lang/spanish/index.inc.php b/main/lang/spanish/index.inc.php index 4bd67fb481..d19bc52cd5 100755 --- a/main/lang/spanish/index.inc.php +++ b/main/lang/spanish/index.inc.php @@ -66,4 +66,7 @@ $LinkAdded = "Ha sido a $AnnouncementAdded = "Ha sido ańadido un anuncio"; $AgendaAdded = "Ha sido ańadido un evento de la agenda "; $YouDoNotHaveAnySessionInItsHistory = "En su historial no hay ninguna sesión de formación"; +$Messages = "Mensajes"; +$Inbox = "Bandeja de entrada"; +$Comppose = "Redactar"; ?> \ No newline at end of file diff --git a/main/lang/spanish/trad4all.inc.php b/main/lang/spanish/trad4all.inc.php index 29239e3ae6..27893476c5 100755 --- a/main/lang/spanish/trad4all.inc.php +++ b/main/lang/spanish/trad4all.inc.php @@ -728,10 +728,10 @@ $SaveIntroText = "Guardar texto de introducci $CourseName = "Nombre del curso"; $SendAMessage = "Enviar mensaje"; $Menu = "Menú"; -$BackToUserList = "Regresar a lista de usurios"; +$BackToUserList = "Regresar a lista de usuarios"; $GraphicNotAvailable = "Gráfico no disponible"; $BackTo = "Volver a"; -$HistoryTrainingSessions = "Historial de sesiones de formación"; +$HistoryTrainingSessions = "Historial de cursos"; $ConversionFailled = "Conversión fallida"; $AlreadyExists = "Ya existe"; $TheNewWordHasBeenAdded = "La nueva palabra ha sido ańadida al subconjunto del idioma principal"; @@ -749,7 +749,7 @@ $WikiAdded = "Wiki a $ReadOnly = "Solo lectura"; $Unacceptable = "No aceptable"; $DisplayTrainingList = "Mostrar la lista de cursos"; -$HistoryTrainingSession = "Historial de sesiones de formación"; +$HistoryTrainingSession = "Historial de cursos"; $Until = "Hasta"; $FirstPage = "Primera página"; $LastPage = "Última página"; diff --git a/main/lang/spanish/userInfo.inc.php b/main/lang/spanish/userInfo.inc.php index f119a27426..5d5155a2cd 100755 --- a/main/lang/spanish/userInfo.inc.php +++ b/main/lang/spanish/userInfo.inc.php @@ -94,4 +94,54 @@ $MyCertificates = "Mis certificados"; $ToChangeYourEmailMustTypeYourPassword = "Para cambiar su correo electrónico debe escribir su contraseńa"; $Invitations = "Invitaciones"; $MyGroups = "Mis grupos"; +$EditProfile = "Editar perfil"; +$Social = "Social"; +$Profile = "Perfil"; +$MyFriends = "Mis amigos"; +$Messages = "Mensajes instantáneos"; +$CreateAgroup = "Crear un grupo"; +$UsersGroups = "Usuarios, Grupos"; +$SorryNoResults = "No hay resultados"; +$URL = "URL"; +$AddPicture = "Agregar imagen"; +$GroupPermissions = "Permiso de grupo"; +$Closed = "Cerrado"; +$AddGroup = "Agregar grupo"; +$Privacy = "Privacidad"; +$ThisIsAnOpenGroup = "Este es un grupo abierto"; +$YouShouldCreateATopic = "Ud. deberia crear un tema"; +$IamAnAdmin = "Yo soy administrador"; +$NewTopic = "Nuevo tema"; +$MessageList = "Lista de mensajes"; +$EditGroup = "Editar grupo"; +$MemberList = "Lista de miembros"; +$WaitingList = "Lista de espera"; +$InviteFriends = "Invitar amigos"; +$Members = "Miembros"; +$Admin = "Administrador"; +$AttachmentFiles = "Adjuntar archivos"; +$AddOneMoreFile = "Agregar un campo mas"; +$MaximunFileSizeXMB = "Tamańo maximo de archivo %s MB"; +$ModifyInformation = "Modificar información"; +$GroupList = "Lista de grupos"; +$GroupEdit = "Editar grupo"; +$ThereAreNotUsersInTheWaitingList = "No hay usuarios en la lista de espera"; +$SendInvitationTo = "Enviar invitación a"; +$InviteUsersToGroup = "Invitar usuarios a grupo"; +$PostIn = "Publicado"; +$Reply = "Responder"; +$Newest = "Lo último"; +$Popular = "Populares"; +$Moderator = "Moderador"; +$DeleteModerator = "Eliminar moderador"; +$UserChangeToModerator = "Usuario cambiado a moderador"; +$IamAModerator = "Yo soy un moderador"; +$ThisIsACloseGroup = "Este es un grupo cerrado"; +$IamAReader = "Yo soy un lector"; +$UserChangeToReader = "Usuario cambiado a lector"; +$AddModerator = "Agregar moderador"; +$UserDeleted = "Usuario eliminado"; +$JoinGroup = "Unirse al grupo"; +$YouShouldJoinTheGroup = "Ud. deberia unirse al grupo"; +$WaitingForAdminResponse = "Esperando a que el admin responda"; ?> \ No newline at end of file