|
@@ 4177-4181 (lines=5) @@
|
| 4174 |
|
// Course legal |
| 4175 |
|
$enabled = api_get_plugin_setting('courselegal', 'tool_enable'); |
| 4176 |
|
|
| 4177 |
|
if ($enabled == 'true') { |
| 4178 |
|
require_once api_get_path(SYS_PLUGIN_PATH) . 'courselegal/config.php'; |
| 4179 |
|
$plugin = CourseLegalPlugin::create(); |
| 4180 |
|
return $plugin->isUserAcceptedLegal($user_id, $course_code, $session_id); |
| 4181 |
|
} |
| 4182 |
|
|
| 4183 |
|
if (empty($session_id)) { |
| 4184 |
|
$table = Database::get_main_table(TABLE_MAIN_COURSE_USER); |
|
@@ 4222-4226 (lines=5) @@
|
| 4219 |
|
// Course plugin legal |
| 4220 |
|
$enabled = api_get_plugin_setting('courselegal', 'tool_enable'); |
| 4221 |
|
|
| 4222 |
|
if ($enabled == 'true') { |
| 4223 |
|
require_once api_get_path(SYS_PLUGIN_PATH) . 'courselegal/config.php'; |
| 4224 |
|
$plugin = CourseLegalPlugin::create(); |
| 4225 |
|
return $plugin->saveUserLegal($user_id, $course_code, $session_id); |
| 4226 |
|
} |
| 4227 |
|
|
| 4228 |
|
$user_id = intval($user_id); |
| 4229 |
|
$course_code = Database::escape_string($course_code); |