class added to the submit button to be able to position it
I optimized display.html and CSS same class name for different objects is problematic _ quiz table and question table must not be named with same class _ surrounding tabel: class="multichoice|etc" _ answer table: class="answer" I changed the classname of the "answer" div to class="ablock" (short from "answer-block") that it does not conflict with "answer" multichoice: _ changed first row to class="r0" _ added descriptive classes to the cells
This commit is contained in:
+31
-16
@@ -29,34 +29,49 @@
|
||||
#mod-quiz-attempt .question .qtext {
|
||||
margin-bottom: 1.5em;
|
||||
}
|
||||
#mod-quiz-attempt .question .answer {
|
||||
#mod-quiz-attempt .question .ablock {
|
||||
margin: 0.7em 0 0.3em 0;
|
||||
clear: both;
|
||||
}
|
||||
#mod-quiz-attempt .question .answer .prompt {
|
||||
#mod-quiz-attempt .question .prompt {
|
||||
float: left;
|
||||
width: 15%;
|
||||
height: 2em;
|
||||
padding-top: 0.3em;
|
||||
font-size: 0.8em;
|
||||
}
|
||||
#mod-quiz-attempt .question .answer .shortanswer {
|
||||
#mod-quiz-attempt .question .answer {
|
||||
float: right;
|
||||
width: 84%;
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
#mod-quiz-attempt .question .submit {
|
||||
position: relative;
|
||||
clear: both;
|
||||
float: left;
|
||||
width: 80%;
|
||||
padding-bottom: 0.5em;
|
||||
}
|
||||
#mod-quiz-attempt .question .answer .multichoice {
|
||||
float: left;
|
||||
width: 80%;
|
||||
padding-bottom: 0.5em;
|
||||
/* MSIE Hack */
|
||||
* html #mod-quiz-attempt .question .submit {
|
||||
float: none;
|
||||
}
|
||||
#mod-quiz-attempt .question .answer .multichoice .c0 {
|
||||
#mod-quiz-attempt .question .c0,
|
||||
#mod-quiz-attempt .question .c1 {
|
||||
padding: 0.3em 0 0.3em 0.3em;
|
||||
}
|
||||
#mod-quiz-attempt .question .r0 {
|
||||
background-color: #F5F5F5;
|
||||
}
|
||||
#mod-quiz-attempt .question .r1 {
|
||||
background-color: #EEE;
|
||||
}
|
||||
#mod-quiz-attempt .multichoice .c0 {
|
||||
width: 5%;
|
||||
vertical-align: top;
|
||||
padding: 0;
|
||||
padding-top: 0.4em;
|
||||
}
|
||||
#mod-quiz-attempt .question .answer input {
|
||||
margin: 0.5em 0 0 0;
|
||||
}
|
||||
#mod-quiz-attempt .question .answer .shortanswer input {
|
||||
margin: 0;
|
||||
#mod-quiz-attempt .shortanswer .answer {
|
||||
background-color: #EEE;
|
||||
padding: 0.3em 0 0.3em 0.3em;
|
||||
}
|
||||
#mod-quiz-attempt .question .grading {
|
||||
float: right;
|
||||
|
||||
@@ -6,25 +6,25 @@
|
||||
<img class="qimage" src="<?php echo $q->imageurl; ?>" alt="" />
|
||||
<?php } ?>
|
||||
|
||||
<div class="answer">
|
||||
<div class="ablock">
|
||||
<div class="prompt">
|
||||
<?php echo $answerprompt; ?>
|
||||
</div>
|
||||
|
||||
<table class="multichoice">
|
||||
<?php foreach ($anss as $answer) { ?>
|
||||
<tr class="<?php echo $row = $row ? 0 : 1; ?>">
|
||||
<td class="c0">
|
||||
<table class="answer">
|
||||
<?php $row = 1; foreach ($anss as $answer) { ?>
|
||||
<tr class="<?php echo 'r'.$row = $row ? 0 : 1; ?>">
|
||||
<td class="c0 control">
|
||||
<?php echo $answer->control; ?>
|
||||
</td>
|
||||
<td class="c1 <?php echo $answer->class ?>"><label for="<?php echo $answer->id ?>">
|
||||
<td class="c1 text <?php echo $answer->class ?>"><label for="<?php echo $answer->id ?>">
|
||||
<?php echo $answer->text; ?>
|
||||
</td>
|
||||
<td class="c2">
|
||||
<td class="c0 feedback">
|
||||
<?php echo $answer->feedback; ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
</table>
|
||||
<?php $this->print_question_submit_buttons($question, $state, $cmoptions, $options); ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -656,7 +656,8 @@ class quiz_default_questiontype {
|
||||
echo $question->name_prefix;
|
||||
echo 'mark" value="';
|
||||
print_string('mark', 'quiz');
|
||||
echo '" />';
|
||||
echo '" class="submit btn"';
|
||||
echo ' />';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -6,12 +6,12 @@
|
||||
<img class="qimage" src="<?php echo $q->imageurl; ?>" alt="" />
|
||||
<?php } ?>
|
||||
|
||||
<div class="answer">
|
||||
<div class="ablock">
|
||||
<div class="prompt">
|
||||
<?php echo get_string("answer", "quiz").': '; ?>
|
||||
</div>
|
||||
|
||||
<div class="shortanswer">
|
||||
<div class="answer">
|
||||
<input type="text" <?php echo "$readonly $inputname $value"; ?> size="80"/>
|
||||
</div>
|
||||
<?php $this->print_question_submit_buttons($question, $state, $cmoptions, $options); ?>
|
||||
|
||||
@@ -6,12 +6,12 @@
|
||||
<img class="qimage" src="<?php echo $q->imageurl; ?>" alt="" />
|
||||
<?php } ?>
|
||||
|
||||
<div class="answer">
|
||||
<div class="ablock">
|
||||
<div class="prompt">
|
||||
<?php print_string('answer', 'quiz') ?>:
|
||||
</div>
|
||||
|
||||
<div class="controls">
|
||||
<div class="answer">
|
||||
<span <?php echo $trueclass; ?>>
|
||||
<?php echo $radiotrue ?>
|
||||
</span>
|
||||
@@ -28,4 +28,4 @@
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user