Should fix bug when showing review/not review text for "free answers" see #5524

skala
Julio Montoya 13 years ago
parent fdf41d2ccc
commit 4a86359960
  1. 11
      main/css/base.css
  2. 18
      main/exercice/exercise.lib.php
  3. 18
      main/exercice/exercise_show.php
  4. 7
      main/exercice/freeanswer.class.php

@ -2568,7 +2568,7 @@ div.admin_section h4 {
.ribbon .rib {
height: 30px;
width: 115px;
width: 120px;
display: block;
line-height: 1.3;
left: -2px;
@ -2594,7 +2594,8 @@ div.admin_section h4 {
}
.ribbon .rib h3 {
color:white;
color: white;
font-size: 16px;
}
.ribbon .rib-total {
@ -2645,7 +2646,7 @@ div.admin_section h4 {
.ribbon h4 {
display: block;
left: 132px;
left: 140px;
height: 30px;
line-height: 1.3;
margin: 0;
@ -2655,10 +2656,6 @@ div.admin_section h4 {
color: #444;
}
.score_exercise {
/*font-size: 110%;*/
}
.ribbon-total h4 {
left: 290px;
}

@ -2101,14 +2101,7 @@ function display_question_list_by_attempt($objExercise, $exe_id, $save_user_resu
$my_total_score = 0;
}
$score = array();
if ($show_results) {
$score['result'] = get_lang('Score')." : ".show_score($my_total_score, $my_total_weight, false, false);
$score['pass'] = $my_total_score >= $my_total_weight ? true : false;
$score['score'] = $my_total_score;
$score['weight'] = $my_total_weight;
}
$comnt = null;
if ($show_results) {
$comnt = get_comments($exe_id, $questionId);
if (!empty($comnt)) {
@ -2117,6 +2110,15 @@ function display_question_list_by_attempt($objExercise, $exe_id, $save_user_resu
}
}
$score = array();
if ($show_results) {
$score['result'] = get_lang('Score')." : ".show_score($my_total_score, $my_total_weight, false, false);
$score['pass'] = $my_total_score >= $my_total_weight ? true : false;
$score['score'] = $my_total_score;
$score['weight'] = $my_total_weight;
$score['comments'] = $comnt;
}
$contents = ob_get_clean();
$question_content = '<div class="question_row">';

@ -487,8 +487,10 @@ foreach ($questionList as $questionId) {
echo '</table>';
}
}
if ($show_results) {
$comnt = null;
if ($show_results) {
if ($is_allowedToEdit && $locked == false && !api_is_drh()) {
$name = "fckdiv".$questionId;
$marksname = "marksName".$questionId;
@ -541,7 +543,7 @@ foreach ($questionList as $questionId) {
if ($is_allowedToEdit) {
if (in_array($answerType, array(FREE_ANSWER, ORAL_EXPRESSION))) {
$marksname = "marksName".$questionId;
echo '<div id="'.$marksname.'" style="display:none" >';
echo '<div id="'.$marksname.'" style="display:none">';
echo '<form name="marksform_'.$questionId.'" method="post" action="">';
$arrmarks[] = $questionId;
echo get_lang("AssignMarks");
@ -551,7 +553,8 @@ foreach ($questionList as $questionId) {
}
echo '</select>';
echo '</form><br/ ></div>';
if ($questionScore==-1 ) {
if ($questionScore == -1 ) {
$questionScore = 0;
echo Display::return_message(get_lang('notCorrectedYet'));
}
@ -581,9 +584,10 @@ foreach ($questionList as $questionId) {
$score['pass'] = $my_total_score >= $my_total_weight ? true : false;
$score['type'] = $answerType;
$score['score'] = $my_total_score;
$score['weight'] = $my_total_weight;
$score['weight'] = $my_total_weight;
$score['comments'] = isset($comnt) ? $comnt : null;
}
unset($objAnswerTmp);
$i++;
@ -592,7 +596,7 @@ foreach ($questionList as $questionId) {
$question_content = '<div class="question_row">';
if ($show_results) {
//Shows question title an description
//Shows question title an description
$question_content .= $objQuestionTmp->return_header(null, $counter, $score);
// display question category, if any

@ -59,12 +59,11 @@ if (!class_exists('FreeAnswer')):
}
function return_header($feedback_type = null, $counter = null, $score = null) {
if ((int) $score['score'] == 0) {
$score['revised'] = false;
} else {
if (!empty($score['comments']) || $score['score'] > 0) {
$score['revised'] = true;
} else {
$score['revised'] = false;
}
$header = parent::return_header($feedback_type, $counter, $score);
$header .= '<table class="' . $this->question_table_class . '" >
<tr>

Loading…
Cancel
Save