|
|
|
@ -61,6 +61,13 @@ if ($objExercise->expired_time != 0 && !empty($clock_expired_time)) { |
|
|
|
$time_control = true; |
|
|
|
$time_control = true; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$extra_params = ''; |
|
|
|
|
|
|
|
if (isset($_GET['preview'])) { |
|
|
|
|
|
|
|
$extra_params = '&preview=1'; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
$exercise_url = api_get_path(WEB_CODE_PATH).'exercise/exercise_submit.php?'. |
|
|
|
|
|
|
|
api_get_cidreq().'&exerciseId='.$objExercise->id.'&learnpath_id='.$learnpath_id.'&learnpath_item_id='.$learnpath_item_id.'&learnpath_item_view_id='.$learnpathItemViewId.$extra_params; |
|
|
|
|
|
|
|
|
|
|
|
if ($time_control) { |
|
|
|
if ($time_control) { |
|
|
|
// Get time left for expiring time |
|
|
|
// Get time left for expiring time |
|
|
|
$time_left = api_strtotime($clock_expired_time, 'UTC') - time(); |
|
|
|
$time_left = api_strtotime($clock_expired_time, 'UTC') - time(); |
|
|
|
@ -69,7 +76,7 @@ if ($time_control) { |
|
|
|
$htmlHeadXtra[] = api_get_js('epiclock/javascript/jquery.dateformat.min.js'); |
|
|
|
$htmlHeadXtra[] = api_get_js('epiclock/javascript/jquery.dateformat.min.js'); |
|
|
|
$htmlHeadXtra[] = api_get_js('epiclock/javascript/jquery.epiclock.min.js'); |
|
|
|
$htmlHeadXtra[] = api_get_js('epiclock/javascript/jquery.epiclock.min.js'); |
|
|
|
$htmlHeadXtra[] = api_get_js('epiclock/renderers/minute/epiclock.minute.js'); |
|
|
|
$htmlHeadXtra[] = api_get_js('epiclock/renderers/minute/epiclock.minute.js'); |
|
|
|
$htmlHeadXtra[] = $objExercise->showTimeControlJS($time_left, true); |
|
|
|
$htmlHeadXtra[] = $objExercise->showTimeControlJS($time_left, $exercise_url); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (!in_array($origin, ['learnpath', 'embeddable', 'mobileapp'])) { |
|
|
|
if (!in_array($origin, ['learnpath', 'embeddable', 'mobileapp'])) { |
|
|
|
@ -128,11 +135,6 @@ if (!empty($objExercise->description)) { |
|
|
|
$html .= Display::div($objExercise->description, ['class' => 'exercise_description']); |
|
|
|
$html .= Display::div($objExercise->description, ['class' => 'exercise_description']); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
$extra_params = ''; |
|
|
|
|
|
|
|
if (isset($_GET['preview'])) { |
|
|
|
|
|
|
|
$extra_params = '&preview=1'; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$exercise_stat_info = $objExercise->get_stat_track_exercise_info( |
|
|
|
$exercise_stat_info = $objExercise->get_stat_track_exercise_info( |
|
|
|
$learnpath_id, |
|
|
|
$learnpath_id, |
|
|
|
$learnpath_item_id, |
|
|
|
$learnpath_item_id, |
|
|
|
@ -151,8 +153,6 @@ if (isset($exercise_stat_info['exe_id'])) { |
|
|
|
|
|
|
|
|
|
|
|
// 2. Exercise button |
|
|
|
// 2. Exercise button |
|
|
|
// Notice we not add there the lp_item_view_id because is not already generated |
|
|
|
// Notice we not add there the lp_item_view_id because is not already generated |
|
|
|
$exercise_url = api_get_path(WEB_CODE_PATH).'exercise/exercise_submit.php?'. |
|
|
|
|
|
|
|
api_get_cidreq().'&exerciseId='.$objExercise->id.'&learnpath_id='.$learnpath_id.'&learnpath_item_id='.$learnpath_item_id.'&learnpath_item_view_id='.$learnpathItemViewId.$extra_params; |
|
|
|
|
|
|
|
$exercise_url_button = Display::url( |
|
|
|
$exercise_url_button = Display::url( |
|
|
|
$label, |
|
|
|
$label, |
|
|
|
$exercise_url, |
|
|
|
$exercise_url, |
|
|
|
|