|
@@ 4408-4412 (lines=5) @@
|
| 4405 |
|
// Course legal |
| 4406 |
|
$enabled = api_get_plugin_setting('courselegal', 'tool_enable'); |
| 4407 |
|
|
| 4408 |
|
if ($enabled == 'true') { |
| 4409 |
|
require_once api_get_path(SYS_PLUGIN_PATH) . 'courselegal/config.php'; |
| 4410 |
|
$plugin = CourseLegalPlugin::create(); |
| 4411 |
|
return $plugin->isUserAcceptedLegal($user_id, $course_code, $session_id); |
| 4412 |
|
} |
| 4413 |
|
|
| 4414 |
|
if (empty($session_id)) { |
| 4415 |
|
$table = Database::get_main_table(TABLE_MAIN_COURSE_USER); |
|
@@ 4453-4457 (lines=5) @@
|
| 4450 |
|
// Course plugin legal |
| 4451 |
|
$enabled = api_get_plugin_setting('courselegal', 'tool_enable'); |
| 4452 |
|
|
| 4453 |
|
if ($enabled == 'true') { |
| 4454 |
|
require_once api_get_path(SYS_PLUGIN_PATH) . 'courselegal/config.php'; |
| 4455 |
|
$plugin = CourseLegalPlugin::create(); |
| 4456 |
|
return $plugin->saveUserLegal($user_id, $course_code, $session_id); |
| 4457 |
|
} |
| 4458 |
|
|
| 4459 |
|
$user_id = intval($user_id); |
| 4460 |
|
$course_code = Database::escape_string($course_code); |