Skip to content

Commit 9ae7df3

Browse files
authored
Merge pull request #14 from bdecentgmbh/dev
Dev
2 parents f0a51b9 + 32598d5 commit 9ae7df3

33 files changed

+534
-659
lines changed

.github/workflows/moodle-ci.yml

Lines changed: 38 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on: [push, pull_request]
44

55
jobs:
66
test:
7-
runs-on: ubuntu-22.04
7+
runs-on: ubuntu-latest
88

99
services:
1010
postgres:
@@ -15,8 +15,9 @@ jobs:
1515
ports:
1616
- 5432:5432
1717
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 3
18+
1819
mariadb:
19-
image: mariadb:10.6.7
20+
image: mariadb:10
2021
env:
2122
MYSQL_USER: 'root'
2223
MYSQL_ALLOW_EMPTY_PASSWORD: "true"
@@ -30,22 +31,22 @@ jobs:
3031
fail-fast: false
3132
matrix:
3233
include:
33-
- php: '8.2'
34-
moodle-branch: 'MOODLE_403_STABLE'
35-
database: 'pgsql'
36-
- php: '8.0'
37-
moodle-branch: 'MOODLE_402_STABLE'
34+
- php: '8.3'
35+
moodle-branch: 'MOODLE_405_STABLE'
3836
database: 'mariadb'
39-
- php: '8.0'
40-
moodle-branch: 'MOODLE_401_STABLE'
37+
- php: '8.3'
38+
moodle-branch: 'MOODLE_405_STABLE'
4139
database: 'pgsql'
42-
- php: '7.4'
43-
moodle-branch: 'MOODLE_400_STABLE'
40+
- php: '8.2'
41+
moodle-branch: 'MOODLE_404_STABLE'
4442
database: 'mariadb'
43+
- php: '8.2'
44+
moodle-branch: 'MOODLE_404_STABLE'
45+
database: 'pgsql'
4546

4647
steps:
4748
- name: Check out repository code
48-
uses: actions/checkout@v3
49+
uses: actions/checkout@v4
4950
with:
5051
path: plugin
5152

@@ -55,65 +56,68 @@ jobs:
5556
php-version: ${{ matrix.php }}
5657
extensions: ${{ matrix.extensions }}
5758
ini-values: max_input_vars=5000
59+
# If you are not using code coverage, keep "none". Otherwise, use "pcov" (Moodle 3.10 and up) or "xdebug".
60+
# If you try to use code coverage with "none", it will fallback to phpdbg (which has known problems).
5861
coverage: none
5962

6063
- name: Initialise moodle-plugin-ci
6164
run: |
62-
composer create-project -n --no-dev --prefer-dist moodlehq/moodle-plugin-ci ci ^3
65+
composer create-project -n --no-dev --prefer-dist moodlehq/moodle-plugin-ci ci ^4
6366
echo $(cd ci/bin; pwd) >> $GITHUB_PATH
6467
echo $(cd ci/vendor/bin; pwd) >> $GITHUB_PATH
6568
sudo locale-gen en_AU.UTF-8
6669
echo "NVM_DIR=$HOME/.nvm" >> $GITHUB_ENV
6770
6871
- name: Install moodle-plugin-ci
69-
run: |
70-
moodle-plugin-ci install --plugin ./plugin --db-host=127.0.0.1
72+
run: moodle-plugin-ci install --plugin ./plugin --db-host=127.0.0.1
7173
env:
7274
DB: ${{ matrix.database }}
7375
MOODLE_BRANCH: ${{ matrix.moodle-branch }}
76+
# Uncomment this to run Behat tests using the Moodle App.
77+
# MOODLE_APP: 'true'
7478

7579
- name: PHP Lint
76-
if: ${{ always() }}
80+
if: ${{ !cancelled() }}
7781
run: moodle-plugin-ci phplint
7882

