Skip to content

19 homework student feature show all the data from the database in the preparation feed block #55

19 homework student feature show all the data from the database in the preparation feed block

19 homework student feature show all the data from the database in the preparation feed block #55

Workflow file for this run

name: Codesniffer for Moodle Homework Plugin
on:
push:
branches: [ "main" ]
pull_request:
types: [opened, reopened, synchronize]
jobs:
homework-plugin-codesniffer:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# Set up Composer
- name: Set up Composer
run: |
composer global config minimum-stability dev
composer global config --no-plugins allow-plugins.dealerdirect/phpcodesniffer-composer-installer true
composer global require moodlehq/moodle-cs
# Add Composer global bin to PATH
- name: Add Composer global bin to PATH
run: echo "PATH=$HOME/.composer/vendor/bin:$PATH" >> $GITHUB_ENV
# Create .phpcs.xml file with required content
- name: Create .phpcs.xml file
run: |
cat <<EOT >> ./.phpcs.xml
<?xml version="1.0" encoding="UTF-8"?>
<ruleset name="MoodleCore">
<rule ref="moodle-extra"/>
</ruleset>
EOT
# Run PHP_CodeSniffer
- name: Run Code Sniffer on mod_homework
if: always()
run: phpcs --runtime-set ignore_warnings_on_exit 1 server/moodle/mod/homework/
- name: Run Code Sniffer on block_homework
if: always()
run: phpcs --runtime-set ignore_warnings_on_exit 1 server/moodle/blocks/homework/