Skip to content

Commit

Permalink
Coding style fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
frogprincess committed Dec 23, 2024
1 parent 341e724 commit c63d117
Show file tree
Hide file tree
Showing 93 changed files with 1,448 additions and 1,209 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/moodle-ci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Moodle Plugin CI

on: [push, pull_request]
on: [ push, pull_request ]

jobs:
test:
Expand Down
134 changes: 67 additions & 67 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,23 +21,23 @@ cache:
# listed here will create a separate build and run the tests against that
# version of PHP.
php:
- 7.2
- 7.3
- 7.4
- 7.2
- 7.3
- 7.4

# This section sets up the environment variables for the build.
env:
global:
# This line determines which version branch of Moodle to test against.
- MOODLE_BRANCH=MOODLE_39_STABLE
# This matrix is used for testing against multiple databases. So for
# each version of PHP being tested, one build will be created for each
# database listed here. EG: for PHP 7.3, one build will be created
# using PHP 7.3 and pgsql. In addition, another build will be created
# using PHP 7.3 and mysqli.
matrix:
- DB=pgsql
- DB=mysqli
global:
# This line determines which version branch of Moodle to test against.
- MOODLE_BRANCH=MOODLE_39_STABLE
# This matrix is used for testing against multiple databases. So for
# each version of PHP being tested, one build will be created for each
# database listed here. EG: for PHP 7.3, one build will be created
# using PHP 7.3 and pgsql. In addition, another build will be created
# using PHP 7.3 and mysqli.
matrix:
- DB=pgsql
- DB=mysqli

# Optionally, it is possible to specify a different Moodle repo to use
# (git://github.com/moodle/moodle.git is used by default):
Expand All @@ -61,78 +61,78 @@ env:

# This lists steps that are run before the installation step.
before_install:
# This disables XDebug which should speed up the build.
# This disables XDebug which should speed up the build.
- phpenv config-rm xdebug.ini
# Currently we are inside of the clone of your repository. We move up two
# directories to build the project.
# Currently we are inside of the clone of your repository. We move up two
# directories to build the project.
- cd ../..
# Update Composer.
- composer selfupdate
# Install this project into a directory called "ci".
# Update Composer.
- composer selfupdate
# Install this project into a directory called "ci".
- composer create-project -n --no-dev --prefer-dist moodlehq/moodle-plugin-ci ci ^3
# Update the $PATH so scripts from this project can be called easily.
# Update the $PATH so scripts from this project can be called easily.
- export PATH="$(cd ci/bin; pwd):$(cd ci/vendor/bin; pwd):$PATH"

# This lists steps that are run for installation and setup.
install:
# Run the default install. The overview of what this does:
# - Clone the Moodle project into a directory called moodle.
# - Create a data directory called moodledata.
# - Create Moodle config.php, database, etc.
# - Copy your plugin(s) into Moodle.
# - Run Composer install within Moodle.
# - Install the correct (or configured) version of nodejs/npm using NVM.
# - Run NPM install in Moodle and in your plugin if it has a "package.json".
# - Run "grunt ignorefiles" within Moodle to update ignore file lists.
# - If your plugin has Behat features, then Behat will be setup.
# - If your plugin has unit tests, then PHPUnit will be setup.
# Run the default install. The overview of what this does:
# - Clone the Moodle project into a directory called moodle.
# - Create a data directory called moodledata.
# - Create Moodle config.php, database, etc.
# - Copy your plugin(s) into Moodle.
# - Run Composer install within Moodle.
# - Install the correct (or configured) version of nodejs/npm using NVM.
# - Run NPM install in Moodle and in your plugin if it has a "package.json".
# - Run "grunt ignorefiles" within Moodle to update ignore file lists.
# - If your plugin has Behat features, then Behat will be setup.
# - If your plugin has unit tests, then PHPUnit will be setup.
- moodle-plugin-ci install

