legal instead of legal_agreement see #5189

skala
Julio Montoya 13 years ago
parent 2c1c0ece3c
commit a233e0d13e
  1. 3
      main/inc/lib/course.lib.php
  2. 2
      main/inc/lib/legal.lib.php
  3. 4
      main/inc/lib/main_api.lib.php

@ -3388,7 +3388,7 @@ class CourseManager {
* @param int session id
* @return boolean
*/
function is_user_accepted_legal($user_id, $course_code, $session_id = null) {
public static function is_user_accepted_legal($user_id, $course_code, $session_id = null) {
$user_id = intval($user_id);
$course_code = Database::escape_string($course_code);
$session_id = intval($session_id);
@ -3815,6 +3815,7 @@ class CourseManager {
$_course['subscribe_allowed'] = $course_data['subscribe'];
$_course['unubscribe_allowed'] = $course_data['unsubscribe'];
$_course['activate_legal'] = $course_data['activate_legal'];
$_course['legal'] = $course_data['legal' ];
$_course['show_score'] = $course_data['show_score']; //used in the work tool
}
return $_course;

@ -193,7 +193,7 @@ class LegalManager {
$sql = "SELECT version, original_name as language, content, changes, type, FROM_UNIXTIME(date)
FROM $legal_conditions_table inner join $lang_table l on(language_id = l.id) ";
$sql .= "ORDER BY language, version ASC ";
$sql .= "LIMIT $from,$number_of_items ";
$sql .= "LIMIT $from, $number_of_items ";
$result = Database::query($sql);
$legals = array ();

@ -1266,7 +1266,7 @@ function api_get_course_info($course_code = null) {
$_course['department_name'] = $course_data['department_name'];
$_course['department_url'] = $course_data['department_url' ];
$_course['legal_agreement'] = $course_data['legal_agreement' ];
$_course['legal'] = $course_data['legal' ];
$_course['show_score'] = $course_data['show_score']; //used in the work tool
// The real_id is an integer. It is mandatory for future implementations.
@ -1342,7 +1342,7 @@ function api_get_course_info_by_id($id = null) {
$_course['title' ] = $course_data['title' ];
$_course['course_language'] = $course_data['course_language'];
$_course['activate_legal'] = $course_data['activate_legal'];
$_course['legal_agreement'] = $course_data['legal_agreement'];
$_course['legal'] = $course_data['legal' ];
$_course['show_score'] = $course_data['show_score']; //used in the work tool
if (file_exists(api_get_path(SYS_COURSE_PATH).$course_data['directory'].'/course-pic85x85.png')) {

Loading…
Cancel
Save