Index: trunk/extensions/Quiz/Quiz.php |
— | — | @@ -204,11 +204,14 @@ |
205 | 205 | function parseQuiz($input) { |
206 | 206 | # Ouput the style and the script to the header once for all. |
207 | 207 | if($this->mQuizId == 0) { |
| 208 | + global $wgContLang; |
| 209 | + $start = $wgContLang->isRTL() ? "right" : "left"; |
| 210 | + $end = $wgContLang->isRTL() ? "left" : "right"; |
208 | 211 | $head = "<style type=\"text/css\">\n"; |
209 | 212 | $head .= ".quiz .settings input.numerical { width:2em; }\n"; |
210 | | - $head .= ".quiz .question { margin-left:2em; }\n"; |
211 | | - $head .= ".quiz .margin { padding-left:20px; }\n"; |
212 | | - $head .= ".quiz .header .questionId {font-size: 1.1em; font-weight: bold; float: left;}\n"; |
| 213 | + $head .= ".quiz .question { margin-$start:2em; }\n"; |
| 214 | + $head .= ".quiz .margin { padding-$start:20px; }\n"; |
| 215 | + $head .= ".quiz .header .questionId {font-size: 1.1em; font-weight: bold; float: $start;}\n"; |
213 | 216 | $head .= "*>.quiz .header .questionId {text-indent: -1.5em; }\n"; // *> prevent ie6 to interprate it. |
214 | 217 | $head .= ".quiz table.object, .quiz table.correction { background-color:transparent; }"; |
215 | 218 | $head .= ".quiz .correction { background-color: ".Quiz::getColor('correction').";}\n"; |
— | — | @@ -220,8 +223,8 @@ |
221 | 224 | # Part for the inputfields |
222 | 225 | $head .= ".quiz a.input, .quiz a.input:hover, .quiz a.input:active, .quiz a.input:visited { text-decoration:none; color:black; outline:0 }\n"; |
223 | 226 | $head .= ".quiz a.input span { outline:#7F9DB9 solid 1px; *border:1px solid #7F9DB9; }\n"; // *border is for IE6/7 |
224 | | - $head .= ".quiz a.input em { color:black; background-color:#DFDFDF; margin-right:1px; }\n"; |
225 | | - $head .= ".quiz a.input input { padding-left:2px; border:0; }\n"; |
| 227 | + $head .= ".quiz a.input em { color:black; background-color:#DFDFDF; margin-$end:1px; }\n"; |
| 228 | + $head .= ".quiz a.input input { padding-$start:2px; border:0; }\n"; |
226 | 229 | $head .= ".quiz a.input span.correction { padding:3px; margin:0; list-style-type:none; display:none; background-color:".Quiz::getColor("correction")."; }\n"; |
227 | 230 | $head .= ".quiz a.input:active span.correction, .quiz a.input:focus span.correction { display:inline; position:absolute; margin:1.8em 0 0 0.1em; }\n"; |
228 | 231 | $head .= "</style>\n"; |
— | — | @@ -394,9 +397,11 @@ |
395 | 398 | $buffer = call_user_func(array($question, "{$question->mType}ParseObject"), $matches[3]); |
396 | 399 | $output .= "<table class=\"object\" "; |
397 | 400 | $lState = $question->getState(); |
398 | | - # Determine the border-left color, title, score and the total of the question. |
| 401 | + # Determine the side border color, title, score and the total of the question. |
399 | 402 | if($lState != "") { |
400 | | - $output .= "style=\"border-left:3px solid ".$this->getColor($lState)."\""; |
| 403 | + global $wgContLang; |
| 404 | + $border = $wgContLang->isRTL() ? "border-right" : "border-left"; |
| 405 | + $output .= "style=\"$border:3px solid ".$this->getColor($lState)."\""; |
401 | 406 | if($this->mIgnoringCoef) { |
402 | 407 | $question->mCoef = 1; |
403 | 408 | } |
— | — | @@ -826,7 +831,9 @@ |
827 | 832 | } |
828 | 833 | } |
829 | 834 | if($state == "error" || $this->mBeingCorrected) { |
830 | | - $style = "style=\"border-left:3px solid ".Quiz::getColor($state)."; \""; |
| 835 | + global $wgContLang; |
| 836 | + $border = $wgContLang->isRTL() ? "border-right" : "border-left"; |
| 837 | + $style = "style=\"$border:3px solid ".Quiz::getColor($state)."; \""; |
831 | 838 | $this->setState(empty($value)? "new_NA" : $state); |
832 | 839 | if($state == "error") { |
833 | 840 | $size = ""; |