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

1.10.x
Julio Montoya 11 years ago
commit b4180048dc
  1. 1
      documentation/changelog.html
  2. 1
      documentation/installation_guide.html
  3. 3
      main/admin/course_information.php
  4. 4
      main/admin/session_import.php
  5. 14
      main/admin/teacher_time_report.php
  6. 2
      main/admin/user_information.php
  7. 6
      main/admin/user_move_stats.php
  8. 2
      main/announcements/announcements.php
  9. 2
      main/course_info/infocours.php
  10. 5
      main/coursecopy/copy_course_session_selected.php
  11. 5
      main/document/show_content.php
  12. 14
      main/exercice/TestCategory.php
  13. 4
      main/exercice/exercise.php
  14. 7
      main/forum/download.php
  15. 2
      main/forum/forumfunction.inc.php
  16. 4
      main/gradebook/exercise_jump.php
  17. 2
      main/gradebook/lib/GradebookUtils.php
  18. 2
      main/gradebook/lib/be/category.class.php
  19. 2
      main/inc/ajax/course.ajax.php
  20. 4
      main/inc/ajax/exercise.ajax.php
  21. 70
      main/inc/global.inc.php
  22. 4
      main/inc/lib/AnnouncementManager.php
  23. 4
      main/inc/lib/agenda.lib.php
  24. 4
      main/inc/lib/api.lib.php
  25. 14
      main/inc/lib/attendance.lib.php
  26. 4
      main/inc/lib/banner.lib.php
  27. 4
      main/inc/lib/blog.lib.php
  28. 40
      main/inc/lib/course.lib.php
  29. 2
      main/inc/lib/fileUpload.lib.php
  30. 2
      main/inc/lib/groupmanager.lib.php
  31. 22
      main/inc/lib/link.lib.php
  32. 8
      main/inc/lib/search/tool_processors/link_processor.class.php
  33. 6
      main/inc/lib/search/tool_processors/quiz_processor.class.php
  34. 16
      main/inc/lib/sessionmanager.lib.php
  35. 12
      main/install/data.sql
  36. 4
      main/install/index.php
  37. 21
      main/lang/english/trad4all.inc.php
  38. 39
      main/lang/french/trad4all.inc.php
  39. 32
      main/lang/spanish/trad4all.inc.php
  40. 4
      main/newscorm/learnpath.class.php
  41. 2
      main/survey/survey.lib.php
  42. 2
      main/tracking/courseLog.php
  43. 2
      main/tracking/course_log_resources.php
  44. 2
      main/tracking/course_log_tools.php
  45. 6
      main/user/user.php
  46. 2
      main/work/upload.php
  47. 2
      main/work/upload_from_template.php
  48. 14
      main/work/work.lib.php
  49. 4
      main/work/work.php
  50. 64
      src/Chamilo/CoreBundle/Migrations/Schema/V110/Version20150504182600.php
  51. 4
      user_portal.php
  52. 2
      whoisonlinesession.php

@ -54,6 +54,7 @@
<h3>Possibly breaking changes</h3>
<ul>
<li>We changed/fixed several calls to SQL NOW() to api_get_utc_datetime(), as our coding conventions require. This *might* have a small adverse effect of generating a hole or a superposition in connections tracking in a few admin reports. See commits <a href="https://github.com/chamilo/chamilo-lms/commit/17c04edf6bb932361ecb1f5092aaed87962d4301">17c04ed</a>, <a href="https://github.com/chamilo/chamilo-lms/commit/df958828f8992aefcd8ef603cc7087979c753653">df95882</a>, <a href="https://github.com/chamilo/chamilo-lms/commit/b568eb4e67509a44bcafff68c580b65675cbd1d6">b568eb4</a> and <a href="https://github.com/chamilo/chamilo-lms/commit/3b8a26f3634da86fccab4db2921a6613e3c111d1">3b8a26f</a> for details</li>
<li>A few languages now get a "parent" language which is not English. In this case, we have based the update query on an ID that we "assume" to be the right one for Spanish, Italian, French, Chinese and Portuguese. If the ID is not correct, you might, in the worst case scenario, get Chinese or Arabic terms appear in a language that is not the primary one, like Galician (normally taking Spanish as parent language). This can be fixed very easily by an "UPDATE language SET parent_id = NULL"; for all your languages, and then re-apply the parent manually to your sub-language if it needs one.</li>
</ul>
<h3>Notable new Features</h3>
<h3>Improvements (minor features) and debug</h3>

@ -384,6 +384,7 @@ As this is only a minor version change from previous 1.10.* versions of Chamilo,
<li> point your browser on your portal URL + main/install/</li>
<li> choose your language and click&nbsp;<span style="font-style: italic;">Upgrade from 1.8.x/1.9.x</span></li>
<li> clean your archive/ directory: take a temporary copy of index.html, delete all the contents *in* this directory (do NOT remove the directory itself, only its contents!). It will all be re-generated. You can also delete the contents of this directory through the "Archive directory cleanup" option in the "System" box of the Administration page.</li>
<li> make sure "AllowOverride All" is present in your Apache configuration, as interpreting the .htaccess files is very important for Chamilo to work</li>
</ul>
<br />

