Skip to content

Commit

Permalink
Removed internal check on rubref.php file
Browse files Browse the repository at this point in the history
See #30
Credit to Kevin Hipwell
  • Loading branch information
marcusgreen committed Oct 13, 2024
1 parent a7b9195 commit 94fe663
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 27 deletions.
43 changes: 21 additions & 22 deletions .github/workflows/moodle-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,44 +30,43 @@ jobs:
fail-fast: false
matrix:
include:
- php: '8.2'
moodle-branch: 'MOODLE_404_STABLE'
database: 'mariadb'
# - php: '8.2'
# moodle-branch: 'MOODLE_402_STABLE'
# database: 'mariadb'
- php: '8.3'
moodle-branch: 'MOODLE_405_STABLE'
database: 'pgsql'
steps:
- name: Check out repository code
uses: actions/checkout@v2
- name: Checkout
uses: actions/checkout@v3
with:
path: plugin

- name: Setup PHP ${{ matrix.php }}
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: ${{ matrix.extensions }}
ini-values: max_input_vars=5000
# none to use phpdbg fallback. Specify pcov (Moodle 3.10 and up) or xdebug to use them instead.
coverage: none
- name: Install NVM and Node
run: |
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.0/install.sh | bash
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
nvm install 20
nvm use 20
- name: Initialise moodle-plugin-ci

- name: Deploy moodle-plugin-ci
run: |
composer create-project -n --no-dev --prefer-dist moodlehq/moodle-plugin-ci ci ^3
# Add dirs to $PATH
echo $(cd ci/bin; pwd) >> $GITHUB_PATH
echo $(cd ci/vendor/bin; pwd) >> $GITHUB_PATH
# PHPUnit depends on en_AU.UTF-8 locale
sudo locale-gen en_AU.UTF-8
echo "NVM_DIR=$HOME/.nvm" >> $GITHUB_ENV
- name: Install moodle-plugin-ci
run: |
moodle-plugin-ci add-plugin --branch MOODLE_402_STABLE catalyst/moodle-gradingform_rubric_ranges
moodle-plugin-ci install --plugin ./plugin --db-host=127.0.0.1
- name: Install Moodle
# Need explicit IP to stop mysql client fail on attempt to use unix socket.
run: moodle-plugin-ci install --plugin ./plugin --db-host=127.0.0.1
env:
DB: ${{ matrix.database }}
MOODLE_BRANCH: ${{ matrix.moodle-branch }}
IGNORE_PATHS: 'templates/local/mobile'

- name: PHP Lint
if: ${{ always() }}
Expand Down Expand Up @@ -100,13 +99,13 @@ jobs:
run: moodle-plugin-ci savepoints

- name: Grunt
if: ${{ always() }}
run: moodle-plugin-ci grunt --max-lint-warnings 0
if: ${{ matrix.moodle-branch == 'master' }}
run: moodle-plugin-ci grunt

- name: PHPUnit tests
if: ${{ always() }}
run: moodle-plugin-ci phpunit

- name: Behat features
if: ${{ always() }}
run: moodle-plugin-ci behat --profile chrome
run: moodle-plugin-ci behat --profile chrome
5 changes: 5 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
### Version 1.01 Oct 2024
Confirmed compatibility with Moodle 4.5 and PHP 8.3
Thanks to Kevin Hipwell and Enovation for contribution to rubref (rubric refined also known as rubric flex)
https://github.com/marcusgreen/moodle-report_advancedgrading/issues/30

### Version 1.0 May 2024

Added behat test compatibility to work with Moodle 4.4. Thanks to Monash university Australia and thanks to Dmitrii Metelkin of
Expand Down
2 changes: 1 addition & 1 deletion classes/rubref.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public function get_rows(array $data): string {
* @param \cm_info $cm
* @return array
*/
public function get_data(\assign $assign, \cm_info $cm) : array {
public function get_data(\assign $assign, \cm_info $cm): array {
global $DB;
$sql = "SELECT grf.id as grfid,
cm.course, asg.name as assignment,asg.grade as gradeoutof,
Expand Down
2 changes: 1 addition & 1 deletion classes/rubric.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public function get_rows(array $data): string {
* @param \cm_info $cm
* @return array
*/
public function get_data(\assign $assign, \cm_info $cm) : array {
public function get_data(\assign $assign, \cm_info $cm): array {
global $DB;
$sql = "SELECT grf.id as grfid,
cm.course, asg.name as assignment,asg.grade as gradeoutof,
Expand Down
4 changes: 1 addition & 3 deletions rubref.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,10 @@
* Exports an Excel spreadsheet of the grades in a rubref-graded assignment.
*
* @package report_advancedgrading
* @copyright 2022 Marcus Green
* @copyright 2024 Marcus Green
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

defined('MOODLE_INTERNAL') || die();

require(__DIR__ . '../../../config.php');
require_once(__DIR__ . '/../../report/advancedgrading/locallib.php');
require_once(__DIR__ . '/../../lib/excellib.class.php');
Expand Down

0 comments on commit 94fe663

Please sign in to comment.