]> git.mjollnir.org Git - moodle.git/commitdiff
Fixing a large number of tidy warnings
authorgustav_delius <gustav_delius>
Thu, 6 Apr 2006 20:35:49 +0000 (20:35 +0000)
committergustav_delius <gustav_delius>
Thu, 6 Apr 2006 20:35:49 +0000 (20:35 +0000)
question/type/essay/questiontype.php
question/type/match/questiontype.php
question/type/multianswer/questiontype.php
question/type/multichoice/display.html
question/type/question.html
question/type/truefalse/display.html

index cc8ad8a2c1acf3e6cb92502b6e3de6947d31d3fa..e362eee3c8fe47cb567839cf88c2d1f67c39ea2f 100644 (file)
@@ -119,7 +119,7 @@ class question_essay_qtype extends default_questiontype {
 
         $inputname = $nameprefix;
         
-        echo "<p>$stranswer: ".
+        echo "<p>$stranswer: </p>".
             '<div style="padding-left: 30px;">';   
         if (empty($options->readonly)) {    
             // the student needs to type in their answer so print out a text editor
@@ -128,9 +128,9 @@ class question_essay_qtype extends default_questiontype {
         } else {
             // it is read only, so just format the students answer and output it
             echo format_text($value);
-            echo '<input type="hidden" name="'.$inputname.'" value="'.htmlSpecialChars($value).'">'; // need hidden one for grading
+            echo '<input type="hidden" name="'.$inputname.'" value="'.htmlSpecialChars($value).'" />'; // need hidden one for grading
         }    
-        echo '</div></p>';
+        echo '</div>';
                     
         if (isset($state->responses['response'])) {
             $value = $state->responses['response'];
@@ -162,14 +162,14 @@ class question_essay_qtype extends default_questiontype {
             choose_from_menu($gradeoptions, $nameprefix."fraction", $state->responses['fraction'],"");
         } else if (!empty($options->readonly)) {
             //read only so format the comment and print it out
-            echo "<p>$strcomment: ".
+            echo "<p>$strcomment: </p>".
                 '<div style="padding-left: 30px;">';
             if (empty($value)) {  // no comment yet
                 echo format_text(get_string('nocommentsyet', 'quiz'));
             } else {
                 echo format_text($value, '', $formatoptions, $cmoptions->course);    
             }
-            echo '</div></p>';
+            echo '</div>';
         }
 
         // feedback
index 6538198e4efc3db1bc2554379d946fd9ab44166b..35531ec3e4b1b3f90d26349c0a6ba8ed37c4af48 100644 (file)
@@ -237,7 +237,6 @@ class question_match_qtype extends default_questiontype {
         $image = get_question_image($question, $cmoptions->course);
 
         ///// Print the input controls //////
-        echo '<table border="0" cellpadding="10" align="right">';
         foreach ($subquestions as $key => $subquestion) {
 
             /// Subquestion text:
index e8cee24a3873d7734902996ccdbd72897872d689..4adf038e391fb5469d30e9e10412b2bc9f00595a 100644 (file)
@@ -194,6 +194,7 @@ class embedded_cloze_qtype extends default_questiontype {
     function print_question_formulation_and_controls(&$question, &$state, $cmoptions, $options) {
         global $QTYPES;
         $readonly = empty($options->readonly) ? '' : 'readonly="readonly"';
+        $disabled = empty($options->readonly) ? '' : 'disabled="disabled"';
         $formatoptions->noclean = true;
         $formatoptions->para = false;
         $nameprefix = $question->name_prefix;
@@ -318,7 +319,7 @@ class embedded_cloze_qtype extends default_questiontype {
                                 ? ' selected="selected" ' : '';
                         $outputoptions .= "<option value=\"$mcanswer->id\" $selected>$mcanswer->answer</option>";
                     }
-                   echo "<select $popup $readonly $style name=\"$inputname\">";
+                   echo "<select $popup $disabled $style name=\"$inputname\">";
                    echo $outputoptions;
                    echo '</select>';
                    break;
index de4f8fcbb74f6a8ca2557bdcd56883b541ca3775..ef553d29f604ee14ff7e889352eb360d0ebbbe41 100644 (file)
         <td class="c0 control">
           <?php echo $answer->control; ?>
         </td>
-        <td class="c1 text <?php echo $answer->class ?>"><label for="<?php echo $answer->id ?>">
-          <?php echo $answer->text; ?>
+        <td class="c1 text <?php echo $answer->class ?>">
+          <label for="<?php echo $answer->id ?>">
+            <?php echo $answer->text; ?>
+          </label>
         </td>
         <td class="c0 feedback">
           <?php echo $answer->feedback; ?>
index f6ac34a2abc194c2dbca40ef17aa392ca0c1f704..0b9649f9bf0e35d455d2a491f1527b5a1687ca15 100644 (file)
@@ -6,7 +6,9 @@
 <table id="q<?php echo $question->id; ?>" class="que <?php echo $question->qtype; ?>"><tr><td>
   <div class="info">
     <span class="no"><?php echo $number; ?></span>
-    <span class="edit"><?php echo $editlink; ?></span>
+    <?php if ($editlink) { ?>
+      <span class="edit"><?php echo $editlink; ?></span>
+    <?php } ?>
     <?php if ($grade) { ?>
       <div class="grade">
         <?php echo get_string('marks', 'quiz').': '.$grade; ?>
index 99d9688ba51e87f931ed892bc6e89ab8963be0ca..7c5d02d879ee8bdeaec93608cb80bcadc290a6dc 100644 (file)
@@ -25,6 +25,4 @@
                </div>
        <?php } ?>
        <?php $this->print_question_submit_buttons($question, $state, $cmoptions, $options); ?>
-</div>
-
-</div>
+</div>
\ No newline at end of file