@ -153,9 +153,8 @@ if (Database::num_rows($res) > 0) {
} else {
echo get_lang('NoUsersInCourse');
}
$courseInfo = api_get_course_info($course->code);
$session_list = SessionManager::get_session_by_course($courseInfo['real_id']);
$session_list = SessionManager::get_session_by_course($course->id);
$url = api_get_path(WEB_CODE_PATH);
if (!empty($session_list)) {

@ -380,8 +380,8 @@ if (isset($_POST['formSent']) && $_POST['formSent']) {
if ($vcourse['code'] == $course_code) {
// Ignore, this has already been inserted.
} else {
$course_info = api_get_course_info($course['code']);
$courseId = $course_info['real_id'];
$course_info = api_get_course_info_by_id($course['id']);
$courseId = $course['real_id'];
$sql_course = "INSERT INTO $tbl_session_course SET
c_id = $courseId,

@ -187,7 +187,7 @@ if (!empty($selectedTeacher)) {
if (!empty($courses)) {
foreach ($courses as $course) {
$courseInfo = api_get_course_info($course['code']);
$courseInfo = api_get_course_info_by_id($course['real_id']);
$totalTime = UserManager::getExpendedTimeInCourses(
$selectedTeacher,
@ -219,11 +219,11 @@ if (!empty($selectedTeacher)) {
'name' => $session['name']
);
$courseInfo = api_get_course_info($course['course_code']);
$courseInfo = api_get_course_info_by_id($course['c_id']);
$totalTime = UserManager::getExpendedTimeInCourses(
$selectedTeacher,
$course['real_id'],
$course['c_id'],
$session['id'],
$selectedFrom,
$selectedUntil
@ -233,7 +233,7 @@ if (!empty($selectedTeacher)) {
$timeReport->data[] = array(
'session' => $sessionData,
'course' => array(
'id' => $courseInfo['real_id'],
'id' => $course['c_id'],
'name' => $courseInfo['title']
),
'coach' => $teacherData,
@ -249,7 +249,11 @@ if (empty($selectedCourse) && empty($selectedSession) && empty($selectedTeacher)
'username' => $teacher['username'],
'completeName' => $teacher['completeName'],
),
'totalTime' => SessionManager::getTotalUserTimeInPlatform($teacher['user_id'], $selectedFrom, $selectedUntil)
'totalTime' => SessionManager::getTotalUserTimeInPlatform(
$teacher['user_id'],
$selectedFrom,
$selectedUntil
)
);
}
}

@ -137,7 +137,7 @@ if (count($sessions) > 0) {
$csvContent[] = array($session_item['session_name']);
$csvContent[] = $headerList;
foreach ($session_item['courses'] as $my_course) {
$courseInfo = api_get_course_info($my_course['code']);
$courseInfo = api_get_course_info_by_id($my_course['real_id']);
$sessionStatus = SessionManager::get_user_status_in_session(
$user['user_id'],
$courseInfo['real_id'],

@ -669,7 +669,9 @@ if (!empty($user_list)) {
if (is_array($course_list) && !empty($course_list)) {
foreach ($course_list as $my_course) {
$key = $my_course['code'].'_'.$my_course['session_id'];
$courseInfo = api_get_course_info_by_id($my_course['c_id']);
$my_course['real_id'] = $my_course['c_id'];
$key = $courseInfo['code'].'_'.$my_course['session_id'];
if (!in_array($key, $new_course_list)) {
$my_course['not_registered'] = 1;
@ -679,7 +681,7 @@ if (!empty($user_list)) {
}
foreach ($course_list_registered as & $course) {
$courseInfo = api_get_course_info($course['code']);
$courseInfo = api_get_course_info_by_id($course['real_id']);
$course['name'] = $courseInfo['name'];
}

@ -51,7 +51,7 @@ $tbl_announcement = Database::get_course_table(TABLE_ANNOUNCEMENT);
$tbl_item_property = Database::get_course_table(TABLE_ITEM_PROPERTY);
$course_id = api_get_course_int_id();
$_course = api_get_course_info();
$_course = api_get_course_info_by_id($course_id);
$group_id = api_get_group_id();
api_protect_course_group(GroupManager::GROUP_TOOL_ANNOUNCEMENT);

@ -434,7 +434,7 @@ if ($form->validate() && is_settings_editable()) {
isset($_configuration[$urlId]['hosting_limit_active_courses']) &&
$_configuration[$urlId]['hosting_limit_active_courses'] > 0
) {
$courseInfo = api_get_course_info($course_code);
$courseInfo = api_get_course_info_by_id($courseId);
// Check if
if ($courseInfo['visibility'] == COURSE_VISIBILITY_HIDDEN &&

@ -29,8 +29,9 @@ if (!api_is_coach()) {
api_not_allowed(true);
}
$courseCode = api_get_course_id();
$courseInfo = api_get_course_info($courseCode);
$courseId = api_get_course_int_id();
$courseInfo = api_get_course_info($courseId);
$courseCode = $courseInfo['code'];
$sessionId = api_get_session_id();
if (empty($courseCode) OR empty($sessionId)) {

@ -14,8 +14,9 @@ $noPHP_SELF = true;
$header_file = isset($_GET['file']) ? Security::remove_XSS($_GET['file']) : null;
$document_id = intval($_GET['id']);
$course_info = api_get_course_info();
$course_code = api_get_course_id();
$courseId = api_get_course_int_id();
$course_info = api_get_course_info_by_id($courseId);
$course_code = $course_info['code'];
$session_id = api_get_session_id();
if (empty($course_info)) {

@ -85,8 +85,8 @@ class TestCategory
Database::query($sql);
// add test_category in item_property table
$course_code = api_get_course_id();
$course_info = api_get_course_info($course_code);
$course_id = api_get_course_int_id();
$course_info = api_get_course_info_by_id($course_id);
api_item_property_update(
$course_info,
TOOL_TEST_CATEGORY,
@ -117,13 +117,13 @@ class TestCategory
if (Database::affected_rows($result) <= 0) {
return false;
} else {
$course_id = api_get_course_int_id();
// remove link between question and category
$sql2 = "DELETE FROM $tbl_question_rel_cat
WHERE category_id=$v_id AND c_id=".api_get_course_int_id();
WHERE category_id=$v_id AND c_id=".$course_id;
Database::query($sql2);
// item_property update
$course_code = api_get_course_id();
$course_info = api_get_course_info($course_code);
$course_info = api_get_course_info_by_id($course_id);
api_item_property_update(
$course_info,
TOOL_TEST_CATEGORY,
@ -151,8 +151,8 @@ class TestCategory
return false;
} else {
// item_property update
$course_code = api_get_course_id();
$course_info = api_get_course_info($course_code);
$course_id = api_get_course_int_id();
$course_info = api_get_course_info_by_id($course_id);
api_item_property_update(
$course_info,
TOOL_TEST_CATEGORY,

@ -37,9 +37,9 @@ $is_allowedToEdit = api_is_allowed_to_edit(null, true);
$is_tutor = api_is_allowed_to_edit(true);
$is_tutor_course = api_is_course_tutor();
$courseInfo = api_get_course_info();
$courseId = api_get_course_int_id();
$userId = api_get_user_id();
$courseId = $courseInfo['real_id'];
$userInfo = api_get_user_info();
$userId = $userInfo['id'];
$isDrhOfCourse = CourseManager::isUserSubscribedInCourseAsDrh(
$userId,
$courseInfo

@ -54,6 +54,7 @@ $tbl_forum_attachment = Database::get_course_table(TABLE_FORUM_ATTACHMENT);
$tbl_forum_post = Database::get_course_table(TABLE_FORUM_POST);
$course_id = api_get_course_int_id();
$courseInfo = api_get_course_info_by_id($course_id);
// launch event
Event::event_download($doc_url);
@ -71,13 +72,13 @@ $result = Database::query($sql);
$row = Database::fetch_array($result);
$forum_thread_visibility = api_get_item_visibility(
api_get_course_info($course_code),
$courseInfo,
TOOL_FORUM_THREAD,
$row['thread_id'],
api_get_session_id()
);
$forum_forum_visibility = api_get_item_visibility(
api_get_course_info($course_code),
$courseInfo,
TOOL_FORUM,
$row['forum_id'],
api_get_session_id()
@ -86,7 +87,7 @@ $forum_forum_visibility = api_get_item_visibility(
if ($forum_thread_visibility==1 && $forum_forum_visibility==1) {
if (Security::check_abs_path(
$full_file_name,
api_get_path(SYS_COURSE_PATH).api_get_course_path().'/upload/forum/')
api_get_path(SYS_COURSE_PATH).$courseInfo['path'].'/upload/forum/')
) {
DocumentManager::file_send_for_download(
$full_file_name,

@ -2240,7 +2240,7 @@ function count_number_of_forums_in_category($cat_id)
*/
function store_thread($current_forum, $values, $courseInfo = array(), $showMessage = true)
{
$courseInfo = empty($courseInfo) ? api_get_course_info() :$courseInfo ;
$courseInfo = empty($courseInfo) ? api_get_course_info() : $courseInfo ;
$_user = api_get_user_info();
$course_id = $courseInfo['real_id'];
$courseCode = $courseInfo['code'];

@ -14,8 +14,8 @@ require_once '../inc/global.inc.php';
api_block_anonymous_users();
$this_section=SECTION_COURSES;
$course_code = api_get_course_id();
$course_info = api_get_course_info($course_code);
$course_id = api_get_course_int_id();
$course_info = api_get_course_info_by_id($course_id);
$course_title = $course_info['title'];
$course_code = $return_result['code'];
$gradebook = Security::remove_XSS($_GET['gradebook']);

@ -1211,7 +1211,7 @@ class GradebookUtils
continue;
}
$courseInfo = api_get_course_info($course['code']);
$courseInfo = api_get_course_info_by_id($course['real_id']);
$courseList[] = [
'course' => $courseInfo['title'],

@ -288,7 +288,7 @@ class Category implements GradebookItem
return $cats;
}
$courseCode = api_get_course_info(api_get_course_id());
$courseCode = api_get_course_info_by_id(api_get_course_int_id());
$courseCode = $courseCode['code'];
$session_id = intval($session_id);

@ -28,7 +28,7 @@ switch ($action) {
$list_course_all_info = CourseManager::get_courses_list_by_user_id($user_id, false);
if (!empty($list_course_all_info)) {
foreach ($list_course_all_info as $course_item) {
$course_info = api_get_course_info($course_item['code']);
$course_info = api_get_course_info_by_id($course_item['real_id']);
echo $course_info['title'].'<br />';
}
} else {

@ -184,7 +184,7 @@ switch ($action) {
}
break;
case 'update_question_order':
$course_info = api_get_course_info($course_code);
$course_info = api_get_course_info_by_id($course_id);
$course_id = $course_info['real_id'];
$exercise_id = isset($_REQUEST['exercise_id']) ? $_REQUEST['exercise_id'] : null;
@ -221,7 +221,7 @@ switch ($action) {
}
break;
case 'save_exercise_by_now':
$course_info = api_get_course_info($course_code);
$course_info = api_get_course_info_by_id($course_id);
$course_id = $course_info['real_id'];
// Use have permissions?

@ -456,53 +456,33 @@ if (!empty($valid_languages)) {
$language_interface_initial_value = $language_interface;
/**
* Include all necessary language files
* - trad4all
* - notification
* - custom tool language files
* Include the trad4all language file
*/
$language_files = array();
$language_files[] = 'trad4all';
if (isset($language_file)) {
if (!is_array($language_file)) {
$language_files[] = $language_file;
} else {
$language_files = array_merge($language_files, $language_file);
// if the sub-language feature is on
$parent_path = SubLanguageManager::get_parent_language_path($language_interface);
if (!empty($parent_path)) {
// include English
include $langpath.'english/trad4all.inc.php';
// prepare string for current language and its parent
$lang_file = $langpath.$language_interface.'/trad4all.inc.php';
$parent_lang_file = $langpath.$parent_path.'/trad4all.inc.php';
// load the parent language file first
if (file_exists($parent_lang_file)) {
include $parent_lang_file;
}
}
// if a set of language files has been properly defined
if (is_array($language_files)) {
// if the sub-language feature is on
if (api_get_setting('allow_use_sub_language') == 'true') {
$parent_path = SubLanguageManager::get_parent_language_path($language_interface);
foreach ($language_files as $index => $language_file) {
// include English
include $langpath.'english/'.$language_file.'.inc.php';
// prepare string for current language and its parent
$lang_file = $langpath.$language_interface.'/'.$language_file.'.inc.php';
$parent_lang_file = $langpath.$parent_path.'/'.$language_file.'.inc.php';
// load the parent language file first
if (file_exists($parent_lang_file)) {
include $parent_lang_file;
}
// overwrite the parent language translations if there is a child
if (file_exists($lang_file)) {
include $lang_file;
}
}
} else {
// if the sub-languages feature is not on, then just load the
// set language interface
foreach ($language_files as $index => $language_file) {
// include English
include $langpath.'english/'.$language_file.'.inc.php';
// prepare string for current language
$langfile = $langpath.$language_interface.'/'.$language_file.'.inc.php';
if (file_exists($langfile)) {
include $langfile;
}
}
// overwrite the parent language translations if there is a child
if (file_exists($lang_file)) {
include $lang_file;
}
} else {
// if the sub-languages feature is not on, then just load the
// set language interface
// include English
include $langpath.'english/trad4all.inc.php';
// prepare string for current language
$langfile = $langpath.$language_interface.'/trad4all.inc.php';
if (file_exists($langfile)) {
include $langfile;
}
}

@ -1623,9 +1623,9 @@ class AnnouncementManager
$tbl_announcement = Database::get_course_table(TABLE_ANNOUNCEMENT);
$tbl_item_property = Database::get_course_table(TABLE_ITEM_PROPERTY);
$course_id = api_get_course_int_id();
$_course = api_get_course_info();
$session_id = api_get_session_id();
$_course = api_get_course_info();
$course_id = $_course['real_id'];
$userId = api_get_user_id();
$condition_session = api_get_session_condition($session_id, true, true, 'announcement.session_id');

@ -931,7 +931,7 @@ class Agenda
$my_session_id = $session_item['session_id'];
if (!empty($my_courses)) {
foreach ($my_courses as $course_item) {
$courseInfo = api_get_course_info($course_item['code']);
$courseInfo = api_get_course_info_by_id($course_item['real_id']);
$this->getCourseEvents($start, $end, $courseInfo, 0, $my_session_id);
}
}
@ -2953,7 +2953,7 @@ class Agenda
// get agenda-items for every course
$courses = api_get_user_courses($user_id,false);
foreach ($courses as $id => $course) {
$c = api_get_course_info($course['code']);
$c = api_get_course_info_by_id($course['real_id']);
//databases of the courses
$t_a = Database :: get_course_table(TABLE_AGENDA, $course['db']);
$t_ip = Database :: get_course_table(TABLE_ITEM_PROPERTY, $course['db']);

@ -1322,7 +1322,7 @@ function api_get_user_courses($userid, $fetch_session = true)
$t_course = Database::get_main_table(TABLE_MAIN_COURSE);
$t_course_user = Database::get_main_table(TABLE_MAIN_COURSE_USER);
$sql = "SELECT cc.code code, cc.directory dir, cu.status status
$sql = "SELECT cc.id as real_id, cc.code code, cc.directory dir, cu.status status
FROM $t_course cc,
$t_course_user cu
WHERE
@ -1406,7 +1406,7 @@ function _api_format_user($user, $add_password = false)
$result['email'] = isset($user['mail'])? $user['mail'] : null;
}
$user_id = intval($user['user_id']);
$result['user_id'] = $user_id;
$result['user_id'] = $result['id'] = $user_id;
$saveUserLastLogin = api_get_configuration_value('save_user_last_login');
if ($saveUserLastLogin) {

@ -293,8 +293,8 @@ class Attendance
$table_link = Database:: get_main_table(TABLE_MAIN_GRADEBOOK_LINK);
$session_id = api_get_session_id();
$user_id = api_get_user_id();
$course_code = api_get_course_id();
$course_id = api_get_course_int_id();
$course_code = $_course['code'];
$course_id = $_course['real_id'];
$title_gradebook= Database::escape_string($this->attendance_qualify_title);
$value_calification = 0;
$weight_calification = floatval($this->attendance_weight);
@ -364,8 +364,8 @@ class Attendance
$session_id = api_get_session_id();
$user_id = api_get_user_id();
$attendance_id = intval($attendance_id);
$course_code = api_get_course_id();
$course_id = api_get_course_int_id();
$course_code = $_course['code'];
$course_id = $_course['real_id'];
$title_gradebook = Database::escape_string($this->attendance_qualify_title);
$value_calification = 0;
$weight_calification= floatval($this->attendance_weight);
@ -418,7 +418,7 @@ class Attendance
$_course = api_get_course_info();
$tbl_attendance = Database :: get_course_table(TABLE_ATTENDANCE);
$user_id = api_get_user_id();
$course_id = api_get_course_int_id();
$course_id = $_course['real_id'];
if (is_array($attendance_id)) {
foreach ($attendance_id as $id) {
$id = intval($id);
@ -456,7 +456,7 @@ class Attendance
$_course = api_get_course_info();
$tbl_attendance = Database :: get_course_table(TABLE_ATTENDANCE);
$user_id = api_get_user_id();
$course_id = api_get_course_int_id();
$course_id = $_course['real_id'];
if (is_array($attendance_id)) {
foreach ($attendance_id as $id) {
$id = intval($id);
@ -500,7 +500,7 @@ class Attendance
$_course = api_get_course_info();
$tbl_attendance = Database :: get_course_table(TABLE_ATTENDANCE);
$user_id = api_get_user_id();
$course_id = api_get_course_int_id();
$course_id = $_course['real_id'];
$status = intval($status);
$action = 'visible';

@ -201,7 +201,7 @@ function return_logo($theme) {
function return_notification_menu()
{
$_course = api_get_course_info();
$course_id = api_get_course_id();
$course_id = $_course['code'];
$user_id = api_get_user_id();
$html = '';
@ -497,7 +497,7 @@ function return_breadcrumb($interbreadcrumb, $language_file, $nameTools)
$session_name = api_get_session_name($session_id);
$_course = api_get_course_info();
$user_id = api_get_user_id();
$course_id = api_get_course_id();
$course_id = $_course['real_id'];
/* Plugins for banner section */
$web_course_path = api_get_path(WEB_COURSE_PATH);

@ -282,7 +282,7 @@ class Blog
{
$_user = api_get_user_info();
$_course = api_get_course_info();
$course_id = api_get_course_int_id();
$course_id = $_course['real_id'];
$blog_table_attachment = Database::get_course_table(TABLE_BLOGS_ATTACHMENT);
$upload_ok=true;
@ -2010,7 +2010,7 @@ class Blog
$_course = api_get_course_info();
$is_western_name_order = api_is_western_name_order();
$session_id = api_get_session_id();
$course_id = api_get_course_int_id();
$course_id = $_course['real_id'];
$currentCourse = $_course['code'];
$tbl_users = Database::get_main_table(TABLE_MAIN_USER);

@ -706,18 +706,19 @@ class CourseManager
}
/**
* Subscribe a user $user_id to a course $course_code.
* Subscribe a user $user_id to a course defined by $courseCode.
* @author Hugues Peeters
* @author Roan Embrechts
*
* @param int $user_id the id of the user
* @param string $course_code the course code
* @param string $status (optional) The user's status in the course
* @param string $courseCode the course code
* @param int $status (optional) The user's status in the course
* @param int The user category in which this subscription will be classified
*
* @return boolean true if subscription succeeds, boolean false otherwise.
* @assert ('', '') === false
*/
public static function add_user_to_course($user_id, $course_code, $status = STUDENT, $userCourseCategoryId = 0)
public static function add_user_to_course($user_id, $courseCode, $status = STUDENT, $userCourseCategoryId = 0)
{
$debug = false;
$user_table = Database::get_main_table(TABLE_MAIN_USER);
@ -725,16 +726,16 @@ class CourseManager
$course_user_table = Database::get_main_table(TABLE_MAIN_COURSE_USER);
$status = ($status == STUDENT || $status == COURSEMANAGER) ? $status : STUDENT;
if (empty($user_id) || empty($course_code) || ($user_id != strval(intval($user_id)))) {
if (empty($user_id) || empty($courseCode) || ($user_id != strval(intval($user_id)))) {
return false;
}
$course_code = Database::escape_string($course_code);
$courseInfo = api_get_course_info($course_code);
$courseCode = Database::escape_string($courseCode);
$courseInfo = api_get_course_info($courseCode);
$courseId = $courseInfo['real_id'];
// Check in advance whether the user has already been registered on the platform.
$sql = "SELECT status FROM " . $user_table . " WHERE user_id = '$user_id' ";
$sql = "SELECT status FROM " . $user_table . " WHERE user_id = $user_id ";
if (Database::num_rows(Database::query($sql)) == 0) {
if ($debug) {
error_log('The user has not been registered to the platform');
@ -745,9 +746,9 @@ class CourseManager
// Check whether the user has already been subscribed to this course.
$sql = "SELECT * FROM $course_user_table
WHERE
user_id = '$user_id' AND
relation_type<>" . COURSE_RELATION_TYPE_RRHH . " AND
c_id = '$courseId'";
user_id = $user_id AND
relation_type <> " . COURSE_RELATION_TYPE_RRHH . " AND
c_id = $courseId";
if (Database::num_rows(Database::query($sql)) > 0) {
if ($debug) {
error_log('The user has been already subscribed to the course');
@ -755,14 +756,16 @@ class CourseManager
return false; // The user has been subscribed to the course.
}
// Check in advance whether subscription is allowed or not for this course.
$sql = "SELECT code, visibility FROM $course_table
WHERE id = $courseId AND subscribe = '" . SUBSCRIBE_NOT_ALLOWED . "'";
if (Database::num_rows(Database::query($sql)) > 0) {
if ($debug) {
error_log('Subscription is not allowed for this course');
if (!api_is_course_admin()) {
// Check in advance whether subscription is allowed or not for this course.
$sql = "SELECT code, visibility FROM $course_table
WHERE id = $courseId AND subscribe = '" . SUBSCRIBE_NOT_ALLOWED . "'";
if (Database::num_rows(Database::query($sql)) > 0) {
if ($debug) {
error_log('Subscription is not allowed for this course');
}
return false; // Subscription is not allowed for this course.
}
return false; // Subscription is not allowed for this course.
}
// Ok, subscribe the user.
@ -774,6 +777,7 @@ class CourseManager
'sort' => $max_sort + 1,
'user_course_cat' => $userCourseCategoryId
];
error_log(print_r($params, 1));
$insertId = Database::insert($course_user_table, $params);
return $insertId;

@ -1677,8 +1677,6 @@ function move_uploaded_file_collection_into_directory(
*/
function replace_img_path_in_html_file($original_img_path, $new_img_path, $html_file)
{
$_course = api_get_course_info();
// Open the file
$fp = fopen($html_file, 'r');

@ -160,7 +160,7 @@ class GroupManager
{
$_course = api_get_course_info();
$session_id = api_get_session_id();
$course_id = api_get_course_int_id();
$course_id = $_course['real_id'];
$currentCourseRepository = $_course['path'];

@ -156,8 +156,8 @@ class Link extends Model
global $msgErr;
$ok = true;
$course_id = api_get_course_int_id();
$_course = api_get_course_info();
$course_id = $_course['real_id'];
$session_id = api_get_session_id();
if ($type == 'link') {
@ -231,8 +231,8 @@ class Link extends Model
LIBRARY_PATH
) . 'specific_fields_manager.lib.php';
$course_int_id = api_get_course_int_id();
$courseid = api_get_course_id();
$course_int_id = $_course['real_id'];
$courseCode = $_course['code'];
$specific_fields = get_specific_field_list();
$ic_slide = new IndexableChunk();
@ -251,7 +251,7 @@ class Link extends Model
);
add_specific_field_value(
$specific_field['id'],
$courseid,
$courseCode,
TOOL_LINK,
$link_id,
$sterm
@ -263,10 +263,10 @@ class Link extends Model
// Build the chunk to index.
$ic_slide->addValue('title', $title);
$ic_slide->addCourseId($courseid);
$ic_slide->addCourseId($courseCode);
$ic_slide->addToolId(TOOL_LINK);
$xapian_data = array(
SE_COURSE_ID => $courseid,
SE_COURSE_ID => $courseCode,
SE_TOOL_ID => TOOL_LINK,
SE_DATA => array(
'link_id' => (int)$link_id
@ -320,7 +320,7 @@ class Link extends Model
$sql,
$tbl_se_ref,
$course_int_id,
$courseid,
$courseCode,
TOOL_LINK,
$link_id,
$did
@ -351,11 +351,11 @@ class Link extends Model
$order = intval($order);
$session_id = api_get_session_id();
$sql = "INSERT INTO " . $tbl_categories . " (c_id, category_title, description, display_order, session_id)
VALUES (" . $course_id . ",
VALUES ($course_id,
'" . Database::escape_string($category_title) . "',
'" . Database::escape_string($description) . "',
'$order',
'$session_id'
$session_id
)";
Database:: query($sql);
$linkId = Database:: insert_id();
@ -389,7 +389,7 @@ class Link extends Model
$tbl_link = Database:: get_course_table(TABLE_LINK);
$tbl_categories = Database:: get_course_table(TABLE_LINK_CATEGORY);
$course_id = api_get_course_int_id();
$course_id = $courseInfo['real_id'];
$id = intval($id);
if (empty($id)) {
@ -508,8 +508,8 @@ class Link extends Model
public static function editLink($id, $values = array())
{
$tbl_link = Database:: get_course_table(TABLE_LINK);
$course_id = api_get_course_int_id();
$_course = api_get_course_info();
$course_id = $_course['real_id'];
$values['url'] = trim($values['url']);
$values['title'] = trim($values['title']);

@ -40,10 +40,10 @@ class link_processor extends search_processor {
public function process() {
$results = array();
foreach ($this->links as $courseid => $one_course_links) {
$course_info = api_get_course_info($courseid);
foreach ($this->links as $courseCode => $one_course_links) {
$course_info = api_get_course_info($courseCode);
$search_show_unlinked_results = (api_get_setting('search_show_unlinked_results') == 'true');
$course_visible_for_user = api_is_course_visible_for_user(NULL, $courseid);
$course_visible_for_user = api_is_course_visible_for_user(NULL, $courseCode);
// can view course?
if ($course_visible_for_user || $search_show_unlinked_results) {
$result = NULL;
@ -53,7 +53,7 @@ class link_processor extends search_processor {
if ($visibility) {
// if one is visible let show the result for a course
// also asume all data of this item like the data of the whole group of links(Ex. author)
list($thumbnail, $image, $name, $author, $url) = $this->get_information($courseid, $one_link['link_id']);
list($thumbnail, $image, $name, $author, $url) = $this->get_information($courseCode, $one_link['link_id']);
$result_tmp = array(
'toolid' => TOOL_LINK,
'score' => $one_course_links['total_score'] / (count($one_course_links) - 1), // not count total_score array item

@ -106,8 +106,8 @@ class quiz_processor extends search_processor {
/**
* Get learning path information
*/
private function get_information($course_id, $exercise_id) {
$course_information = api_get_course_info($course_id);
private function get_information($courseCode, $exercise_id) {
$course_information = api_get_course_info($courseCode);
$course_id = $course_information['real_id'];
if (!empty($course_information)) {
@ -118,9 +118,11 @@ class quiz_processor extends search_processor {
$dk_result = Database::query($sql);
//actually author isn't saved on exercise tool, but prepare for when it's ready
/*
$sql = "SELECT insert_user_id FROM $item_property_table
WHERE ref = $doc_id AND tool = '" . TOOL_DOCUMENT . "' AND c_id = $course_id
LIMIT 1";
*/
$name = '';
if ($row = Database::fetch_array($dk_result)) {

@ -2048,7 +2048,7 @@ class SessionManager
foreach ($existingCourses as $existingCourse) {
if (!in_array($existingCourse['c_id'], $courseList)) {
$courseInfo = api_get_course_info($existingCourse['c_id']);
$courseInfo = api_get_course_info_by_id($existingCourse['c_id']);
$sql = "DELETE FROM $tbl_session_rel_course
WHERE c_id = '" . $existingCourse['c_id'] . "' AND session_id = $sessionId";
@ -2059,7 +2059,7 @@ class SessionManager
Database::query($sql);
CourseManager::remove_course_ranking(
$courseInfo['real_id'],
$existingCourse['c_id'],
$sessionId
);
@ -2082,7 +2082,7 @@ class SessionManager
if (!$exists) {
//if the course isn't subscribed yet
$sql = "INSERT INTO $tbl_session_rel_course (session_id, c_id)
VALUES ('$sessionId', '$courseId')";
VALUES ($sessionId, $courseId)";
Database::query($sql);
// We add the current course in the existing courses array,
@ -2095,22 +2095,22 @@ class SessionManager
foreach ($user_list as $enreg_user) {
$enreg_user_id = intval($enreg_user['user_id']);
$sql = "INSERT IGNORE INTO $tbl_session_rel_course_rel_user (session_id, c_id, user_id)
VALUES ($sessionId, '$courseId', $enreg_user_id)";
VALUES ($sessionId, $courseId, $enreg_user_id)";
$result = Database::query($sql);
if (Database::affected_rows($result)) {
$nbr_users++;
}
}
$sql = "UPDATE $tbl_session_rel_course
SET nbr_users=$nbr_users
WHERE session_id ='$sessionId' AND c_id='$courseId'";
SET nbr_users = $nbr_users
WHERE session_id = $sessionId AND c_id = $courseId";
Database::query($sql);
}
}
$sql = "UPDATE $tbl_session
SET nbr_courses = $nbr_courses
WHERE id = '$sessionId'";
WHERE id = $sessionId";
Database::query($sql);
}
@ -5617,7 +5617,7 @@ class SessionManager
/**
* Get the courses list by a course coach
* @param int $coachId The coach id
* @return array
* @return array (id, user_id, session_id, c_id, visibility, status, legal_agreement)
*/
public static function getCoursesListByCourseCoach($coachId)
{

@ -695,6 +695,16 @@ INSERT INTO language (original_name, english_name, isocode, dokeos_folder, avail
('isiXhosa', 'xhosa', 'xh', 'xhosa', 0),
('Yor&ugrave;b&aacute;','yoruba','yo','yoruba',0);
-- Set parent language to Spanish for all close-by languages, same for Italian, French, Portuguese and Chinese
UPDATE language SET parent_id = 49 WHERE english_name = 'quechua_cusco';
UPDATE language SET parent_id = 49 WHERE english_name = 'galician';
UPDATE language SET parent_id = 49 WHERE english_name = 'esperanto';
UPDATE language SET parent_id = 49 WHERE english_name = 'catalan';
UPDATE language SET parent_id = 49 WHERE english_name = 'asturian';
UPDATE language SET parent_id = 28 WHERE english_name = 'friulian';
UPDATE language SET parent_id = 18 WHERE english_name = 'occitan';
UPDATE language SET parent_id = 40 WHERE english_name = 'brazilian';
UPDATE language SET parent_id = 45 WHERE english_name = 'trad_chinese';
INSERT INTO course_category VALUES (1,'Language skills','LANG',NULL,1,0,'TRUE','TRUE'),(2,'PC Skills','PC',NULL,2,0,'TRUE','TRUE'),(3,'Projects','PROJ',NULL,3,0,'TRUE','TRUE');
@ -1617,4 +1627,4 @@ INSERT INTO sequence_type_entity VALUES
(2,'Quiz', 'Quiz and Tests','c_quiz'),
(3,'LpItem', 'Items of a Learning Path','c_lp_item');
UPDATE settings_current SET selected_value = '1.10.0.36' WHERE variable = 'chamilo_database_version';
UPDATE settings_current SET selected_value = '1.10.0.37' WHERE variable = 'chamilo_database_version';

@ -204,8 +204,8 @@ if (!isset($_GET['running'])) {
if (isset($email_parts[1]) && $email_parts[1] == 'localhost') {
$emailForm .= '.localdomain';
}
$adminLastName = 'Doe';
$adminFirstName = 'John';
$adminLastName = get_lang('DefaultInstallAdminLastname');
$adminFirstName = get_lang('DefaultInstallAdminFirstname');
$loginForm = 'admin';
$passForm = api_generate_password();

@ -1056,7 +1056,7 @@ $AllStudents = "All learners";
$StudentsQualified = "Qualified learners";
$StudentsNotQualified = "Unqualified learners";
$NamesAndLastNames = "Names and last names";
$MaxScore = "Score";
$MaxScore = "Max score";
$QualificationCanNotBeGreaterThanMaxScore = "Grade cannot exceed max score";
$ThreadStatistics = "Thread statistics";
$Thread = "Thread";
@ -7225,17 +7225,24 @@ $ShibbolethLogin = "Shibboleth Login";
$NewStatus = "New status";
$Reason = "Reason";
$RequestStatus = "Request new status";
$StatusRequestMessage = "You have been logged-in with default rights. If you can request more rights by submitting the following request.";
$StatusRequestMessage = "You have been logged-in with default permissions. You can request more permissions by submitting the following request.";
$ReasonIsMandatory = "You reason field is mandatory. Please fill it in before submitting.";
$RequestSubmitted = "Your request has been submitted.";
$RequestFailed = "We are not able to fulfill your request at this time. Please contact your administrator.";
$InternalLogin = "Internal login";
$AlreadyLoggedIn = "You are already logged in";
$Draggable = "Draggable";
$Draggable = "Sequence ordering";
$Incorrect = "Incorrect";
$YouNotYetAchievedCertificates = "You not yet achieved certificates";
$YouNotYetAchievedCertificates = "You have not achieved any certificate just yet. Continue on your learning path to get one!";
$SearchCertificates = "Search certificates";
$TheUserXNotYetAchievedCertificates = "The user %s not yet achieved certificates";
$CertificatesNotPublic = "Certificates not public";
$MatchingDraggable = "Matching Draggable";
$TheUserXNotYetAchievedCertificates = "User %s hast not acquired any certificate yet";
$CertificatesNotPublic = "Certificates are not publicly available";
$MatchingDraggable = "Match by dragging";
$ForumThreadPeerScoring = "Thread scored by peers";
$ForumThreadPeerScoringComment = "If selected, this option will require each student to qualify at least 2 other students in order to get his score greater than 0 in the gradebook.";
$ForumThreadPeerScoringStudentComment = "To get the expected score in this forum, your contribution will have to be scored by another student, and you will have to score at least 2 other students' contributions. Until you reach this objective, even if scored, your contribution will show as a 0 score in the global grades for this course.";
$Readable = "Readable";
$NotReadable = "Not readable";
$DefaultInstallAdminFirstname = "John";
$DefaultInstallAdminLastname = "Doe";
?>

@ -1135,6 +1135,7 @@ $AdminPass = "Mot de passe de l'administrateur (<font color=\"red\">en choisir u
$EducationManager = "Responsable du contenu";
$CampusName = "Nom du campus";
$DBSettingIntro = "Le script d'installation créera les bases de données principales de Chamilo. Veuillez prendre en compte que Chamilo devra créer plusieurs bases de données. Si vous êtes restreint à une seule base de données par votre hébergeur, Chamilo ne fonctionnera pas, à moins que vous ne choisissiez l'option \"Une seule base de données\".";
$TimeSpentByStudentsInCourses = "Temps passé par les étudiants dans les cours";
$Step3 = "Étape 3 sur 6";
$Step4 = "Étape 4 sur 6";
$Step5 = "Étape 5 sur 6";
@ -1144,6 +1145,7 @@ $DBSetting = "Paramètres de MySQL";
$MainLang = "Langue principale";
$Licence = "Licence";
$LastCheck = "Dernière vérification avant installation";
$AutoEvaluation = "Auto-évaluation";
$DbPrefixForm = "Préfixe pour le nom de base MySQL";
$DbPrefixCom = "Laissez vide si non requis";
$EncryptUserPass = "Crypter les mots de passes des utilisateur dans la base de données";
@ -4035,6 +4037,14 @@ $Authoring = "Production";
$SessionIdentifier = "Identifiant de session";
$SessionCategory = "Catégorie de sessions";
$ConvertToUniqueAnswer = "Convertir à réponse unique";
$ReportsRequiresNoSetting = "Ce type de rapport ne requiert aucun paramètre";
$ShowWizard = "Montrer l'assistant";
$ReportFormat = "Format de rapport";
$ReportType = "Type de rapport";
$PleaseChooseReportType = "Veuillez choisir un type de rapport";
$PleaseFillFormToBuildReport = "Veuillez compléter le formulaire pour générer le rapport";
$UnknownFormat = "Format non reconnu";
$ErrorWhileBuildingReport = "Une erreur est survenue durant la génération du rapport";
$WikiSearchResults = "Résultats de recherche du wiki";
$StartPage = "Page d'accueil";
$EditThisPage = "Modifier cette page";
@ -5245,6 +5255,7 @@ $ReadTheInstallGuide = "lisez le guide d'installation";
$HereAreTheValuesYouEntered = "Voici les valeurs que vous avez introduites";
$PrintThisPageToRememberPassAndOthers = "Imprimez cette page pour conserver votre mot de passe et autres paramètres";
$TheInstallScriptWillEraseAllTables = "Le script d'installation va supprimer toutes les tables des bases de données sélectionnées. Nous recommandons avec insistance pour que vous fassiez une copie de sauvegarde complète de celles-ci avant de confirmer cette dernière étape de l'installation.";
$Published = "Publié";
$ReadWarningBelow = "lire l'avertissement ci-dessous";
$SecurityAdvice = "Conseil de sécurité";
$YouHaveMoreThanXCourses = "Vous avez plus de %d cours sur votre campus Chamilo ! %d cours seulement ont été mis à jour. Pour mettre les autres à jour, %s cliquez ici %s";
@ -7195,4 +7206,32 @@ $SaveBadge = "Enregistrer le badge";
$BadgeMeasuresXPixelsInPNG = "Propriétés recommandées du badge: 200x200 pixels au format PNG";
$SetTutor = "Faire coach";
$UniqueAnswerImage = "Sélection d'image";
$TimeSpentByStudentsInCoursesGroupedByCode = "Temps passé par les étudiants dans les cours, regroupés par code";
$TestResultsByStudentsGroupesByCode = "Résultats des tests par les groupes d'étudiants, par code";
$TestResultsByStudents = "Résultats des tests par étudiant";
$SystemCouldNotLogYouIn = "Le système n'a pas pu vous authentifier. Merci de contacter l'administrateur.";
$ShibbolethLogin = "Login par Shibboleth";
$NewStatus = "Nouveau statut";
$Reason = "Raison";
$RequestStatus = "Demander un nouveau statut";
$StatusRequestMessage = "Vous avez été authentifié avec les permissions par défaut. Si vous le souhaitez, vous pouvez demander plus de permissions en envoyant la requête suivante.";
$ReasonIsMandatory = "Le champ 'raison' est obligatoire. Merci de le remplir avant d'envoyer le formulaire.";
$RequestSubmitted = "Votre demande a été envoyée.";
$RequestFailed = "Impossible de traiter votre demande en ce moment. Merci de contacter votre administrateur.";
$InternalLogin = "Login interne";
$AlreadyLoggedIn = "Vous êtes déjà authentifié";
$Draggable = "Ordonnancement";
$Incorrect = "Incorrect";
$YouNotYetAchievedCertificates = "Vous n'avez pas encore obtenu de certificat";
$SearchCertificates = "Chercher un certificat";
$TheUserXNotYetAchievedCertificates = "L'utilisateur %s n'a pas encore obtenu de certificat";
$CertificatesNotPublic = "Les certificats ne sont pas publics";
$MatchingDraggable = "Correspondances glisser-déplacer";
$ForumThreadPeerScoring = "Fil évalué par les pairs";
$ForumThreadPeerScoringComment = "Lorsque cette option est sélectionnée, chaque étudiant devra évaluer la participation d'au moins 2 autres étudiants afin d'obtenir un score supérieur à 0 pour sa participation.";
$ForumThreadPeerScoringStudentComment = "Afin d'obtenir le résultat (note) de votre participation dans ce fil de discussion, votre participation devra être évaluée par un autre étudiant, et vous devrez avoir évalué un minimum de 2 autres étudiants. Votre participation restera à 0, même si vous avez été évalué, jusqu'à ce que vous ayez réalisé votre évaluation de 2 autres étudiants.";
$Readable = "Lisible";
$NotReadable = "Non accessible en lecture";
$DefaultInstallAdminFirstname = "Jean";
$DefaultInstallAdminLastname = "Dupont";
?>

@ -1142,6 +1142,7 @@ $AdminPass = "Contraseña del administrador (<font color=\"red\">puede que desee
$EducationManager = "Responsable educativo";
$CampusName = "Nombre de su plataforma";
$DBSettingIntro = "El script de instalación creará las principales bases de datos de Chamilo. Por favor, recuerde que Chamilo necesitará crear varias bases de datos. Si sólo puede tener una base de datos en su proveedor, Chamilo no funcionará.";
$TimeSpentByStudentsInCourses = "Tiempo dedicado por los estudiantes en los cursos";
$Step3 = "Paso 3 de 6";
$Step4 = "Paso 4 de 6";
$Step5 = "Paso 5 de 6";
@ -1151,6 +1152,7 @@ $DBSetting = "Parámetros de las bases de datos MySQL";
$MainLang = "Idioma principal";
$Licence = "Licencia";
$LastCheck = "Última comprobación antes de instalar";
$AutoEvaluation = "Auto-evaluación";
$DbPrefixForm = "Prefijo MySQL";
$DbPrefixCom = "No completar si no se requiere";
$EncryptUserPass = "Encriptar las contraseñas de los usuarios en la base de datos";
@ -4044,6 +4046,14 @@ $Authoring = "Creación de contenidos";
$SessionIdentifier = "Identificador de la sesión";
$SessionCategory = "Categoría de la sesión";
$ConvertToUniqueAnswer = "Convertir a respuesta única";
$ReportsRequiresNoSetting = "Este tipo de reporte no requiere parámetros";
$ShowWizard = "Mostrar la guía";
$ReportFormat = "Formato de reporte";
$ReportType = "Tipo de reporte";
$PleaseChooseReportType = "Elija un tipo de reporte";
$PleaseFillFormToBuildReport = "Llene el formulario para generar el reporte";
$UnknownFormat = "Formato desconocido";
$ErrorWhileBuildingReport = "Se ha producido un error al momento de generar el reporte";
$WikiSearchResults = "Resultados de la búsqueda en el Wiki";
$StartPage = "Página de inicio del Wiki";
$EditThisPage = "Editar esta página";
@ -5254,6 +5264,7 @@ $ReadTheInstallGuide = "leer la guía de instalación";
$HereAreTheValuesYouEntered = "Éstos son los valores que ha introducido";
$PrintThisPageToRememberPassAndOthers = "Imprima esta página para recordar su contraseña y otras configuraciones";
$TheInstallScriptWillEraseAllTables = "El programa de instalación borrará todas las tablas de las bases de datos seleccionadas. Le recomendamos encarecidamente que realice una copia de seguridad completa de todas ellas antes de confirmar este último paso de la instalación.";
$Published = "Publicado";
$ReadWarningBelow = "lea la advertencia inferior";
$SecurityAdvice = "Aviso de seguridad";
$YouHaveMoreThanXCourses = "¡ Tiene más de %d cursos en su plataforma Chamilo ! Sólamente se han actualizado los cursos de %d. Para actualizar los otros cursos, %s haga clic aquí %s";
@ -7235,6 +7246,20 @@ $SaveBadge = "Guardar insignia";
$BadgeMeasuresXPixelsInPNG = "Medidas de la insignia 200x200 píxeles en formato PNG";
$SetTutor = "Hacer tutor";
$UniqueAnswerImage = "Respuesta de imagen única";
$TimeSpentByStudentsInCoursesGroupedByCode = "Tiempo dedicado por los estudiantes en los cursos, agrupados por código";
$TestResultsByStudentsGroupesByCode = "Resultados de ejercicios por grupos de estudiantes, por código";
$TestResultsByStudents = "Resultados de ejercicios por estudiante";
$SystemCouldNotLogYouIn = "El sistema no ha podido identificarlo/a. Por favor contacte con su administrador.";
$ShibbolethLogin = "Login Shibboleth";
$NewStatus = "Nuevo estatus";
$Reason = "Razón";
$RequestStatus = "Pedir nuevo estatus";
$StatusRequestMessage = "Ha sido autentificado con los permisos por defecto. Si desea más permisos, puede pedirlos a través del siguiente formulario.";
$ReasonIsMandatory = "El campo 'razón' es obligatorio. Complételo antes de enviar su pedida.";
$RequestSubmitted = "Su pedida ha sido enviada.";
$RequestFailed = "No podemos completar esta pedida en este momento. Por favor contacte su administrador.";
$InternalLogin = "Login interno";
$AlreadyLoggedIn = "Ya está conectado/a";
$Draggable = "Arrastrable";
$Incorrect = "Incorrecto";
$YouNotYetAchievedCertificates = "Aún no ha logrado certificados";
@ -7242,4 +7267,11 @@ $SearchCertificates = "Buscar certificados";
$TheUserXNotYetAchievedCertificates = "El usuario %s aún no ha logrado certificados";
$CertificatesNotPublic = "Los certificados no son públicos";
$MatchingDraggable = "Coincidencia arrastrable";
$ForumThreadPeerScoring = "Tema evaluado por pares";
$ForumThreadPeerScoringComment = "Si esta opción está seleccionada, requerirá que cada estudiante califique a 2 otros estudiantes para obtener un score superior a 0 en su propia evaluación.";
$ForumThreadPeerScoringStudentComment = "Para obtener su resultado en este tema de discusión, su participación tendrá que ser evaluada por lo mínimo por un otro estudiante, y usted tendrá que evaluar por lo mínimo la participación 2 otros estudiantes. Hasta que lo haya hecho, su resultado se mantendrá a 0 aquí y, de ser el caso, en los resultados de este tema de foro en la hoja de evaluación global del curso.";
$Readable = "Accesible en lectura";
$NotReadable = "No accesible en lectura";
$DefaultInstallAdminFirstname = "Juan";
$DefaultInstallAdminLastname = "Perez";
?>

@ -8650,7 +8650,7 @@ class learnpath
$selfUrl = api_get_self();
$courseIdReq = api_get_cidreq();
$course = api_get_course_info();
$course_id = api_get_course_int_id();
$course_id = $course['real_id'];
$tbl_link = Database::get_course_table(TABLE_LINK);
$linkCategoryTable = Database::get_course_table(TABLE_LINK_CATEGORY);
$moveEverywhereIcon = Display::return_icon('move_everywhere.png', get_lang('Move'), array(), ICON_SIZE_TINY);
@ -8836,7 +8836,7 @@ class learnpath
public function scorm_export()
{
$_course = api_get_course_info();
$course_id = api_get_course_int_id();
$course_id = $_course['real_id'];
// Remove memory and time limits as much as possible as this might be a long process...
if (function_exists('ini_set')) {

@ -4380,7 +4380,7 @@ class SurveyUtil
public static function getSurveyList($user_id)
{
$_course = api_get_course_info();
$course_id = api_get_course_int_id();
$course_id = $_course['real_id'];
$user_id = intval($user_id);
$sessionId = api_get_session_id();

@ -12,7 +12,7 @@ require_once '../inc/global.inc.php';
$current_course_tool = TOOL_TRACKING;
$courseInfo = api_get_course_info(api_get_course_id());
$courseCode = api_get_course_id();
$courseCode = $courseInfo['code'];
$from_myspace = false;
$from = isset($_GET['from']) ? $_GET['from'] : null;

@ -11,7 +11,7 @@ $pathopen = isset($_REQUEST['pathopen']) ? $_REQUEST['pathopen'] : null;
// Including the global initialization file
require_once '../inc/global.inc.php';
$current_course_tool = TOOL_TRACKING;
$course_info = api_get_course_info(api_get_course_id());
$course_info = api_get_course_info();
$from_myspace = false;
$from = isset($_GET['from']) ? $_GET['from'] : null;

@ -12,7 +12,7 @@ $pathopen = isset($_REQUEST['pathopen']) ? $_REQUEST['pathopen'] : null;
require_once '../inc/global.inc.php';
$current_course_tool = TOOL_TRACKING;
$course_info = api_get_course_info(api_get_course_id());
$course_info = api_get_course_info();
$from_myspace = false;
$from = isset($_GET['from']) ? $_GET['from'] : null;

@ -38,8 +38,8 @@ $is_western_name_order = api_is_western_name_order();
$sort_by_first_name = api_sort_by_first_name();
$course_info = api_get_course_info();
$user_id = api_get_user_id();
$courseCode = api_get_course_id();
$courseId = api_get_course_int_id();
$courseCode = $course_info['code'];
$courseId = $course_info['real_id'];
//Can't auto unregister from a session
if (!empty($sessionId)) {
@ -617,7 +617,7 @@ function get_user_data($from, $number_of_items, $column, $direction)
$course_info = api_get_course_info();
$sessionId = api_get_session_id();
$course_code = api_get_course_id();
$course_code = $course_info['code'];
$a_users = array();

@ -20,8 +20,8 @@ $course_id = api_get_course_int_id();
$user_id = api_get_user_id();
$userInfo = api_get_user_info();
$session_id = api_get_session_id();
$course_code = api_get_course_id();
$course_info = api_get_course_info();
$course_code = $course_info['code'];
$group_id = api_get_group_id();
if (empty($work_id)) {

@ -21,8 +21,8 @@ $course_id = api_get_course_int_id();
$user_id = api_get_user_id();
$userInfo = api_get_user_info();
$session_id = api_get_session_id();
$course_code = api_get_course_id();
$course_info = api_get_course_info();
$course_code = $course_info['code'];
$group_id = api_get_group_id();
if (empty($work_id)) {

@ -552,8 +552,8 @@ function display_student_publications_list(
$session_id = api_get_session_id();
$condition_session = api_get_session_condition($session_id);
$course_id = api_get_course_int_id();
$course_info = api_get_course_info(api_get_course_id());
$course_info = api_get_course_info();
$course_id = $course_info['real_id'];
$sort_params = array();
@ -1557,9 +1557,9 @@ function get_count_work($work_id, $onlyMeUserId = null, $notMeUserId = null)
$session_id = api_get_session_id();
$condition_session = api_get_session_condition($session_id, true, false, 'work.session_id');
$course_id = api_get_course_int_id();
$group_id = api_get_group_id();
$course_info = api_get_course_info(api_get_course_id());
$course_info = api_get_course_info();
$course_id = $course_info['real_id'];
$work_id = intval($work_id);
if (!empty($group_id)) {
@ -1635,7 +1635,7 @@ function getWorkListStudent(
$workTable = Database::get_course_table(TABLE_STUDENT_PUBLICATION);
$workTableAssignment = Database::get_course_table(TABLE_STUDENT_PUBLICATION_ASSIGNMENT);
$courseInfo = api_get_course_info();
$course_id = api_get_course_int_id();
$course_id = $courseInfo['real_id'];
$session_id = api_get_session_id();
$condition_session = api_get_session_condition($session_id);
$group_id = api_get_group_id();
@ -2123,9 +2123,9 @@ function get_work_user_list(
$user_table = Database::get_main_table(TABLE_MAIN_USER);
$session_id = api_get_session_id();
$course_id = api_get_course_int_id();
$group_id = api_get_group_id();
$course_info = api_get_course_info(api_get_course_id());
$course_info = api_get_course_info();
$course_id = $course_info['real_id'];
$work_id = intval($work_id);
$column = !empty($column) ? Database::escape_string($column) : 'sent_date';

@ -14,8 +14,8 @@ api_protect_course_script(true);
require_once 'work.lib.php';
$course_id = api_get_course_int_id();
$course_info = api_get_course_info();
$course_id = $course_info['real_id'];
$user_id = api_get_user_id();
$id_session = api_get_session_id();
@ -33,7 +33,7 @@ $_course = api_get_course_info();
/* Constants and variables */
$tool_name = get_lang('StudentPublications');
$course_code = api_get_course_id();
$course_code = $_course['code'];
$session_id = api_get_session_id();
$group_id = api_get_group_id();

@ -0,0 +1,64 @@
<?php
/* For licensing terms, see /license.txt */
namespace Chamilo\CoreBundle\Migrations\Schema\V110;
use Chamilo\CoreBundle\Migrations\AbstractMigrationChamilo;
use Doctrine\DBAL\Schema\Schema;
/**
* Class Version20150504182600
*
* @package Chamilo\CoreBundle\Migrations\Schema\v1
*/
class Version20150504182600 extends AbstractMigrationChamilo
{
/**
* @param Schema $schema
*
* @throws \Doctrine\DBAL\Schema\SchemaException
*/
public function up(Schema $schema)
{
// Set parent language to Spanish for all close-by languages. Same for Italian,
// French, Portuguese and Chinese
$this->addSql("
UPDATE language SET parent_id = 49 WHERE english_name = 'quechua_cusco'
");
$this->addSql("
UPDATE language SET parent_id = 49 WHERE english_name = 'galician'
");
$this->addSql("
UPDATE language SET parent_id = 49 WHERE english_name = 'esperanto'
");
$this->addSql("
UPDATE language SET parent_id = 49 WHERE english_name = 'catalan'
");
$this->addSql("
UPDATE language SET parent_id = 49 WHERE english_name = 'asturian'
");
$this->addSql("
UPDATE language SET parent_id = 28 WHERE english_name = 'friulian'
");
$this->addSql("
UPDATE language SET parent_id = 18 WHERE english_name = 'occitan'
");
$this->addSql("
UPDATE language SET parent_id = 40 WHERE english_name = 'brazilian'
");
$this->addSql("
UPDATE language SET parent_id = 45 WHERE english_name = 'trad_chinese'
");
$this->addSql("
UPDATE settings_current SET selected_value = '1.10.0.37' WHERE variable = 'chamilo_database_version'
");
}
/**
* We don't allow downgrades yet
* @param Schema $schema
*/
public function down(Schema $schema)
{
}
}

@ -54,7 +54,7 @@ if (api_get_setting('go_to_course_after_login') == 'true') {
// Session only has 1 course.
if (isset($sessionInfo['courses']) && count($sessionInfo['courses']) == 1) {
$courseCode = $sessionInfo['courses'][0]['code'];
$courseInfo = api_get_course_info($courseCode);
$courseInfo = api_get_course_info_by_id($sessionInfo['courses'][0]['real_id']);
$courseUrl = $courseInfo['course_public_url'].'?id_session='.$sessionInfo['session_id'];
header('Location:'.$courseUrl);
exit;
@ -77,7 +77,7 @@ if (api_get_setting('go_to_course_after_login') == 'true') {
$courses = CourseManager::get_courses_list_by_user_id($userId);
if (!empty($courses) && isset($courses[0]) && isset($courses[0]['code'])) {
$courseInfo = api_get_course_info($courses[0]['code']);
$courseInfo = api_get_course_info_by_id($courses[0]['real_id']);
if (!empty($courseInfo)) {
$courseUrl = $courseInfo['course_public_url'];
header('Location:'.$courseUrl);

@ -111,7 +111,7 @@ Display::display_header(get_lang('UserOnlineListSession'));
echo " </td>
<td align='center'>
";
$courseInfo = api_get_course_info($student_online['c_id']);
$courseInfo = api_get_course_info_by_id($student_online['c_id']);
echo $courseInfo['title'];
echo " </td>
<td align='center'>

Loading…
Cancel
Save