Skip to content

Commit

Permalink
Merge branch 'MDL-64506' of git://github.com/Chocolate-lightning/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
sarjona committed Apr 3, 2019
2 parents f3971a2 + 5db1ce5 commit 86c3df9
Show file tree
Hide file tree
Showing 1,068 changed files with 1,280 additions and 70,071 deletions.
6 changes: 1 addition & 5 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,4 @@ theme/boost/amd/src/tab.js
theme/boost/amd/src/tooltip.js
theme/boost/amd/src/util.js
theme/boost/amd/src/tether.js
theme/boost/scss/fontawesome/
theme/bootstrapbase/less/bootstrap/
theme/bootstrapbase/javascript/html5shiv.js
theme/bootstrapbase/amd/src/bootstrap.js
theme/bootstrapbase/less/fontawesome/
theme/boost/scss/fontawesome/
2 changes: 0 additions & 2 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
**/yui/build/** -diff
**/amd/build/** -diff
lib/dml/oci_native_moodle_package.sql text eol=lf
theme/bootstrapbase/style/editor.css -diff
theme/bootstrapbase/style/moodle.css -diff
9 changes: 1 addition & 8 deletions .stylelintignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
# Generated by "grunt ignorefiles"
**/yui/build/*
theme/bootstrapbase/style/
theme/clean/style/custom.css
theme/more/style/custom.css
theme/boost/style/moodle.css
theme/classic/style/moodle.css
node_modules/
Expand Down Expand Up @@ -88,8 +85,4 @@ theme/boost/amd/src/tab.js
theme/boost/amd/src/tooltip.js
theme/boost/amd/src/util.js
theme/boost/amd/src/tether.js
theme/boost/scss/fontawesome/
theme/bootstrapbase/less/bootstrap/
theme/bootstrapbase/javascript/html5shiv.js
theme/bootstrapbase/amd/src/bootstrap.js
theme/bootstrapbase/less/fontawesome/
theme/boost/scss/fontawesome/
34 changes: 1 addition & 33 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,17 +126,6 @@ module.exports = function(grunt) {
options: {report: 'none'}
}
},
less: {
bootstrapbase: {
files: {
"theme/bootstrapbase/style/moodle.css": "theme/bootstrapbase/less/moodle.less",
"theme/bootstrapbase/style/editor.css": "theme/bootstrapbase/less/editor.less",
},
options: {
compress: false // We must not compress to keep the comments.
}
}
},
sass: {
dist: {
files: {
Expand All @@ -156,10 +145,6 @@ module.exports = function(grunt) {
files: ['**/amd/src/**/*.js'],
tasks: ['amd']
},
bootstrapbase: {
files: ["theme/bootstrapbase/less/**/*.less"],
tasks: ["css"]
},
yui: {
files: ['**/yui/src/**/*.js'],
tasks: ['yui']
Expand All @@ -181,18 +166,6 @@ module.exports = function(grunt) {
}
},
stylelint: {
less: {
options: {
syntax: 'less',
configOverrides: {
rules: {
// These rules have to be disabled in .stylelintrc for scss compat.
"at-rule-no-unknown": true,
}
}
},
src: ['theme/**/*.less']
},
scss: {
options: {syntax: 'scss'},
src: ['*/**/*.scss']
Expand Down Expand Up @@ -224,9 +197,6 @@ module.exports = function(grunt) {
var stylelintIgnores = [
'# Generated by "grunt ignorefiles"',
'**/yui/build/*',
'theme/bootstrapbase/style/',
'theme/clean/style/custom.css',
'theme/more/style/custom.css',
'theme/boost/style/moodle.css',
'theme/classic/style/moodle.css',
].concat(thirdPartyPaths);
Expand Down Expand Up @@ -362,7 +332,6 @@ 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);
grunt.config('gherkinlint.options.files', files);
changedFiles = Object.create(null);
}, 200);
Expand All @@ -374,7 +343,6 @@ module.exports = function(grunt) {

// Register NPM tasks.
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-less');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-sass');
grunt.loadNpmTasks('grunt-eslint');
Expand All @@ -389,7 +357,7 @@ module.exports = function(grunt) {
grunt.registerTask('js', ['amd', 'yui']);

// Register CSS taks.
grunt.registerTask('css', ['stylelint:scss', 'sass', 'stylelint:less', 'less:bootstrapbase', 'stylelint:css']);
grunt.registerTask('css', ['stylelint:scss', 'sass', 'stylelint:css']);

// Register the startup task.
grunt.registerTask('startup', 'Run the correct tasks for the current directory', tasks.startup);
Expand Down
2 changes: 1 addition & 1 deletion admin/cli/cfg.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
Stores the given configuration variable in the shell variable, escaped
so that it can be safely used as a shell argument.
# php cfg.php --name=theme --set=clean
# php cfg.php --name=theme --set=classic
Sets the given configuration variable to the given value.
# php cfg.php --name=noemailever --unset
Expand Down
42 changes: 21 additions & 21 deletions admin/renderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -1066,7 +1066,7 @@ public function plugins_check_table(core_plugin_manager $pluginman, $version, ar
$sourcelabel = html_writer::span(get_string('sourcestd', 'core_plugin'), 'sourcetext label');
} else {
$row->attributes['class'] .= ' extension';
$sourcelabel = html_writer::span(get_string('sourceext', 'core_plugin'), 'sourcetext label label-info');
$sourcelabel = html_writer::span(get_string('sourceext', 'core_plugin'), 'sourcetext badge badge-info');
}

$coredependency = $plugin->is_core_dependency_satisfied($version);
Expand All @@ -1078,19 +1078,19 @@ public function plugins_check_table(core_plugin_manager $pluginman, $version, ar
$statusclass = 'statustext label ';
switch ($statuscode) {
case core_plugin_manager::PLUGIN_STATUS_NEW:
$statusclass .= $dependenciesok ? 'label-success' : 'label-warning';
$statusclass .= $dependenciesok ? 'badge-success' : 'badge-warning';
break;
case core_plugin_manager::PLUGIN_STATUS_UPGRADE:
$statusclass .= $dependenciesok ? 'label-info' : 'label-warning';
$statusclass .= $dependenciesok ? 'badge-info' : 'badge-warning';
break;
case core_plugin_manager::PLUGIN_STATUS_MISSING:
case core_plugin_manager::PLUGIN_STATUS_DOWNGRADE:
case core_plugin_manager::PLUGIN_STATUS_DELETE:
$statusclass .= 'label-important';
$statusclass .= 'badge-danger';
break;
case core_plugin_manager::PLUGIN_STATUS_NODB:
case core_plugin_manager::PLUGIN_STATUS_UPTODATE:
$statusclass .= $dependenciesok ? '' : 'label-warning';
$statusclass .= $dependenciesok ? '' : 'badge-warning';
break;
}
$status = html_writer::span(get_string('status_' . $statuscode, 'core_plugin'), $statusclass);
Expand Down Expand Up @@ -1363,7 +1363,7 @@ protected function available_missing_dependencies_list(core_plugin_manager $plug
$supportedmoodles = array();
foreach ($plugin->version->supportedmoodles as $moodle) {
if ($CFG->branch == str_replace('.', '', $moodle->release)) {
$supportedmoodles[] = html_writer::span($moodle->release, 'label label-success');
$supportedmoodles[] = html_writer::span($moodle->release, 'badge badge-success');
} else {
$supportedmoodles[] = html_writer::span($moodle->release, 'label');
}
Expand Down Expand Up @@ -1468,7 +1468,7 @@ protected function required_column(\core\plugininfo\base $plugin, core_plugin_ma
$label = '';
} else {
$class = 'requires-failed';
$label = html_writer::span(get_string('dependencyfails', 'core_plugin'), 'label label-important');
$label = html_writer::span(get_string('dependencyfails', 'core_plugin'), 'badge badge-danger');
}
$requires[] = html_writer::tag('li',
html_writer::span(get_string('moodleversion', 'core_plugin', $plugin->versionrequires), 'dep dep-core').
Expand All @@ -1483,33 +1483,33 @@ protected function required_column(\core\plugininfo\base $plugin, core_plugin_ma

} else if ($reqinfo->status == $pluginman::REQUIREMENT_STATUS_MISSING) {
if ($reqinfo->availability == $pluginman::REQUIREMENT_AVAILABLE) {
$label = html_writer::span(get_string('dependencymissing', 'core_plugin'), 'label label-warning');
$label .= ' '.html_writer::span(get_string('dependencyavailable', 'core_plugin'), 'label label-warning');
$label = html_writer::span(get_string('dependencymissing', 'core_plugin'), 'badge badge-warning');
$label .= ' '.html_writer::span(get_string('dependencyavailable', 'core_plugin'), 'badge badge-warning');
$class = 'requires-failed requires-missing requires-available';
$actions[] = html_writer::link(
new moodle_url('https://moodle.org/plugins/view.php', array('plugin' => $reqname)),
get_string('misdepinfoplugin', 'core_plugin')
);

} else {
$label = html_writer::span(get_string('dependencymissing', 'core_plugin'), 'label label-important');
$label = html_writer::span(get_string('dependencymissing', 'core_plugin'), 'badge badge-danger');
$label .= ' '.html_writer::span(get_string('dependencyunavailable', 'core_plugin'),
'label label-important');
'badge badge-danger');
$class = 'requires-failed requires-missing requires-unavailable';
}
$displayuploadlink = true;

} else if ($reqinfo->status == $pluginman::REQUIREMENT_STATUS_OUTDATED) {
if ($reqinfo->availability == $pluginman::REQUIREMENT_AVAILABLE) {
$label = html_writer::span(get_string('dependencyfails', 'core_plugin'), 'label label-warning');
$label .= ' '.html_writer::span(get_string('dependencyavailable', 'core_plugin'), 'label label-warning');
$label = html_writer::span(get_string('dependencyfails', 'core_plugin'), 'badge badge-warning');
$label .= ' '.html_writer::span(get_string('dependencyavailable', 'core_plugin'), 'badge badge-warning');
$class = 'requires-failed requires-outdated requires-available';
$displayupdateslink = true;

} else {
$label = html_writer::span(get_string('dependencyfails', 'core_plugin'), 'label label-important');
$label = html_writer::span(get_string('dependencyfails', 'core_plugin'), 'badge badge-danger');
$label .= ' '.html_writer::span(get_string('dependencyunavailable', 'core_plugin'),
'label label-important');
'badge badge-danger');
$class = 'requires-failed requires-outdated requires-unavailable';
}
$displayuploadlink = true;
Expand Down Expand Up @@ -1773,13 +1773,13 @@ public function plugins_control_panel(core_plugin_manager $pluginman, array $opt
$source = '';
} else {
$row->attributes['class'] .= ' extension';
$source = html_writer::div(get_string('sourceext', 'core_plugin'), 'source label label-info');
$source = html_writer::div(get_string('sourceext', 'core_plugin'), 'source badge badge-info');
}

if ($status === core_plugin_manager::PLUGIN_STATUS_MISSING) {
$msg = html_writer::div(get_string('status_missing', 'core_plugin'), 'statusmsg label label-important');
$msg = html_writer::div(get_string('status_missing', 'core_plugin'), 'statusmsg badge badge-danger');
} else if ($status === core_plugin_manager::PLUGIN_STATUS_NEW) {
$msg = html_writer::div(get_string('status_new', 'core_plugin'), 'statusmsg label label-success');
$msg = html_writer::div(get_string('status_new', 'core_plugin'), 'statusmsg badge badge-success');
} else {
$msg = '';
}
Expand Down Expand Up @@ -2018,13 +2018,13 @@ public function environment_check_table($result, $environment_results) {
// Format error or warning line
if ($errorline) {
$messagetype = 'error';
$statusclass = 'label-important';
$statusclass = 'badge-danger';
} else if ($warningline) {
$messagetype = 'warn';
$statusclass = 'label-warning';
$statusclass = 'badge-warning';
} else {
$messagetype = 'ok';
$statusclass = 'label-success';
$statusclass = 'badge-success';
}
$status = html_writer::span($status, 'label ' . $statusclass);
// Here we'll store all the feedback found
Expand Down
2 changes: 1 addition & 1 deletion admin/roles/module.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ M.core_role.init_cap_table_filter = function(Y, tableid, contextid) {
marginRight : 'auto'
});
// Create the capability search input.
this.input = Y.Node.create('<input class="form-control m-x-1" type="text"' +
this.input = Y.Node.create('<input class="form-control mx-1" type="text"' +
' id="'+this.table.get('id')+'capabilitysearch" value="'+Y.Escape.html(filtervalue)+'" />');
// Create a label for the search input.
this.label = Y.Node.create('<label for="' + this.input.get('id') + '">' +
Expand Down
1 change: 0 additions & 1 deletion admin/settings/appearance.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
$temp->add(new admin_setting_configcheckbox('allowcohortthemes', new lang_string('allowcohortthemes', 'admin'), new lang_string('configallowcohortthemes', 'admin'), 0));
$temp->add(new admin_setting_configcheckbox('allowthemechangeonurl', new lang_string('allowthemechangeonurl', 'admin'), new lang_string('configallowthemechangeonurl', 'admin'), 0));
$temp->add(new admin_setting_configcheckbox('allowuserblockhiding', new lang_string('allowuserblockhiding', 'admin'), new lang_string('configallowuserblockhiding', 'admin'), 1));
$temp->add(new admin_setting_configcheckbox('allowblockstodock', new lang_string('allowblockstodock', 'admin'), new lang_string('configallowblockstodock', 'admin'), 1));
$temp->add(new admin_setting_configtextarea('custommenuitems', new lang_string('custommenuitems', 'admin'),
new lang_string('configcustommenuitems', 'admin'), '', PARAM_RAW, '50', '10'));
$temp->add(new admin_setting_configtextarea(
Expand Down
4 changes: 2 additions & 2 deletions admin/tool/analytics/classes/output/renderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public function render_evaluate_results($results, $logs = array()) {
foreach ($results as $timesplittingid => $result) {

if (!CLI_SCRIPT) {
$output .= $OUTPUT->box_start('generalbox m-b-3');
$output .= $OUTPUT->box_start('generalbox mb-3');
}

// Check that the array key is a string, not all results depend on time splitting methods (e.g. general errors).
Expand Down Expand Up @@ -177,7 +177,7 @@ public function render_get_predictions_results($trainresults = false, $trainlogs
}

if ($predictresults || (!empty($predictlogs) && debugging())) {
$output .= $OUTPUT->heading(get_string('predictionresults', 'tool_analytics'), 3, 'main m-t-3');
$output .= $OUTPUT->heading(get_string('predictionresults', 'tool_analytics'), 3, 'main mt-3');
}

if ($predictresults) {
Expand Down
6 changes: 3 additions & 3 deletions admin/tool/analytics/templates/invalid_analysables.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,12 @@
<h3>{{#str}}modelinvalidanalysables, tool_analytics, {{modelname}}{{/str}}</h3>
<div>{{#str}}invalidanalysablesinfo, tool_analytics{{/str}}</div>
{{#noanalysables}}
<div class="m-t-2 m-b-1">
<div class="mt-2 mb-1">
{{> core/notification_info}}
</div>
{{/noanalysables}}
{{^noanalysables}}
<div class="m-t-2 m-b-1">
<div class="mt-2 mb-1">
<span>{{#prev}}{{> core/single_button}}{{/prev}}</span>
<span>{{#next}}{{> core/single_button}}{{/next}}</span>
</div>
Expand All @@ -77,7 +77,7 @@
{{/analysables}}
</tbody>
</table>
<div class="m-t-1 m-b-2">
<div class="mt-1 mb-2">
<span>{{#prev}}{{> core/single_button}}{{/prev}}</span>
<span>{{#next}}{{> core/single_button}}{{/next}}</span>
</div>
Expand Down
4 changes: 2 additions & 2 deletions admin/tool/analytics/templates/models_list.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,8 @@

<div class="box">
<div class="top-nav d-flex">
<a href="{{createmodelurl}}" class="btn btn-default mr-2">{{#str}}createmodel, tool_analytics{{/str}}</a>
<a href="{{importmodelurl}}" class="btn btn-default">{{#str}}importmodel, tool_analytics{{/str}}</a>
<a href="{{createmodelurl}}" class="btn btn-secondary mr-2">{{#str}}createmodel, tool_analytics{{/str}}</a>
<a href="{{importmodelurl}}" class="btn btn-secondary">{{#str}}importmodel, tool_analytics{{/str}}</a>
</div>
<table class="generaltable fullwidth">
<caption>{{#str}}analyticmodels, tool_analytics{{/str}}</caption>
Expand Down
2 changes: 1 addition & 1 deletion admin/tool/cohortroles/templates/cohort-in-list.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"visible": true,
"idnumber": "014",
"description": "Some users",
"theme": "clean"
"theme": "classic"
}
}}
{{> tool_lp/form-cohort-selector-suggestion }}
Loading

0 comments on commit 86c3df9

Please sign in to comment.