diff --git a/backup/moodle2/restore_plugin.class.php b/backup/moodle2/restore_plugin.class.php index 02039876352..5ed177ea5f5 100644 --- a/backup/moodle2/restore_plugin.class.php +++ b/backup/moodle2/restore_plugin.class.php @@ -80,6 +80,23 @@ abstract class restore_plugin { } } + /** + * after_restore dispatcher for any restore_plugin class + * + * This method will dispatch execution to the corresponding + * after_restore_xxx() method when available, with xxx + * being the connection point of the instance, so plugin + * classes with multiple connection points will support + * multiple after_restore methods, one for each connection point + */ + public function launch_after_restore_methods() { + // Check if the after_restore method exists and launch it + $afterrestore = 'after_restore_' . basename($this->connectionpoint->get_path()); + if (method_exists($this, $afterrestore)) { + $this->$afterrestore(); + } + } + /** * Returns one array with all the decode contents * to be processed by the links decoder diff --git a/backup/util/plan/restore_structure_step.class.php b/backup/util/plan/restore_structure_step.class.php index ae648bc4911..ddb2fe54729 100644 --- a/backup/util/plan/restore_structure_step.class.php +++ b/backup/util/plan/restore_structure_step.class.php @@ -360,6 +360,43 @@ abstract class restore_structure_step extends restore_step { } + /** + * Launch all the after_restore methods present in all the processing objects + * + * This method will launch all the after_restore methods that can be defined + * both in restore_plugin class + * + * For restore_plugin classes the name of the method to be executed will be + * "after_restore_" + connection point (as far as can be multiple connection + * points in the same class) + */ + public function launch_after_restore_methods() { + $alreadylaunched = array(); // To avoid multiple executions + foreach ($this->pathelements as $pathelement) { + // Get the processing object + $pobject = $pathelement->get_processing_object(); + // Skip null processors (child of grouped ones for sure) + if (is_null($pobject)) { + continue; + } + // Skip restore structure step processors (this) + if ($pobject instanceof restore_structure_step) { + continue; + } + // Skip already launched processing objects + if (in_array($pobject, $alreadylaunched, true)) { + continue; + } + // Add processing object to array of launched ones + $alreadylaunched[] = $pobject; + // If the processing object has support for + // launching after_restore methods, use it + if (method_exists($pobject, 'launch_after_restore_methods')) { + $pobject->launch_after_restore_methods(); + } + } + } + /** * This method will be executed after the whole structure step have been processed * diff --git a/backup/util/plan/restore_task.class.php b/backup/util/plan/restore_task.class.php index cdd525d09a4..5b22b4bd3d5 100644 --- a/backup/util/plan/restore_task.class.php +++ b/backup/util/plan/restore_task.class.php @@ -100,6 +100,13 @@ abstract class restore_task extends base_task { * method if available */ public function execute_after_restore() { + if ($this->executed) { + foreach ($this->steps as $step) { + if (method_exists($step, 'launch_after_restore_methods')) { + $step->launch_after_restore_methods(); + } + } + } if ($this->executed && method_exists($this, 'after_restore')) { $this->after_restore(); } diff --git a/course/moodleform_mod.php b/course/moodleform_mod.php index 04821682c7a..e4eb740ac44 100644 --- a/course/moodleform_mod.php +++ b/course/moodleform_mod.php @@ -428,7 +428,7 @@ abstract class moodleform_mod extends moodleform { if (!empty($CFG->enableavailability)) { // Conditional availability - $mform->addElement('header', '', get_string('availabilityconditions', 'condition')); + $mform->addElement('header', 'availabilityconditionsheader', get_string('availabilityconditions', 'condition')); $mform->addElement('date_selector', 'availablefrom', get_string('availablefrom', 'condition'), array('optional'=>true)); $mform->addHelpButton('availablefrom', 'availablefrom', 'condition'); $mform->addElement('date_selector', 'availableuntil', get_string('availableuntil', 'condition'), array('optional'=>true)); @@ -522,7 +522,7 @@ abstract class moodleform_mod extends moodleform { $completion = new completion_info($COURSE); } if ($completion->is_enabled()) { - $mform->addElement('header', '', get_string('activitycompletion', 'completion')); + $mform->addElement('header', 'activitycompletionheader', get_string('activitycompletion', 'completion')); // Unlock button for if people have completed it (will // be removed in definition_after_data if they haven't) diff --git a/lib/enrollib.php b/lib/enrollib.php index 4a6715ef23d..1484e4be85f 100644 --- a/lib/enrollib.php +++ b/lib/enrollib.php @@ -1062,7 +1062,7 @@ abstract class enrol_plugin { if (!is_null($status)) { $ue->status = $status; } - $ue->modifier = $USER->id; + $ue->modifierid = $USER->id; $ue->timemodified = time(); $DB->update_record('user_enrolments', $ue); } @@ -1073,7 +1073,7 @@ abstract class enrol_plugin { $ue->userid = $userid; $ue->timestart = $timestart; $ue->timeend = $timeend; - $ue->modifier = $USER->id; + $ue->modifierid = $USER->id; $ue->timecreated = time(); $ue->timemodified = $ue->timecreated; $ue->id = $DB->insert_record('user_enrolments', $ue); diff --git a/lib/modinfolib.php b/lib/modinfolib.php index f9994fee7ef..c2fc0d025b3 100644 --- a/lib/modinfolib.php +++ b/lib/modinfolib.php @@ -1074,6 +1074,8 @@ function get_fast_modinfo(&$course, $userid=0) { if (count($cache) > MAX_MODINFO_CACHE_SIZE) { reset($cache); $key = key($cache); + unset($cache[$key]->instances); + unset($cache[$key]->cms); unset($cache[$key]); } diff --git a/lib/navigationlib.php b/lib/navigationlib.php index 1e4be902921..4fcfd8c09d9 100644 --- a/lib/navigationlib.php +++ b/lib/navigationlib.php @@ -237,8 +237,8 @@ class navigation_node implements renderable { } /** - * Adds a navigation node as a child of this node. - * + * Creates a navigation node, ready to add it as a child using add_node + * function. (The created node needs to be added before you can use it.) * @param string $text * @param moodle_url|action_link $action * @param int $type @@ -247,11 +247,8 @@ class navigation_node implements renderable { * @param pix_icon $icon * @return navigation_node */ - public function add($text, $action=null, $type=self::TYPE_CUSTOM, $shorttext=null, $key=null, pix_icon $icon=null) { - // First convert the nodetype for this node to a branch as it will now have children - if ($this->nodetype !== self::NODETYPE_BRANCH) { - $this->nodetype = self::NODETYPE_BRANCH; - } + public static function create($text, $action=null, $type=self::TYPE_CUSTOM, + $shorttext=null, $key=null, pix_icon $icon=null) { // Properties array used when creating the new navigation node $itemarray = array( 'text' => $text, @@ -269,18 +266,58 @@ class navigation_node implements renderable { if ($icon!==null) { $itemarray['icon'] = $icon; } - // Default the key to the number of children if not provided - if ($key === null) { - $key = $this->children->count(); - } // Set the key $itemarray['key'] = $key; + // Construct and return + return new navigation_node($itemarray); + } + + /** + * Adds a navigation node as a child of this node. + * + * @param string $text + * @param moodle_url|action_link $action + * @param int $type + * @param string $shorttext + * @param string|int $key + * @param pix_icon $icon + * @return navigation_node + */ + public function add($text, $action=null, $type=self::TYPE_CUSTOM, $shorttext=null, $key=null, pix_icon $icon=null) { + // Create child node + $childnode = self::create($text, $action, $type, $shorttext, $key, $icon); + + // Add the child to end and return + return $this->add_node($childnode); + } + + /** + * Adds a navigation node as a child of this one, given a $node object + * created using the create function. + * @param navigation_node $childnode Node to add + * @param int|string $key The key of a node to add this before. If not + * specified, adds at end of list + * @return navigation_node The added node + */ + public function add_node(navigation_node $childnode, $beforekey=null) { + // First convert the nodetype for this node to a branch as it will now have children + if ($this->nodetype !== self::NODETYPE_BRANCH) { + $this->nodetype = self::NODETYPE_BRANCH; + } // Set the parent to this node - $itemarray['parent'] = $this; + $childnode->parent = $this; + + // Default the key to the number of children if not provided + if ($childnode->key === null) { + $childnode->key = $this->children->count(); + } + // Add the child using the navigation_node_collections add method - $node = $this->children->add(new navigation_node($itemarray)); - // If the node is a category node or the user is logged in and its a course - // then mark this node as a branch (makes it expandable by AJAX) + $node = $this->children->add($childnode, $beforekey); + + // If added node is a category node or the user is logged in and it's a course + // then mark added node as a branch (makes it expandable by AJAX) + $type = $childnode->type; if (($type==self::TYPE_CATEGORY) || (isloggedin() && $type==self::TYPE_COURSE)) { $node->nodetype = self::NODETYPE_BRANCH; } @@ -288,7 +325,7 @@ class navigation_node implements renderable { if ($this->hidden) { $node->hidden = true; } - // Return the node (reference returned by $this->children->add() + // Return added node (reference returned by $this->children->add() return $node; } @@ -647,13 +684,16 @@ class navigation_node_collection implements IteratorAggregate { /** * Adds a navigation node to the collection * - * @param navigation_node $node - * @return navigation_node + * @param navigation_node $node Node to add + * @param string $beforekey If specified, adds before a node with this key, + * otherwise adds at end + * @return navigation_node Added node */ - public function add(navigation_node $node) { + public function add(navigation_node $node, $beforekey=null) { global $CFG; $key = $node->key; $type = $node->type; + // First check we have a 2nd dimension for this type if (!array_key_exists($type, $this->orderedcollection)) { $this->orderedcollection[$type] = array(); @@ -662,15 +702,50 @@ class navigation_node_collection implements IteratorAggregate { if ($CFG->debug && array_key_exists($key, $this->orderedcollection[$type])) { debugging('Navigation node intersect: Adding a node that already exists '.$key, DEBUG_DEVELOPER); } - // Add the node to the appropriate place in the ordered structure. + + // Find the key to add before + $newindex = $this->count; + $last = true; + if ($beforekey !== null) { + foreach ($this->collection as $index => $othernode) { + if ($othernode->key === $beforekey) { + $newindex = $index; + $last = false; + break; + } + } + if ($newindex === $this->count) { + $allkeys = ''; + foreach ($this->collection as $othernode) { + $allkeys .= ' ' . $othernode->key; + } + debugging('Navigation node add_before: Reference node not found ' . $beforekey . + ', options: ' . $allkeys, DEBUG_DEVELOPER); + } + } + + // Add the node to the appropriate place in the by-type structure (which + // is not ordered, despite the variable name) $this->orderedcollection[$type][$key] = $node; + if (!$last) { + // Update existing references in the ordered collection (which is the + // one that isn't called 'ordered') to shuffle them along if required + for ($oldindex = $this->count; $oldindex > $newindex; $oldindex--) { + $this->collection[$oldindex] = $this->collection[$oldindex - 1]; + } + } // Add a reference to the node to the progressive collection. - $this->collection[$this->count] = &$this->orderedcollection[$type][$key]; + $this->collection[$newindex] = &$this->orderedcollection[$type][$key]; // Update the last property to a reference to this new node. $this->last = &$this->orderedcollection[$type][$key]; + + // Reorder the array by index if needed + if (!$last) { + ksort($this->collection); + } $this->count++; // Return the reference to the now added node - return $this->last; + return $node; } /** @@ -1700,9 +1775,16 @@ class global_navigation extends navigation_node { } // Add a reports tab and then add reports the the user has permission to see. - $anyreport = has_capability('moodle/user:viewuseractivitiesreport', $usercontext); + $anyreport = has_capability('moodle/user:viewuseractivitiesreport', $usercontext); - $viewreports = ($anyreport || ($course->showreports && $iscurrentuser && $forceforcontext)); + $outlinetreport = ($anyreport || has_capability('coursereport/outline:view', $coursecontext)); + $logtodayreport = ($anyreport || has_capability('coursereport/log:viewtoday', $coursecontext)); + $logreport = ($anyreport || has_capability('coursereport/log:view', $coursecontext)); + $statsreport = ($anyreport || has_capability('coursereport/stats:view', $coursecontext)); + + $somereport = $outlinetreport || $logtodayreport || $logreport || $statsreport; + + $viewreports = ($anyreport || $somereport || ($course->showreports && $iscurrentuser && $forceforcontext)); if ($viewreports) { $reporttab = $usernode->add(get_string('activityreports')); $reportargs = array('user'=>$user->id); @@ -1711,21 +1793,21 @@ class global_navigation extends navigation_node { } else { $reportargs['id'] = SITEID; } - if ($viewreports || has_capability('coursereport/outline:view', $coursecontext)) { + if ($viewreports || $outlinetreport) { $reporttab->add(get_string('outlinereport'), new moodle_url('/course/user.php', array_merge($reportargs, array('mode'=>'outline')))); $reporttab->add(get_string('completereport'), new moodle_url('/course/user.php', array_merge($reportargs, array('mode'=>'complete')))); } - if ($viewreports || has_capability('coursereport/log:viewtoday', $coursecontext)) { + if ($viewreports || $logtodayreport) { $reporttab->add(get_string('todaylogs'), new moodle_url('/course/user.php', array_merge($reportargs, array('mode'=>'todaylogs')))); } - if ($viewreports || has_capability('coursereport/log:view', $coursecontext)) { + if ($viewreports || $logreport ) { $reporttab->add(get_string('alllogs'), new moodle_url('/course/user.php', array_merge($reportargs, array('mode'=>'alllogs')))); } if (!empty($CFG->enablestats)) { - if ($viewreports || has_capability('coursereport/stats:view', $coursecontext)) { + if ($viewreports || $statsreport) { $reporttab->add(get_string('stats'), new moodle_url('/course/user.php', array_merge($reportargs, array('mode'=>'stats')))); } } diff --git a/lib/pluginlib.php b/lib/pluginlib.php index 17e829849f2..ccfe57a8858 100644 --- a/lib/pluginlib.php +++ b/lib/pluginlib.php @@ -347,10 +347,11 @@ class plugin_manager { ), 'theme' => array( - 'anomaly', 'arialist', 'base', 'binarius', 'boxxie', 'brick', - 'canvas', 'formal_white', 'formfactor', 'fusion', - 'leatherbound', 'magazine', 'nimble', 'nonzero', 'overlay', - 'serenity', 'sky_high', 'splash', 'standard', 'standardold' + 'afterburner', 'anomaly', 'arialist', 'base', 'binarius', + 'boxxie', 'brick', 'canvas', 'formal_white', 'formfactor', + 'fusion', 'leatherbound', 'magazine', 'nimble', 'nonzero', + 'overlay', 'serenity', 'sky_high', 'splash', 'standard', + 'standardold' ), 'webservice' => array( diff --git a/lib/simpletest/testnavigationlib.php b/lib/simpletest/testnavigationlib.php index 808ca53e6da..b75d5ccff9d 100644 --- a/lib/simpletest/testnavigationlib.php +++ b/lib/simpletest/testnavigationlib.php @@ -98,6 +98,28 @@ class navigation_node_test extends UnitTestCase { $this->assertReference($node3, $this->node->get($node3->key, $node3->type)); } + public function test_add_before() { + global $CFG; + // Create 3 nodes + $node1 = navigation_node::create('test_add_1', null, navigation_node::TYPE_CUSTOM, + 'test 1', 'testadd1'); + $node2 = navigation_node::create('test_add_2', null, navigation_node::TYPE_CUSTOM, + 'test 2', 'testadd2'); + $node3 = navigation_node::create('test_add_3', null, navigation_node::TYPE_CUSTOM, + 'test 3', 'testadd3'); + // Add node 2, then node 1 before 2, then node 3 at end + $this->node->add_node($node2); + $this->node->add_node($node1, 'testadd2'); + $this->node->add_node($node3); + // Check the last 3 nodes are in 1, 2, 3 order and have those indexes + foreach($this->node->children as $child) { + $keys[] = $child->key; + } + $this->assertEqual('testadd1', $keys[count($keys)-3]); + $this->assertEqual('testadd2', $keys[count($keys)-2]); + $this->assertEqual('testadd3', $keys[count($keys)-1]); + } + public function test_add_class() { $node = $this->node->get('demo1'); $this->assertIsA($node, 'navigation_node'); diff --git a/lib/statslib.php b/lib/statslib.php index e57e89a07fc..a65b7714373 100644 --- a/lib/statslib.php +++ b/lib/statslib.php @@ -1333,7 +1333,7 @@ function stats_get_report_options($courseid,$mode) { case STATS_MODE_GENERAL: $reportoptions[STATS_REPORT_ACTIVITY] = get_string('statsreport'.STATS_REPORT_ACTIVITY); if ($courseid != SITEID && $context = get_context_instance(CONTEXT_COURSE, $courseid)) { - $sql = 'SELECT r.id, r.name FROM {role} r JOIN {stats_daily} s ON s.roleid = r.id WHERE s.courseid = :courseid GROUP BY s.roleid'; + $sql = 'SELECT r.id, r.name FROM {role} r JOIN {stats_daily} s ON s.roleid = r.id WHERE s.courseid = :courseid GROUP BY r.id, r.name'; if ($roles = $DB->get_records_sql($sql, array('courseid' => $courseid))) { foreach ($roles as $role) { $reportoptions[STATS_REPORT_ACTIVITYBYROLE.$role->id] = get_string('statsreport'.STATS_REPORT_ACTIVITYBYROLE). ' '.$role->name; diff --git a/theme/canvas/style/core.css b/theme/canvas/style/core.css index 64616ecd0db..6df7891bfd9 100644 --- a/theme/canvas/style/core.css +++ b/theme/canvas/style/core.css @@ -1,25 +1,30 @@ html { - height: 100%; + height: 100%; } body { - min-height: 100%; - margin: 0; - padding: 0; + min-height: 100%; + margin: 0; + padding: 0; +} + +#page { + font-size: 85%; + line-height: 1.4; } .sitetopic { - border: none; + border: none; } .headingblock { - border-bottom: 1px solid #ddd; - font-size: 1.3em; - color: #333; + border-bottom: 1px solid #ddd; + font-size: 1.3em; + color: #333; } #notice { - text-align: center; + text-align: center; } .noticebox, @@ -32,505 +37,509 @@ body { .singlebutton, .buttons, .singleselect { - text-align: center; - margin: 1em 0; + text-align: center; + margin: 1em 0; } .navbutton .singlebutton { - margin: 0; + margin: 0; } .generalbox { - border-color: #ddd; + border-color: #ddd; } .noticebox .generalbox { - border: none; - margin:2em 0; + border: none; + margin:2em 0; } .expired, .notopenyet { - border: none; - color: #f00; + border: none; + color: #f00; } .buttons .singlebutton input { - margin: 0 1em; + margin: 0 1em; } .initialbar { - text-align: center; + text-align: center; } .side-pre-only #page-content #region-main-box #region-post-box #region-main-wrap #region-main { - padding-right: 0; + padding-right: 0; } .side-post-only #page-content #region-main-box #region-post-box #region-main-wrap #region-main { - padding-left: 0; + padding-left: 0; } input[type="checkbox"], input[type="radio"] { - margin-right: 7px; + margin-right: 7px; } /* Login ------------------------*/ .loginbox { - margin: 15px 25%; + margin: 15px 25%; } .loginbox .loginerrors { - color: #f00; + color: #f00; } .loginbox .loginform { - margin: 15px auto 0; - width: 175px; + margin: 15px auto 0; + width: 175px; } .loginbox .loginform .form-label { - float: none; - width: 100%; - margin: 0 auto; - text-align: left; + float: none; + width: 100%; + margin: 0 auto; + text-align: left; } .dir-rtl .loginbox .loginform .form-label { - text-align: right; + text-align: right; } .loginbox .loginform .form-input { - float: none; - width: 100%; - margin: 0 auto; + float: none; + width: 100%; + margin: 0 auto; } .loginbox .loginform .form-input #username, .loginbox .loginform .form-input #password { - width: 97%; - padding: 3px; - font-size: 1.1em; - font-family: Helvetica, Arial, sans-serif; - border: 2px solid #ddd; - margin: 0 0 5px; - color: #333; + width: 97%; + padding: 3px; + font-size: 1.1em; + font-family: Helvetica, Arial, sans-serif; + border: 2px solid #ddd; + margin: 0 0 5px; + color: #333; } .loginbox .loginform .form-input #loginbtn { - margin: 0.5em auto; + margin: 0.5em auto; } .loginbox .forgetpass { - margin: 1em 0 0; - font-size: 0.95em; + margin: 1em 0 0; + font-size: 0.95em; } .loginbox.twocolumns { - width: 90%; - margin-left: 5%; + width: 90%; + margin-left: 5%; } .loginbox .guestsub { - border-top: 1px solid #DDDDDD; - margin: 5px 20% + border-top: 1px solid #DDDDDD; + margin: 5px 20% } .loginbox.twocolumns .loginpanel { - border-color: #ddd; - padding-right: 0.5%; + border-color: #ddd; + padding-right: 0.5%; } .loginbox.twocolumns .signuppanel { - padding-left: 1%; - width: 48%; + padding-left: 1%; + width: 48%; } #page-course-loginas #notice { - border: none; + border: none; } #page-login-forgot_password .generalbox { - margin: 0 auto 1.5em; - width: 75%; - padding: 10px; + margin: 0 auto 1.5em; + width: 75%; + padding: 10px; } #page-login-signup .mform { - width: 85%; - margin: 0 auto; + width: 85%; + margin: 0 auto; } #page-login-signup .mform .fitem .fitemtitle { - width: 20%; + width: 20%; } #page-login-signup .mform .fitem .felement { - margin-left: 21%; + margin-left: 21%; } /* Calendar -----------------------*/ .calendarlayout .sidecalendar { - padding-left: 15px; + padding-left: 15px; } .minicalendarblock h3 { - text-align: center; - font-size: 1.2em; + text-align: center; + font-size: 1.2em; } .maincalendar .header .buttons { - margin: 0; + margin: 0; } .maincalendar .calendarmonth td, .maincalendar .calendarmonth th { - border-color: #ddd; - border-style: dotted; - border-width: 1px; + border-color: #ddd; + border-style: dotted; + border-width: 1px; } .maincalendar .calendarmonth th, .minicalendar th { - background: url([[pix:theme|gradient-sb]]) repeat-x 0 0; + background: url([[pix:theme|gradient-sb]]) repeat-x 0 0; } .maincalendar .calendar-controls { - padding: 10px 5px 0; + padding: 10px 5px 0; } .maincalendar .calendar-controls .previous, .maincalendar .calendar-controls .current, .maincalendar .calendar-controls .next { - float: left; + float: left; } .maincalendar .calendar-controls .current { - margin: 0 auto; - font-size: 1.35em; - text-align: center; - line-height: 1; - font-weight: bold; + margin: 0 auto; + font-size: 1.35em; + text-align: center; + line-height: 1; + font-weight: bold; } .maincalendar .calendar-controls .next { - text-align: right; + text-align: right; } .maincalendar .filters table td { - font-size: 0.9em; + font-size: 0.9em; } .maincalendar .bottom { - margin-top: 25px; + margin-top: 25px; } .minicalendar th abbr { - border: none; + border: none; } .calendar_filters td, .minicalendar td, .minicalendar th { - padding: 2px; - font-size: 0.85em; + padding: 2px; + font-size: 0.85em; } #page-calendar-view .eventlist { - padding-top: 1em; + padding-top: 1em; } #page-calendar-view .eventlist .event { - border: none; + border: none; } #page-calendar-view .eventlist .event .topic { - border-width: 1px 1px 0; - border-color: #ddd; - border-style: solid; - background: #f5f5f5; + border-width: 1px 1px 0; + border-color: #ddd; + border-style: solid; + background: #f5f5f5; } #page-calendar-view .eventlist .event .topic .name { - font-weight: bold; + font-weight: bold; } #page-calendar-view .eventlist .event .description { - border-width: 0 1px 1px; - border-style: solid; - border-color: #ddd; + border-width: 0 1px 1px; + border-style: solid; + border-color: #ddd; } .calendartable .duration ul { - border-width: 2px 0; - border-style: solid; + border-width: 2px 0; + border-style: solid; } .calendartable .duration_user ul { - border-color: #dce7ec; + border-color: #dce7ec; } .calendartable .duration_global ul { - border-color: #d6f8cd; + border-color: #d6f8cd; } .calendartable .duration_group ul { - border-color: #fee7ae; + border-color: #fee7ae; } .calendartable .duration_course ul { - border-color: #ffd3bd; + border-color: #ffd3bd; } .calendartable .duration .events-underway { - color: #666; + color: #666; } .minicalendar { - border-collapse: separate; + border-collapse: separate; } .minicalendar td, .minicalendar th { - font-size: 0.85em; - padding: 0 2px; - border-width: 2px 0; - border-color: #fff; + font-size: 0.85em; + padding: 0 2px; + border-width: 2px 0; + border-color: #fff; } .minicalendar .calendar_event_user, .minicalendar .duration_user { - border-color: #dce7ec; + border-color: #dce7ec; } .minicalendar .calendar_event_course, .minicalendar .duration_course { - border-color: #ffd3bd; + border-color: #ffd3bd; } .minicalendar .calendar_event_global, .minicalendar .duration_global { - border-color: #d6f8cd; + border-color: #d6f8cd; } .minicalendar .calendar_event_group, .minicalendar .duration_group { - border-color: #fee7ae; + border-color: #fee7ae; } /* User -----------------------*/ .userinfobox { -border-color: #ddd; -padding: 0 + border-color: #ddd; + padding: 0 } .userinfobox .content { - text-align: left; - padding-left:10px + text-align: left; + padding-left:10px } .userinfobox .links { - vertical-align: top; - background: #f4f4f4; - padding-left: 10px; + vertical-align: top; + background: #f4f4f4; + padding-left: 10px; } .userinfobox .links a { - display: block; - text-align: left; - + display: block; + text-align: left; } .profilepicture { - float: left; - margin-right: 10px; + float: left; + margin-right: 10px; } .descriptionbox { - margin-left: 110px; - border: 1px solid #ddd; - padding: 10px; + margin-left: 110px; + border: 1px solid #ddd; + padding: 10px; } .path-user .description { - padding-bottom: 15px; - border-bottom: 1px solid #eee; + padding-bottom: 15px; + border-bottom: 1px solid #eee; } .userprofile .list { - margin-top: 10px; + margin-top: 10px; } .userprofile .list td { - padding-top: 3px; - padding-bottom: 3px; + padding-top: 3px; + padding-bottom: 3px; } .userprofile .list .c0 { - padding-left: 0; - font-weight: bold; + padding-left: 0; + font-weight: bold; } #page-user-view .buttons { - text-align: center; - width: 70%; - margin: 0 auto; + text-align: center; + width: 70%; + margin: 0 auto; } #page-user-view .buttons div { - padding: 0 0 10px; + padding: 0 0 10px; } #page-user-index .controls { - width: 100% + width: 100% } #page-user-index .controls .singleselect { - margin: 0; + margin: 0; } .rolesform { - text-align: center; - margin: 1em 0; + text-align: center; + margin: 1em 0; } #participantsform { - text-align: center; + text-align: center; } #participants { - width: 100%; - margin: 1em auto 0; + width: 100%; + margin: 1em auto 0; } #participants th, #participants td { - vertical-align: middle; + vertical-align: middle; } -.groupinfobox {border-color: #DDDDDD;width: 60%;margin-left: 20%;margin-right: 20%;} +.groupinfobox { + border-color: #DDDDDD; + width: 60%; + margin-left: 20%; + margin-right: 20%; +} /* Notes ------------------------*/ .path-notes .generalbox { - border: none; + border: none; } /* Roles ------------------------*/ .path-admin-roles .generaltable { - /* width: 65%; hiding because it's causing problems on role/assign */ + /* width: 65%; hiding because it's causing problems on role/assign */ } .path-admin-roles .generaltable th { - vertical-align: middle; + vertical-align: middle; } .path-admin-roles .generaltable .lastcol { - width: 15%; + width: 15%; } .path-admin-roles .backlink { - text-align: center; + text-align: center; } /* Blogs ------------------------*/ .blog_entry .audience { - color: #444; - margin: 0 0 0.5em; - font-size: 0.9em; + color: #444; + margin: 0 0 0.5em; + font-size: 0.9em; } .blog_entry .tags { - margin-bottom: 0.5em; + margin-bottom: 0.5em; } /* Tags ------------------------*/ #big-tag-cloud-box { - padding: 10px; + padding: 10px; } #tag-management-box { - text-align: center; + text-align: center; } .tag-management-form { - border: none; - padding: 0 0 1em; + border: none; + padding: 0 0 1em; } #tag-management-list { - margin: 1em 0 + margin: 1em 0 } #page-tag-index #tag-blogs { - border-width: 0 0 1px; - width: 65%; - margin: 1em auto; + border-width: 0 0 1px; + width: 65%; + margin: 1em auto; } #tagblogentries { - margin: 0 0 1em; + margin: 0 0 1em; } #tagblogentries li { - list-style: none; - padding: 0.25em 0; - margin: 0 + list-style: none; + padding: 0.25em 0; + margin: 0 } #big-tag-cloud-box { - border: none; + border: none; } #tag-user-table { - width: 95%; - margin: 0 auto; - border-width: 0 0 1px; + width: 95%; + margin: 0 auto; + border-width: 0 0 1px; } .managelink { - text-align: right; + text-align: right; } #page-tag-index .headingblock { - text-align: center; - margin-bottom: 0; + text-align: center; + margin-bottom: 0; } #page-tag-index #tag-management-box { - border-bottom: 1px solid #ddd; - padding: 4px 0; + border-bottom: 1px solid #ddd; + padding: 4px 0; } #page-tag-index .relatedpages { - text-align: center; + text-align: center; } #page-tag-manage .lastinitial { - margin-bottom: 0.5em; + margin-bottom: 0.5em; } #page-tag-manage .green { - text-align: center; - padding: 0 0 1em; + text-align: center; + padding: 0 0 1em; } /* YUI overlays ------------------------*/ #helppopupbox { - z-index: 99999 !important; + z-index: 99999 !important; } @@ -538,37 +547,37 @@ padding: 0 ------------------------*/ .pagelayout-embedded { - text-align: center; - background-color: #fff; - background-image: none; + text-align: center; + background-color: #fff; + background-image: none; } .pagelayout-embedded #content { - padding-top: 30px; + padding-top: 30px; } /* Forms -----------------------*/ .mform .fsubmit { - text-align: center; - padding: 2px; + text-align: center; + padding: 2px; } .form-label .form-shortname { - font-size: 0.8em; - color: #777; + font-size: 0.8em; + color: #777; } .form-description { - font-size: 0.95em; - color: #444; + font-size: 0.95em; + color: #444; } .mform .hidden .fitem .fgroup { - width: 100%; - text-align: center; - margin: 1em 0; + width: 100%; + text-align: center; + margin: 1em 0; } .path-backup .mform .hidden .fitem .fgroup { @@ -586,99 +595,158 @@ padding: 0 -----------------------*/ .comment-list li { - background: #eee !important; - list-style: none; + background: #eee !important; + list-style: none; } /* Gradebook ----------------------*/ .path-grade h1.headermain { - text-align: left; /* Strangely necessary TODO: find bug */ + text-align: left; /* Strangely necessary TODO: find bug */ } .gradestable .lastrow th.header { - background: #ddd; + background: #ddd; } .gradestable .lastrow td.cell { - background: #eee !important; + background: #eee !important; } .user-grade td.b1t, .user-grade td.baggt { - background: #ddd !important; + background: #ddd !important; } #page-grade-edit-scale-index .generaltable { - margin: 1em auto; + margin: 1em auto; } #page-grade-report-grader-preferences .generalbox { - border: none; + border: none; } .path-grade-report-grader form { - text-align: left; + text-align: left; } /* Footer -----------------------*/ #page-footer .logininfo { - padding: 1em 0; + padding: 1em 0; } #page-footer .homelink, #page-footer .sitelink { - padding: 1em 0; + padding: 1em 0; } .homelink a { - text-decoration: none; - border-top: 1px solid #cecece; - border-bottom: 2px solid #8a8a8a; - border-left: 1px solid #cecece; - border-right: 2px solid #8a8a8a; + text-decoration: none; + border-top: 1px solid #cecece; + border-bottom: 2px solid #8a8a8a; + border-left: 1px solid #cecece; + border-right: 2px solid #8a8a8a; } .homelink a:hover { - text-decoration: none; - border-bottom: 1px solid #cecece; - border-top: 2px solid #8a8a8a; - border-right: 1px solid #cecece; - border-left: 2px solid #8a8a8a; + text-decoration: none; + border-bottom: 1px solid #cecece; + border-top: 2px solid #8a8a8a; + border-right: 1px solid #cecece; + border-left: 2px solid #8a8a8a; } /** * Enrol - TODO: tidy up styles here */ -.userenrolment {font-size:90%;border:1px solid #999;} -.userenrolment tr.r0 {background-color:#F9F9F9;} -.userenrolment tr.r1 {background-color:#F3F3F3;} -.userenrolment td {border:1px solid #E9E9E9;border-top-color:#F6F6F6;border-right-color:#EEE;border-left-color:#F3F3F3;} -.userenrolment td.c0 {border-left-color:#999;} -.userenrolment td.c4 {border-right-color:#999;} -.userenrolment .col_userdetails {padding:3px;min-width:35%;} -.userenrolment .col_role .roles {position:relative;} -.userenrolment .col_role .role {line-height:10px;font-size:10px;} -.userenrolment .col_role .role a img {height:8px;} -.userenrolment .col_role .addrole {background-color:#DDD;border:1px outset #EEE;-moz-border-radius:5px;} -.userenrolment .col_group {max-width:300px;} -.userenrolment .col_group .group {line-height:10px;font-size:10px;} -.userenrolment .col_group .group a img {height:8px;} -.userenrolment .col_group .addgroup {background-color:#DDD;border:1px outset #EEE;-moz-border-radius:5px;} -.userenrolment .col_enrol {max-width:300px;} -.userenrolment .col_enrol .enrolment {border:1px outset #E6E6E6;background-color:#EEE;line-height:10px;font-size:10px;-moz-border-radius:5px;} +.userenrolment { + font-size:90%; + border:1px solid #999; +} +.userenrolment tr.r0 { + background-color:#F9F9F9; +} +.userenrolment tr.r1 { + background-color:#F3F3F3; +} +.userenrolment td { + border:1px solid #E9E9E9; + border-top-color:#F6F6F6; + border-right-color:#EEE; + border-left-color:#F3F3F3; +} +.userenrolment td.c0 { + border-left-color:#999; +} +.userenrolment td.c4 { + border-right-color:#999; +} +.userenrolment .col_userdetails { + padding:3px; + min-width:35%; +} +.userenrolment .col_role .roles { + position:relative; +} +.userenrolment .col_role .role { + line-height:10px; + font-size:10px; +} +.userenrolment .col_role .role a img { + height:8px; +} +.userenrolment .col_role .addrole { + background-color:#DDD; + border:1px outset #EEE; + -moz-border-radius:5px; +} +.userenrolment .col_group { + max-width:300px; +} +.userenrolment .col_group .group { + line-height:10px; + font-size:10px; +} +.userenrolment .col_group .group a img { + height:8px; +} +.userenrolment .col_group .addgroup { + background-color:#DDD; + border:1px outset #EEE; + -moz-border-radius:5px; +} +.userenrolment .col_enrol { + max-width:300px; +} +.userenrolment .col_enrol .enrolment { + border:1px outset #E6E6E6; + background-color:#EEE; + line-height:10px; + font-size:10px; + -moz-border-radius:5px; +} .path-enrol .enrolusersbutton, -.path-enrol .enrolcohortbutton {float:left;} +.path-enrol .enrolcohortbutton { + float:left; +} .path-enrol .enrolusersbutton.instance1, -.path-enrol .enrolcohortbutton.instance1 {float:right;} +.path-enrol .enrolcohortbutton.instance1 { + float:right; +} /* Registration */ -#page-admin-registration-hubselector .registration_textfield {width: 400px;} +#page-admin-registration-hubselector .registration_textfield { + width: 400px; +} /** * Redirect */ -.pagelayout-redirect #content {text-align:center;margin-top:10%;margin-bottom:10%;} \ No newline at end of file +.pagelayout-redirect #content { + text-align:center; + margin-top:10%; + margin-bottom:10%; +} \ No newline at end of file diff --git a/theme/canvas/style/text.css b/theme/canvas/style/text.css index e84c85f9eed..f0d97a44fa3 100644 --- a/theme/canvas/style/text.css +++ b/theme/canvas/style/text.css @@ -1,163 +1,158 @@ /* Text Elements --------------------------*/ -body { - font-size: 85%; - line-height: 1.4; -} - -body,h1,h2,h3,h4,h5,h6,p,ul,ol,dl,input,textarea { - font-family: Helvetica, Arial, sans-serif; +h1,h2,h3,h4,h5,h6,p,ul,ol,dl,input,textarea { + font-family: Helvetica, Arial, sans-serif; } h1,h2,h3,h4,h5,h6 { - font-weight: bold; - margin: 0; + font-weight: bold; + margin: 0; } h2.main,h3.main,h4.main { - text-align: center; - padding: 0.5em 0 1em; - margin: 0; + text-align: center; + padding: 0.5em 0 1em; + margin: 0; } h1 { - font-size: 2.25em; - line-height: 1; - margin-bottom: 0.5em; + font-size: 2.25em; + line-height: 1; + margin-bottom: 0.5em; } h2 { - font-size: 1.5em; - margin-bottom: 0.5em; + font-size: 1.5em; + margin-bottom: 0.5em; } h3 { - font-size: 1.25em; - line-height: 1; - margin-bottom: 0.5em; + font-size: 1.25em; + line-height: 1; + margin-bottom: 0.5em; } h4 { - font-size: 1.1em; - line-height: 1.25; - margin-bottom: 0.75em; + font-size: 1.1em; + line-height: 1.25; + margin-bottom: 0.75em; } h5 { - font-size: 1em; - margin-bottom: 1em; + font-size: 1em; + margin-bottom: 1em; } h6 { - font-size: 1em; + font-size: 1em; } p { - margin: 0 0 1em; + margin: 0 0 1em; } ul, ol { - margin: 0 1.5em 1.5em 1.5em; + margin: 0 1.5em 1.5em 1.5em; } ul { - list-style-type: circle; + list-style-type: circle; } ol { - list-style-type: decimal; + list-style-type: decimal; } dl { - margin: 0 0 1.5em 0; + margin: 0 0 1.5em 0; } dl dt { - font-weight: bold; + font-weight: bold; } dl dd { - margin-left: 1.5em; + margin-left: 1.5em; } abbr, acronym { - border-bottom: 1px dotted #000; + border-bottom: 1px dotted #000; } address { - margin-top: 1.5em; - font-style: italic; + margin-top: 1.5em; + font-style: italic; } del { - color: #000; + color: #000; } a { - text-decoration: none; + text-decoration: none; } blockquote { - margin: 1.5em; + margin: 1.5em; } strong { - font-weight: bold; + font-weight: bold; } em, dfn { - font-style: italic; + font-style: italic; } dfn { - font-weight: bold; + font-weight: bold; } pre, code { - white-space: pre; + white-space: pre; } pre, code, tt { - font: 1.2em monospace; - line-height: 1.5; - margin: 1.5em 0; + font: 1.2em monospace; + line-height: 1.5; + margin: 1.5em 0; } .small { - font-size: .8em; - margin-bottom: 1.875em; - line-height: 1.875em; + font-size: .8em; + margin-bottom: 1.875em; + line-height: 1.875em; } .large { - font-size: 1.25em; - line-height: 1.5em; - margin-bottom: 1em; + font-size: 1.25em; + line-height: 1.5em; + margin-bottom: 1em; } .quiet { - color: #999; + color: #999; } .hide { - display: none; + display: none; } .icon.hide { - display: inline; + display: inline; } .highlight { - background: #ffc; + background: #ffc; } .top { - margin-top: 0; - padding-top: 0; + margin-top: 0; + padding-top: 0; } .bottom { - margin-bottom: 0; - padding-bottom: 0; + margin-bottom: 0; + padding-bottom: 0; } \ No newline at end of file diff --git a/version.php b/version.php index 81ffcf47944..caaa6ff2258 100644 --- a/version.php +++ b/version.php @@ -30,10 +30,10 @@ defined('MOODLE_INTERNAL') || die(); -$version = 2011052500.00; // YYYYMMDD = weekly release date of this DEV branch +$version = 2011060200.00; // YYYYMMDD = weekly release date of this DEV branch // RR = release increments - 00 in DEV branches // .XX = incremental changes -$release = '2.1dev (Build: 20110525)'; // Human-friendly version name +$release = '2.1dev (Build: 20110602)'; // Human-friendly version name $maturity = MATURITY_ALPHA; // this version's maturity level