Merge branch 'MDL-54847-master-fix' of git://github.com/cameron1729/moodle

This commit is contained in:
Dan Poltawski 2016-08-02 20:09:45 +01:00
commit 805f1c8d0b
37 changed files with 1625 additions and 940 deletions

92
.stylelintrc Normal file
View file

@ -0,0 +1,92 @@
{
"rules": {
"at-rule-empty-line-before": [ "always",
{"except": [ "blockless-group", "first-nested" ], ignore: ["after-comment"]}
],
"at-rule-name-case": "lower",
"at-rule-name-space-after": "always-single-line",
"at-rule-no-unknown": true,
"at-rule-semicolon-newline-after": "always",
"block-closing-brace-newline-after": "always",
"block-closing-brace-newline-before": "always-multi-line",
"block-closing-brace-space-before": "always-single-line",
"block-no-empty": true,
"block-no-single-line": true,
"block-opening-brace-newline-after": "always-multi-line",
"block-opening-brace-space-after": "always-single-line",
"block-opening-brace-space-before": "always",
"color-hex-case": ["lower", { "severity": "warning" }],
"color-hex-length": ["short", { "severity": "warning" }],
"color-no-invalid-hex": true,
"declaration-bang-space-after": "never",
"declaration-bang-space-before": "always",
"declaration-block-no-duplicate-properties": true,
"declaration-block-no-ignored-properties": true,
"declaration-block-no-shorthand-property-overrides": true,
"declaration-block-semicolon-newline-after": "always-multi-line",
"declaration-block-semicolon-space-after": "always-single-line",
"declaration-block-semicolon-space-before": "never",
"declaration-block-single-line-max-declarations": 1,
"declaration-block-trailing-semicolon": "always",
"declaration-colon-newline-after": "always-multi-line",
"declaration-colon-space-after": "always-single-line",
"declaration-colon-space-before": "never",
"function-calc-no-unspaced-operator": true,
"function-comma-newline-after": "always-multi-line",
"function-comma-space-after": "always-single-line",
"function-comma-space-before": "never",
"function-linear-gradient-no-nonstandard-direction": true,
"function-max-empty-lines": 0,
"function-name-case": "lower",
"function-parentheses-newline-inside": "always-multi-line",
"function-parentheses-space-inside": "never-single-line",
"function-url-data-uris": never,
"function-whitespace-after": "always",
"indentation": 4,
"keyframe-declaration-no-important": true,
"length-zero-no-unit": [true, { "severity": "warning" }],
"max-empty-lines": 2,
"max-line-length": [132, { "severity": "warning" }],
"media-feature-colon-space-after": "always",
"media-feature-colon-space-before": "never",
"media-feature-no-missing-punctuation": true,
"media-feature-range-operator-space-after": "always",
"media-feature-range-operator-space-before": "always",
"media-query-list-comma-newline-after": "always-multi-line",
"media-query-list-comma-space-after": "always-single-line",
"media-query-list-comma-space-before": "never",
"no-browser-hacks": [true, { "severity": "warning" }],
"no-empty-source": true,
"no-eol-whitespace": true,
"no-extra-semicolons": [true, { "severity": "warning" }],
"no-invalid-double-slash-comments": true,
"no-unknown-animations": true,
"property-case": "lower",
"selector-attribute-brackets-space-inside": "never",
"selector-attribute-operator-space-after": "never",
"selector-attribute-operator-space-before": "never",
"selector-combinator-space-after": "always",
"selector-combinator-space-before": "always",
"selector-list-comma-newline-after": "always",
"selector-list-comma-space-before": "never",
"selector-max-empty-lines": 0,
"selector-pseudo-class-case": "lower",
"selector-pseudo-class-no-unknown": true,
"selector-pseudo-class-parentheses-space-inside": "never",
"selector-pseudo-element-case": "lower",
"selector-pseudo-element-no-unknown": true,
"selector-root-no-composition": true,
"selector-type-case": "lower",
"selector-type-no-unknown": true,
"shorthand-property-no-redundant-values": [null, { "severity": "warning" }],
"string-no-newline": true,
"time-no-imperceptible": true,
"unit-blacklist": ["pt", "rem"],
"unit-case": "lower",
"unit-no-unknown": true,
"value-keyword-case": ["lower", {"ignoreKeywords": ["/@/"]}],
"value-list-comma-newline-after": "always-multi-line",
"value-list-comma-space-after": "always-single-line",
"value-list-comma-space-before": "never",
}
}

View file