79-
- name: PHP Copy/Paste Detector
80-
continue-on-error: true # This step will show errors but will not fail
81-
if: ${{ always() }}
82-
run: moodle-plugin-ci phpcpd
83-
8483
- name: PHP Mess Detector
8584
continue-on-error: true # This step will show errors but will not fail
86-
if: ${{ always() }}
85+
if: ${{ !cancelled() }}
8786
run: moodle-plugin-ci phpmd
8887

8988
- name: Moodle Code Checker
90-
if: ${{ always() }}
91-
run: moodle-plugin-ci codechecker --max-warnings 0
89+
if: ${{ !cancelled() }}
90+
run: moodle-plugin-ci phpcs --max-warnings 0
9291

9392
- name: Moodle PHPDoc Checker
94-
if: ${{ always() }}
95-
run: moodle-plugin-ci phpdoc
93+
if: ${{ !cancelled() }}
94+
run: moodle-plugin-ci phpdoc --max-warnings 0
9695

9796
- name: Validating
98-
if: ${{ always() }}
97+
if: ${{ !cancelled() }}
9998
run: moodle-plugin-ci validate
10099

101100
- name: Check upgrade savepoints
102-
if: ${{ always() }}
101+
if: ${{ !cancelled() }}
103102
run: moodle-plugin-ci savepoints
104103

105104
- name: Mustache Lint
106-
if: ${{ always() }}
107-
run: moodle-plugin-ci mustache || true
105+
if: ${{ !cancelled() }}
106+
run: moodle-plugin-ci mustache
108107

109108
- name: Grunt
110-
if: ${{ always() }}
109+
if: ${{ !cancelled() }}
111110
run: moodle-plugin-ci grunt --max-lint-warnings 0
112111

113112
- name: PHPUnit tests
114-
if: ${{ always() }}
113+
if: ${{ !cancelled() }}
115114
run: moodle-plugin-ci phpunit --fail-on-warning
116115

117116
- name: Behat features
118-
if: ${{ always() }}
119-
run: moodle-plugin-ci behat --profile chrome --auto-rerun 0
117+
id: behat
118+
if: ${{ !cancelled() }}
119+
run: moodle-plugin-ci behat --profile chrome
120+
121+
- name: Mark cancelled jobs as failed.
122+
if: ${{ cancelled() }}
123+
run: exit 1

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ See http://docs.moodle.org/en/Installing_plugins for details on installing Moodl
1717

1818
# Quick start guide
1919

20-
Admins or users with the capability tool/skills:manage (by default given to managers) need to create skills under Site Administration > Plugins > Tools > Skills and make them available either globally or for specific course categories.
20+
Admins or users with the capability tool/skills:manage (by default given to managers) need to create skills under Site Administration > Plugins > Tools > Skills and make them available either globally or for specific course categories.
2121

2222
Teachers (or users with the capability tool/skills:managecourseskillslist) can then manage skills in their course from the "Manage skills" page which is found in the secondary navigation of the course. From there, teachers can then enable specific skills and configure how many points students earn upon completion of the course.
2323

amd/build/skills.min.js

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

amd/build/skills.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

amd/src/skills.js

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,26 @@
1+
// This file is part of Moodle - http://moodle.org/
2+
//
3+
// Moodle is free software: you can redistribute it and/or modify
4+
// it under the terms of the GNU General Public License as published by
5+
// the Free Software Foundation, either version 3 of the License, or
6+
// (at your option) any later version.
7+
//
8+
// Moodle is distributed in the hope that it will be useful,
9+
// but WITHOUT ANY WARRANTY; without even the implied warranty of
10+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+
// GNU General Public License for more details.
12+
//
13+
// You should have received a copy of the GNU General Public License
14+
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
15+
16+
/**
17+
* Tool skills - Manage skills, course skills.
18+
*
19+
* @module tool_skills/skills
20+
* @copyright 2023 bdecent GmbH <https://bdecent.de>
21+
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
22+
*/
23+
124
define(['jquery', 'core/modal_factory', 'core/str', 'core_form/modalform'], function($, ModalFactory, Str, ModalForm) {
225

326
const SELECTORS = {

0 commit comments

Comments
 (0)