mirror of
https://github.com/moodle/moodle.git
synced 2025-02-22 19:06:51 +01:00
Fixing a large number of tidy warnings
This commit is contained in:
parent
755bddf118
commit
6463e8a6b6
@ -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
|
||||
|
@ -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:
|
||||
|
@ -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;
|
||||
|
@ -17,8 +17,10 @@
|
||||
<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; ?>
|
||||
|
@ -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; ?>
|
||||
|
@ -25,6 +25,4 @@
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php $this->print_question_submit_buttons($question, $state, $cmoptions, $options); ?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
Loading…
x
Reference in New Issue
Block a user