# This lists steps that are run for the purposes of testing. Any of
# these steps can be re-ordered or removed to your liking. And of
# course, you can add any of your own custom steps.
script:
# This step lints your PHP files to check for syntax errors.
# This step lints your PHP files to check for syntax errors.
- moodle-plugin-ci phplint
# This step runs the PHP Copy/Paste Detector on your plugin.
# This helps to find code duplication.
# - moodle-plugin-ci phpcpd
# This step runs the PHP Mess Detector on your plugin. This helps to find
# potential problems with your code which can result in
# refactoring opportunities.
# This step runs the PHP Copy/Paste Detector on your plugin.
# This helps to find code duplication.
# - moodle-plugin-ci phpcpd
# This step runs the PHP Mess Detector on your plugin. This helps to find
# potential problems with your code which can result in
# refactoring opportunities.
- moodle-plugin-ci phpmd
# This step runs the Moodle Code Checker to make sure that your plugin
# conforms to the Moodle coding standards. It is highly recommended
# that you keep this step.
# To fail on warnings use --max-warnings 0
# This step runs the Moodle Code Checker to make sure that your plugin
# conforms to the Moodle coding standards. It is highly recommended
# that you keep this step.
# To fail on warnings use --max-warnings 0
- moodle-plugin-ci codechecker
# This step runs Moodle PHPDoc checker on your plugin.
# This step runs Moodle PHPDoc checker on your plugin.
- moodle-plugin-ci phpdoc
# This step runs some light validation on the plugin file structure
# and code. Validation can be plugin specific.
# This step runs some light validation on the plugin file structure
# and code. Validation can be plugin specific.
- moodle-plugin-ci validate
# This step validates your plugin's upgrade steps.
# This step validates your plugin's upgrade steps.
- moodle-plugin-ci savepoints
# This step validates the HTML and Javascript in your Mustache templates.
# - moodle-plugin-ci mustache
# This step runs Grunt tasks on the plugin. By default, it tries to run
# tasks relevant to your plugin and Moodle version, but you can run
# specific tasks by passing them as options,
# EG: moodle-plugin-ci grunt -t task1 -t task2
# To fail on eslint warnings use --max-lint-warnings 0
# This step validates the HTML and Javascript in your Mustache templates.
# - moodle-plugin-ci mustache
# This step runs Grunt tasks on the plugin. By default, it tries to run
# tasks relevant to your plugin and Moodle version, but you can run
# specific tasks by passing them as options,
# EG: moodle-plugin-ci grunt -t task1 -t task2
# To fail on eslint warnings use --max-lint-warnings 0
- moodle-plugin-ci grunt
# This step runs the PHPUnit tests of your plugin. If your plugin has
# PHPUnit tests, then it is highly recommended that you keep this step.
# This step runs the PHPUnit tests of your plugin. If your plugin has
# PHPUnit tests, then it is highly recommended that you keep this step.
- moodle-plugin-ci phpunit
# This step runs the Behat tests of your plugin. If your plugin has
# Behat tests, then it is highly recommended that you keep this step.
# There are few important options that you may want to use:
# - The auto rerun option allows you to rerun failures X number of times,
# default is 2, EG usage: --auto-rerun 3
# - The dump option allows you to print the failure HTML to the console,
# handy for debugging, EG usage: --dump
# - The suite option allows you to set the theme to use for behat test. If
# not specified, the default theme is used, EG usage: --suite boost
# - The profile option allows you to set the browser driver to use,
# default is Firefox. If you need Chrome, set '--profile chrome'.
# This step runs the Behat tests of your plugin. If your plugin has
# Behat tests, then it is highly recommended that you keep this step.
# There are few important options that you may want to use:
# - The auto rerun option allows you to rerun failures X number of times,
# default is 2, EG usage: --auto-rerun 3
# - The dump option allows you to print the failure HTML to the console,
# handy for debugging, EG usage: --dump
# - The suite option allows you to set the theme to use for behat test. If
# not specified, the default theme is used, EG usage: --suite boost
# - The profile option allows you to set the browser driver to use,
# default is Firefox. If you need Chrome, set '--profile chrome'.
- moodle-plugin-ci behat
32 changes: 17 additions & 15 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
r3.11.0
-------

- Refactored activity to used own setting for grouping instead of Common module settings.
- Refactored submission grade to allow float values
- Added grading before due date warning #59 (for group summary screen)
Expand All @@ -10,14 +11,15 @@ r3.11.0
- AMOS string fix #3 provided by https://github.com/izendegi.
- Table prefix fix #1 provided by https://github.com/izendegi.


r2.3.2
------

