Fixing exercise result layout

skala
Julio Montoya 13 years ago
parent a6ab7513da
commit 73cf8aaa8f
  1. 45
      main/css/base.css
  2. 2
      main/exercice/exercise.class.php
  3. 10
      main/exercice/fill_blanks.class.php
  4. 12
      main/exercice/freeanswer.class.php
  5. 23
      main/exercice/matching.class.php
  6. 11
      main/exercice/multiple_answer.class.php
  7. 11
      main/exercice/multiple_answer_combination.class.php
  8. 11
      main/exercice/multiple_answer_true_false.class.php
  9. 14
      main/exercice/unique_answer.class.php
  10. 11
      main/exercice/unique_answer_no_option.class.php
  11. 1
      main/exercice/upload_exercise.php

@ -4004,3 +4004,48 @@ input.liteoption {
}
.row_selected {
border-color: #478ced #1f6fe2 #1f6fe2;
background-color: #2d7ceb;
background-image: -webkit-gradient(linear, left top, left bottom, from(#2d7ceb), to(#2978e6));
background-image: -webkit-linear-gradient(top, #2d7ceb, #2978e6);
background-image: -moz-linear-gradient(top, #2d7ceb, #2978e6);
background-image: -ms-linear-gradient(top, #2d7ceb, #2978e6);
background-image: -o-linear-gradient(top, #2d7ceb, #2978e6);
background-image: linear-gradient(top, #2d7ceb, #2978e6);
/*filter: progid:DXImageTransform.Microsoft.gradient(startColorStr='#2d7ceb', EndColorStr='#2978e6');*/
-moz-box-shadow: 0px 0px 0px transparent;
-webkit-box-shadow: 0px 1px 0px transparent;
box-shadow: 0px 1px 0px transparent;
}
.row_selected a, .row_selected .invisible, .row_selected td {
color: #FFFFFF !important;
}
.data_table_exercise_result, .data_table_exercise_result_left {
border-collapse: collapse;
border-spacing: 0;
font-size: 12px;
margin-bottom: 15px;
margin-top: 8px;
text-align: left;
width: 100%;
}
.data_table_exercise_result td {
line-height: normal;
padding: 6px;
text-align: center;
vertical-align: middle;
}
.data_table_exercise_result_left td {
line-height: normal;
padding: 6px;
text-align: left;
vertical-align: middle;
}

@ -2270,7 +2270,7 @@ class Exercise {
}
if ($show_result) {
echo '<tr>';
echo '<td>'.$s_answer_label.'</td><td>'.$user_answer.' / <b><span style="color: #008000;">'.$real_list[$i_answer_correct_answer].'</span></b></td>';
echo '<td>'.$s_answer_label.'</td><td>'.$user_answer.' <b><span style="color: #008000;">'.$real_list[$i_answer_correct_answer].'</span></b></td>';
echo '</tr>';
}
}

@ -203,15 +203,9 @@ class FillBlanks extends Question
function return_header($feedback_type, $counter = null) {
parent::return_header($feedback_type, $counter);
$header = '<table width="100%" border="0" cellspacing="3" cellpadding="3">
<tr>
<td>&nbsp;</td>
</tr>
$header = '<table width="100%" class="data_table_exercise_result_left">
<tr>
<td><i><?php echo get_lang("Answer"); ?></i> </td>
</tr>
<tr>
<td>&nbsp;</td>
<td><i>'.get_lang("Answer").'</i> </td>
</tr>';
return $header;
}

@ -60,15 +60,9 @@ class FreeAnswer extends Question {
function return_header($feedback_type, $counter = null) {
parent::return_header($feedback_type, $counter);
$header = '<table width="100%" border="0" cellspacing="3" cellpadding="3">
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td><i><?php echo get_lang("Answer"); ?></i> </td>
</tr>
<tr>
<td>&nbsp;</td>
$header = '<table width="100%" class="data_table_exercise_result_left" >
<tr>
<td><i>'.get_lang("Answer").'</i></td>
</tr>';
return $header;
}

@ -42,8 +42,7 @@ class Matching extends Question {
$navigator_info = api_get_navigator();
$nb_matches = $nb_options = 2;
if($form -> isSubmitted())
{
if($form -> isSubmitted()) {
$nb_matches = $form -> getSubmitValue('nb_matches');
$nb_options = $form -> getSubmitValue('nb_options');
if(isset($_POST['lessMatches']))
@ -254,18 +253,14 @@ class Matching extends Question {
$this->save();
}
function return_header($feedback_type, $counter = null) {
parent::return_header($feedback_type, $counter);
echo '<table width="100%" height="71" border="0" cellspacing="3" cellpadding="3" >';
echo '<tr><td colspan="2">&nbsp;</td></tr>';
echo '<tr>
<td><span style="font-style: italic;">'.get_lang('ElementList').'</span> </td>
<td><span style="font-style: italic;">'.get_lang('CorrespondsTo').'</span></td>
</tr>';
echo '<tr><td colspan="2">&nbsp;</td></tr>';
}
function return_header($feedback_type, $counter = null) {
parent::return_header($feedback_type, $counter);
echo '<table width="100%" height="71" class="data_table_exercise_result_left">';
echo '<tr>
<td><span style="font-style: italic;">'.get_lang('ElementList').'</span> </td>
<td><span style="font-style: italic;">'.get_lang('CorrespondsTo').'</span></td>
</tr>';
}
}

@ -213,10 +213,7 @@ class MultipleAnswer extends Question {
function return_header($feedback_type, $counter = null) {
parent::return_header($feedback_type, $counter);
$header = '<table width="100%" border="0" cellspacing="3" cellpadding="3">
<tr>
<td>&nbsp;</td>
</tr>
$header = '<table width="100%" class="data_table_exercise_result">
<tr>
<td><i>'.get_lang("Choice").'</i> </td>
<td><i>'. get_lang("ExpectedChoice").'</i></td>
@ -226,11 +223,7 @@ class MultipleAnswer extends Question {
} else {
$header .= '<td>&nbsp;</td>';
}
$header .= '
</tr>
<tr>
<td>&nbsp;</td>
</tr>';
$header .= '</tr>';
return $header;
}

@ -226,10 +226,7 @@ class MultipleAnswerCombination extends Question {
function return_header($feedback_type, $counter = null) {
parent::return_header($feedback_type, $counter);
$header = '<table width="100%" border="0" cellspacing="3" cellpadding="3">
<tr>
<td>&nbsp;</td>
</tr>
$header = '<table width="100%" class="data_table_exercise_result">
<tr>
<td><i>'.get_lang("Choice").'</i> </td>
<td><i>'. get_lang("ExpectedChoice").'</i></td>
@ -239,11 +236,7 @@ class MultipleAnswerCombination extends Question {
} else {
$header .= '<td>&nbsp;</td>';
}
$header .= '
</tr>
<tr>
<td>&nbsp;</td>
</tr>';
$header .= '</tr>';
return $header;
}

@ -286,10 +286,7 @@ class MultipleAnswerTrueFalse extends Question {
} else {
$header = parent::return_header($feedback_type, $counter, $in_echo) . $header;
}
$header .= '<table width="100%" border="0" cellspacing="3" cellpadding="3">
<tr>
<td>&nbsp;</td>
</tr>
$header .= '<table width="100%" class="data_table_exercise_result">
<tr>
<td><i>'.get_lang("Choice").'</i> </td>
<td><i>'. get_lang("ExpectedChoice").'</i></td>
@ -299,11 +296,7 @@ class MultipleAnswerTrueFalse extends Question {
} else {
$header .= '<td>&nbsp;</td>';
}
$header .= '
</tr>
<tr>
<td>&nbsp;</td>
</tr>';
$header .= '</tr>';
return $header;
}
}

@ -376,10 +376,7 @@ class UniqueAnswer extends Question {
function return_header($feedback_type, $counter = null) {
parent::return_header($feedback_type, $counter);
$header = '<table width="100%" border="0" cellspacing="3" cellpadding="3">
<tr>
<td>&nbsp;</td>
</tr>
$header = '<table width="100%" class="data_table_exercise_result">
<tr>
<td><i>'.get_lang("Choice").'</i> </td>
<td><i>'. get_lang("ExpectedChoice").'</i></td>
@ -389,13 +386,10 @@ class UniqueAnswer extends Question {
} else {
$header .= '<td>&nbsp;</td>';
}
$header .= '
</tr>
<tr>
<td>&nbsp;</td>
</tr>';
$header .= '</tr>';
return $header;
}
}
function create_answer($id, $question_id, $answer_title, $comment, $score = 0, $correct = 0) {
$tbl_quiz_answer = Database::get_course_table(TABLE_QUIZ_ANSWER);
$tbl_quiz_question = Database::get_course_table(TABLE_QUIZ_QUESTION);

@ -466,10 +466,7 @@ class UniqueAnswerNoOption extends Question {
function return_header($feedback_type, $counter = null) {
parent::return_header($feedback_type, $counter);
$header = '<table width="100%" border="0" cellspacing="3" cellpadding="3">
<tr>
<td>&nbsp;</td>
</tr>
$header = '<table width="100%" class="data_table_exercise_result">
<tr>
<td><i>'.get_lang("Choice").'</i> </td>
<td><i>'. get_lang("ExpectedChoice").'</i></td>
@ -479,11 +476,7 @@ class UniqueAnswerNoOption extends Question {
} else {
$header .= '<td>&nbsp;</td>';
}
$header .= '
</tr>
<tr>
<td>&nbsp;</td>
</tr>';
$header .= '</tr>';
return $header;
}
}

@ -17,7 +17,6 @@ $help_content = 'exercise_upload';
// including the global Dokeos file
require_once '../inc/global.inc.php';
require_once api_get_path(LIBRARY_PATH) . 'fileUpload.lib.php';
require_once api_get_path(LIBRARY_PATH) . 'formvalidator/FormValidator.class.php';
require_once api_get_path(LIBRARY_PATH) . 'pear/excelreader/reader.php';
require_once 'exercise.class.php';
require_once 'question.class.php';

Loading…
Cancel
Save