|
@@ 4486-4490 (lines=5) @@
|
| 4483 |
|
// Course legal |
| 4484 |
|
$enabled = api_get_plugin_setting('courselegal', 'tool_enable'); |
| 4485 |
|
|
| 4486 |
|
if ($enabled == 'true') { |
| 4487 |
|
require_once api_get_path(SYS_PLUGIN_PATH) . 'courselegal/config.php'; |
| 4488 |
|
$plugin = CourseLegalPlugin::create(); |
| 4489 |
|
return $plugin->isUserAcceptedLegal($user_id, $course_code, $session_id); |
| 4490 |
|
} |
| 4491 |
|
|
| 4492 |
|
if (empty($session_id)) { |
| 4493 |
|
$table = Database::get_main_table(TABLE_MAIN_COURSE_USER); |
|
@@ 4531-4535 (lines=5) @@
|
| 4528 |
|
// Course plugin legal |
| 4529 |
|
$enabled = api_get_plugin_setting('courselegal', 'tool_enable'); |
| 4530 |
|
|
| 4531 |
|
if ($enabled == 'true') { |
| 4532 |
|
require_once api_get_path(SYS_PLUGIN_PATH) . 'courselegal/config.php'; |
| 4533 |
|
$plugin = CourseLegalPlugin::create(); |
| 4534 |
|
return $plugin->saveUserLegal($user_id, $course_code, $session_id); |
| 4535 |
|
} |
| 4536 |
|
|
| 4537 |
|
$user_id = intval($user_id); |
| 4538 |
|
$course_code = Database::escape_string($course_code); |