]> git.mjollnir.org Git - moodle.git/commitdiff
Fixed some small xhtml problems and removed a warning
authorgustav_delius <gustav_delius>
Sat, 8 Apr 2006 14:20:52 +0000 (14:20 +0000)
committergustav_delius <gustav_delius>
Sat, 8 Apr 2006 14:20:52 +0000 (14:20 +0000)
lib/questionlib.php
question/type/essay/questiontype.php
question/type/question.html

index 1d652d80f281efaf4233d4a738cb40ba464363a4..39277ee9db419e23034a3784eda975b84b5a0e2e 100644 (file)
@@ -615,6 +615,7 @@ function get_question_states(&$questions, $cmoptions, $attempt) {
             $states[$i]->raw_grade = 0;
             $states[$i]->penalty = 0;
             $states[$i]->sumpenalty = 0;
+            $states[$i]->comment = '';
             $states[$i]->responses = array('' => '');
             // Prevent further changes to the session from incrementing the
             // sequence number
index e362eee3c8fe47cb567839cf88c2d1f67c39ea2f..7d831954a8bea03656b428817d591878fa40e84c 100644 (file)
@@ -127,7 +127,8 @@ class question_essay_qtype extends default_questiontype {
             use_html_editor($inputname);
         } else {
             // it is read only, so just format the students answer and output it
-            echo format_text($value);
+            echo format_text($value, $question->questiontextformat,
+                         $formatoptions, $cmoptions->course);
             echo '<input type="hidden" name="'.$inputname.'" value="'.htmlSpecialChars($value).'" />'; // need hidden one for grading
         }    
         echo '</div>';
index 42575de5ba3bd08da6a1f3552f52f38e4820cbe7..9934db0ffba06c0ad2f9e16fbab00784dced6eb9 100644 (file)
@@ -17,7 +17,7 @@
     }
 </script>
 
-<a name="<?php echo $question->id; ?>">
+<a name="<?php echo $question->id; ?>" id="<?php echo $question->id; ?>"></a>
 <div id="q<?php echo $question->id; ?>" class="que <?php echo $question->qtype; ?> clearfix">
   <div class="info">
     <span class="no"><?php echo $number; ?></span>