Permalink
Browse files

Merge branch 'MOODLE_21_STABLE' into install_21_STABLE

  • Loading branch information...
2 parents 7138495 + cf04ce3 commit 81b24b17cf054b9a3794c7f377ea0ce1cb02b763 AMOS bot committed Nov 19, 2011
View
9 backup/moodle2/restore_stepslib.php
@@ -802,7 +802,14 @@ public function process_grouping_group($data) {
$data->groupingid = $this->get_new_parentid('grouping'); // Use new parentid
$data->groupid = $this->get_mappingid('group', $data->groupid); // Get from mappings
- $DB->insert_record('groupings_groups', $data); // No need to set this mapping (no child info nor files)
+
+ $params = array();
+ $params['groupingid'] = $data->groupingid;
+ $params['groupid'] = $data->groupid;
+
+ if (!$DB->record_exists('groupings_groups', $params)) {
+ $DB->insert_record('groupings_groups', $data); // No need to set this mapping (no child info nor files)
+ }
}
protected function after_execute() {
View
17 lib/db/upgrade.php
@@ -6679,6 +6679,23 @@ function xmldb_main_upgrade($oldversion) {
upgrade_main_savepoint(true, 2011070101.10);
}
+ if ($oldversion < 2011070102.08) {
+ upgrade_set_timeout(60*20); // this may take a while
+ // Remove duplicate entries from groupings_groups table
+ $sql = 'SELECT MIN(id) AS firstid, groupingid, groupid FROM {groupings_groups} '.
+ 'GROUP BY groupingid, groupid HAVING COUNT(id)>1';
+ $badrs = $DB->get_recordset_sql($sql);
+ foreach ($badrs as $badrec) {
+ $where = 'groupingid = ? and groupid = ? and id > ?';
+ $params = array($badrec->groupingid, $badrec->groupid, $badrec->firstid);
+ $DB->delete_records_select('groupings_groups', $where, $params);
+ }
+ $badrs->close();
+
+ // Main savepoint reached
+ upgrade_main_savepoint(true, 2011070102.08);
+ }
+
return true;
}
View
9 lib/moodlelib.php
@@ -8454,12 +8454,17 @@ function generate_password($maxlen=10) {
$filler1 = $fillers[rand(0, strlen($fillers) - 1)];
$password = $word1 . $filler1 . $word2;
} else {
- $maxlen = !empty($CFG->minpasswordlength) ? $CFG->minpasswordlength : 0;
+ $minlen = !empty($CFG->minpasswordlength) ? $CFG->minpasswordlength : 0;
$digits = $CFG->minpassworddigits;
$lower = $CFG->minpasswordlower;
$upper = $CFG->minpasswordupper;
$nonalphanum = $CFG->minpasswordnonalphanum;
- $additional = $maxlen - ($lower + $upper + $digits + $nonalphanum);
+ $total = $lower + $upper + $digits + $nonalphanum;
+ // minlength should be the greater one of the two ( $minlen and $total )
+ $minlen = $minlen < $total ? $total : $minlen;
+ // maxlen can never be smaller than minlen
+ $maxlen = $minlen > $maxlen ? $minlen : $maxlen;
+ $additional = $maxlen - $total;
// Make sure we have enough characters to fulfill
// complexity requirements
View
12 lib/questionlib.php
@@ -825,16 +825,8 @@ function get_question_options(&$questions, $loadtags = false) {
* @return string the HTML for the img tag.
*/
function print_question_icon($question) {
- global $OUTPUT;
-
- $qtype = question_bank::get_qtype($question->qtype, false);
- $namestr = $qtype->menu_name();
-
- // TODO convert to return a moodle_icon object, or whatever the class is.
- $html = '<img src="' . $OUTPUT->pix_url('icon', $qtype->plugin_name()) . '" alt="' .
- $namestr . '" title="' . $namestr . '" />';
-
- return $html;
+ global $PAGE;
+ return $PAGE->get_renderer('question', 'bank')->qtype_icon($question->qtype);
}
/**
View
3 mod/forum/lib.php
@@ -6225,8 +6225,9 @@ function forum_tp_mark_posts_read($user, $postids) {
if ($new) {
list($usql, $new_params) = $DB->get_in_or_equal($new);
- $params = array($user->id, $now, $now, $user->id, $cutoffdate);
+ $params = array($user->id, $now, $now, $user->id);
$params = array_merge($params, $new_params);
+ $params[] = $cutoffdate;
$sql = "INSERT INTO {forum_read} (userid, postid, discussionid, forumid, firstread, lastread)
View
8 mod/quiz/editlib.php
@@ -781,7 +781,7 @@ function quiz_print_singlequestion($question, $returnurl, $quiz) {
echo quiz_question_edit_button($quiz->cmid, $question, $returnurl,
quiz_question_tostring($question) . ' ');
echo '<span class="questiontype">';
- print_question_icon($question);
+ echo print_question_icon($question);
echo ' ' . question_bank::get_qtype_name($question->qtype) . '</span>';
echo '<span class="questionpreview">' .
quiz_question_preview_button($quiz, $question, true) . '</span>';
@@ -807,7 +807,7 @@ function quiz_print_randomquestion(&$question, &$pageurl, &$quiz, $quiz_qbanktoo
}
echo '<div class="randomquestionfromcategory">';
- print_question_icon($question);
+ echo print_question_icon($question);
print_random_option_icon($question);
echo ' ' . get_string('randomfromcategory', 'quiz') . '</div>';
@@ -886,7 +886,7 @@ function quiz_print_randomquestion(&$question, &$pageurl, &$quiz, $quiz_qbanktoo
function quiz_print_singlequestion_reordertool($question, $returnurl, $quiz) {
echo '<div class="singlequestion">';
echo '<label for="s' . $question->id . '">';
- print_question_icon($question);
+ echo print_question_icon($question);
echo ' ' . quiz_question_tostring($question);
echo '</label>';
echo '<span class="questionpreview">' .
@@ -920,7 +920,7 @@ function quiz_print_randomquestion_reordertool(&$question, &$pageurl, &$quiz) {
echo '<div class="quiz_randomquestion">';
echo '<div class="randomquestionfromcategory">';
echo $reordercheckboxlabel;
- print_question_icon($question);
+ echo print_question_icon($question);
print_random_option_icon($question);
if ($questioncount == 0) {
View
2 mod/quiz/module.js
@@ -170,7 +170,7 @@ M.mod_quiz.nav.init = function(Y) {
if (Y.one('a.endtestlink')) {
Y.on('click', function(e) {
- e.preventDefault(e);
+ e.preventDefault();
Y.one('#followingpage').set('value', -1);
Y.one('#responseform').submit();
}, 'a.endtestlink');
View
10 mod/quiz/report/attemptsreport.php
@@ -614,13 +614,21 @@ protected function add_latest_state_join($slot) {
return;
}
+ // This condition roughly filters the list of attempts to be considered.
+ // It is only used in a subselect to help crappy databases (see MDL-30122)
+ // therefore, it is better to use a very simple join, which may include
+ // too many records, than to do a super-accurate join.
+ $qubaids = new qubaid_join("{quiz_attempts} {$alias}quiza", "{$alias}quiza.uniqueid",
+ "{$alias}quiza.quiz = :{$alias}quizid", array("{$alias}quizid" => $this->sql->params['quizid']));
+
$dm = new question_engine_data_mapper();
- $inlineview = $dm->question_attempt_latest_state_view($alias);
+ list($inlineview, $viewparams) = $dm->question_attempt_latest_state_view($alias, $qubaids);
$this->sql->fields .= ",\n$fields";
$this->sql->from .= "\nLEFT JOIN $inlineview ON " .
"$alias.questionusageid = quiza.uniqueid AND $alias.slot = :{$alias}slot";
$this->sql->params[$alias . 'slot'] = $slot;
+ $this->sql->params = array_merge($this->sql->params, $viewparams);
}
/**
View
2 mod/quiz/startattempt.php
@@ -102,7 +102,7 @@
if (!$quizobj->is_preview_user() && $messages) {
$output = $PAGE->get_renderer('mod_quiz');
print_error('attempterror', 'quiz', $quizobj->view_url(),
- $output->print_messages($messages));
+ $output->access_messages($messages));
}
$accessmanager->do_password_check($quizobj->is_preview_user());
View
9 mod/quiz/styles.css
@@ -96,6 +96,13 @@ div.editq div.question div.content .singlequestion a .questiontext{text-decorati
#page-mod-quiz-mod #reviewoptionshdr fieldset.fgroup span label,
#adminquizreviewoptions span label {margin-left: 0.4em;}
+#page-mod-quiz-mod.dir-rtl #reviewoptionshdr .fitem,
+#adminquizreviewoptions .group {float: right; width: 24%;}
+#page-mod-quiz-mod.dir-rtl #reviewoptionshdr fieldset.fgroup span,
+#adminquizreviewoptions span {float: right; clear: right;}
+#page-mod-quiz-mod.dir-rtl #reviewoptionshdr .fitemtitle,
+#adminquizreviewoptions .fitemtitle {text-align: right;}
+
/** Mod quiz view **/
#page-mod-quiz-view .quizinfo,
#page-mod-quiz-view #page .quizgradefeedback,
@@ -377,4 +384,4 @@ bank window's title is prominent enough*/
.qnum label {padding-right: 0.25em;}
/** settings.php */
-#adminquizreviewoptions {margin-bottom: 0.5em;}
+#adminquizreviewoptions {margin-bottom: 0.5em;}
View
2 mod/quiz/summary.php
@@ -61,7 +61,7 @@
$output = $PAGE->get_renderer('mod_quiz');
if (!$attemptobj->is_preview_user() && $messages) {
print_error('attempterror', 'quiz', $attemptobj->view_url(),
- $output->print_messages($messages));
+ $output->access_messages($messages));
}
$accessmanager->do_password_check($attemptobj->is_preview_user());
View
4 mod/wiki/styles.css
@@ -171,6 +171,10 @@
float: right;
}
+.dir-rtl .wiki_diffuserleft {
+ float: left;
+}
+
.wiki_diffuserright {
float: left;
}
View
17 question/behaviour/behaviourbase.php
@@ -70,8 +70,7 @@
public function __construct(question_attempt $qa, $preferredbehaviour) {
$this->qa = $qa;
$this->question = $qa->get_question();
- $requiredclass = $this->required_question_definition_type();
- if (!$this->question instanceof $requiredclass) {
+ if (!$this->is_compatible_question($this->question)) {
throw new coding_exception('This behaviour (' . $this->get_name() .
') cannot work with this question (' . get_class($this->question) . ')');
}
@@ -82,13 +81,25 @@ public static function get_required_behaviours() {
}
/**
+ * Some behaviours can only work with certing types of question. This method
+ * allows the behaviour to verify that a question is compatible.
+ * @param question_definition $question the question.
+ */
+ public function is_compatible_question(question_definition $question) {
+ $requiredclass = $this->required_question_definition_type();
+ return $this->question instanceof $requiredclass;
+ }
+
+ /**
* Most behaviours can only work with {@link question_definition}s
* of a particular subtype, or that implement a particular interface.
* This method lets the behaviour document that. The type of
* question passed to the constructor is then checked against this type.
* @return string class/interface name.
*/
- public abstract function required_question_definition_type();
+ protected function required_question_definition_type() {
+ return 'question_definition';
+ }
/**
* @return string the name of this behaviour. For example the name of
View
2 question/editlib.php
@@ -1787,7 +1787,7 @@ function print_qtype_to_add_option($qtype) {
echo '<span class="qtypename">';
$fakequestion = new stdClass();
$fakequestion->qtype = $qtype->name();
- print_question_icon($fakequestion);
+ echo print_question_icon($fakequestion);
echo $qtype->menu_name() . '</span><span class="qtypesummary">' .
get_string($qtype->name() . 'summary', 'qtype_' . $qtype->name());
echo "</span></label>\n";
View
63 question/engine/datalib.php
@@ -865,33 +865,42 @@ public function sum_usage_marks_subquery($qubaid) {
END) = 0";
}
- public function question_attempt_latest_state_view($alias) {
- return "(
- SELECT
- {$alias}qa.id AS questionattemptid,
- {$alias}qa.questionusageid,
- {$alias}qa.slot,
- {$alias}qa.behaviour,
- {$alias}qa.questionid,
- {$alias}qa.variant,
- {$alias}qa.maxmark,
- {$alias}qa.minfraction,
- {$alias}qa.flagged,
- {$alias}qa.questionsummary,
- {$alias}qa.rightanswer,
- {$alias}qa.responsesummary,
- {$alias}qa.timemodified,
- {$alias}qas.id AS attemptstepid,
- {$alias}qas.sequencenumber,
- {$alias}qas.state,
- {$alias}qas.fraction,
- {$alias}qas.timecreated,
- {$alias}qas.userid
-
- FROM {question_attempts} {$alias}qa
- JOIN {question_attempt_steps} {$alias}qas ON
- {$alias}qas.id = {$this->latest_step_for_qa_subquery($alias . 'qa.id')}
- ) $alias";
+ /**
+ * Get a subquery that returns the latest step of every qa in some qubas.
+ * Currently, this is only used by the quiz reports. See
+ * {@link quiz_attempt_report_table::add_latest_state_join()}.
+ * @param string $alias alias to use for this inline-view.
+ * @param qubaid_condition $qubaids restriction on which question_usages we
+ * are interested in. This is important for performance.
+ * @return array with two elements, the SQL fragment and any params requried.
+ */
+ public function question_attempt_latest_state_view($alias, qubaid_condition $qubaids) {
+ return array("(
+ SELECT {$alias}qa.id AS questionattemptid,
+ {$alias}qa.questionusageid,
+ {$alias}qa.slot,
+ {$alias}qa.behaviour,
+ {$alias}qa.questionid,
+ {$alias}qa.variant,
+ {$alias}qa.maxmark,
+ {$alias}qa.minfraction,
+ {$alias}qa.flagged,
+ {$alias}qa.questionsummary,
+ {$alias}qa.rightanswer,
+ {$alias}qa.responsesummary,
+ {$alias}qa.timemodified,
+ {$alias}qas.id AS attemptstepid,
+ {$alias}qas.sequencenumber,
+ {$alias}qas.state,
+ {$alias}qas.fraction,
+ {$alias}qas.timecreated,
+ {$alias}qas.userid
+
+ FROM {$qubaids->from_question_attempts($alias . 'qa')}
+ JOIN {question_attempt_steps} {$alias}qas ON
+ {$alias}qas.id = {$this->latest_step_for_qa_subquery($alias . 'qa.id')}
+ WHERE {$qubaids->where()}
+ ) $alias", $qubaids->from_where_params());
}
protected function latest_step_for_qa_subquery($questionattemptid = 'qa.id') {
View
49 question/renderer.php
@@ -0,0 +1,49 @@
+<?php
+// This file is part of Moodle - http://moodle.org/
+//
+// Moodle is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// Moodle is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
+
+/**
+ * Renderers for outputting parts of the question bank.
+ *
+ * @package moodlecore
+ * @subpackage questionbank
+ * @copyright 2011 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
+
+
+defined('MOODLE_INTERNAL') || die();
+
+
+/**
+ * This renderer outputs parts of the question bank.
+ *
+ * @copyright 2011 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
+class core_question_bank_renderer extends plugin_renderer_base {
+
+ /**
+ * Output the icon for a question type
+ * @param string $qtype the question type.
+ * @return string HTML fragment.
+ */
+ public function qtype_icon($qtype) {
+ $qtype = question_bank::get_qtype($qtype, false);
+ $namestr = $qtype->local_name();
+
+ return $this->pix_icon('icon', $namestr, $qtype->plugin_name(), array('title' => $namestr));
+ }
+}
View
6 question/type/edit_question_form.php
@@ -344,7 +344,7 @@ protected function add_combined_feedback_fields($withshownumpartscorrect = false
$mform->setType($feedbackname, PARAM_RAW);
if ($withshownumpartscorrect && $feedbackname == 'partiallycorrectfeedback') {
- $mform->addElement('checkbox', 'shownumcorrect',
+ $mform->addElement('advcheckbox', 'shownumcorrect',
get_string('options', 'question'),
get_string('shownumpartscorrect', 'question'));
}
@@ -361,11 +361,11 @@ protected function get_hint_fields($withclearwrong = false, $withshownumpartscor
$repeatedoptions['hint']['type'] = PARAM_RAW;
if ($withclearwrong) {
- $repeated[] = $mform->createElement('checkbox', 'hintclearwrong',
+ $repeated[] = $mform->createElement('advcheckbox', 'hintclearwrong',
get_string('options', 'question'), get_string('clearwrongparts', 'question'));
}
if ($withshownumpartscorrect) {
- $repeated[] = $mform->createElement('checkbox', 'hintshownumcorrect', '',
+ $repeated[] = $mform->createElement('advcheckbox', 'hintshownumcorrect', '',
get_string('shownumpartscorrect', 'question'));
}
View
2 question/type/numerical/edit_numerical_form.php
@@ -264,7 +264,7 @@ protected function validate_answers($data, $errors) {
if ($data['fraction'][$key] == 1) {
$maxgrade = true;
}
- if (!is_numeric($data['tolerance'][$key])) {
+ if ($answer !== '*' && !is_numeric($data['tolerance'][$key])) {
$errors['tolerance['.$key.']'] =
get_string('mustbenumeric', 'qtype_calculated');
}
View
7 question/type/numerical/questiontype.php
@@ -641,16 +641,17 @@ public function apply_units($response, $separateunit = null) {
$numberstring = $matches[0];
if ($this->unitsbefore) {
- $unit = substr($response, 0, -strlen($numberstring));
+ // substr returns false when it means '', so cast back to string.
+ $unit = (string) substr($response, 0, -strlen($numberstring));
} else {
- $unit = substr($response, strlen($numberstring));
+ $unit = (string) substr($response, strlen($numberstring));
}
if (!is_null($separateunit)) {
$unit = $separateunit;
}
- if ($unit && $this->is_known_unit($unit)) {
+ if ($this->is_known_unit($unit)) {
$multiplier = 1 / $this->units[$unit];
} else {
$multiplier = null;
View
106 theme/anomaly/style/general.css
@@ -739,71 +739,79 @@ html, body {
}
/** Custom menu **/
-<<<<<<< HEAD
-/*YUI Reset */
+
+#custommenu {
+ clear: both;
+ padding-left: 4px;
+ margin-bottom: 0;
+ padding-bottom: 2px;
+}
+
+/** YUI Reset **/
+
.yui3-skin-sam #page .yui3-menu-horizontal .yui3-menu-content,
.yui3-skin-sam #page .yui3-menu-horizontal .yui3-menu-label,
.yui3-skin-sam #page .yui3-menu-horizontal .yui3-menu-label-active,
.yui3-skin-sam #page .yui3-menu-horizontal .yui3-menuitem-active .yui3-menuitem-content,
-.yui3-skin-sam #page .yui3-menu-horizontal .yui3-menu-label-menuvisible {background-position: -10000px -10000px;}
+.yui3-skin-sam #page .yui3-menu-horizontal .yui3-menu-label-menuvisible {
+ background-position: -10000px -10000px;
+}
+
.yui3-skin-sam #page .yui3-menu-label,
.yui3-skin-sam #page .yui3-menu .yui3-menu .yui3-menu-label,
-.yui3-skin-sam #page .yui3-menubuttonnav .yui3-menu-label em { background-position: right center; }
-.yui3-skin-sam #page .yui3-splitbuttonnav .yui3-menu-label .yui3-menu-toggle {background-position: 3px center;}
-.yui3-skin-sam #page .yui3-splitbuttonnav .yui3-menu-label-menuvisible .yui3-menu-toggle {background-position: 0% 50%;}
-#custommenu {clear: both;padding-left: 4px;margin-bottom: 0px;padding-bottom: 2px;}
-.yui3-skin-sam #page .yui3-menu-label,
-.yui3-skin-sam #page .yui3-menuitem-content {color: #fff;font-weight: 800;line-height: 30px;}
-.yui3-skin-sam #page .custom_menu_submenu .yui3-menu-label,
-.yui3-skin-sam #page .custom_menu_submenu .yui3-menuitem-content {color: #000 !important;text-shadow: none !important;line-height: 25px;}
-.yui3-skin-sam #page .yui3-menu-label.yui3-menu-label-active,
-.yui3-skin-sam #page .yui3-menuitem-active .yui3-menuitem-content {color: #000;background-color: #697F55;}
-.yui3-skin-sam #page .yui3-menu-content,
-.yui3-skin-sam #page .yui3-menu .yui3-menu .yui3-menu-content,
-.yui3-skin-sam #page .yui3-menu-horizontal .yui3-menu-label,
-.yui3-skin-sam #page .yui3-menu-horizontal .yui3-menuitem-content {border: none !important;}
-.yui3-skin-sam .yui3-menu-horizontal .yui3-menu-label,
-.yui3-skin-sam .yui3-menu-horizontal .yui3-menuitem-content {border-color:#808080;border-style:solid;border-width:0px 0;}
-
-#page .custom_menu_submenu {border: 1px solid #697F55 !important;-webkit-border-bottom-right-radius: 5px;-webkit-border-bottom-left-radius: 5px;-moz-border-radius-bottomright: 5px;-moz-border-radius-bottomleft: 5px;border-bottom-right-radius: 5px;border-bottom-left-radius: 5px;}
-=======
-
-#custommenu {
- margin-bottom: 0;
+.yui3-skin-sam #page .yui3-menubuttonnav .yui3-menu-label em {
+ background-position: right center;
}
-#custommenu .yui3-menu-horizontal .yui3-menu-content,
-#custommenu .yui3-menu-horizontal.javascript-disabled .yui3-menu-content,
-#custommenu .yui3-menu-horizontal .yui3-menu-content ul,
-#custommenu .yui3-menu-horizontal.javascript-disabled .yui3-menu-content ul,
-#custommenu .yui3-menu-horizontal.javascript-disabled .yui3-menu-content li li:hover > a,
-#custommenu .yui3-menu-horizontal .yui3-menu-label,
-#custommenu .yui3-menuitem,
-#custommenu .yui3-menuitem .yui3-menuitem-content {
- border-width: 0;
+.yui3-skin-sam #page .yui3-splitbuttonnav .yui3-menu-label .yui3-menu-toggle {
+ background-position: 3px center;
}
-#custommenu .yui3-menu .yui3-menu-label,
-#custommenu .yui3-menu .yui3-menuitem-content {
- color: #FFF;
- font-weight: bold;
- line-height: 30px;
- padding: 0 14px;
+.yui3-skin-sam #page .yui3-splitbuttonnav .yui3-menu-label-menuvisible .yui3-menu-toggle {
+ background-position: 0% 50%;
}
-#custommenu .custom_menu_submenu .yui3-menu-content{
- background-color: #3A4D28;
+.yui3-skin-sam #page .yui3-menu-label,
+.yui3-skin-sam #page .yui3-menuitem-content {
+ color: #fff;
+ font-weight: 800;
+ line-height: 30px;
}
-#custommenu .custom_menu_submenu .yui3-menu-label,
-#custommenu .custom_menu_submenu .yui3-menuitem-content {
+.yui3-skin-sam #page .custom_menu_submenu .yui3-menu-label,
+.yui3-skin-sam #page .custom_menu_submenu .yui3-menuitem-content {
+ color: #000 !important;
+ text-shadow: none !important;
line-height: 25px;
- padding: 0 20px;
}
-#custommenu .yui3-menu-label-active,
-#custommenu .yui3-menu-label-menuvisible,
-#custommenu .yui3-menu .yui3-menu .yui3-menuitem-active .yui3-menuitem-content {
+.yui3-skin-sam #page .yui3-menu-label.yui3-menu-label-active,
+.yui3-skin-sam #page .yui3-menuitem-active .yui3-menuitem-content {
+ color: #000;
background-color: #697F55;
}
->>>>>>> 0a52611... wip-MDL-22351 convert Anomaly CSS to readable format
+
+.yui3-skin-sam #page .yui3-menu-content,
+.yui3-skin-sam #page .yui3-menu .yui3-menu .yui3-menu-content,
+.yui3-skin-sam #page .yui3-menu-horizontal .yui3-menu-label,
+.yui3-skin-sam #page .yui3-menu-horizontal .yui3-menuitem-content {
+ border: none !important;
+}
+
+.yui3-skin-sam .yui3-menu-horizontal .yui3-menu-label,
+.yui3-skin-sam .yui3-menu-horizontal .yui3-menuitem-content {
+ border-color: #808080;
+ border-style: solid;
+ border-width: 0px 0;
+}
+
+#page .custom_menu_submenu {
+ border: 1px solid #697F55 !important;
+ -webkit-border-bottom-right-radius: 5px;
+ -webkit-border-bottom-left-radius: 5px;
+ -moz-border-radius-bottomright: 5px;
+ -moz-border-radius-bottomleft: 5px;
+ border-bottom-right-radius: 5px;
+ border-bottom-left-radius: 5px;
+}
+
View
71 theme/base/style/core.css
@@ -218,6 +218,8 @@ a.skip:active {position: static;display: block;}
.mform .ftags label.accesshide {display: block;position: static;}
.mform .ftags select {margin-bottom: 0.7em;min-width: 22em;}
+input#id_externalurl {direction:ltr;}
+
/** Browser corrections for mforms **/
.ie .mform .fitem .felement {margin-left:0;text-align:left;float:left;}
/** Fix IE double margin + float bugs **/
@@ -717,6 +719,23 @@ body.tag .managelink {padding: 5px;}
.mod-indent-15,
.mod-indent-huge {margin-left:300px;}
+.dir-rtl .mod-indent-1 {margin-right:20px;margin-left:0;}
+.dir-rtl .mod-indent-2 {margin-right:40px;margin-left:0;}
+.dir-rtl .mod-indent-3 {margin-right:60px;margin-left:0;}
+.dir-rtl .mod-indent-4 {margin-right:80px;margin-left:0;}
+.dir-rtl .mod-indent-5 {margin-right:100px;margin-left:0;}
+.dir-rtl .mod-indent-6 {margin-right:120px;margin-left:0;}
+.dir-rtl .mod-indent-7 {margin-right:140px;margin-left:0;}
+.dir-rtl .mod-indent-8 {margin-right:160px;margin-left:0;}
+.dir-rtl .mod-indent-9 {margin-right:180px;margin-left:0;}
+.dir-rtl .mod-indent-10 {margin-right:200px;margin-left:0;}
+.dir-rtl .mod-indent-11 {margin-right:220px;margin-left:0;}
+.dir-rtl .mod-indent-12 {margin-right:240px;margin-left:0;}
+.dir-rtl .mod-indent-13 {margin-right:260px;margin-left:0;}
+.dir-rtl .mod-indent-14 {margin-right:280px;margin-left:0;}
+.dir-rtl .mod-indent-15,
+.dir-rtl .mod-indent-huge {margin-right:300px;margin-left:0;}
+
.dir-rtl .felement.feditor select {margin-right:18.75%;}
/* Resourcelib mp3 player size: only width could be changed here, height hardcoded in JS */
@@ -800,4 +819,54 @@ ul li,
.course-content ul.topics .content .summary ul li {list-style: disc outside none;}
ol li,
.course-content ul.weeks .content .summary ol li,
-.course-content ul.topics .content .summary ol li {list-style: decimal outside none;}
+.course-content ul.topics .content .summary ol li {list-style: decimal outside none;}
+
+.dir-rtl #adminsettings #id_s__pathtodu,
+.dir-rtl #adminsettings #id_s__aspellpath,
+.dir-rtl #adminsettings #id_s__pathtodot,
+.dir-rtl #adminsettings #id_s__supportemail,
+.dir-rtl #adminsettings #id_s__supportpage,
+.dir-rtl #adminsettings #id_s__sessioncookie,
+.dir-rtl #adminsettings #id_s__sessioncookiepath,
+.dir-rtl #adminsettings #id_s__sessioncookiedomain,
+.dir-rtl #adminsettings #id_s__proxyhost,
+.dir-rtl #adminsettings #id_s__proxyuser,
+.dir-rtl #adminsettings #id_s__proxypassword,
+.dir-rtl #adminsettings #id_s__proxybypass,
+.dir-rtl #adminsettings #id_s__jabberhost,
+.dir-rtl #adminsettings #id_s__jabberserver,
+.dir-rtl #adminsettings #id_s__jabberusername,
+.dir-rtl #adminsettings #id_s__jabberpassword,
+.dir-rtl #adminsettings #id_s__additionalhtmlhead,
+.dir-rtl #adminsettings #id_s__additionalhtmltopofbody,
+.dir-rtl #adminsettings #id_s__additionalhtmlfooter,
+.dir-rtl #adminsettings #id_s__docroot,
+.dir-rtl #adminsettings #id_s__filter_tex_latexpreamble,
+.dir-rtl #adminsettings #id_s__filter_tex_latexbackground,
+.dir-rtl #adminsettings #id_s__filter_tex_pathlatex,
+.dir-rtl #adminsettings #id_s__filter_tex_pathdvips,
+.dir-rtl #adminsettings #id_s__filter_tex_pathconvert,
+.dir-rtl #adminsettings #id_s__blockedip,
+.dir-rtl #adminsettings #id_s__pathtoclam,
+.dir-rtl #adminsettings #id_s__quarantinedir,
+.dir-rtl #adminsettings #id_s__sitepolicy,
+.dir-rtl #adminsettings #id_s__sitepolicyguest,
+.dir-rtl #adminsettings #id_s__cronremotepassword,
+.dir-rtl #adminsettings #id_s__allowedip,
+.dir-rtl #adminsettings #id_s__blockedip,
+.dir-rtl #adminsettings #id_s_enrol_meta_nosyncroleids,
+.dir-rtl #adminsettings #id_s_enrol_ldap_host_url,
+.dir-rtl #adminsettings #id_s_enrol_ldap_ldapencoding,
+.dir-rtl #adminsettings #id_s_enrol_ldap_bind_dn,
+.dir-rtl #adminsettings #id_s_enrol_ldap_bind_pw,
+.dir-rtl #adminsettings #admin-emoticons .form-text,
+.dir-rtl #adminsettings #admin-role_mapping input[type=text],
+.dir-rtl #adminsettings #id_s_enrol_paypal_paypalbusiness,
+.dir-rtl #adminsettings #id_s_enrol_flatfile_location,
+#page-admin-setting-enrolsettingsflatfile.dir-rtl input[type=text],
+#page-admin-setting-enrolsettingsdatabase.dir-rtl input[type=text],
+#page-admin-auth-db.dir-rtl input[type=text] {direction: ltr;}
+
+#page-admin-setting-enrolsettingsflatfile.dir-rtl .informationbox {direction: ltr;text-align: left;}
+
+#page-admin-grade-edit-scale-edit.dir-rtl .error input#id_name {margin-right: 170px;}
View
2 theme/base/style/course.css
@@ -27,7 +27,7 @@
.path-course-view li.activity form.togglecompletion .ajaxworking {position:absolute;top:0; left:20px;width: 20px; height: 20px;background: url([[pix:i/ajaxloader]]) no-repeat;}
.dir-rtl.path-course-view li.activity {margin-right:0px;margin-left:20px;}
.dir-rtl.path-course-view li.activity form.togglecompletion,
-.dir-rtl.path-course-view li.activity span.autocompletion {right:auto;left:-20px;}
+.dir-rtl.path-course-view li.activity span.autocompletion {right:auto;right:-20px;}
.section img.movetarget {height:16px;width:80px;}
View
2 theme/standard/style/core.css
@@ -277,6 +277,8 @@ h2.tag-heading {text-align:center;margin-left:auto;margin-right:auto;width:95%;}
#tags-management-links,
.tag .managelink {text-align:right;}
table#tag-management-list {margin: 10px auto;width: 80%;}
+#page-tag-index.dir-rtl .relatedpages {text-align:center;}
+#page-tag-index.dir-rtl .user-box {float:right;}
/**
* Overriding base
View
5 version.php
@@ -30,11 +30,10 @@
defined('MOODLE_INTERNAL') || die();
-
-$version = 2011070102.07; // 20110701 = branching date YYYYMMDD - do not modify!
+$version = 2011070102.09; // 20110701 = branching date YYYYMMDD - do not modify!
// RR = release increments - 00 in DEV branches
// .XX = incremental changes
-$release = '2.1.2+ (Build: 20111115)'; // Human-friendly version name
+$release = '2.1.2+ (Build: 20111118)'; // Human-friendly version name
$maturity = MATURITY_STABLE; // this version's maturity level
View
13 webservice/renderer.php
@@ -46,15 +46,24 @@ public function admin_authorised_user_selector(&$options) {
$table->cellspacing = 0;
$table->cellpadding = 0;
+ // LTR/RTL support, for drawing button arrows in the right direction
+ if (right_to_left()) {
+ $addarrow = '';
+ $removearrow = '';
+ } else {
+ $addarrow = '';
+ $removearrow = '';
+ }
+
//create the add and remove button
$addinput = html_writer::empty_tag('input',
array('name' => 'add', 'id' => 'add', 'type' => 'submit',
- 'value' => '' . ' ' . get_string('add'),
+ 'value' => $addarrow . ' ' . get_string('add'),
'title' => get_string('add')));
$addbutton = html_writer::tag('div', $addinput, array('id' => 'addcontrols'));
$removeinput = html_writer::empty_tag('input',
array('name' => 'remove', 'id' => 'remove', 'type' => 'submit',
- 'value' => '' . ' ' . get_string('remove'),
+ 'value' => $removearrow . ' ' . get_string('remove'),
'title' => get_string('remove')));
$removebutton = html_writer::tag('div', $removeinput, array('id' => 'removecontrols'));

0 comments on commit 81b24b1

Please sign in to comment.