فهرست منبع

Minor - Code conventions - refs #7612

Angel Fernando Quiroz Campos 10 سال پیش
والد
کامیت
80639a88f6
3فایلهای تغییر یافته به همراه18 افزوده شده و 18 حذف شده
  1. 15 15
      main/exercice/exercise.class.php
  2. 2 2
      main/inc/lib/display.lib.php
  3. 1 1
      main/inc/lib/exercise.lib.php

+ 15 - 15
main/exercice/exercise.class.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>';

+ 2 - 2
main/inc/lib/display.lib.php

@@ -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>';
         }

+ 1 - 1
main/inc/lib/exercise.lib.php

@@ -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;