Skip to content

Commit

Permalink
Updated from agora_moodle2 repository (20230109)
Browse files Browse the repository at this point in the history
  • Loading branch information
toniginard committed Jan 9, 2023
1 parent ed45587 commit dc0bd40
Show file tree
Hide file tree
Showing 1,096 changed files with 13,388 additions and 5,704 deletions.
1 change: 1 addition & 0 deletions html/.grunt/components.js
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,7 @@ const getOwningComponentDirectory = checkPath => {
};

module.exports = {
fetchComponentData,
getAmdSrcGlobList,
getComponentFromPath,
getComponentPaths,
Expand Down
3 changes: 3 additions & 0 deletions html/.grunt/tasks/javascript.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ module.exports = grunt => {
// Load ESLint.
require('./eslint')(grunt);

// Load jsconfig.
require('./jsconfig')(grunt);

// Load JSDoc.
require('./jsdoc')(grunt);

Expand Down
53 changes: 53 additions & 0 deletions html/.grunt/tasks/jsconfig.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
// 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/>.
/* jshint node: true, browser: false */
/* eslint-env node */

/**
* @copyright 2022 Andrew Lyons <[email protected]>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

const configuration = {
compilerOptions: {
baseUrl: ".",
paths: {
},
target: "es2015",
allowSyntheticDefaultImports: false,
},
exclude: [
"node_modules",
],
include: [],
};

module.exports = (grunt) => {
const handler = () => {
const jsconfigData = Object.assign({}, configuration);

const path = require('path');
const {fetchComponentData} = require(path.join(process.cwd(), '.grunt', 'components.js'));

const componentData = fetchComponentData().components;
for (const [thisPath, component] of Object.entries(componentData)) {
jsconfigData.compilerOptions.paths[`${component}/*`] = [`${thisPath}/amd/src/*`];
jsconfigData.include.push(`${thisPath}/amd/src/**/*`);
}

grunt.file.write('jsconfig.json', JSON.stringify(jsconfigData, null, " ") + "\n");
};
grunt.registerTask('jsconfig', 'Generate a jsconfig configuration compatible with the LSP', handler);
};
29 changes: 29 additions & 0 deletions html/CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,35 @@ More information on each of the fixes can be found in the project
development home at https://github.com/projectestac/agora_moodle2


Changes 22.12.13
---------------------------------------------------------------------------------------
- Upgraded Moodle to version 3.11.11+
- Updated langpacks
- Attendance: Upgraded module
- Choicegroup: Upgraded module
- completion_progress: Upgraded block
- local_agora: Added script to configure oAuth2 client for IDI
- migratehvp2h5p: Upgraded tool
- oAuth2 client: Fixed save of oAuth2 issuers when acceptrisk is checked
- oAuth2 client: Ensure method get_issuer exists before calling it. Added exception for client for IDI
- oAuth2 client: Only xtecadmin can configure oAuth2 client for IDI
- Theme xtec2020: Fix for collapsible menu using custommenuitems
- Wiris: Upgraded all components


Changes 22.11.15
---------------------------------------------------------------------------------------
- Upgraded Moodle to version 3.11.11
- Updated langpacks
- oAuth2 client: Modified behavior for login to Azure AD via oAuth2
- Attendance: Upgraded module
- Choicegroup: Upgraded module
- Clickedu: Upgraded module
- Hotpot: Downgraded module
- GeoGebra: Upgraded module
- Wiris: Upgraded all components


Changes 22.10.04
---------------------------------------------------------------------------------------
- Upgraded Moodle to version 3.11.10+
Expand Down
7 changes: 2 additions & 5 deletions html/admin/environment.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3371,6 +3371,7 @@
<VENDOR name="oracle" version="11.2" />
</DATABASE>
<PHP version="7.3.0" level="required">
<RESTRICT function="restrict_php_version_81" message="unsupportedphpversion81" />
</PHP>
<PCREUNICODE level="optional">
<FEEDBACK>
Expand Down Expand Up @@ -3557,6 +3558,7 @@
<VENDOR name="oracle" version="11.2" />
</DATABASE>
<PHP version="7.3.0" level="required">
<RESTRICT function="restrict_php_version_81" message="unsupportedphpversion81" />
</PHP>
<PCREUNICODE level="optional">
<FEEDBACK>
Expand Down Expand Up @@ -3781,11 +3783,6 @@
<ON_CHECK message="tokenizerrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="xmlrpc" level="optional">
<FEEDBACK>
<ON_CHECK message="xmlrpcrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="soap" level="optional">
<FEEDBACK>
<ON_CHECK message="soaprecommended" />
Expand Down
5 changes: 2 additions & 3 deletions html/admin/mnet/peer_forms.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,8 @@ function validation($data, $files) {
$wwwroot = 'http://'.$wwwroot;
}
if ($host = $DB->get_record('mnet_host', array('wwwroot' => $wwwroot))) {
global $CFG;
return array('wwwroot' => get_string('hostexists', 'mnet',
new moodle_url('/admin/mnet/peers.php', array('hostid' => $host->id))));
$str = get_string('hostexists', 'mnet', (new moodle_url('/admin/mnet/peers.php', ['hostid' => $host->id]))->out());
return array('wwwroot' => $str);
}
return array();
}
Expand Down
11 changes: 6 additions & 5 deletions html/admin/tool/customlang/cli/export.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
Options:
-l, --lang Comma seperated language ids to export, default: all
-c, --components Comma seperated components to export, default: all
-t, --target Target to copy the zip files to, default: $CFG->tempdir/customlang
-t, --target Target directory to copy the zip files to, default: $CFG->tempdir/customlang
-o, --overwrite Overwrite existing files in the target folder.
Note: If the target is not set, the files are always overwritten!
-h, --help Print out this help
Expand Down Expand Up @@ -73,9 +73,10 @@
echo $usage;
die;
}
if (!file_exists($options['target'])) {
mkdir($options['target'], 0777, true);
}

// Ensure target directory exists.
$options['target'] = rtrim($options['target'], '/') . '/';
check_dir_exists($options['target']);

cli_writeln(get_string('cliexportheading', 'tool_customlang'));
$langs = [];
Expand All @@ -90,7 +91,7 @@
$filename = $options['target'] . get_string('exportzipfilename', 'tool_customlang', ['lang' => $lang]);
// If the file exists and we are not using the temp folder it requires an ovewrite.
if ($options['target'] != $dafaulttarget && file_exists($filename) && !$options['overwrite']) {
cli_problem(get_string('cliexportfileexists', 'tool_customlang', $lang));
cli_problem(get_string('cliexportfileexists', 'tool_customlang', ['lang' => $lang]));
continue;
}
cli_heading(get_string('cliexportstartexport', 'tool_customlang', $lang));
Expand Down
10 changes: 10 additions & 0 deletions html/admin/tool/customlang/cli/import.php
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,16 @@

cli_heading(get_string('clifiles', 'tool_customlang', $lng));

// If we intend to check in any changes, we must first check them out.
if ($checkin) {
cli_writeln(get_string('checkout', 'tool_customlang'));

$progressbar = new progress_bar();
$progressbar->create();

tool_customlang_utils::checkout($lng, $progressbar);
}

foreach ($files as $file) {
// Generate a valid stored_file from this file.
$record = (object)[
Expand Down
1 change: 1 addition & 0 deletions html/admin/tool/customlang/lang/en/tool_customlang.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
$string['customlang:view'] = 'View local translation';
$string['export'] = 'Export custom strings';
$string['exportfilter'] = 'Select component(s) to export';
$string['exportzipfilename'] = 'customlang-export-{$a->lang}.zip';
$string['filter'] = 'Filter strings';
$string['filtercomponent'] = 'Show strings of these components';
$string['filtercustomized'] = 'Customised only';
Expand Down
4 changes: 3 additions & 1 deletion html/admin/tool/customlang/locallib.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,9 @@ public static function list_components() {
* @param progress_bar $progressbar optionally, the given progress bar can be updated
*/
public static function checkout($lang, progress_bar $progressbar = null) {
global $DB;
global $DB, $CFG;

require_once("{$CFG->libdir}/adminlib.php");

// For behat executions we are going to load only a few components in the
// language customisation structures. Using the whole "en" langpack is
Expand Down
6 changes: 6 additions & 0 deletions html/admin/tool/langimport/classes/controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,12 @@ public function uninstall_language($lang) {
}

if ($rm1 or $rm2) {
// Set the default site language to en if the deleted language pack is the default site language.
if ($CFG->lang === $lang) {
set_config('lang', 'en');
// Fix the user's current language to the default site language.
fix_current_language($CFG->lang);
}
$this->info[] = get_string('langpackremoved', 'tool_langimport', $lang);
event\langpack_removed::event_with_langcode($lang)->trigger();
return true;
Expand Down
7 changes: 4 additions & 3 deletions html/admin/tool/lp/templates/user_competency_summary.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,10 @@
ucw.registerEvents('[data-region="user-competency-status"]');
ucw.on('status-changed', infoReloader.reload.bind(infoReloader));
ucw.on('error-occured', infoReloader.reload.bind(infoReloader));
var inlineGrader = new mod('#rate_{{uniqid}}', '{{competency.scaleid}}', '{{competency.competency.id}}', '{{user.id}}', '{{plan.id}}', '', '{{#str}}chooserating, tool_lp{{/str}}');
inlineGrader.on('competencyupdated', infoReloader.reload.bind(infoReloader));
{{#cangrade}}
var inlineGrader = new mod('#rate_{{uniqid}}', '{{competency.scaleid}}', '{{competency.competency.id}}', '{{user.id}}', '{{plan.id}}', '', '{{#str}}chooserating, tool_lp{{/str}}');
inlineGrader.on('competencyupdated', infoReloader.reload.bind(infoReloader));
{{/cangrade}}
});
{{/js}}
{{/usercompetency}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,13 +95,14 @@
{{#js}}
require(['jquery', 'tool_lp/grade_user_competency_inline', 'tool_lp/user_competency_info'], function($, mod, info) {
var inlineGrader = new mod('#rate_{{uniqid}}', '{{competency.scaleid}}', '{{competency.competency.id}}', '{{user.id}}', '', '{{course.id}}', '{{#str}}chooserating, tool_lp{{/str}}');
var competencyElement = $('[data-region-id="{{uniqid}}"]');
var displayuser = ('{{displayuser}}' == 'true') ? true : false;
var infoReloader = new info(competencyElement, '{{competency.competency.id}}', '{{user.id}}', '', '{{course.id}}', displayuser);
inlineGrader.on('competencyupdated', infoReloader.reload.bind(infoReloader));
{{#cangrade}}
var inlineGrader = new mod('#rate_{{uniqid}}', '{{competency.scaleid}}', '{{competency.competency.id}}', '{{user.id}}', '', '{{course.id}}', '{{#str}}chooserating, tool_lp{{/str}}');
inlineGrader.on('competencyupdated', infoReloader.reload.bind(infoReloader));
{{/cangrade}}
});

{{/js}}
Expand Down
7 changes: 7 additions & 0 deletions html/admin/tool/migratehvp2h5p/CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# VERSIONS HISTORY #

Changes in version 0.1.5 (20221129) - I'm now stable!
---------------------------------------------------
- Include author, if possible, when migrating to content bank (#46)
- Fix SQL limit with Oracle (#34)

Thanks to Jonathan Harker from Catalyst and all the contributors who have created issues, fixes and improvements.

Changes in version 0.1.4 (20210204) - Let's make it better!
---------------------------------------------------
- Copy completion information related to grades too (#27)
Expand Down
Loading

0 comments on commit dc0bd40

Please sign in to comment.