Permalink
Browse files

MDL-30130 bootstrapbase: Bring back Quiz answer feedback

  • Loading branch information...
1 parent 95190fd commit ed88a6f32af936f71d95e73274c6724ce786dc40 David Scotson committed May 3, 2013
Showing with 59 additions and 10 deletions.
  1. +58 −9 theme/bootstrapbase/less/moodle/question.less
  2. +1 −1 theme/bootstrapbase/style/moodle.css
@@ -188,6 +188,14 @@
.alert-info;
color: @textColor;
}
+.formulation input[type="text"],
+.formulation select {
+ width: auto;
+}
+
+.path-mod-quiz input[size] {
+ width: auto;
+}
.que .outcome {
}
.que .comment {
@@ -218,21 +226,59 @@
.que .qtext {
margin-bottom: 1.5em;
}
-.que .correct {
+.que .correctness {
.label;
- background-color: @successText;
+ &.correct {
+ background-color: @successText;
+ }
+ &.partiallycorrect {
+ background-color: @orange;
+ }
+ &.notanswered,
+ &.incorrect {
+ background-color: @errorText;
+ }
}
-.que .notanswered,
-.que .incorrect {
- .label;
- background-color: @errorText;
+.que .validationerror {
+ color: @errorText;
+}
+// copied from .formFieldState in mixin.less
+// and made more specific
+.answerState(@textColor, @backgroundColor) {
+ @borderColor: @textColor;
+ color: @textColor;
+ background-color: @backgroundColor;
+ border-color: @borderColor;
+ .box-shadow(inset 0 1px 1px rgba(0,0,0,.075)); // Redeclare so transitions work
+ &:focus {
+ border-color: darken(@borderColor, 10%);
+ @shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 6px lighten(@borderColor, 20%);
+ .box-shadow(@shadow);
+ }
}
-.que .partiallycorrect {
+
+.formulation .correct {
+ background-color: @successBackground;
+}
+.formulation .partiallycorrect {
background-color: @warningBackground;
}
-.que .validationerror {
- color: @errorText;
+.formulation .incorrect {
+ background-color: @errorBackground;
+}
+.formulation select.correct,
+.formulation input.correct {
+ .answerState(@successText, @successBackground);
}
+.formulation select.partiallycorrect,
+.formulation input.partiallycorrect {
+ .answerState(@warningText, @warningBackground);
+}
+.formulation select.incorrect,
+.formulation input.incorrect {
+ .answerState(@errorText, @errorBackground);
+}
+
.que .grading,
.que .comment,
.que .commentlink,
@@ -340,6 +386,9 @@
border: none;
background-color: @bodyBackground;
}
+#page-mod-quiz-edit div.question div.content div.points label {
+ display: inline-block;
+}
#page-mod-quiz-edit div.quizpage .pagecontent .pagestatus {
background-color: @bodyBackground;

Large diffs are not rendered by default.

Oops, something went wrong.

0 comments on commit ed88a6f

Please sign in to comment.