Minor - Code conventions - refs #7612

1.10.x
Angel Fernando Quiroz Campos 10 years ago
parent 41cf93232a
commit 80639a88f6
  1. 30
      main/exercice/exercise.class.php
  2. 4
      main/inc/lib/display.lib.php
  3. 2
      main/inc/lib/exercise.lib.php

@ -2815,18 +2815,18 @@ class Exercise
if ($answerType == DRAGGABLE) {
$user_answer = Display::label(get_lang('Correct'), 'success');
} else {
if (isset($real_list[$i_answer_id])) {
$user_answer = Display::span($real_list[$i_answer_id]);
}
if (isset($real_list[$i_answer_id])) {
$user_answer = Display::span($real_list[$i_answer_id]);
}
}
} else {
if ($answerType == DRAGGABLE) {
$user_answer = Display::label(get_lang('NotCorrect'), 'danger');
} else {
$user_answer = Display::span(
$real_list[$s_user_answer],
['style' => 'color: #FF0000; text-decoration: line-through;']
);
$user_answer = Display::span(
$real_list[$s_user_answer],
['style' => 'color: #FF0000; text-decoration: line-through;']
);
}
}
} elseif ($answerType == DRAGGABLE) {
@ -2835,15 +2835,15 @@ class Exercise
if ($show_result) {
echo '<tr>';
echo '<td>'.$s_answer_label.'</td>';
echo '<td>'.$user_answer;
echo '<td>' . $s_answer_label . '</td>';
echo '<td>' . $user_answer;
if ($answerType == MATCHING) {
if (isset($real_list[$i_answer_correct_answer])) {
echo Display::span(
$real_list[$i_answer_correct_answer],
['style' => 'color: #008000; font-weight: bold;']
);
}
if (isset($real_list[$i_answer_correct_answer])) {
echo Display::span(
$real_list[$i_answer_correct_answer],
['style' => 'color: #008000; font-weight: bold;']
);
}
}
echo '</td>';
echo '</tr>';

@ -1754,8 +1754,8 @@ class Display
if (!empty($list)) {
$html = '<dl class="dl-horizontal">';
foreach ($list as $item) {
$html .= '<dt>'.$item['title'].'</dt>';
$html .= '<dd>'.$item['content'].'</dd>';
$html .= '<dt>' . $item['title'] . '</dt>';
$html .= '<dd>' . $item['content'] . '</dd>';
}
$html .= '</dl>';
}

@ -110,7 +110,7 @@ class ExerciseLib
<div class="clearfix">
<ul class="exercise-draggable-answer ui-helper-reset ui-helper-clearfix">';
} else {
$s .= '<table class="table table-hover table-striped">';
$s .= '<table class="table table-hover table-striped">';
}
// Iterate through answers
$x = 1;

Loading…
Cancel
Save