--- /dev/null
+{
+ 'env': {
+ 'browser': true,
+ 'amd': true
+ },
+ 'globals': {
+ 'M': true,
+ 'Y': true
+ },
+ 'rules': {
+ // See http://eslint.org/docs/rules/ for all rules and explanations of all
+ // rules. Commented out rules with 'DEFINE POLICY' are rules Dan P has flagged
+ // for discussion and possible enable soon.
+ // === Possible Errors ===
+ // DEFINE POLICY: 'comma-dangle': ['off', 'always'],
+ 'no-cond-assign': 'error',
+ 'no-console': 'error',
+ 'no-constant-condition': 'error',
+ 'no-control-regex': 'error',
+ 'no-debugger': 'error',
+ 'no-dupe-args': 'error',
+ 'no-dupe-keys': 'error',
+ 'no-duplicate-case': 'error',
+ // Disabled for YUI rollups, enabled by grunt for AMD: 'no-empty': 'error',
+ 'no-empty-character-class': 'error',
+ 'no-ex-assign': 'error',
+ 'no-extra-boolean-cast': 'error',
+ 'no-extra-parens': 'off',
+ 'no-extra-semi': 'error',
+ 'no-func-assign': 'error',
+ 'no-inner-declarations': 'error',
+ 'no-invalid-regexp': 'error',
+ 'no-irregular-whitespace': 'error',
+ 'no-negated-in-lhs': 'error',
+ 'no-obj-calls': 'error',
+ 'no-prototype-builtins': 'off',
+ 'no-regex-spaces': 'error',
+ 'no-sparse-arrays': 'error',
+ 'no-unexpected-multiline': 'error',
+ 'no-unreachable': 'warn',
+ 'no-unsafe-finally': 'error',
+ 'use-isnan': 'error',
+ 'valid-jsdoc': ['warn', { 'requireReturn': false }],
+ 'valid-typeof': 'error',
+
+ // === Best Practices ===
+ // (these mostly match our jshint config)
+ 'curly': 'error',
+ 'dot-notation': 'warn',
+ 'no-alert': 'warn',
+ 'no-caller': 'error',
+ 'no-case-declarations': 'error',
+ 'no-empty-pattern': 'error',
+ 'no-empty-function': 'warn',
+ //DEFINE POLICY: 'no-eq-null': 'warn',
+ 'no-eval': 'error',
+ //DEFINE POLICY: 'no-extra-bind': 'warn',
+ 'no-fallthrough': 'error',
+ //DEFINE POLICY: 'no-implicit-globals': 'warn',
+ 'no-implied-eval': 'error',
+ 'no-invalid-this': 'error',
+ 'no-iterator': 'error',
+ 'no-labels': 'error',
+ 'no-loop-func': 'error',
+ 'no-multi-spaces': 'warn',
+ 'no-multi-str': 'error',
+ 'no-native-reassign': 'warn',
+ 'no-new-func': 'error',
+ 'no-new-wrappers': 'error',
+ // DEFINE POLICY: no-octal: "error"
+ // DEFINE POLICY: no-octal-escape: "error"
+ 'no-proto': 'error',
+ 'no-redeclare': 'warn',
+ 'no-return-assign': 'error',
+ 'no-script-url': 'error',
+ 'no-self-assign': 'error',
+ 'no-self-compare': 'error',
+ 'no-unmodified-loop-condition': 'error',
+ // Disabled for YUI rollups, enabled by grunt for AMD: 'no-unused-expressions': 'error',
+ 'no-unused-labels': 'error',
+ //DEFINE POLICY: 'no-useless-call': 'error',
+ 'no-useless-escape': 'warn',
+ //DEFINE POLICY: 'no-with': 'error',
+ 'wrap-iife': ['error', 'any'],
+
+ // === Variables ===
+ 'no-delete-var': 'error',
+ // Disabled for YUI rollups, enabled by grunt for AMD: 'no-undef': 'off',
+ //DEFINE POLICY: 'no-undef-init': 'error',
+ // Disabled for YUI rollups, enabled by grunt for AMD: 'no-unused-vars': 'error',
+
+ // === Stylistic Issues ===
+ 'array-bracket-spacing': 'warn',
+ 'block-spacing': 'warn',
+ 'brace-style': ['warn', '1tbs'],
+ 'camelcase': 'warn',
+ 'comma-spacing': ['warn', { 'before': false, 'after': true }],
+ 'comma-style': ['warn', 'last'],
+ 'computed-property-spacing': 'error',
+ 'consistent-this': 'off',
+ 'eol-last': 'off',
+ 'func-names': 'off',
+ 'func-style': 'off',
+ // indent currently not doing well with our wrapping style, so disabled.
+ 'indent': ['off', 4, { 'SwitchCase': 1 }],
+ 'key-spacing': ['warn', { 'beforeColon': false, 'afterColon': true, 'mode': minimum }],
+ 'keyword-spacing': 'warn',
+ 'linebreak-style': ['error', 'unix'],
+ 'lines-around-comment': 'off',
+ 'max-len': ['error', 132],
+ 'max-lines': 'off',
+ // DEFINE POLICY: turn on some of these max values?
+ 'max-depth': 'off',
+ 'max-nested-callbacks': 'off',
+ 'max-params': 'off',
+ 'max-statements': 'off',
+ 'max-statements-per-line': 'off',
+ 'new-cap': 'warn',
+ 'new-parens': 'warn',
+ 'newline-after-var': 'off',
+ 'newline-before-return': 'off',
+ // REVIST POLICY: 'newline-per-chained-call': 'warn',
+ 'no-array-constructor': 'off',
+ 'no-bitwise': 'error',
+ 'no-continue': 'off',
+ 'no-inline-comments': 'off',
+ 'no-lonely-if': 'off',
+ 'no-mixed-operators': 'off',
+ 'no-mixed-spaces-and-tabs': 'error',
+ 'no-multiple-empty-lines': 'warn',
+ 'no-negated-condition': 'off',
+ 'no-nested-ternary': 'warn',
+ 'no-new-object': 'off',
+ 'no-plusplus': 'off',
+ 'no-spaced-func': 'warn',
+ 'no-ternary': 'off',
+ 'no-trailing-spaces': 'error',
+ 'no-underscore-dangle': 'off',
+ // DEFINE POLICY: 'no-unneeded-ternary': 'off',
+ 'no-whitespace-before-property': 'warn',
+ // DEFINE POLICY: 'object-curly-newline': 'off,
+ // DEFINE POLICY: 'object-curly-spacing': 'off',
+ // DEFINE POLICY: 'object-property-newline': 'off',
+ 'one-var': 'off',
+ // DEFINE POLICY: 'one-var-declaration-per-line': 'off',
+ 'operator-assignment': 'off',
+ 'operator-linebreak': 'off',
+ 'padded-blocks': 'off',
+ // DEFINE POLICY: 'quote-props': 'off',
+ 'quotes': 'off',
+ 'require-jsdoc': 'warn',
+ 'semi': 'error',
+ 'semi-spacing': ['warn', {'before': false, 'after': true}],
+ 'sort-vars': 'off',
+ 'space-before-blocks': 'warn',
+ 'space-before-function-paren': ['warn', 'never'],
+ 'space-in-parens': 'warn',
+ 'space-infix-ops': 'warn',
+ 'space-unary-ops': 'warn',
+ 'spaced-comment': 'warn',
+ 'unicode-bom': 'error',
+ 'wrap-regex': 'off',
+ }
+}
/lib/yuilib/*/*/*-coverage.js
atlassian-ide-plugin.xml
/node_modules/
+.eslintignore
# Postgres is significantly is pretty reasonable in its run-time.
# Run unit tests on MySQL
- - DB=mysqli PHPUNIT=true INSTALL=false CITEST=false
+ - DB=mysqli TASK=PHPUNIT
# Run CI Tests without running PHPUnit.
- - DB=none PHPUNIT=false INSTALL=false CITEST=true
+ - DB=none TASK=CITEST
# Run unit tests on Postgres
- - DB=pgsql PHPUNIT=true INSTALL=false CITEST=false
+ - DB=pgsql TASK=PHPUNIT
# Perform an upgrade test too.
- - DB=pgsql PHPUNIT=false INSTALL=true CITEST=false UPGRADE=true
+ - DB=pgsql TASK=UPGRADE
+
+ # Run a check for unbuilt files with Grunt.
+ - DB=none TASK=GRUNT
matrix:
# Enable fast finish.
exclude:
# MySQL - it's just too slow.
# Exclude it on all versions except for 7.0
- # - env: DB=mysqli PHPUNIT=true INSTALL=false CITEST=false
+ # - env: DB=mysqli TASK=PHPUNIT
# php: 5.6
#
- # - env: DB=mysqli PHPUNIT=true INSTALL=false CITEST=false
+ # - env: DB=mysqli TASK=PHPUNIT
# php: 5.5
- - env: DB=mysqli PHPUNIT=true INSTALL=false CITEST=false
+ - env: DB=mysqli TASK=PHPUNIT
+ php: 5.4
+
+ - env: DB=none TASK=GRUNT
php: 5.4
# Moodle 2.7 is not compatible with PHP 7 for the upgrade test.
- - env: DB=pgsql PHPUNIT=false INSTALL=true CITEST=false UPGRADE=true
+ - env: DB=pgsql TASK=UPGRADE
php: 7.0
cache:
directories:
- $HOME/.composer/cache
+ - $HOME/.npm
install:
# Disable xdebug. We aren't generating code coverage, and it has a huge impact upon test performance.
# Set the encrypted GITHUB_TOKEN if it's available to raise the API limit.
- if [ -n "$GITHUB_APITOKEN" ]; then composer config github-oauth.github.com $GITHUB_APITOKEN; fi
+ - echo 'auth.json' >> .git/info/exclude
# Install composer dependencies.
# We need --no-interaction in case we hit API limits for composer. This causes it to fall back to a standard clone.
before_script:
- >
- if [ "$INSTALL" = 'true' -o "$PHPUNIT" = 'true' ];
+ if [ "$TASK" = 'PHPUNIT' -o "$TASK" = 'UPGRADE' ];
then
# Copy generic configuration in place.
cp config-dist.php config.php ;
mysql -u root -e 'SET GLOBAL innodb_file_per_table=ON;' ;
mysql -e 'CREATE DATABASE travis_ci_test DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_bin;' ;
fi
+ fi
- if [ "$PHPUNIT" = 'true' ];
- then
- # Create a directory for the phpunit dataroot.
- mkdir -p "$HOME"/roots/phpunit
+ - >
+ if [ "$TASK" = 'PHPUNIT' ];
+ then
+ # Create a directory for the phpunit dataroot.
+ mkdir -p "$HOME"/roots/phpunit
- # The phpunit dataroot and prefix..
- sed -i \
- -e "/require_once/i \\\$CFG->phpunit_dataroot = '\/home\/travis\/roots\/phpunit';" \
- -e "/require_once/i \\\$CFG->phpunit_prefix = 'p_';" \
- config.php ;
+ # The phpunit dataroot and prefix..
+ sed -i \
+ -e "/require_once/i \\\$CFG->phpunit_dataroot = '\/home\/travis\/roots\/phpunit';" \
+ -e "/require_once/i \\\$CFG->phpunit_prefix = 'p_';" \
+ config.php ;
- # Initialise PHPUnit for Moodle.
- php admin/tool/phpunit/cli/init.php
- fi
+ # Initialise PHPUnit for Moodle.
+ php admin/tool/phpunit/cli/init.php
fi
-script:
- ########################################################################
- # PHPUnit
- ########################################################################
- >
- if [ "$PHPUNIT" = 'true' ];
+ if [ "$TASK" = 'GRUNT' ];
then
- vendor/bin/phpunit;
+ npm install ;
+ npm install -g grunt ;
+ grunt ;
fi
########################################################################
# CI Tests
########################################################################
- >
- if [ "$CITEST" = 'true' ];
+ if [ "$TASK" = 'CITEST' ];
then
# Note - this is deliberately placed in the script section as we
# should not add any code until after phpunit has run.
export phpcmd=`which php`;
fi
- # Actually run the CI Tests - do this outside of the main test to make output clearer.
- - >
- if [ "$CITEST" = 'true' ];
- then
- bash local/ci/php_lint/php_lint.sh;
- fi
-
########################################################################
# Upgrade test
########################################################################
- >
- if [ "$UPGRADE" = 'true' ];
+ if [ "$TASK" = 'UPGRADE' ];
then
# We need the official upstream.
git remote add upstream https://github.com/moodle/moodle.git;
# The local_ci repository can be used to check upgrade savepoints.
git clone https://github.com/moodlehq/moodle-local_ci.git local/ci ;
+ fi
+script:
+ - >
+ if [ "$TASK" = 'PHPUNIT' ];
+ then
+ vendor/bin/phpunit;
+ fi
+
+ - >
+ if [ "$TASK" = 'CITEST' ];
+ then
+ bash local/ci/php_lint/php_lint.sh;
+ fi
+
+ - >
+ if [ "$TASK" = 'GRUNT' ];
+ then
+ # Add all files to the git index and then run diff --cached to see all changes.
+ # This ensures that we get the status of all files, including new files.
+ git add . ;
+ git diff --cached --exit-code ;
+ fi
+
+ ########################################################################
+ # Upgrade test
+ ########################################################################
+ - >
+ if [ "$TASK" = 'UPGRADE' ];
+ then
cp local/ci/check_upgrade_savepoints/check_upgrade_savepoints.php ./check_upgrade_savepoints.php
result=`php check_upgrade_savepoints.php`;
# Check if there are problems
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/* jshint node: true, browser: false */
+/* eslint-env node */
/**
* @copyright 2014 Andrew Nicols
module.exports = function(grunt) {
var path = require('path'),
tasks = {},
- cwd = process.env.PWD || process.cwd();
+ cwd = process.env.PWD || process.cwd(),
+ async = require('async'),
+ DOMParser = require('xmldom').DOMParser,
+ xpath = require('xpath');
// Windows users can't run grunt in a subdirectory, so allow them to set
// the root by passing --root=path/to/dir.
var root = grunt.option('root');
if (grunt.file.exists(__dirname, root)) {
cwd = path.join(__dirname, root);
- grunt.log.ok('Setting root to '+cwd);
+ grunt.log.ok('Setting root to ' + cwd);
} else {
- grunt.fail.fatal('Setting root to '+root+' failed - path does not exist');
+ grunt.fail.fatal('Setting root to ' + root + ' failed - path does not exist');
}
}
* @param {String} srcPath the matched src path
* @return {String} The rewritten destination path.
*/
- var uglify_rename = function (destPath, srcPath) {
+ var uglifyRename = function(destPath, srcPath) {
destPath = srcPath.replace('src', 'build');
destPath = destPath.replace('.js', '.min.js');
destPath = path.resolve(cwd, destPath);
return destPath;
};
+ /**
+ * Find thirdpartylibs.xml and generate an array of paths contained within
+ * them (used to generate ignore files and so on).
+ *
+ * @return {array} The list of thirdparty paths.
+ */
+ var getThirdPartyPathsFromXML = function() {
+ var thirdpartyfiles = grunt.file.expand('*/**/thirdpartylibs.xml');
+ var libs = ['node_modules/', 'vendor/'];
+
+ thirdpartyfiles.forEach(function(file) {
+ var dirname = path.dirname(file);
+
+ var doc = new DOMParser().parseFromString(grunt.file.read(file));
+ var nodes = xpath.select("/libraries/library/location/text()", doc);
+
+ nodes.forEach(function(node) {
+ var lib = path.join(dirname, node.toString());
+ if (grunt.file.isDir(lib)) {
+ // Ensure trailing slash on dirs.
+ lib = lib.replace(/\/?$/, '/');
+ }
+
+ // Look for duplicate paths before adding to array.
+ if (libs.indexOf(lib) === -1) {
+ libs.push(lib);
+ }
+ });
+ });
+ return libs;
+ };
+
+ // An array of paths to third party directories.
+ var thirdPartyPaths = getThirdPartyPathsFromXML();
+
+ /**
+ * Determine if the file is a Moodle file, or its listed in
+ * the thirdpartylibs.xml file paths as a third party file.
+ *
+ * @param {string} file The file path to determine if thirdparty
+ * @return {bool} false If thid party file.
+ */
+ var isMoodleFile = function(file) {
+ if (grunt.file.isMatch(thirdPartyPaths, file)) {
+ return false;
+ }
+ return true;
+ };
+
// Project configuration.
grunt.initConfig({
jshint: {
options: {jshintrc: '.jshintrc'},
amd: { src: amdSrc }
},
+ eslint: {
+ // Even though warnings dont stop the build we don't display warnings by default because
+ // at this moment we've got too many core warnings.
+ options: { quiet: !grunt.option('show-lint-warnings') },
+ // Check AMD files. We add some stricter rules which we can't apply to the default configuration due
+ // to YUI rollups.
+ amd: {
+ src: amdSrc,
+ filter: isMoodleFile,
+ options: {
+ rules: {'no-undef': 'error', 'no-unused-vars': 'error', 'no-empty': 'error', 'no-unused-expressions': 'error'}
+ }
+ },
+ // Check YUI module source files.
+ yui: {
+ src: ['**/yui/src/**/*.js', '!*/**/yui/src/*/meta/*.js'],
+ filter: isMoodleFile
+ }
+ },
uglify: {
amd: {
files: [{
expand: true,
src: amdSrc,
- rename: uglify_rename
+ rename: uglifyRename
}]
}
},
},
yui: {
files: ['**/yui/src/**/*.js'],
- tasks: ['shifter']
+ tasks: ['yui']
},
},
shifter: {
}
});
+ /**
+ * Generate ignore files (utilising thirdpartylibs.xml data)
+ */
+ tasks.ignorefiles = function() {
+ // Generate .eslintignore.
+ var eslintIgnores = ['# Generated by "grunt ignorefiles"', '*/**/yui/src/*/meta/', '*/**/build/'].concat(thirdPartyPaths);
+ grunt.file.write('.eslintignore', eslintIgnores.join('\n'));
+ };
+
/**
* Shifter task. Is configured with a path to a specific file or a directory,
* in the case of a specific file it will work out the right module to be built.
* so be careful to to call done().
*/
tasks.shifter = function() {
- var async = require('async'),
- done = this.async(),
+ var done = this.async(),
options = grunt.config('shifter.options');
// Run the shifter processes one at a time to avoid confusing output.
- async.eachSeries(options.paths, function (src, filedone) {
+ async.eachSeries(options.paths, function(src, filedone) {
var args = [];
- args.push( path.normalize(__dirname + '/node_modules/shifter/bin/shifter'));
+ args.push(path.normalize(__dirname + '/node_modules/shifter/bin/shifter'));
// Always ignore the node_modules directory.
args.push('--excludes', 'node_modules');
cmd: "node",
args: args,
opts: {cwd: src, stdio: 'inherit', env: process.env}
- }, function (error, result, code) {
+ }, function(error, result, code) {
if (code) {
grunt.fail.fatal('Shifter failed with code: ' + code);
} else {
tasks.startup = function() {
// Are we in a YUI directory?
if (path.basename(path.resolve(cwd, '../../')) == 'yui') {
- grunt.task.run('shifter');
+ grunt.task.run('yui');
// Are we in an AMD directory?
} else if (inAMD) {
grunt.task.run('amd');
var onChange = grunt.util._.debounce(function() {
var files = Object.keys(changedFiles);
grunt.config('jshint.amd.src', files);
- grunt.config('uglify.amd.files', [{ expand: true, src: files, rename: uglify_rename }]);
+ grunt.config('uglify.amd.files', [{ expand: true, src: files, rename: uglifyRename }]);
grunt.config('shifter.options.paths', files);
changedFiles = Object.create(null);
}, 200);
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-less');
grunt.loadNpmTasks('grunt-contrib-watch');
+ grunt.loadNpmTasks('grunt-eslint');
// Register JS tasks.
grunt.registerTask('shifter', 'Run Shifter against the current directory', tasks.shifter);
- grunt.registerTask('amd', ['jshint', 'uglify']);
- grunt.registerTask('js', ['amd', 'shifter']);
+ grunt.registerTask('ignorefiles', 'Generate ignore files for linters', tasks.ignorefiles);
+ grunt.registerTask('yui', ['eslint:yui', 'shifter']);
+ grunt.registerTask('amd', ['eslint:amd', 'jshint', 'uglify']);
+ grunt.registerTask('js', ['amd', 'yui']);
// Register CSS taks.
grunt.registerTask('css', ['less:bootstrapbase']);
<ON_CHECK message="unsupporteddbtablerowformat" />
</FEEDBACK>
</CUSTOM_CHECK>
+ <CUSTOM_CHECK file="lib/upgradelib.php" function="check_unoconv_version" level="optional">
+ <FEEDBACK>
+ <ON_CHECK message="unoconvwarning" />
+ </FEEDBACK>
+ </CUSTOM_CHECK>
</CUSTOM_CHECKS>
</MOODLE>
</COMPATIBILITY_MATRIX>
$dom->appendChild($top);
$top->appendChild($dom->createElement('shortname', $role->shortname));
- $top->appendChild($dom->createElement('name', $role->name));
- $top->appendChild($dom->createElement('description', $role->description));
+ $top->appendChild($dom->createElement('name', htmlspecialchars($role->name, ENT_COMPAT | ENT_HTML401, 'UTF-8')));
+ $top->appendChild($dom->createElement('description', htmlspecialchars($role->description, ENT_COMPAT | ENT_HTML401,
+ 'UTF-8')));
$top->appendChild($dom->createElement('archetype', $role->archetype));
$contextlevels = $dom->createElement('contextlevels');
$formcourseformats[$courseformat] = new lang_string('pluginname', "format_$courseformat");
}
$temp->add(new admin_setting_configselect('moodlecourse/format', new lang_string('format'), new lang_string('coursehelpformat'),
- 'weeks',$formcourseformats));
+ 'topics', $formcourseformats));
$temp->add(new admin_setting_configtext('moodlecourse/maxsections', new lang_string('maxnumberweeks'),
new lang_string('maxnumberweeks_desc'), 52));
$temp->add(new admin_settings_num_course_sections('moodlecourse/numsections', new lang_string('numberweeks'),
- new lang_string('coursehelpnumberweeks'), 10));
+ new lang_string('coursehelpnumberweeks'), 4));
$choices = array();
$choices['0'] = new lang_string('hiddensectionscollapsed');
defined('MOODLE_INTERNAL') || die();
-$plugin->version = 2015111600;
-$plugin->requires = 2015111000;
+$plugin->version = 2016052300;
+$plugin->requires = 2016051900;
$plugin->component = 'tool_assignmentupgrade';
-$plugin->dependencies = array('mod_assign' => 2015111000);
+$plugin->dependencies = array('mod_assign' => 2016051900);
defined('MOODLE_INTERNAL') || die();
-$plugin->version = 2015111600;
-$plugin->requires = 2015111000;
+$plugin->version = 2016052300;
+$plugin->requires = 2016051900;
$plugin->component = 'tool_availabilityconditions';
defined('MOODLE_INTERNAL') || die();
-$plugin->version = 2015111600; // The current plugin version (Date: YYYYMMDDXX)
-$plugin->requires = 2015111000; // Requires this Moodle version
+$plugin->version = 2016052300; // The current plugin version (Date: YYYYMMDDXX)
+$plugin->requires = 2016051900; // Requires this Moodle version
$plugin->component = 'tool_behat'; // Full name of the plugin (used for diagnostics)
defined('MOODLE_INTERNAL') || die();
-$plugin->version = 2015111600; // The current plugin version (Date: YYYYMMDDXX).
-$plugin->requires = 2015111000; // Requires this Moodle version.
+$plugin->version = 2016052300; // The current plugin version (Date: YYYYMMDDXX).
+$plugin->requires = 2016051900; // Requires this Moodle version.
$plugin->component = 'tool_capability'; // Full name of the plugin (used for diagnostics).
$string['acohortroleassignmentssaved'] = '{$a} cohort role assignments were saved.';
$string['assign'] = 'Assign';
-$string['assignroletocohort'] = 'Assign role to users in the context of all members of these cohorts';
-$string['backgroundsync'] = 'Note: Roles assigned on this page will not take affect immediately, the changes to role assignments will be made by a background task.';
+$string['assignroletocohort'] = 'Assign user-context roles to all cohort members';
+$string['backgroundsync'] = 'Note: New cohort role assignments will not take effect immediately. Role assignment changes will be made by a scheduled task.';
$string['cohortroleassignmentremoved'] = 'The cohort role assignment was removed.';
$string['cohortroleassignmentnotremoved'] = 'The cohort role assignment was not removed.';
$string['cohortroles'] = 'Cohort roles';
$string['existingcohortroles'] = 'Existing cohort role assignments';
-$string['managecohortroles'] = 'Assign user roles for entire cohort';
-$string['noassignableroles'] = 'No roles can be assigned at a user context level. <a href="../../roles/manage.php">Manage roles</a>';
+$string['managecohortroles'] = 'Assign user roles to cohort';
+$string['noassignableroles'] = 'There are currently no roles that can be assigned in the user context. <a href="../../roles/manage.php">Manage roles</a>';
$string['nocohortroleassignmentssaved'] = 'No cohort role assignments were saved.';
$string['onecohortroleassignmentsaved'] = 'One cohort role assignment was saved.';
$string['pluginname'] = 'Cohort roles management';
defined('MOODLE_INTERNAL') || die();
-$plugin->version = 2015111018; // The current plugin version (Date: YYYYMMDDXX).
-$plugin->requires = 2014110400; // Requires this Moodle version.
+$plugin->version = 2016052300; // The current plugin version (Date: YYYYMMDDXX).
+$plugin->requires = 2016051900; // Requires this Moodle version.
$plugin->component = 'tool_cohortroles'; // Full name of the plugin (used for diagnostics).
$plugin->dependencies = array(
// Moodle v3.0.0 release upgrade line.
// Put any upgrade step following this.
+ // Moodle v3.1.0 release upgrade line.
+ // Put any upgrade step following this.
+
return true;
}
defined('MOODLE_INTERNAL') || die();
-$plugin->version = 2015111600;
-$plugin->requires = 2015111000;
+$plugin->version = 2016052300;
+$plugin->requires = 2016051900;
$plugin->component = 'tool_customlang'; // Full name of the plugin (used for diagnostics)
defined('MOODLE_INTERNAL') || die();
-$plugin->version = 2015111600; // The current plugin version (Date: YYYYMMDDXX).
-$plugin->requires = 2015111000; // Requires this Moodle version.
+$plugin->version = 2016052300; // The current plugin version (Date: YYYYMMDDXX).
+$plugin->requires = 2016051900; // Requires this Moodle version.
$plugin->component = 'tool_dbtransfer'; // Full name of the plugin (used for diagnostics).
defined('MOODLE_INTERNAL') || die();
-$plugin->version = 2015111600;
-$plugin->requires = 2015111000;
+$plugin->version = 2016052300;
+$plugin->requires = 2016051900;
$plugin->component = 'tool_filetypes';
defined('MOODLE_INTERNAL') || die();
-$plugin->version = 2015111600;
-$plugin->requires = 2015111000;
+$plugin->version = 2016052300;
+$plugin->requires = 2016051900;
$plugin->component = 'tool_generator';
defined('MOODLE_INTERNAL') || die();
-$plugin->version = 2015111600; // The current plugin version (Date: YYYYMMDDXX)
-$plugin->requires = 2015111000; // Requires this Moodle version
+$plugin->version = 2016052300; // The current plugin version (Date: YYYYMMDDXX)
+$plugin->requires = 2016051900; // Requires this Moodle version
$plugin->component = 'tool_health'; // Full name of the plugin (used for diagnostics)
$plugin->maturity = MATURITY_ALPHA; // this version's maturity level
defined('MOODLE_INTERNAL') || die();
-$plugin->version = 2015111600; // The current plugin version (Date: YYYYMMDDXX)
-$plugin->requires = 2015111000; // Requires this Moodle version
+$plugin->version = 2016052300; // The current plugin version (Date: YYYYMMDDXX)
+$plugin->requires = 2016051900; // Requires this Moodle version
$plugin->component = 'tool_innodb'; // Full name of the plugin (used for diagnostics)
defined('MOODLE_INTERNAL') || die();
$plugin->component = 'tool_installaddon';
-$plugin->version = 2015111600;
-$plugin->requires = 2015111000;
+$plugin->version = 2016052300;
+$plugin->requires = 2016051900;
$plugin->maturity = MATURITY_STABLE;
defined('MOODLE_INTERNAL') || die();
-$plugin->version = 2015111600; // The current plugin version (Date: YYYYMMDDXX)
-$plugin->requires = 2015111000; // Requires this Moodle version
+$plugin->version = 2016052300; // The current plugin version (Date: YYYYMMDDXX)
+$plugin->requires = 2016051900; // Requires this Moodle version
$plugin->component = 'tool_langimport'; // Full name of the plugin (used for diagnostics)
// Moodle v3.0.0 release upgrade line.
// Put any upgrade step following this.
+ // Moodle v3.1.0 release upgrade line.
+ // Put any upgrade step following this.
+
return true;
}
// Moodle v3.0.0 release upgrade line.
// Put any upgrade step following this.
+ // Moodle v3.1.0 release upgrade line.
+ // Put any upgrade step following this.
+
return true;
}
defined('MOODLE_INTERNAL') || die();
-$plugin->version = 2015111600; // The current plugin version (Date: YYYYMMDDXX).
-$plugin->requires = 2015111000; // Requires this Moodle version.
+$plugin->version = 2016052300; // The current plugin version (Date: YYYYMMDDXX).
+$plugin->requires = 2016051900; // Requires this Moodle version.
$plugin->component = 'logstore_database'; // Full name of the plugin (used for diagnostics).
defined('MOODLE_INTERNAL') || die();
-$plugin->version = 2015111600; // The current plugin version (Date: YYYYMMDDXX).
-$plugin->requires = 2015111000; // Requires this Moodle version.
+$plugin->version = 2016052300; // The current plugin version (Date: YYYYMMDDXX).
+$plugin->requires = 2016051900; // Requires this Moodle version.
$plugin->component = 'logstore_legacy'; // Full name of the plugin (used for diagnostics).
upgrade_plugin_savepoint(true, 2016041200, 'logstore', 'standard');
}
+ // Moodle v3.1.0 release upgrade line.
+ // Put any upgrade step following this.
+
return true;
}
defined('MOODLE_INTERNAL') || die();
-$plugin->version = 2016041200; // The current plugin version (Date: YYYYMMDDXX).
-$plugin->requires = 2015111000; // Requires this Moodle version.
+$plugin->version = 2016052300; // The current plugin version (Date: YYYYMMDDXX).
+$plugin->requires = 2016051900; // Requires this Moodle version.
$plugin->component = 'logstore_standard'; // Full name of the plugin (used for diagnostics).
defined('MOODLE_INTERNAL') || die();
-$plugin->version = 2015111600; // The current plugin version (Date: YYYYMMDDXX).
-$plugin->requires = 2015111000; // Requires this Moodle version.
+$plugin->version = 2016052300; // The current plugin version (Date: YYYYMMDDXX).
+$plugin->requires = 2016051900; // Requires this Moodle version.
$plugin->component = 'tool_log'; // Full name of the plugin (used for diagnostics).
try {
config = JSON.parse(self._competency.ruleconfig);
} catch (e) {
+ // eslint-disable-line no-empty
}
}
UserCompetencyCourseNavigation.prototype._courseId = null;
/** @type {String} Plugin base url. */
UserCompetencyCourseNavigation.prototype._baseUrl = null;
- /** @type {Boolean} Ignore the first change event for users. */
- UserCompetencyCourseNavigation.prototype._ignoreFirstUser = null;
/** @type {Boolean} Ignore the first change event for competencies. */
UserCompetencyCourseNavigation.prototype._ignoreFirstCompetency = null;
$string['noactivities'] = 'No activities';
$string['nocompetencies'] = 'No competencies have been created in this framework.';
$string['nocompetenciesincourse'] = 'No competencies have been linked to this course.';
+$string['nocompetenciesinevidence'] = 'No competencies have been linked to this evidence.';
+$string['nocompetenciesinlearningplan'] = 'No competencies have been linked to this learning plan.';
$string['nocompetenciesintemplate'] = 'No competencies have been linked to this learning plan template.';
$string['nocompetencyframeworks'] = 'No competency frameworks have been created yet.';
$string['nocompetencyselected'] = 'No competency selected';
navigation_node::TYPE_SETTING,
null,
null,
- new pix_icon('competency', '', 'tool_lp'));
+ new pix_icon('i/competencies', ''));
if (isset($settingsnode)) {
$navigation->add_node($settingsnode);
}
navigation_node::TYPE_SETTING,
null,
null,
- new pix_icon('competency', '', 'tool_lp'));
+ new pix_icon('i/competencies', ''));
if (isset($settingsnode)) {
$navigation->add_node($settingsnode);
}
navigation_node::TYPE_SETTING,
null,
null,
- new pix_icon('competency', '', 'tool_lp'));
+ new pix_icon('i/competencies', ''));
if (isset($settingsnode)) {
$navigation->add_node($settingsnode);
}
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-
-<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://creativecommons.org/ns#"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- width="32"
- height="32"
- id="svg2"
- version="1.1"
- inkscape:version="0.48.4 r9939"
- sodipodi:docname="New document 1" preserveAspectRatio="xMinYMid meet">
- <defs
- id="defs4" />
- <sodipodi:namedview
- id="base"
- pagecolor="#ffffff"
- bordercolor="#666666"
- borderopacity="1.0"
- inkscape:pageopacity="0.0"
- inkscape:pageshadow="2"
- inkscape:zoom="5.6"
- inkscape:cx="32.609372"
- inkscape:cy="35.818362"
- inkscape:document-units="px"
- inkscape:current-layer="layer1"
- showgrid="false"
- width="33px"
- inkscape:window-width="1916"
- inkscape:window-height="981"
- inkscape:window-x="0"
- inkscape:window-y="72"
- inkscape:window-maximized="0" />
- <metadata
- id="metadata7">
- <rdf:RDF>
- <cc:Work
- rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- <dc:title></dc:title>
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <g
- inkscape:label="Layer 1"
- inkscape:groupmode="layer"
- id="layer1"
- transform="translate(0,-1020.3622)">
- <g
- id="g3050"
- transform="matrix(0.92121849,0,0,0.92121849,-35.507391,91.120599)">
- <path
- style="fill:#fafafa"
- d="m 38.892857,1026.2908 0,-17 17,0 17,0 0,17 0,17 -17,0 -17,0 0,-17 z"
- id="path3056"
- inkscape:connector-curvature="0" />
- <path
- style="fill:#989898"
- d="m 40.954049,1037.3439 c -3.465234,-3.0054 -1.687876,-4.0531 6.875853,-4.0531 6.919599,0 7.985143,0.2502 9.263277,2.1752 0.947236,1.4266 2.021632,1.9536 3.121972,1.5314 1.37559,-0.5279 1.677706,-2.0754 1.677706,-8.5934 0,-4.3723 0.273145,-8.6614 0.606989,-9.5314 0.509481,-1.3277 -0.303204,-1.5818 -5.059017,-1.5818 -3.522693,0 -5.432219,-0.3783 -5.047972,-1 1.028329,-1.6639 14.737848,-1.2221 17.277494,0.5567 3.593622,2.5171 2.823056,4.4433 -1.777494,4.4433 l -4,0 0,7.345 c 0,9.8743 -0.892111,10.655 -12.175731,10.655 -7.005509,0 -8.916904,-0.3458 -10.763077,-1.9469 z m 3.938808,-10.6589 c 0,-2.9538 0.324365,-3.3942 2.5,-3.3942 2.153991,0 2.499902,0.4498 2.499294,3.25 -6e-4,2.7611 -0.376693,3.2717 -2.5,3.3942 -2.203157,0.1271 -2.499294,-0.2579 -2.499294,-3.25 z m 7.428571,-1.3942 c 0,-1.6931 0.666667,-2 4.344732,-2 5.000845,0 4.927087,1.9191 -0.08232,2.1419 -3.011559,0.1339 -2.966069,0.1822 0.809017,0.8581 l 4,0.7162 -4.535714,0.1419 c -3.91635,0.1225 -4.535715,-0.1312 -4.535715,-1.8581 z m -6.761904,-3.6667 c -1.167788,-1.1678 -0.718106,-4.0457 0.833333,-5.3333 1.846181,-1.5322 4.5,0.2461 4.5,3.0155 0,2.2918 -3.735778,3.9154 -5.333333,2.3178 z m 6.833333,-0.3333 c 0.339919,-0.55 2.139919,-1 4,-1 1.860081,0 3.660081,0.45 4,1 0.377944,0.6115 -1.175955,1 -4,1 -2.824045,0 -4.377944,-0.3885 -4,-1 z"
- id="path3054"
- inkscape:connector-curvature="0" />
- <path
- style="fill:#5e5e5e"
- d="m 40.892857,1036.2908 c -1.027328,-1.9196 -0.76049,-2 6.636076,-2 5.863885,0 8.157677,0.4084 9.593719,1.708 1.429812,1.2939 2.297278,1.4506 3.578741,0.6463 1.318167,-0.8273 1.801811,-3.0713 2.191464,-10.1678 l 0.5,-9.1062 -5.5,-0.351 c -4.40263,-0.2811 -3.893849,-0.3889 2.55,-0.5402 5.16365,-0.1213 8.480263,0.2412 9.25,1.0109 2.011735,2.0117 1.364232,2.8 -2.3,2.8 l -3.5,0 0,7.0657 c 0,10.7479 -0.204518,10.9343 -12,10.9343 -8.906177,0 -10.039956,-0.2061 -11,-2 z m 5.078947,-9.0357 c -0.06465,-2.8954 0.283272,-3.5357 1.921053,-3.5357 1.608782,0 2,0.6666 2,3.4081 0,2.8111 -0.245749,3.2042 -1.402754,2.244 -1.077175,-0.894 -1.523051,-0.8644 -1.921053,0.1276 -0.285064,0.7104 -0.553825,-0.2994 -0.597246,-2.244 z m 8.682712,-0.6716 c 1.243913,-0.2392 3.043913,-0.2301 4,0.02 0.956088,0.2503 -0.06166,0.446 -2.261659,0.4349 -2.2,-0.011 -2.982253,-0.2159 -1.738341,-0.4551 z m 0,-3 c 1.243913,-0.2392 3.043913,-0.2301 4,0.02 0.956088,0.2503 -0.06166,0.446 -2.261659,0.4349 -2.2,-0.011 -2.982253,-0.2159 -1.738341,-0.4551 z m 0,-2 c 1.243913,-0.2392 3.043913,-0.2301 4,0.02 0.956088,0.2503 -0.06166,0.446 -2.261659,0.4349 -2.2,-0.011 -2.982253,-0.2159 -1.738341,-0.4551 z m -9.205886,-1.2025 c -0.810187,-1.3109 0.447721,-4.0902 1.851216,-4.0902 1.828446,0 3.499178,2.081 2.907877,3.6219 -0.592966,1.5452 -3.892838,1.87 -4.759093,0.4683 z"
- id="path3052"
- inkscape:connector-curvature="0" />
- </g>
- </g>
-</svg>
}
.path-admin-tool-lp .progresstext {
display: inline-block;
- height: 40px;
vertical-align: top;
}
.path-admin-tool-lp .progress {
width: 100%;
display: inline-block;
- margin-right: 2em;
+}
+.path-admin-tool-lp .progress .bar {
+ min-width: 3em;
}
.dir-rtl.path-admin-tool-lp .progress .bar {
float: right;
.path-admin-tool-lp [data-region="competencylinktree"] select {
width: 100%;
}
+.path-admin-tool-lp [data-region] .generaltable.fullwidth {
+ clear: both;
+}
.path-admin-tool-lp .competency-rule-points {
margin-top: 10px;
.user-competency-course-navigation {
width: 240px;
}
+.user-competency-course-navigation span {
+ max-width: 100%;
+ overflow: hidden;
+}
/** Competency grader */
.competency-grader textarea {
</tbody>
</table>
{{^competencies}}
-<p class="alert-info">
+<p class="alert alert-info">
{{#str}}nocompetenciesincourse, tool_lp{{/str}}
</p>
{{/competencies}}
{{#competencycount}}
<div data-region="coursecompetencystatistics" class="well">
{{#canbegradedincourse}}
- <div class="clearfix">
- <div class="span6">
- <div class="progresstext">
+ {{< tool_lp/progress_bar}}
+ {{$progresstext}}
{{#str}}xcompetenciesproficientoutofyincourse, tool_lp, { "x": "{{proficientcompetencycount}}", "y": "{{competencycount}}" } {{/str}}
- </div>
- </div>
- <div class="span6">
- <span class="pull-right label label-info">{{proficientcompetencypercentageformatted}} %</span>
- <div class="progress">
- <div class="bar" style="width: {{proficientcompetencypercentage}}%;"></div>
- </div>
- </div>
- </div>
+ {{/progresstext}}
+ {{$percentage}}{{proficientcompetencypercentage}}{{/percentage}}
+ {{$percentlabel}}{{proficientcompetencypercentageformatted}} %{{/percentlabel}}
+ {{/tool_lp/progress_bar}}
{{/canbegradedincourse}}
{{#canmanagecoursecompetencies}}
{{#leastproficientcount}}
* navigation - array of strings containing buttons for navigation
}}
<div data-region="managecompetencies">
-<div class="btn-group pull-left">
+<div class="pull-left">
{{#navigation}}
{{{.}}}
{{/navigation}}
</tbody>
</table>
{{^competencyframeworks}}
-<p class="alert-info">
+<p class="alert alert-info">
{{#str}}nocompetencyframeworks, tool_lp{{/str}}
</p>
{{/competencyframeworks}}
* navigation - array of strings containing buttons for navigation
}}
<div data-region="managetemplates">
-<div class="btn-group pull-left">
+<div class="pull-left">
{{#navigation}}
{{{.}}}
{{/navigation}}
</tbody>
</table>
{{^templates}}
-<p class="alert-info">
+<p class="alert alert-info">
{{#str}}notemplates, tool_lp{{/str}}
</p>
{{/templates}}
-<p class="alert-error">
+<p class="alert alert-error">
{{#str}}nocompetencyframeworks, tool_lp{{/str}}
</p>
{{/description}}
<dt>{{#str}}progress, tool_lp{{/str}}</dt>
<dd>
- <div class="span4">
- <div class="progresstext">
- {{#str}}xcompetenciesproficientoutofy, tool_lp, { "x": "{{proficientcompetencycount}}", "y": "{{competencycount}}" }{{/str}}
- </div>
- </div>
- <div class="span4">
- <span class="pull-right label label-info">{{proficientcompetencypercentageformatted}} %</span>
- <div class="progress">
- <div class="bar" style="width: {{proficientcompetencypercentage}}%;"></div>
- </div>
- </div>
+ {{< tool_lp/progress_bar}}
+ {{$progresstext}}
+ {{#str}}xcompetenciesproficientoutofy, tool_lp, { "x": "{{proficientcompetencycount}}", "y": "{{competencycount}}" }{{/str}}
+ {{/progresstext}}
+ {{$percentage}}{{proficientcompetencypercentage}}{{/percentage}}
+ {{$percentlabel}}{{proficientcompetencypercentageformatted}} %{{/percentlabel}}
+ {{/tool_lp/progress_bar}}
</dd>
</dl>
</div>
{{/competencies}}
</tbody>
</table>
+ {{^competencies}}
+ <p class="alert alert-info">
+ {{#str}}nocompetenciesinlearningplan, tool_lp{{/str}}
+ </p>
+ {{/competencies}}
</div>
</div>
{{#js}}
}}
<div data-region="plans">
-<div class="btn-group pull-left">
+<div class="pull-left">
{{#navigation}}
{{{.}}}
{{/navigation}}
</table>
{{^plans}}
-<p class="alert-info">
+<p class="alert alert-info">
{{#str}}nouserplans, tool_lp{{/str}}
</p>
{{/plans}}
--- /dev/null
+{{!
+ 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/>.
+}}
+{{!
+ @template tool_lp/progress_bar
+
+ Moodle progress bar template for tool_lp.
+
+ The purpose of this template is to render a progress bar with a brief description.
+ Inherits core/columns-1to2.
+
+ Classes required for JS:
+ * none
+
+ Data attributes required for JS:
+ * none
+
+ Context variables required for this template:
+ * progresstextvalue A brief text that describes the progress bar.
+ * percentagevalue The numeric value for the progress bar's percentage.
+ * percentlabelvalue The progress bar's label that shows the percentage value.
+
+ Example context (json):
+ {
+ "progresstextvalue": "Progress:",
+ "percentagevalue": "50",
+ "percentlabelvalue": "50.00 %"
+ }
+
+}}
+<div class="row-fluid rtl-compatible">
+ <div class="span4">
+ <div class="progresstext">
+ {{$progresstext}}{{progresstextvalue}}{{/progresstext}}
+ </div>
+ </div>
+ <div class="span8">
+ <div class="progress">
+ <div class="bar" style="width: {{$percentage}}{{percentagevalue}}{{/percentage}}%;" role="progressbar" aria-valuenow="{{$percentage}}{{percentagevalue}}{{/percentage}}" aria-valuemin="0" aria-valuemax="100">
+ {{$percentlabel}}{{percentlabelvalue}}{{/percentlabel}}
+ </div>
+ </div>
+ </div>
+</div>
</div>
</div>
{{^competencies}}
- <p class="alert-info">
+ <p class="alert alert-info">
{{#str}}nocompetenciesintemplate, tool_lp{{/str}}
</p>
{{/competencies}}
}}
{{#competencycount}}
<div data-region="templatestatistics" class="well">
- <div class="clearfix">
- <div class="span4">
- <div class="progresstext">
- {{#str}}xcompetencieslinkedoutofy, tool_lp, { "x": "{{linkedcompetencycount}}", "y": "{{competencycount}}" } {{/str}}
- </div>
- </div>
- <div class="span6">
- <span class="pull-right label label-info">{{linkedcompetencypercentageformatted}} %</span>
- <div class="progress">
- <div class="bar" style="width: {{linkedcompetencypercentage}}%;"></div>
- </div>
- </div>
- </div>
+ {{< tool_lp/progress_bar}}
+ {{$progresstext}}
+ {{#str}}xcompetencieslinkedoutofy, tool_lp, { "x": "{{linkedcompetencycount}}", "y": "{{competencycount}}" } {{/str}}
+ {{/progresstext}}
+ {{$percentage}}{{linkedcompetencypercentage}}{{/percentage}}
+ {{$percentlabel}}{{linkedcompetencypercentageformatted}} %{{/percentlabel}}
+ {{/tool_lp/progress_bar}}
{{#plancount}}
- <div class="clearfix">
- <div class="span4">
- <div class="progresstext">
+ {{< tool_lp/progress_bar}}
+ {{$progresstext}}
{{#str}}xplanscompletedoutofy, tool_lp, { "x": "{{completedplancount}}", "y": "{{plancount}}" } {{/str}}
- </div>
- </div>
- <div class="span6">
- <span class="pull-right label label-info">{{completedplanpercentageformatted}} %</span>
- <div class="progress">
- <div class="bar" style="width: {{completedplanpercentage}}%;">
-
- </div>
- </div>
- </div>
- </div>
+ {{/progresstext}}
+ {{$percentage}}{{completedplanpercentage}}{{/percentage}}
+ {{$percentlabel}}{{completedplanpercentageformatted}} %{{/percentlabel}}
+ {{/tool_lp/progress_bar}}
{{/plancount}}
{{#usercompetencyplancount}}
- <div class="clearfix">
- <div class="span4">
- <div class="progresstext">
+ {{< tool_lp/progress_bar}}
+ {{$progresstext}}
{{#str}}averageproficiencyrate, tool_lp, {{proficientusercompetencyplanpercentageformatted}} {{/str}}
- </div>
- </div>
- <div class="span6">
- <span class="pull-right label label-info">{{proficientusercompetencyplanpercentageformatted}} %</span>
- <div class="progress">
- <div class="bar" style="width: {{proficientusercompetencyplanpercentage}}%;"></div>
- </div>
- </div>
- </div>
+ {{/progresstext}}
+ {{$percentage}}{{proficientusercompetencyplanpercentage}}{{/percentage}}
+ {{$percentlabel}}{{proficientusercompetencyplanpercentageformatted}} %{{/percentlabel}}
+ {{/tool_lp/progress_bar}}
{{/usercompetencyplancount}}
{{#leastproficientcount}}
<div>
<dt>{{#str}}rating, tool_lp{{/str}}</dt>
<dd>{{gradename}}
{{#cangrade}}
- <buttn class="btn" id="rate_{{uniqid}}">{{#str}}rate, tool_lp{{/str}}</button>
+ <button class="btn" id="rate_{{uniqid}}">{{#str}}rate, tool_lp{{/str}}</button>
{{/cangrade}}
</dd>
{{#js}}
<dt>{{#str}}rating, tool_lp{{/str}}</dt>
<dd>{{gradename}}
{{#cangrade}}
- <buttn class="btn" id="rate_{{uniqid}}">{{#str}}rate, tool_lp{{/str}}</button>
+ <button class="btn" id="rate_{{uniqid}}">{{#str}}rate, tool_lp{{/str}}</button>
{{/cangrade}}
</dd>
{{/usercompetencycourse}}
}}
<div data-region="user-evidence-list">
-<div class="btn-group pull-left">
+<div class="pull-left">
{{#navigation}}
{{{.}}}
{{/navigation}}
</table>
{{^evidence}}
- <p class="alert-info">{{#str}}nouserevidence, tool_lp{{/str}}</p>
+ <p class="alert alert-info">{{#str}}nouserevidence, tool_lp{{/str}}</p>
{{/evidence}}
</div>
{{/usercompetencies}}
</tbody>
</table>
+ {{^usercompetencies}}
+ <p class="alert alert-info">
+ {{#str}}nocompetenciesinevidence, tool_lp{{/str}}
+ </p>
+ {{/usercompetencies}}
</div>
</div>
--- /dev/null
+This files describes changes in /admin/tool/lp/* - plugins,
+information provided here is intended especially for developers.
+
+=== 3.2 ===
+
+* The icon 'competency.png/svg' has been removed, please use i/competencies instead.
+
+=== 3.1.1 ===
+
+* The plugin icon 'competency.png/svg' will be removed in the future use i/competencies instead.
defined('MOODLE_INTERNAL') || die();
-$plugin->version = 2016050400; // The current plugin version (Date: YYYYMMDDXX).
-$plugin->requires = 2014110400; // Requires this Moodle version.
+$plugin->version = 2016052300; // The current plugin version (Date: YYYYMMDDXX).
+$plugin->requires = 2016051900; // Requires this Moodle version.
$plugin->component = 'tool_lp'; // Full name of the plugin (used for diagnostics).
defined('MOODLE_INTERNAL') || die();
-$plugin->version = 2016022401; // The current plugin version (Date: YYYYMMDDXX).
-$plugin->requires = 2014110400; // Requires this Moodle version.
+$plugin->version = 2016052300; // The current plugin version (Date: YYYYMMDDXX).
+$plugin->requires = 2016051900; // Requires this Moodle version.
$plugin->component = 'tool_lpmigrate'; // Full name of the plugin (used for diagnostics).
$plugin->dependencies = array(
'tool_lp' => ANY_VERSION
defined('MOODLE_INTERNAL') || die();
-$plugin->version = 2015111600;
-$plugin->requires = 2015111000;
+$plugin->version = 2016052300;
+$plugin->requires = 2016051900;
$plugin->component = 'tool_messageinbound';
'component' => $component,
'version' => $version,
'addon' => $addonname,
- 'dependencies' => !empty($addon['dependencies']) ? $addoninfo['dependencies'] : array(),
+ 'dependencies' => !empty($addoninfo['dependencies']) ? $addoninfo['dependencies'] : array(),
'fileurl' => '',
'filehash' => '',
'filesize' => 0
*/
defined('MOODLE_INTERNAL') || die();
-$plugin->version = 2016032401; // The current plugin version (Date: YYYYMMDDXX).
-$plugin->requires = 2016032400.00; // Requires this Moodle version.
+$plugin->version = 2016052300; // The current plugin version (Date: YYYYMMDDXX).
+$plugin->requires = 2016051900; // Requires this Moodle version.
$plugin->component = 'tool_mobile'; // Full name of the plugin (used for diagnostics).
// Moodle v3.0.0 release upgrade line.
// Put any upgrade step following this.
+ // Moodle v3.1.0 release upgrade line.
+ // Put any upgrade step following this.
+
return true;
}
defined('MOODLE_INTERNAL') || die;
-$plugin->version = 2015111600; // The current plugin version (Date: YYYYMMDDXX).
-$plugin->requires = 2015111000; // Requires this Moodle version.
+$plugin->version = 2016052300; // The current plugin version (Date: YYYYMMDDXX).
+$plugin->requires = 2016051900; // Requires this Moodle version.
$plugin->component = 'tool_monitor'; // Full name of the plugin (used for diagnostics).
defined('MOODLE_INTERNAL') || die();
-$plugin->version = 2015111600; // The current plugin version (Date: YYYYMMDDXX)
-$plugin->requires = 2015111000; // Requires this Moodle version
+$plugin->version = 2016052300; // The current plugin version (Date: YYYYMMDDXX)
+$plugin->requires = 2016051900; // Requires this Moodle version
$plugin->component = 'tool_multilangupgrade'; // Full name of the plugin (used for diagnostics)
defined('MOODLE_INTERNAL') || die();
-$plugin->version = 2015111600; // The current plugin version (Date: YYYYMMDDXX)
-$plugin->requires = 2015111000; // Requires this Moodle version
+$plugin->version = 2016052300; // The current plugin version (Date: YYYYMMDDXX)
+$plugin->requires = 2016051900; // Requires this Moodle version
$plugin->component = 'tool_phpunit'; // Full name of the plugin (used for diagnostics)
defined('MOODLE_INTERNAL') || die();
-$plugin->version = 2015111600; // The current plugin version (Date: YYYYMMDDXX)
-$plugin->requires = 2015111000; // Requires this Moodle version
+$plugin->version = 2016052300; // The current plugin version (Date: YYYYMMDDXX)
+$plugin->requires = 2016051900; // Requires this Moodle version
$plugin->component = 'tool_profiling'; // Full name of the plugin (used for diagnostics)
defined('MOODLE_INTERNAL') || die();
-$plugin->version = 2016030200; // The current plugin version (Date: YYYYMMDDXX).
-$plugin->requires = 2015111000; // Requires this Moodle version.
+$plugin->version = 2016052300; // The current plugin version (Date: YYYYMMDDXX).
+$plugin->requires = 2016051900; // Requires this Moodle version.
$plugin->component = 'tool_recyclebin'; // Full name of the plugin (used for diagnostics).
defined('MOODLE_INTERNAL') || die();
-$plugin->version = 2015111600; // The current plugin version (Date: YYYYMMDDXX)
-$plugin->requires = 2015111000; // Requires this Moodle version
+$plugin->version = 2016052300; // The current plugin version (Date: YYYYMMDDXX)
+$plugin->requires = 2016051900; // Requires this Moodle version
$plugin->component = 'tool_replace'; // Full name of the plugin (used for diagnostics)
$plugin->maturity = MATURITY_ALPHA; // this version's maturity level
defined('MOODLE_INTERNAL') || die();
-$plugin->version = 2015111600;
-$plugin->requires = 2015111000;
+$plugin->version = 2016052300;
+$plugin->requires = 2016051900;
$plugin->component = 'tool_spamcleaner'; // Full name of the plugin (used for diagnostics)
defined('MOODLE_INTERNAL') || die();
-$plugin->version = 2015111600; // The current plugin version (Date: YYYYMMDDXX)
-$plugin->requires = 2015111000; // Requires this Moodle version
+$plugin->version = 2016052300; // The current plugin version (Date: YYYYMMDDXX)
+$plugin->requires = 2016051900; // Requires this Moodle version
$plugin->component = 'tool_task'; // Full name of the plugin (used for diagnostics)
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
-$plugin->version = 2015111600; // The current plugin version (Date: YYYYMMDDXX).
-$plugin->requires = 2015111000; // Requires this Moodle version.
+$plugin->version = 2016052300; // The current plugin version (Date: YYYYMMDDXX).
+$plugin->requires = 2016051900; // Requires this Moodle version.
$plugin->component = 'tool_templatelibrary'; // Full name of the plugin (used for diagnostics).
defined('MOODLE_INTERNAL') || die();
-$plugin->version = 2015111600; // The current plugin version (Date: YYYYMMDDXX)
-$plugin->requires = 2015111000; // Requires this Moodle version
+$plugin->version = 2016052300; // The current plugin version (Date: YYYYMMDDXX)
+$plugin->requires = 2016051900; // Requires this Moodle version
$plugin->component = 'tool_unsuproles'; // Full name of the plugin (used for diagnostics)
defined('MOODLE_INTERNAL') || die();
-$plugin->version = 2015111600; // The current plugin version (Date: YYYYMMDDXX).
-$plugin->requires = 2015111000; // Requires this Moodle version.
+$plugin->version = 2016052300; // The current plugin version (Date: YYYYMMDDXX).
+$plugin->requires = 2016051900; // Requires this Moodle version.
$plugin->component = 'tool_uploadcourse'; // Full name of the plugin (used for diagnostics).
defined('MOODLE_INTERNAL') || die();
-$plugin->version = 2015111600; // The current plugin version (Date: YYYYMMDDXX)
-$plugin->requires = 2015111000; // Requires this Moodle version
+$plugin->version = 2016052300; // The current plugin version (Date: YYYYMMDDXX)
+$plugin->requires = 2016051900; // Requires this Moodle version
$plugin->component = 'tool_uploaduser'; // Full name of the plugin (used for diagnostics)
defined('MOODLE_INTERNAL') || die();
-$plugin->version = 2015111600; // The current plugin version (Date: YYYYMMDDXX)
-$plugin->requires = 2015111000; // Requires this Moodle version
+$plugin->version = 2016052300; // The current plugin version (Date: YYYYMMDDXX)
+$plugin->requires = 2016051900; // Requires this Moodle version
$plugin->component = 'tool_xmldb'; // Full name of the plugin (used for diagnostics)
case 3: redirect($CFG->wwwroot.'/'.$CFG->admin.'/user/user_bulk_delete.php');
case 4: redirect($CFG->wwwroot.'/'.$CFG->admin.'/user/user_bulk_display.php');
case 5: redirect($CFG->wwwroot.'/'.$CFG->admin.'/user/user_bulk_download.php');
- //case 6: redirect($CFG->wwwroot.'/'.$CFG->admin.'/user/user_bulk_enrol.php'); //TODO: MDL-24064
case 7: redirect($CFG->wwwroot.'/'.$CFG->admin.'/user/user_bulk_forcepasswordchange.php');
case 8: redirect($CFG->wwwroot.'/'.$CFG->admin.'/user/user_bulk_cohortadd.php');
}
+++ /dev/null
-<?php
-/**
-* script for bulk user multi enrol operations
-*/
-
-die('this needs to be rewritten to use new enrol framework, sorry'); //TODO: MDL-24064
-
-require_once('../../config.php');
-require_once($CFG->libdir.'/adminlib.php');
-$processed = optional_param('processed', '', PARAM_BOOL);
-$sort = optional_param('sort', 'fullname', PARAM_ALPHA); //Sort by full name
-$dir = optional_param('dir', 'asc', PARAM_ALPHA); //Order to sort (ASC)
-
-require_login();
-admin_externalpage_setup('userbulk');
-require_capability('moodle/role:assign', context_system::instance()); //TODO: use some enrol cap
-$return = $CFG->wwwroot.'/'.$CFG->admin.'/user/user_bulk.php';
-//If no users selected then return to user_bulk.php
-if (empty($SESSION->bulk_users)) {
- redirect($return);
-}
-$users = $SESSION->bulk_users; //Get users to display
-$usertotal = get_users(false); //Total number of users registered
-$usercount = count($users); //number of users
-
-echo $OUTPUT->header();
-
-//take user info
-foreach ($users as $key => $id) {
- $user = $DB->get_record('user', array('id'=>$id));
- $user->fullname = fullname($user, true);
- unset($user->firstname);
- unset($user->lastname);
- $users[$key] = $user;
-}
-
-// Need to sort by date
-function sort_compare($a, $b) {
- global $sort, $dir;
- if($sort == 'lastaccess') {
- $rez = $b->lastaccess - $a->lastaccess;
- } else {
- $rez = strcasecmp(@$a->$sort, @$b->$sort);
- }
- return $dir == 'desc' ? -$rez : $rez;
-}
-usort($users, 'sort_compare');
-
-//Take courses data (id, shortname, and fullname)
-$courses = get_courses_page(1, 'c.sortorder ASC', 'c.id,c.shortname,c.fullname,c.visible', $totalcount);
-$table = new html_table();
-$table->width = "95%";
-$columns = array('fullname');
-foreach ($courses as $v)
-{
- $columns[] = $v->shortname;
-}
-
-//Print columns headers from table
-foreach ($columns as $column) {
- $strtitle = $column;
- if ($sort != $column) {
- $columnicon = '';
- $columndir = 'asc';
- } else {
- $columndir = ($dir == 'asc') ? 'desc' : 'asc';
- $columnicon = ' <img src="'.$OUTPUT->pix_url('t/'.($dir == 'asc' ? 'down' : 'up' )).'" alt="" />';
- }
- $table->head[] = '<a href="user_bulk_enrol.php?sort='.$column.'&dir='.$columndir.'">'.$strtitle.'</a>'.$columnicon;
- $table->align[] = 'left';
-}
-
-// process data submitting
-if(!empty($processed)) {
- //Process data form here
- $total = count($courses) * count($users);
-
- for ( $i = 0; $i < $total; $i++ )
- {
- $param = "selected".$i;
- $info = optional_param($param, '', PARAM_SEQUENCE);
- /**
- * user id: ids[0]
- * course id: ids[1]
- * enrol stat: ids[2]
- */
- $ids = explode(',', $info);
- if(!empty($ids[2])) {
- $context = context_course::instance($ids[1]);
- role_assign(5, $ids[0], $context->id); //TODO: horrible!!
- } else {
- if( empty($ids[1] ) ) {
- continue;
- }
- $context = context_course::instance($ids[1]);
- role_unassign(5, $ids[0], $context->id);
- }
- }
- redirect($return, get_string('changessaved')); //TODO: horrible!!
-}
-
-//Form beginning
-echo '<form id="multienrol" name="multienrol" method="post" action="user_bulk_enrol.php">';
-echo '<input type="hidden" name="processed" value="yes" />';
-$count = 0;
-foreach($users as $user) {
- $temparray = array (
- '<a href="'.$CFG->wwwroot.'/user/view.php?id='.$user->id.'&course='.SITEID.'">'.$user->fullname.'</a>'
- );
- $mycourses = enrol_get_users_courses($user->id, false);
- foreach($courses as $acourse) {
- $state = '';
- if (isset($mycourses[$acourse->id])) {
- $state = 'checked="checked"';
- }
- $temparray[] = '<input type="hidden" name="selected' . $count .
- '" value="' . $user->id . ',' . $acourse->id . ',0" />' .
- '<input type="checkbox" name="selected' . $count .
- '" value="' . $user->id . ',' . $acourse->id . ',1" ' . $state . '/>';
- $count++;
- }
- $table->data[] = $temparray;
-}
-echo $OUTPUT->heading("$usercount / $usertotal ".get_string('users'));
-echo html_writer::table($table);
-echo '<div class="continuebutton">';
-echo '<input type="submit" name="multienrolsubmit" value="save changes" />';
-echo '</div>';
-echo '</form>';
-
-echo $OUTPUT->footer();
if (has_capability('moodle/user:update', $syscontext)) {
$actions[5] = get_string('download', 'admin');
}
- if (has_capability('moodle/role:assign', $syscontext)){
- //TODO: MDL-24064
- //$actions[6] = get_string('enrolmultipleusers', 'admin');
- }
if (has_capability('moodle/user:update', $syscontext)) {
$actions[7] = get_string('forcepasswordchange');
}
// Moodle v3.0.0 release upgrade line.
// Put any upgrade step following this.
+ // Moodle v3.1.0 release upgrade line.
+ // Put any upgrade step following this.
+
return true;
}