Skip to content

Commit

Permalink
Include path for parent class preview_action_column.php.
Browse files Browse the repository at this point in the history
  • Loading branch information
lucaboesch committed May 2, 2024
1 parent 911b120 commit c427c2c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/moodle-plugin-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,15 @@ jobs:
# - each moodle version at least once
# - each database at least once
include:
- {php: '7.3', moodle-branch: MOODLE_400_STABLE, database: pgsql}
- {php: '7.4', moodle-branch: MOODLE_401_STABLE, database: mariadb}
- {php: '8.1', moodle-branch: MOODLE_402_STABLE, database: pgsql}
- {php: '8.0', moodle-branch: MOODLE_402_STABLE, database: pgsql}
- {php: '8.2', moodle-branch: MOODLE_403_STABLE, database: mariadb}
- {php: '8.1', moodle-branch: master, database: pgsql}
- {php: '8.3', moodle-branch: MOODLE_404_STABLE, database: pgsql}
- {php: '8.1', moodle-branch: main, database: pgsql}

steps:
- name: Check out repository code
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
path: plugin

Expand All @@ -58,7 +58,7 @@ jobs:

- name: Initialise moodle-plugin-ci
run: |
composer create-project -n --no-dev --prefer-dist moodlehq/moodle-plugin-ci ci ^3
composer create-project -n --no-dev --prefer-dist moodlehq/moodle-plugin-ci ci ^4
echo $(cd ci/bin; pwd) >> $GITHUB_PATH
echo $(cd ci/vendor/bin; pwd) >> $GITHUB_PATH
sudo locale-gen en_AU.UTF-8
Expand All @@ -77,6 +77,7 @@ jobs:

- name: PHP Copy/Paste Detector
if: ${{ always() }}
continue-on-error: true # This step will show errors but will not fail
run: moodle-plugin-ci phpcpd

- name: PHP Mess Detector
Expand Down
8 changes: 8 additions & 0 deletions classes/question/bank/sq_preview_action.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,14 @@
class_alias('\qbank_previewquestion\preview_action_column', '\qbank_previewquestion\preview_action');
}

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

if (file_exists($CFG->dirroot.'/mod/quiz/classes/question/bank/preview_action_column.php')) {
require_once($CFG->dirroot.'/mod/quiz/classes/question/bank/preview_action_column.php');
}

use qbank_previewquestion\preview_action_column;

/**
* A action type for preview link to mod_studentquiz_preview
*
Expand Down

0 comments on commit c427c2c

Please sign in to comment.