Fixing a large number of tidy warnings

This commit is contained in:
gustav_delius 2006-04-06 20:35:49 +00:00
parent 755bddf118
commit 6463e8a6b6
6 changed files with 15 additions and 13 deletions

View 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

View 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:

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

View File

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

View 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; ?>

View File

@ -25,6 +25,4 @@
</div>
<?php } ?>
<?php $this->print_question_submit_buttons($question, $state, $cmoptions, $options); ?>
</div>
</div>
</div>