|
|
@ -6962,18 +6962,36 @@ class Exercise |
|
|
|
$exercise_actions .= $this->show_button($questionId, $current_question, null, $remindList); |
|
|
|
$exercise_actions .= $this->show_button($questionId, $current_question, null, $remindList); |
|
|
|
break; |
|
|
|
break; |
|
|
|
case ALL_ON_ONE_PAGE: |
|
|
|
case ALL_ON_ONE_PAGE: |
|
|
|
$button = '<a href="javascript://" class="btn" onclick="save_now(\''.$questionId.'\', null, true, 1); ">'.get_lang('SaveForNow').'</a>'; |
|
|
|
$button = [ |
|
|
|
$button .= '<span id="save_for_now_'.$questionId.'" class="exercise_save_mini_message"></span> '; |
|
|
|
Display::button( |
|
|
|
$exercise_actions .= Display::div($button, array('class'=>'exercise_save_now_button')); |
|
|
|
'save_now', |
|
|
|
|
|
|
|
get_lang('SaveForNow'), |
|
|
|
|
|
|
|
['type' => 'button', 'class' => 'btn btn-primary', 'data-question' => $questionId] |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
'<span id="save_for_now_'.$questionId.'" class="exercise_save_mini_message"></span>' |
|
|
|
|
|
|
|
]; |
|
|
|
|
|
|
|
$exercise_actions .= Display::div( |
|
|
|
|
|
|
|
implode(PHP_EOL, $button), |
|
|
|
|
|
|
|
array('class'=>'exercise_save_now_button') |
|
|
|
|
|
|
|
); |
|
|
|
break; |
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (!empty($questions_in_media)) { |
|
|
|
if (!empty($questions_in_media)) { |
|
|
|
$count_of_questions_inside_media = count($questions_in_media); |
|
|
|
$count_of_questions_inside_media = count($questions_in_media); |
|
|
|
if ($count_of_questions_inside_media > 1) { |
|
|
|
if ($count_of_questions_inside_media > 1) { |
|
|
|
$button = '<a href="javascript://" class="btn" onclick="save_now(\''.$questionId.'\', false, false, 0); ">'.get_lang('SaveForNow').'</a>'; |
|
|
|
$button = [ |
|
|
|
$button .= '<span id="save_for_now_'.$questionId.'" class="exercise_save_mini_message"></span> '; |
|
|
|
Display::button( |
|
|
|
$exercise_actions = Display::div($button, array('class'=>'exercise_save_now_button')); |
|
|
|
'save_now', |
|
|
|
|
|
|
|
get_lang('SaveForNow'), |
|
|
|
|
|
|
|
['type' => 'button', 'class' => 'btn btn-primary', 'data-question' => $questionId] |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
'<span id="save_for_now_'.$questionId.'" class="exercise_save_mini_message"></span> ' |
|
|
|
|
|
|
|
]; |
|
|
|
|
|
|
|
$exercise_actions = Display::div( |
|
|
|
|
|
|
|
implode(PHP_EOL, $button), |
|
|
|
|
|
|
|
array('class'=>'exercise_save_now_button') |
|
|
|
|
|
|
|
); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if ($last_question_in_media && $this->type == ONE_PER_PAGE) { |
|
|
|
if ($last_question_in_media && $this->type == ONE_PER_PAGE) { |
|
|
|