Replacing Validate Answers with 'End test' see #4543

skala
Julio Montoya 14 years ago
parent 65d07e8fda
commit 98d3424974
  1. 21
      main/exercice/exercise.class.php
  2. 2
      main/exercice/exercise_reminder.php
  3. 3
      main/exercice/exercise_result.php
  4. 2
      main/exercice/exercise_show.php
  5. 13
      main/exercice/overview.php

@ -1587,7 +1587,7 @@ class Exercise {
if ($this->selectFeedbackType() == EXERCISE_FEEDBACK_TYPE_DIRECT && $this->type == ONE_PER_PAGE) {
$html .='<a href="exercise_submit_modal.php?learnpath_id='.$safe_lp_id.'&learnpath_item_id='.$safe_lp_item_id.'&learnpath_item_view_id='.$safe_lp_item_view_id.'&origin='.$origin.'&hotspot='.$hotspot_get.'&nbrQuestions='.$nbrQuestions.'&questionnum='.$questionNum.'&exerciseType='.$this->type.'&exerciseId='.$this->id.'&placeValuesBeforeTB_=savedValues&TB_iframe=true&height=480&width=640&modal=true" title="" class="thickbox button" id="validationButton">';
$html .= get_lang('ValidateAnswer').'</a>';
$html .= get_lang('EndTest').'</a>';
$html .='<br />';
} else {
//User
@ -1597,8 +1597,8 @@ class Exercise {
$label = get_lang('ReviewQuestions');
$class = 'btn btn-primary';
} else {
$label = get_lang('ValidateAnswers');
$class = 'btn btn-sucess';
$label = get_lang('EndTest');
$class = 'btn btn-success';
}
} else {
$label = get_lang('NextQuestion');
@ -1620,8 +1620,8 @@ class Exercise {
$all_label = get_lang('ReviewQuestions');
$class = 'btn btn-primary';
} else {
$all_label = get_lang('ValidateAnswers');
$class = 'btn btn-sucess';
$all_label = get_lang('EndTest');
$class = 'btn btn-success';
}
$all_button = '&nbsp;<a href="javascript://" class="'.$class.'" onclick="validate_all(); ">'.$all_label.'</a>';
$all_button .= '&nbsp;<span id="save_all_reponse"></span>';
@ -2980,8 +2980,7 @@ class Exercise {
if ($answerType == HOT_SPOT || $answerType == HOT_SPOT_ORDER) {
// We made an extra table for the answers
if ($show_result) {
if ($show_result) {
if ($origin != 'learnpath') {
echo '</table></td></tr>';
echo '<tr>
@ -2992,24 +2991,20 @@ class Exercise {
<param name="movie" value="../plugin/hotspot/hotspot_solution.swf?modifyAnswers='.Security::remove_XSS($questionId).'&exe_id='.$exeId.'&from_db=1" />
</object>';
echo '</td>
</tr>';
</tr>';
}
}
}
if ($origin != 'learnpath') {
if ($show_result) {
echo '</table>';
//if ($this->type == ALL_ON_ONE_PAGE) {
echo '</table>';
echo '<div id="question_score">';
if ($propagate_neg == 0 && $questionScore < 0) {
$questionScore = 0;
}
echo get_lang('Score').": ".show_score($questionScore, $questionWeighting, false, false);
echo '</div>';
//}
echo '<br />';
}
}
}

@ -232,7 +232,7 @@ foreach ($question_list as $questionId) {
echo Display::div($table, array('class'=>'span10'));
$exercise_actions = Display::url(get_lang('ValidateAnswers'), 'javascript://', array('onclick'=>'final_submit();', 'class'=>'btn btn-success'));
$exercise_actions = Display::url(get_lang('EndTest'), 'javascript://', array('onclick'=>'final_submit();', 'class'=>'btn btn-success'));
$exercise_actions .= '&nbsp;'.Display::url(get_lang('ReviewQuestions'), 'javascript://', array('onclick'=>'review_questions();','class'=>'btn'));
echo Display::div('', array('class'=>'clear'));

@ -204,8 +204,7 @@ if ($origin != 'learnpath') {
}
echo show_score($total_score, $total_weight, false, true, true, $objExercise->selectPassPercentage());
echo '</div>';
}
/* <button type="submit" class="save"><?php echo get_lang('Finish');?></button> */
}
}
// Tracking of results

@ -607,7 +607,7 @@ if ($origin!='learnpath' || ($origin == 'learnpath' && isset($_GET['fb_type'])))
if ($objExercise->selectPropagateNeg() == 0 && $my_total_score_temp < 0) {
$my_total_score_temp = 0;
}
echo show_score($my_total_score_temp, $totalWeighting, false);
echo show_score($my_total_score_temp, $totalWeighting, false);
echo '</div>';
}
}

@ -80,18 +80,19 @@ if (isset($_GET['preview'])) {
$extra_params = '&preview=1';
}
$exercise_stat_info = $objExercise->get_stat_track_exercise_info($learnpath_id, $learnpath_item_id, 0);
$attempt_list = null;
if (isset($exercise_stat_info['exe_id'])) {
$attempt_list = get_all_exercise_event_by_exe_id($exercise_stat_info['exe_id']);
}
//Exercise button
//Notice we not add there the lp_item_view__id because is not already generated
$exercise_url = api_get_path(WEB_CODE_PATH).'exercice/exercise_submit.php?'.api_get_cidreq().'&exerciseId='.$objExercise->id.'&origin='.$origin.'&learnpath_id='.$learnpath_id.'&learnpath_item_id='.$learnpath_item_id.$extra_params;
$label = get_lang('StartTest');
if ($time_control && !empty($clock_expired_time)) {
if ($time_control && !empty($clock_expired_time) || !empty($attempt_list)) {
$label = get_lang('ContinueTest');
}
$exercise_stat_info = $objExercise->get_stat_track_exercise_info($learnpath_id, $learnpath_item_id, 0);
$attempt_list = null;
if (isset($exercise_stat_info['exe_id'])) {
$attempt_list = get_all_exercise_event_by_exe_id($exercise_stat_info['exe_id']);
}
$exercise_url_button = Display::url($label, $exercise_url, array('class'=>'btn btn-primary btn-large'));

Loading…
Cancel
Save