|
@@ 4425-4429 (lines=5) @@
|
| 4422 |
|
// Course legal |
| 4423 |
|
$enabled = api_get_plugin_setting('courselegal', 'tool_enable'); |
| 4424 |
|
|
| 4425 |
|
if ($enabled == 'true') { |
| 4426 |
|
require_once api_get_path(SYS_PLUGIN_PATH) . 'courselegal/config.php'; |
| 4427 |
|
$plugin = CourseLegalPlugin::create(); |
| 4428 |
|
return $plugin->isUserAcceptedLegal($user_id, $course_code, $session_id); |
| 4429 |
|
} |
| 4430 |
|
|
| 4431 |
|
if (empty($session_id)) { |
| 4432 |
|
$table = Database::get_main_table(TABLE_MAIN_COURSE_USER); |
|
@@ 4470-4474 (lines=5) @@
|
| 4467 |
|
// Course plugin legal |
| 4468 |
|
$enabled = api_get_plugin_setting('courselegal', 'tool_enable'); |
| 4469 |
|
|
| 4470 |
|
if ($enabled == 'true') { |
| 4471 |
|
require_once api_get_path(SYS_PLUGIN_PATH) . 'courselegal/config.php'; |
| 4472 |
|
$plugin = CourseLegalPlugin::create(); |
| 4473 |
|
return $plugin->saveUserLegal($user_id, $course_code, $session_id); |
| 4474 |
|
} |
| 4475 |
|
|
| 4476 |
|
$user_id = intval($user_id); |
| 4477 |
|
$course_code = Database::escape_string($course_code); |