|
@@ 4389-4393 (lines=5) @@
|
| 4386 |
|
// Course legal |
| 4387 |
|
$enabled = api_get_plugin_setting('courselegal', 'tool_enable'); |
| 4388 |
|
|
| 4389 |
|
if ($enabled == 'true') { |
| 4390 |
|
require_once api_get_path(SYS_PLUGIN_PATH) . 'courselegal/config.php'; |
| 4391 |
|
$plugin = CourseLegalPlugin::create(); |
| 4392 |
|
return $plugin->isUserAcceptedLegal($user_id, $course_code, $session_id); |
| 4393 |
|
} |
| 4394 |
|
|
| 4395 |
|
if (empty($session_id)) { |
| 4396 |
|
$table = Database::get_main_table(TABLE_MAIN_COURSE_USER); |
|
@@ 4434-4438 (lines=5) @@
|
| 4431 |
|
// Course plugin legal |
| 4432 |
|
$enabled = api_get_plugin_setting('courselegal', 'tool_enable'); |
| 4433 |
|
|
| 4434 |
|
if ($enabled == 'true') { |
| 4435 |
|
require_once api_get_path(SYS_PLUGIN_PATH) . 'courselegal/config.php'; |
| 4436 |
|
$plugin = CourseLegalPlugin::create(); |
| 4437 |
|
return $plugin->saveUserLegal($user_id, $course_code, $session_id); |
| 4438 |
|
} |
| 4439 |
|
|
| 4440 |
|
$user_id = intval($user_id); |
| 4441 |
|
$course_code = Database::escape_string($course_code); |