- Removed deprecated string grade/core
- Removed deprecated function user_picture::fields()

r2.3.1
------

- Added grading before due date warning #59
- Improved display of criteria scales #60

Expand All @@ -44,7 +46,7 @@ r2.1.0

- Added individual peer grade override
- Added site setting:
Justification - disabled, hidden, visible anonymous, visible with usernames
Justification - disabled, hidden, visible anonymous, visible with usernames
- Added suite of Behat tests

r2.0.0
Expand All @@ -57,21 +59,21 @@ r1.1.0
------

- Added site settings:
Default number of criteria - 1-5
Default text for 5 criteria
Default scale for 5 criteria
Justification type - per peer or per criteria
Default number of criteria - 1-5
Default text for 5 criteria
Default scale for 5 criteria
Justification type - per peer or per criteria
- Added activity setting:
Justification type - per peer or per criteria
Justification type - per peer or per criteria
- Some activity settings no longer editable after a student has submitted:
Peer grades visibility
Allow students to self grade
Justification
Justification type
Justificaton max length
Criteria
Criteria scale
Add criteria
Peer grades visibility
Allow students to self grade
Justification
Justification type
Justificaton max length
Criteria
Criteria scale
Add criteria
- Style changes to improve responsiveness

r1.0.0
Expand Down
35 changes: 21 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,51 +13,58 @@ Tutors define number of files to be submitted allowing "0" for an offline activi
Tutors control visibility / privacy for students in terms of peer scores, comments.
Students submit work (optional).
Students rate their peers for each criteria (required).
Students can leave feedback comments (optional).
Students can leave feedback comments (optional).
Teachers grade the group assignment.

The activity then calculates the grade each individual student receives.
The final individual grade is based on the teacher grade, peer ratings and weighting. The calculator is a subplugin of the peer work activity.

If PA weighting is included in the selected calculator, then teachers can adjust weightings on a per group basis. Teachers can also override any individual grades/peer grades they need to.
If PA weighting is included in the selected calculator, then teachers can adjust weightings on a per group basis. Teachers can also override any individual grades/peer grades they
need to.
Teachers then release grades ensuring all students recieve their grades at the same time.
Teachers can export grades for an individual group or the entire cohort as a csv file.
Teachers can lock the activity, giving students only one attempt to submit. They can also unlock a group submission or an individual student.

Calculator plugins
Calculator plugins can be assigned available scales. The default is 'all'. If scales are selected then only those will be available in the criteria settings. The scale setting is locked once a student submits peer grades. Changing the calculator type will not affect the peer grades even if the new calculator does not have the scale used as an available scale. Available scale is only checked when the criteria scale is enabled.
Calculator plugins can be assigned available scales. The default is 'all'. If scales are selected then only those will be available in the criteria settings. The scale setting is
locked once a student submits peer grades. Changing the calculator type will not affect the peer grades even if the new calculator does not have the scale used as an available
scale. Available scale is only checked when the criteria scale is enabled.


Authors
=======

2013
- This module was built to a specification from City, University of London
- by Learning Technology Services Ltd, Ireland.

- This module was built to a specification from City, University of London
- by Learning Technology Services Ltd, Ireland.

2017
- This module was revised by Naomi Wilce, City, University of London


- This module was revised by Naomi Wilce, City, University of London

2018
- Work by Kevin Moore, Coventry University to add grading criteria

- Work by Kevin Moore, Coventry University to add grading criteria

2019
- Extended and improved by https://branchup.tech/ with funding from Coventry University

2020
- Extended and improved by Amanda Doughty, City, University of London
- Extended and improved by https://branchup.tech/ with funding from Coventry University

2020

- Extended and improved by Amanda Doughty, City, University of London

Supported Versions
==================

- The module has been tested with Moodle versions 4.0

- The module has been tested with Moodle versions 4.0

Installation instructions
=========================

1. Copy the peerwork directory to the /mod directory of the Moodle instance
2. Log into your Moodle as administrator, or if logged in visit the Notifications
2. Log into your Moodle as administrator, or if logged in visit the Notifications
page
3. You should be prompted to upgrade your Moodle to install the module
4. Once installed there are no global settings for this activity.
Expand Down
Loading

0 comments on commit c63d117

Please sign in to comment.