@ -157,7 +157,7 @@ module.exports = function(grunt) {
},
bootstrapbase: {
files: ["theme/bootstrapbase/less/**/*.less"],
tasks: ["less:bootstrapbase"]
tasks: ["css"]
},
yui: {
files: ['**/yui/src/**/*.js'],
@ -169,6 +169,27 @@ module.exports = function(grunt) {
recursive: true,
paths: [cwd]
}
},
stylelint: {
less: {
options: {
syntax: 'less',
configOverrides: {
rules: {
// TODO: MDL-55165 -Enable these rules once we make output-changing changes to less.
"declaration-block-no-ignored-properties": null,
"value-keyword-case": null,
"declaration-block-no-duplicate-properties": null,
"declaration-block-no-shorthand-property-overrides": null,
"selector-type-no-unknown": null,
"length-zero-no-unit": null,
"color-hex-case": null,
"color-hex-length": null
}
}
},
src: ['theme/**/*.less', '!theme/bootstrapbase/less/bootstrap/*'],
}
}
});
@ -295,6 +316,7 @@ module.exports = function(grunt) {
grunt.config('eslint.yui.src', files);
grunt.config('uglify.amd.files', [{ expand: true, src: files, rename: uglifyRename }]);
grunt.config('shifter.options.paths', files);
grunt.config('stylelint.less.src', files);
changedFiles = Object.create(null);
}, 200);
@ -308,6 +330,7 @@ module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-contrib-less');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-eslint');
grunt.loadNpmTasks('grunt-stylelint');
// Register JS tasks.
grunt.registerTask('shifter', 'Run Shifter against the current directory', tasks.shifter);
@ -317,7 +340,7 @@ module.exports = function(grunt) {
grunt.registerTask('js', ['amd', 'yui']);
// Register CSS taks.
grunt.registerTask('css', ['less:bootstrapbase']);
grunt.registerTask('css', ['stylelint:less', 'less:bootstrapbase']);
// Register the startup task.
grunt.registerTask('startup', 'Run the correct tasks for the current directory', tasks.startup);

View file

@ -102,6 +102,9 @@ class behat_completion extends behat_base {
// Go to course editing.
$this->execute("behat_general::click_link", get_string('editsettings'));
// Expand all the form fields.
$this->execute("behat_forms::i_expand_all_fieldsets");
// Enable completion.
$this->execute("behat_forms::i_set_the_field_to",
array(get_string('enablecompletion', 'completion'), $toggle));

View file

@ -335,25 +335,12 @@ class core_htmlpurifier_testcase extends basic_testcase {
* Test cases for the test_media_tags test.
*/
public function media_tags_provider() {
// Given a 1D array, computes the power set of those elements.
$p = function(array $set) {
return array_reduce($set, function($carry, $element) {
return array_merge($carry, array_map(function($subset) use ($element) {
return array_merge([$element], $subset);
}, $carry));
}, [[]]);
};
// Takes an array of attributes, then generates a test for every possible combination of them
// (i.e., every element of the power set). The testcases are named using $prefix and then
// a '/' delimited string describing the attributes being used. $templats is for the
// raw data and expected result.
// Takes an array of attributes, then generates a test for each of them.
$generatetestcases = function($prefix, array $attrs, array $templates) use ($p) {
$attrcombinations = $p($attrs);
return array_reduce($attrcombinations, function($carry, $attrset) use ($prefix, $templates) {
$testcase = [$prefix . '/' . join('/', $attrset) => [
sprintf($templates[0], join(" ", $attrset)),
sprintf($templates[1], join(" ", $attrset))
return array_reduce($attrs, function($carry, $attr) use ($prefix, $templates) {
$testcase = [$prefix . '/' . $attr => [
sprintf($templates[0], $attr),
sprintf($templates[1], $attr)
]];
return empty(array_values($carry)[0]) ? $testcase : $carry + $testcase;
}, [[]]);

View file

@ -2700,24 +2700,32 @@ function lti_load_tool_from_cartridge($url, $lti) {
function lti_load_cartridge($url, $map, $propertiesmap = array()) {
global $CFG;
require_once($CFG->libdir. "/filelib.php");
// TODO MDL-46023 Replace this code with a call to the new library.
$origentity = libxml_disable_entity_loader(true);
$curl = new curl();
$response = $curl->get($url);
// TODO MDL-46023 Replace this code with a call to the new library.
$origerrors = libxml_use_internal_errors(true);
$origentity = libxml_disable_entity_loader(true);
libxml_clear_errors();
$document = new DOMDocument();
@$document->loadXML($response, LIBXML_DTDLOAD | LIBXML_DTDATTR);
$cartridge = new DomXpath($document);
$errors = libxml_get_errors();
libxml_clear_errors();
libxml_use_internal_errors($origerrors);
libxml_disable_entity_loader($origentity);
if (count($errors) > 0) {
$message = 'Failed to load cartridge.';
foreach ($errors as $error) {
$message .= "\n" . trim($error->message, "\n\r\t .") . " at line " . $error->line;
}
throw new moodle_exception($message);
throw new moodle_exception('errorreadingfile', '', '', $url, $message);
}
$toolinfo = array();
@ -2735,7 +2743,7 @@ function lti_load_cartridge($url, $map, $propertiesmap = array()) {
}
}
}
libxml_disable_entity_loader($origentity);
return $toolinfo;
}

View file

@ -21,7 +21,7 @@ Feature: Add tools
And I set the following fields to these values:
| Tool name | Teaching Tool 1 |
| Tool configuration usage | Show in activity chooser and as a preconfigured tool |
And I set the field "Tool base URL/cartridge URL" to local url "/mod/lti/tests/fixtures/tool_provider.html"
And I set the field "Tool base URL/cartridge URL" to local url "/mod/lti/tests/fixtures/tool_provider.php"
And I press "Save changes"
And I log out

View file

@ -67,7 +67,7 @@ Feature: Add preconfigured tools via teacher interface
| Activity name | Test tool activity 1 |
And I open "Test tool activity 1" actions menu
And I follow "Edit settings" in the open menu
And I set the field "Launch/cartridge URL" to local url "/mod/lti/tests/fixtures/tool_provider.html"
And I set the field "Launch/cartridge URL" to local url "/mod/lti/tests/fixtures/tool_provider.php"
And I press "Save and return to course"
And I follow "Test tool activity 1"
And I switch to "contentframe" iframe

View file

@ -37,7 +37,7 @@ Feature: Configure tool types
@javascript
Scenario: Attempt to add a tool type from a configuration URL, then cancel
When I set the field "url" to local url "/mod/lti/tests/fixtures/tool_provider.html"
When I set the field "url" to local url "/mod/lti/tests/fixtures/tool_provider.php"
And I press "Add"
Then I should see "Cancel"
And I press "cancel-external-registration"

View file

@ -52,7 +52,8 @@ class mod_lti_external_testcase extends externallib_advanced_testcase {
// Setup test data.
$this->course = $this->getDataGenerator()->create_course();
$this->lti = $this->getDataGenerator()->create_module('lti', array('course' => $this->course->id));
$this->lti = $this->getDataGenerator()->create_module('lti',
array('course' => $this->course->id, 'toolurl' => 'http://localhost/not/real/tool.php'));
$this->context = context_module::instance($this->lti->cmid);
$this->cm = get_coursemodule_from_instance('lti', $this->lti->id);

View file

@ -1,8 +0,0 @@
<html>
<head>
<title>Tool provider</title>
</head>
<body>
<p>This represents a tool provider</p>
</body>
</html>

View file

@ -0,0 +1,33 @@
<?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/>.
/**
* Testing fixture.
*
* @package mod_lti
* @copyright 2016 John Okely
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
?>
<html>
<head>
<title>Tool provider</title>
</head>
<body>
<p>This represents a tool provider</p>
</body>
</html>

View file

@ -41,7 +41,7 @@ class mod_lti_generator extends testing_module_generator {
$record = (object) (array) $record;
if (!isset($record->toolurl)) {
$record->toolurl = 'http://www.imsglobal.org/developers/LTI/test/v1p1/tool.php';
$record->toolurl = '';
}
if (!isset($record->resourcekey)) {
$record->resourcekey = '12345';

View file

@ -824,7 +824,7 @@ class mod_wiki_external extends external_api {
return new external_function_parameters (
array(
'pageid' => new external_value(PARAM_INT, 'Page ID to edit.'),
'section' => new external_value(PARAM_TEXT, 'Section page title.', VALUE_DEFAULT, null)
'section' => new external_value(PARAM_RAW, 'Section page title.', VALUE_DEFAULT, null)
)
);
}
@ -1088,7 +1088,7 @@ class mod_wiki_external extends external_api {
array(
'pageid' => new external_value(PARAM_INT, 'Page ID.'),
'content' => new external_value(PARAM_RAW, 'Page contents.'),
'section' => new external_value(PARAM_TEXT, 'Section page title.', VALUE_DEFAULT, null)
'section' => new external_value(PARAM_RAW, 'Section page title.', VALUE_DEFAULT, null)
)
);
}

View file

@ -1155,7 +1155,8 @@ class mod_wiki_external_testcase extends externallib_advanced_testcase {
$this->create_individual_wikis_with_groups();
$sectioncontent = '<h1>Title1</h1>Text inside section';
// We add a <span> in the first title to verify the WS works sending HTML in section.
$sectioncontent = '<h1><span>Title1</span></h1>Text inside section';
$pagecontent = $sectioncontent.'<h1>Title2</h1>Text inside section';
$newpage = $this->getDataGenerator()->get_plugin_generator('mod_wiki')->create_page(
$this->wiki, array('content' => $pagecontent));
@ -1181,7 +1182,7 @@ class mod_wiki_external_testcase extends externallib_advanced_testcase {
'version' => '1'
);
$result = mod_wiki_external::get_page_for_editing($newpage->id, 'Title1');
$result = mod_wiki_external::get_page_for_editing($newpage->id, '<span>Title1</span>');
$result = external_api::clean_returnvalue(mod_wiki_external::get_page_for_editing_returns(), $result);
$this->assertEquals($expected, $result['pagesection']);
}
@ -1273,8 +1274,9 @@ class mod_wiki_external_testcase extends externallib_advanced_testcase {
array('group' => $this->group1->id, 'content' => 'Test'));
// Test edit whole page.
$sectioncontent = '<h1>Title1</h1>Text inside section';
$newpagecontent = $sectioncontent.'<h1>Title2</h1>Text inside section';
// We add <span> in the titles to verify the WS works sending HTML in section.
$sectioncontent = '<h1><span>Title1</span></h1>Text inside section';
$newpagecontent = $sectioncontent.'<h1><span>Title2</span></h1>Text inside section';
$result = mod_wiki_external::edit_page($newpage->id, $newpagecontent);
$result = external_api::clean_returnvalue(mod_wiki_external::edit_page_returns(), $result);
@ -1284,8 +1286,8 @@ class mod_wiki_external_testcase extends externallib_advanced_testcase {
$this->assertEquals($newpagecontent, $version->content);
// Test edit section.
$newsectioncontent = '<h1>Title2</h1>New test2';
$section = 'Title2';
$newsectioncontent = '<h1><span>Title2</span></h1>New test2';
$section = '<span>Title2</span>';
$result = mod_wiki_external::edit_page($newpage->id, $newsectioncontent, $section);
$result = external_api::clean_returnvalue(mod_wiki_external::edit_page_returns(), $result);
@ -1297,8 +1299,8 @@ class mod_wiki_external_testcase extends externallib_advanced_testcase {
$this->assertEquals($expected, $version->content);
// Test locked section.
$newsectioncontent = '<h1>Title2</h1>New test2';
$section = 'Title2';
$newsectioncontent = '<h1><span>Title2</span></h1>New test2';
$section = '<span>Title2</span>';
try {
// Using user 1 to avoid other users to edit.

1194
npm-shrinkwrap.json generated

File diff suppressed because it is too large Load diff

View file

@ -10,7 +10,9 @@
"grunt-contrib-uglify": "1.0.1",
"grunt-contrib-watch": "1.0.0",
"grunt-eslint": "19.0.0",
"grunt-stylelint": "0.6.0",
"shifter": "0.5.0",
"stylelint-checkstyle-formatter": "0.1.0",
"xmldom": "0.1.22",
"xpath": "0.0.23"
},

View file

@ -17,6 +17,7 @@
@import "bootstrap/sprites.less";
@iconSpritePath: ~"[[pix:theme|glyphicons-halflings]]";
@iconWhiteSpritePath: ~"[[pix:theme|glyphicons-halflings-white]]";
@import "bootstrap/wells.less";
// Components: Buttons & Alerts.

View file

@ -76,6 +76,5 @@ body {
@import "bootstrap/responsive-767px-max.less";
@import "bootstrap/responsive-navbar.less";
@import "moodle/responsive";
@import "moodle/debug";
@import "moodle/expendable";

View file

@ -264,7 +264,7 @@ img.iconsmall {
.path-admin .roleassigntable td {
vertical-align: top;
padding: 0.2em 0.3em
padding: 0.2em 0.3em;
}
.path-admin .roleassigntable p {
@ -360,7 +360,7 @@ img.iconsmall {
.dir-rtl .environmenttable img.iconhelp {
padding-left: .3em;
padding-right: 0
padding-right: 0;
}
#trustedhosts .generaltable {
@ -526,7 +526,7 @@ img.iconsmall {
.dir-rtl .form-item .form-label,
.dir-rtl .form-item .form-description,
.dir-rtl.path-admin .roleassigntable p {
text-align: right
text-align: right;
}
#page-admin-index #notice .checkforupdates {
@ -561,7 +561,8 @@ img.iconsmall {
.singlebutton {
margin: 5px 0;
padding: 0;
div, input {
div,
input {
margin: 0 3px 0 0;
}
}
@ -570,7 +571,8 @@ img.iconsmall {
.updateavailableinstallall {
margin: 5px 0;
padding: 0;
div, input {
div,
input {
margin: 0 3px 5px 0;
}
}
@ -595,13 +597,8 @@ img.iconsmall {
font-size: @fontSizeSmall;
.muted;
}
.release {
}
}
.availability {
}
.settings {
}
.uninstall {
a {
color: @errorText;
@ -632,7 +629,8 @@ img.iconsmall {
.singlebutton {
margin: 5px 0;
padding: 0;
div, input {
div,
input {
margin: 0 3px 0 0;
}
}
@ -648,7 +646,8 @@ img.iconsmall {
.singlebutton {
margin: 5px 0;
padding: 0;
div, input {
div,
input {
margin: 0 3px 0 0;
}
}
@ -661,7 +660,8 @@ img.iconsmall {
.muted;
}
.status-missing, .status-downgrade {
.status-missing,
.status-downgrade {
td {
background-color: @errorBackground;
}
@ -701,7 +701,8 @@ img.iconsmall {
.singlebutton {
margin: 5px 0;
padding: 0;
div, input {
div,
input {
margin: 0 3px 0 0;
}
}
@ -732,13 +733,15 @@ img.iconsmall {
// Available plugin update notification.
#plugins-check-page, #plugins-control-panel {
#plugins-check-page,
#plugins-control-panel {
.pluginupdateinfo {
background-color: @infoBackground;
&.maturity50 {
background-color: @errorBackground;
}
&.maturity100, &.maturity150 {
&.maturity100,
&.maturity150 {
background-color: @warningBackground;
}
padding: 5px;
@ -753,7 +756,8 @@ img.iconsmall {
.singlebutton {
margin: 5px 0;
padding: 0;
div, input {
div,
input {
margin: 0 3px 0 0;
}
}
@ -767,7 +771,8 @@ img.iconsmall {
}
.continue {
padding: 0;
div, input {
div,
input {
margin: 0;
}
}

View file

@ -36,8 +36,7 @@
font-weight: bold;
color: inherit;
}
.path-backup .backup_progress .backup_stage.backup_stage_next {
}
.path-backup .backup_progress span.backup_stage.backup_stage_complete {
color: inherit;
}

View file

@ -12,17 +12,45 @@
@warningText: #8a6d3b;
// Headings.
h1 { font-size: round(@baseFontSize * 2.30); } // ~32px
h2 { font-size: round(@baseFontSize * 2.00); } // ~28px
h3 { font-size: round(@baseFontSize * 1.70); } // ~24px
h4 { font-size: round(@baseFontSize * 1.40); } // ~20px
h5 { font-size: round(@baseFontSize * 1.15); } // ~16px
h6 { font-size: round(@baseFontSize * 0.85); } // ~12px
h1 {
font-size: round(@baseFontSize * 2.30); // ~32px
}
h1 small { font-size: round(@baseFontSize * 1.70); } // ~24px
h2 small { font-size: round(@baseFontSize * 1.40); } // ~20px
h3 small { font-size: round(@baseFontSize * 1.15); } // ~16px
h4 small { font-size: round(@baseFontSize * 0.85); } // ~12px
h2 {
font-size: round(@baseFontSize * 2.00); // ~28px
}
h3 {
font-size: round(@baseFontSize * 1.70); // ~24px
}
h4 {
font-size: round(@baseFontSize * 1.40); // ~20px
}
h5 {
font-size: round(@baseFontSize * 1.15); // ~16px
}
h6 {
font-size: round(@baseFontSize * 0.85); // ~12px
}
h1 small {
font-size: round(@baseFontSize * 1.70); // ~24px
}
h2 small {
font-size: round(@baseFontSize * 1.40); // ~20px
}
h3 small {
font-size: round(@baseFontSize * 1.15); // ~16px
}
h4 small {
font-size: round(@baseFontSize * 0.85); // ~12px
}
// Printing.
@media print {
@ -35,10 +63,14 @@ h4 small { font-size: round(@baseFontSize * 0.85); } // ~12px
.fluid-span (@columns) {
.fluid-span-full(@columns, @fluidGridColumnWidth, @fluidGridGutterWidth);
}
// TODO: MDL-55142 remove browser these brwoser hacks:
/* stylelint-disable declaration-block-no-duplicate-properties, no-browser-hacks */
.fluid-span-full (@columns, @columnWidth, @gutterWidth) {
width: (@columnWidth * @columns) + (@gutterWidth * (@columns - 1));
*width: (@columnWidth * @columns) + (@gutterWidth * (@columns - 1)) - (.5 / @gridRowWidth * 100 * 1%);
}
/* stylelint-enable */
/**
* Implement missing variables, or faulty ones, in Bootstrap rules.

View file

@ -24,7 +24,8 @@
.path-calendar {
.calendartable {
width: 100%;
th, td {
th,
td {
width: 14%;
vertical-align: top;
text-align: center;
@ -144,7 +145,8 @@
}
}
.calendartable {
td, li {
td,
li {
padding: 5px;
}
li {
@ -250,7 +252,8 @@
}
}
.calendartable {
td, li {
td,
li {
text-align: right;
}
li {
@ -306,7 +309,8 @@
max-width: 280px;
margin: 0 auto;
width: 100%;
th, td {
th,
td {
padding: 2px;
font-size: 0.8em;
text-align: center;

View file

@ -277,22 +277,30 @@ img.iconsmall {
vertical-align: middle;
width: 12px;
}
img.iconhelp, .helplink img {
img.iconhelp,
.helplink img {
height: 16px;
padding-left: 3px;
vertical-align: text-bottom;
width: 16px;
}
h1 img.iconhelp, h1 img.icon,
h2 img.iconhelp, h2 img.icon,
h3 img.iconhelp, h3 img.icon,
h4 img.iconhelp, h4 img.icon,
h5 img.iconhelp, h5 img.icon,
h6 img.iconhelp, h6 img.icon {
h1 img.iconhelp,
h1 img.icon,
h2 img.iconhelp,
h2 img.icon,
h3 img.iconhelp,
h3 img.icon,
h4 img.iconhelp,
h4 img.icon,
h5 img.iconhelp,
h5 img.icon,
h6 img.iconhelp,
h6 img.icon {
vertical-align: middle;
padding: 4px;
}
.dir-rtl img.iconhelp, .dir-rtl .helplink img {
.dir-rtl img.iconhelp,
.dir-rtl .helplink img {
padding-right: 3px;
padding-left: 0;
}
@ -319,11 +327,13 @@ img.iconkbhelp {
height: 17px;
width: 49px;
}
img.icon-pre, .dir-rtl img.icon-post {
img.icon-pre,
.dir-rtl img.icon-post {
padding-right: 3px;
padding-left: 0;
}
img.icon-post, .dir-rtl img.icon-pre {
img.icon-post,
.dir-rtl img.icon-pre {
padding-left: 3px;
padding-right: 0;
}
@ -682,7 +692,7 @@ table.mod_index {
position: relative;
}
.comment-list li.first {
display: none
display: none;
}
.comment-paging {
text-align: center;
@ -721,19 +731,19 @@ table.mod_index {
margin: .3em;
}
.comment-report-selectall {
display: none
display: none;
}
.comment-link {
display: none
display: none;
}
.jsenabled .comment-link {
display: block
display: block;
}
.jsenabled .showcommentsnonjs {
display: none
display: none;
}
.jsenabled .comment-report-selectall {
display: inline
display: inline;
}
/**
* Completion progress report
@ -1248,7 +1258,9 @@ tr.flagged-tag a {
}
}
.user-enroller-panel .uep-search-results .user {
.count, .picture, .details {
.count,
.picture,
.details {
float: right;
}
.options .enrol {
@ -1259,7 +1271,7 @@ tr.flagged-tag a {
}
#page-enrol-users .enrol-users-page-action input {
margin-left: 0
margin-left: 0;
}
/**
@ -1311,7 +1323,7 @@ tr.flagged-tag a {
}
.label .mod-indent {
float: left;
padding-top:20px
padding-top: 20px;
}
/* Creates a series of .mod-indent-# rule declarations based on indent size and number of indent levels. */
@ -1333,10 +1345,10 @@ tr.flagged-tag a {
/* Audio player size in 'block' mode (can only change width, height is hardcoded in JS) */
.resourcecontent .mediaplugin_mp3 object {
height: 25px;
width: 600px
width: 600px;
}
.resourcecontent audio.mediaplugin_html5audio {
width: 600px
width: 600px;
}
/** Large resource images should avoid hidden overflow **/
.resourceimage {
@ -1345,10 +1357,10 @@ tr.flagged-tag a {
/* Audio player size in 'inline' mode (can only change width, as above) */
.mediaplugin_mp3 object {
height: 15px;
width: 300px
width: 300px;
}
audio.mediaplugin_html5audio {
width: 300px
width: 300px;
}
/* TinyMCE moodle media preview frame should not have padding */
.core_media_preview.pagelayout-embedded #content {
@ -1421,7 +1433,7 @@ body#page-lib-editor-tinymce-plugins-moodlemedia-preview {
}
.dir-rtl .ygtvlph,
.dir-rtl .ygtvlphh {
background-position: 0 -3200px
background-position: 0 -3200px;
}
.dir-rtl .ygtvdepthcell {
background-position: 0 -8000px;
@ -1445,7 +1457,8 @@ body#page-lib-editor-tinymce-plugins-moodlemedia-preview {
text-align: right;
}
/** Fix TinyMCE editor right to left **/
.dir-rtl .clearlooks2.ie9 .mceAlert .mceMiddle span,.dir-rtl .clearlooks2 .mceConfirm .mceMiddle span {
.dir-rtl .clearlooks2.ie9 .mceAlert .mceMiddle span,
.dir-rtl .clearlooks2 .mceConfirm .mceMiddle span {
top: 44px;
}
.dir-rtl .o2k7Skin table,
@ -1475,7 +1488,8 @@ body#page-lib-editor-tinymce-plugins-moodlemedia-preview {
text-align: center;
}
.initialbar {
a, strong {
a,
strong {
padding-left: 3px;
padding-right: 3px;
}
@ -1601,7 +1615,7 @@ body#page-lib-editor-tinymce-plugins-moodlemedia-preview {
text-align: center;
}
.moodle-dialogue-exception .moodle-exception-message {
text-align: center
text-align: center;
}
.moodle-dialogue-exception .moodle-exception-param label {
font-weight: bold;
@ -1639,7 +1653,7 @@ body#page-lib-editor-tinymce-plugins-moodlemedia-preview {
margin: 0.5em 1em;
}
.moodle-dialogue-confirm .confirmation-dialogue input {
min-width: 80px
min-width: 80px;
}
.moodle-dialogue-exception .moodle-exception-message {
margin: 1em;
@ -2347,25 +2361,88 @@ img#persona_signin {
}
/** bottom left of button **/
&.align-tl-bl {top: 100%;left:0;margin-top: 4px;}
&.align-tr-bl {top: 100%;right: 100%;}
&.align-bl-bl {bottom: 100%;left:0;}
&.align-br-bl {bottom: 100%;right: 100%;}
&.align-tl-bl {
top: 100%;
left: 0;
margin-top: 4px;
}
&.align-tr-bl {
top: 100%;
right: 100%;
}
&.align-bl-bl {
bottom: 100%;
left: 0;
}
&.align-br-bl {
bottom: 100%;
right: 100%;
}
/** bottom right of button **/
&.align-tl-br {top: 100%;left:100%;}
&.align-tr-br {top: 100%;right: 0;margin-top: 4px;}
&.align-bl-br {bottom: 100%;left:100%;}
&.align-br-br {bottom: 100%;right: 0;}
&.align-tl-br {
top: 100%;
left: 100%;
}
&.align-tr-br {
top: 100%;
right: 0;
margin-top: 4px;
}
&.align-bl-br {
bottom: 100%;
left: 100%;
}
&.align-br-br {
bottom: 100%;
right: 0;
}
/** top left of button **/
&.align-tl-tl {top: 0;left:0;}
&.align-tr-tl {top: 0;right: 100%;margin-right: 4px;}
&.align-bl-tl {bottom: 100%;left:0;margin-bottom: 4px;}
&.align-br-tl {bottom: 100%;right: 100%;}
&.align-tl-tl {
top: 0;
left: 0;
}
&.align-tr-tl {
top: 0;
right: 100%;
margin-right: 4px;
}
&.align-bl-tl {
bottom: 100%;
left: 0;
margin-bottom: 4px;
}
&.align-br-tl {
bottom: 100%;
right: 100%;
}
/** top right of button **/
&.align-tl-tr {top: 0;left:100%;margin-left: 4px;}
&.align-tr-tr {top: 0;right: 0;}
&.align-bl-tr {bottom: 100%;left:100%;}
&.align-br-tr {bottom: 100%;right: 0;margin-bottom: 4px;}
&.align-tl-tr {
top: 0;
left: 100%;
margin-left: 4px;
}
&.align-tr-tr {
top: 0;
right: 0;
}
&.align-bl-tr {
bottom: 100%;
left: 100%;
}
&.align-br-tr {
bottom: 100%;
right: 0;
margin-bottom: 4px;
}
}
/** no wrap is set - prevent menu items from wrapping **/
&.nowrap-items .menu > li {
@ -2393,25 +2470,85 @@ img#persona_signin {
}
/** bottom left of button **/
&.align-tl-bl {left: auto; right: 0;}
&.align-tr-bl {right: auto; left: 100%;}
&.align-bl-bl {left: auto; right: 0;}
&.align-br-bl {right: auto; left: 100%;}
&.align-tl-bl {
left: auto;
right: 0;
}
&.align-tr-bl {
right: auto;
left: 100%;
}
&.align-bl-bl {
left: auto;
right: 0;
}
&.align-br-bl {
right: auto;
left: 100%;
}
/** bottom right of button **/
&.align-tl-br {left: auto; right: 100%;}
&.align-tr-br {right: auto; left: 0;}
&.align-bl-br {left: auto; right: 100%;}
&.align-br-br {right: auto; left: 0;}
&.align-tl-br {
left: auto;
right: 100%;
}
&.align-tr-br {
right: auto;
left: 0;
}
&.align-bl-br {
left: auto;
right: 100%;
}
&.align-br-br {
right: auto;
left: 0;
}
/** top left of button **/
&.align-tl-tl {left: auto; right: 0;}
&.align-tr-tl {right: auto; left: 100%;}
&.align-bl-tl {left: auto; right: 0;}
&.align-br-tl {right: auto; left: 100%;}
&.align-tl-tl {
left: auto;
right: 0;
}
&.align-tr-tl {
right: auto;
left: 100%;
}
&.align-bl-tl {
left: auto;
right: 0;
}
&.align-br-tl {
right: auto;
left: 100%;
}
/** top right of button **/
&.align-tl-tr {left: auto; right: 100%;}
&.align-tr-tr {right: auto; left: 0;}
&.align-bl-tr {left: auto; right: 100%;}
&.align-br-tr {right: auto; left: 0;}
&.align-tl-tr {
left: auto;
right: 100%;
}
&.align-tr-tr {
right: auto;
left: 0;
}
&.align-bl-tr {
left: auto;
right: 100%;
}
&.align-br-tr {
right: auto;
left: 0;
}
}
}
.block .moodle-actionmenu {

View file

@ -1,5 +1,6 @@
/* course.less */
/* COURSE CONTENT */
/* stylelint-disable unit-blacklist */
.section_add_menus {
text-align: right;
clear: both;
@ -339,7 +340,8 @@
}
.course-content ul li.section.hidden {
.sectionname > span,
.content > div, /* All the divs but the activities which are in a UL. */
.content > div,
/* All the divs but the activities which are in a UL. */
.activity .activityinstance {
opacity: .5;
}
@ -396,7 +398,7 @@
}
.path-course-view .completionprogress {
margin-left: 25px
margin-left: 25px;
}
.path-course-view .completionprogress {
@ -944,7 +946,9 @@ span.editinstructions {
padding-left: 1rem;
}
.moodle-actionmenu:not([data-enhanced]) {
li {line-height:normal;}
li {
line-height: normal;
}
> .menubar a {
color: inherit;
display: inline-block;
@ -989,14 +993,37 @@ span.editinstructions {
}
// Tree item indenting to represent depth.
.tree-icon {margin-left:0;}
li .tree-icon {margin-left:1em;}
li li .tree-icon {margin-left:2em;}
li li li .tree-icon {margin-left:3em;}
li li li li .tree-icon {margin-left:4em;}
li li li li li .tree-icon {margin-left:4.5em;}
li li li li li li .tree-icon {margin-left:5em;}
li li li li li li li .tree-icon {margin-left:5.5em;}
.tree-icon {
margin-left: 0;
}
li .tree-icon {
margin-left: 1em;
}
li li .tree-icon {
margin-left: 2em;
}
li li li .tree-icon {
margin-left: 3em;
}
li li li li .tree-icon {
margin-left: 4em;
}
li li li li li .tree-icon {
margin-left: 4.5em;
}
li li li li li li .tree-icon {
margin-left: 5em;
}
li li li li li li li .tree-icon {
margin-left: 5.5em;
}
}
.item-actions {
@ -1232,14 +1259,37 @@ span.editinstructions {
}
// Tree item indenting to represent depth.
.tree-icon {margin-right:0;}
li .tree-icon {margin-right:1em;}
li li .tree-icon {margin-right:2em;}
li li li .tree-icon {margin-right:3em;}
li li li li .tree-icon {margin-right:4em;}
li li li li li .tree-icon {margin-right:4.5em;}
li li li li li li .tree-icon {margin-right:5em;}
li li li li li li li .tree-icon {margin-right:5.5em;}
.tree-icon {
margin-right: 0;
}
li .tree-icon {
margin-right: 1em;
}
li li .tree-icon {
margin-right: 2em;
}
li li li .tree-icon {
margin-right: 3em;
}
li li li li .tree-icon {
margin-right: 4em;
}
li li li li li .tree-icon {
margin-right: 4.5em;
}
li li li li li li .tree-icon {
margin-right: 5em;
}
li li li li li li li .tree-icon {
margin-right: 5.5em;
}
}
#category-listing {
.listitem {

View file

@ -34,7 +34,8 @@ table {
table.flexible,
.generaltable,
.generaltable thead:first-child tr:first-child {
td , th {
td,
th {
text-align: right;
}
}
@ -46,7 +47,8 @@ table {
}
#page-admin-course-index.dir-rtl .editcourse {
td , th {
td,
th {
text-align: right;
}
}

View file

@ -833,8 +833,7 @@ a.ygtvspacer:hover {
.fp-toolbar .fp-tb-help,
.fp-toolbar .fp-tb-manage,
.fp-toolbar .fp-tb-logout,
.fp-toolbar .fp-tb-refresh
{
.fp-toolbar .fp-tb-refresh {
border: 1px solid #CCC;
border-bottom: 1px solid #B3B3B3;
border-radius: 4px;
@ -859,8 +858,7 @@ a.ygtvspacer:hover {
.fp-tb-help a,
.fp-tb-manage a,
.fp-tb-logout a,
.fp-tb-refresh a
{
.fp-tb-refresh a {
display: block;
width: 30px;
height: 30px;

View file

@ -18,7 +18,7 @@ form {
display: block;
}
.mform fieldset.group {
margin-bottom: 0
margin-bottom: 0;
}
.mform fieldset.error {
border: 1px solid @errorText;
@ -489,9 +489,11 @@ fieldset.coursesearchbox label {
* 1199px + (1199px * 23%)
* Where 23% is the width of span3
* Full calculation is:
* @maxWidthForVerticalForms: 1199px * (unit(((@fluidGridColumnWidth1200 * 3) + (@fluidGridGutterWidth * (3 - 1)))) / 100) + 1199px;
* @maxWidthForVerticalForms: 1199px * (unit(((@fluidGridColumnWidth1200 * 3) +
* (@fluidGridGutterWidth * (3 - 1)))) / 100) + 1199px;
*/
@maxWidthForVerticalForms: 1474px;
@media (max-width: @maxWidthForVerticalForms) {
.used-region-side-pre.used-region-side-post {
.makeFormsVertical;

View file

@ -72,7 +72,8 @@
}
.gradingform_rubric.editor {
.addlevel, .addcriterion {
.addlevel,
.addcriterion {
input {
// Fallback for IE8: we use Bootstrap 2's button styles normally, but
// IE8 ignores background-image: linear-gradient rules.
@ -183,7 +184,8 @@
// Should handle at least three chars with room to spare.
float: none;
width: 2em;
&.hiddenelement,&.pseudotablink {
&.hiddenelement,
&.pseudotablink {
// Zero out the width if it's still in the block flow for some reason
// when hidden
width: 0;

View file

@ -163,6 +163,7 @@ table.message .searchresults td {
border-left: 1px solid @tableBorder;
padding: 0 8px;
}
@media screen and (max-width: 1000px) {
width: 100%;
}
@ -223,12 +224,13 @@ table.message .searchresults td {
margin: 0 3%;
}
.message .messagearea .messagehistory .user {
width: 32%
width: 32%;
}
}
@media screen and (min-width: 1200px) {
.message .messagearea .messagehistory .user {
width: 25%
width: 25%;
}
}
.message .messagearea .messagehistory .heading {
@ -321,7 +323,8 @@ table.message .searchresults td {
.message .visible {
display: inline;
}
.message #usergroupselector.fieldset, .message #viewing {
.message #usergroupselector.fieldset,
.message #viewing {
width: 100%;
}
.messagesearchresults {

View file

@ -53,7 +53,9 @@ select {
}
}
.discussion {
.author, .replies, .lastpost {
.author,
.replies,
.lastpost {
white-space: normal;
}
.discussionsubscription,
@ -148,7 +150,8 @@ select {
border-top: 2px solid @tableBorder;
}
.maincalendar .calendarmonth td,.maincalendar .calendarmonth th {
.maincalendar .calendarmonth td,
.maincalendar .calendarmonth th {
border: 1px dotted @tableBorder;
}
@ -299,11 +302,21 @@ div#dock {
.path-mod-survey {
.surveytable {
> tbody > tr:nth-of-type(odd) {background-color: @tableBackground;}
> tbody > tr:nth-of-type(even) {background-color: @tableBackgroundAccent;}
.rblock label {text-align: center;}
> tbody > tr:nth-of-type(odd) {
background-color: @tableBackground;
}
.resultgraph, .reportsummary, .studentreport, .reportbuttons, .centerpara {
> tbody > tr:nth-of-type(even) {
background-color: @tableBackgroundAccent;
}
.rblock label {
text-align: center;
}
}
.resultgraph,
.reportsummary,
.studentreport,
.reportbuttons,
.centerpara {
text-align: center;
}
}
@ -596,7 +609,6 @@ div#dock {
}
.box-shadow (0 5px 10px rgba(0, 0, 0, 0.2));
}
&:hover .toggle-display {}
}
}
}

View file

@ -74,6 +74,9 @@
border-bottom: 1px solid #bbb;
padding: 0.24em 0;
}
// TODO: MDL-55142 remove browser these brwoser hacks:
/* stylelint-disable declaration-block-no-duplicate-properties, no-browser-hacks */
#chooseqtype .alloptions {
overflow-x: hidden;
overflow-y: auto;
@ -85,6 +88,8 @@
max-height: 60vh;
width: 60%;
}
/* stylelint-enable */
#chooseqtype .qtypeoption {
margin-bottom: 0;
padding: 0.3em 0.3em 0.3em 1.6em;
@ -239,8 +244,7 @@ body.path-question-type .fitem_fgroup .accesshide {
.path-mod-quiz input[size] {
width: auto;
}
.que .outcome {
}
.que .comment {
.alert-success;
}
@ -414,7 +418,8 @@ body.path-question-type .fitem_fgroup .accesshide {
#page-mod-quiz-edit .createnewquestion {
padding: 0.3em 0;
div, input {
div,
input {
margin: 0;
}
}
@ -502,7 +507,8 @@ body.path-question-type .fitem_fgroup .accesshide {
strong {
display: block;
}
hr, br {
hr,
br {
display: none;
}
strong {

View file

@ -3,6 +3,9 @@
// Should probably be moved to relevant .less files
// after 4095 selector issue is solved
// TODO: MDL-55142 remove browser hacks in this file:
/* stylelint-disable declaration-block-no-duplicate-properties, no-browser-hacks */
@media (min-width: 980px) {
.dir-rtl .navbar .nav.pull-right,
.dir-rtl .navbar .logininfo {
@ -349,6 +352,7 @@
display: inline;
}
}
@media (max-width: 767px) {
.row-fluid .desktop-first-column {
clear: both;
@ -450,8 +454,7 @@
.dropdown-menu > li > a:hover,
.dropdown-menu > li > a:focus,
.dropdown-submenu:hover > a,
.dropdown-submenu:focus > a
{
.dropdown-submenu:focus > a {
background-image: none;
color: @grayDark;
}
@ -480,7 +483,9 @@
font-size: round(@fontSizeSmall);
}
.discussion {
.author, .replies, .lastpost {
.author,
.replies,
.lastpost {
font-size: round(@fontSizeSmall);
}
.replies .unread a {

View file

@ -1,5 +1,7 @@
/* Styling for mustache templates */
// TODO: MDL-55142 remove browser these brwoser hacks:
/* stylelint-disable declaration-block-no-duplicate-properties, no-browser-hacks */
// RTL styles for column templates.
#grid {
// A mixin to set styles for the fluid row when RTL language enabled.
@ -20,6 +22,8 @@
}
}
}
/* stylelint-enable */
// Style for template 3 columns auto.
.columns-autoflow-1to1to1 {

View file

@ -238,7 +238,8 @@
> .singlebutton {
display: inline-block;
margin: 0 0 0 0.5em;
div, input {
div,
input {
margin: 0;
}
}