Skip to content

Commit

Permalink
Merge branch 'release/2.0.0'
Browse files Browse the repository at this point in the history
* release/2.0.0:
  feat(version): Removing images und some legacy code. Version for submission into the moodle plugins repository.
  chore(multiple): Removing images und some legacy code.
  fix(multiple): Two small fixes after rework.
  feat(db): Removed old plugininstanceid field for upb.
  Fix(multiple): Total rework of all files and forms to make plugin fully compatible with the moodle coding style. Exam labels now usable even if course name is very long. SVGs now have the correct width. Some other small fixes and improvements.
  chore(coding style): Started reworking the whole plugin to make it compatible with the moodle coding style (not done yet)
  fix(addparticipants): Removed some validation of matriculation numbers to allow a broader variety of numbers for the participants import. Fixed some warnings related to json_decode functions that are displayed in current php versions.
  • Loading branch information
Daniel Nolte committed Feb 22, 2024
2 parents 601695f + eece3df commit 7ae0645
Show file tree
Hide file tree
Showing 125 changed files with 12,370 additions and 11,001 deletions.
110 changes: 110 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
name: Moodle Plugin CI

on: [push, pull_request]

jobs:
test:
runs-on: ubuntu-22.04

services:
postgres:
image: postgres:12
env:
POSTGRES_USER: 'postgres'
POSTGRES_HOST_AUTH_METHOD: 'trust'
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 3
mariadb:
image: mariadb:10
env:
MYSQL_USER: 'root'
MYSQL_ALLOW_EMPTY_PASSWORD: "true"
MYSQL_CHARACTER_SET_SERVER: "utf8mb4"
MYSQL_COLLATION_SERVER: "utf8mb4_unicode_ci"

ports:
- 3306:3306
options: --health-cmd="mysqladmin ping" --health-interval 10s --health-timeout 5s --health-retries 3

strategy:
fail-fast: false
matrix:
php: ['7.3', '7.4', '8.0', '8.1', '8.2']
moodle-branch: ['MOODLE_39_STABLE', 'MOODLE_310_STABLE', 'MOODLE_311_STABLE', 'MOODLE_400_STABLE', 'MOODLE_401_STABLE', 'MOODLE_402_STABLE, 'MOODLE_403_STABLE']
database: [pgsql, mariadb]

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

- name: Setup PHP ${{ matrix.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: Initialise moodle-plugin-ci
run: |
composer create-project -n --no-dev --prefer-dist moodlehq/moodle-plugin-ci ci ^3
echo $(cd ci/bin; pwd) >> $GITHUB_PATH
echo $(cd ci/vendor/bin; pwd) >> $GITHUB_PATH
sudo locale-gen en_AU.UTF-8
echo "NVM_DIR=$HOME/.nvm" >> $GITHUB_ENV
- name: Install moodle-plugin-ci
run: |
moodle-plugin-ci install --plugin ./plugin --db-host=127.0.0.1
env:
DB: ${{ matrix.database }}
MOODLE_BRANCH: ${{ matrix.moodle-branch }}

- name: PHP Lint
if: ${{ always() }}
run: moodle-plugin-ci phplint

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

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

- name: Moodle Code Checker
if: ${{ always() }}
run: moodle-plugin-ci codechecker --max-warnings 0

- name: Moodle PHPDoc Checker
if: ${{ always() }}
run: moodle-plugin-ci phpdoc

- name: Validating
if: ${{ always() }}
run: moodle-plugin-ci validate

- name: Check upgrade savepoints
if: ${{ always() }}
run: moodle-plugin-ci savepoints

- name: Mustache Lint
if: ${{ always() }}
run: moodle-plugin-ci mustache

- name: Grunt
if: ${{ always() }}
run: moodle-plugin-ci grunt --max-lint-warnings 0

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

- name: Behat features
if: ${{ always() }}
run: moodle-plugin-ci behat --profile chrome
15 changes: 15 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,19 @@
## Changelog ##

- [2.0.0]:
- Removing images und some legacy code.
- Version for submission into the moodle plugins repository.

- [1.5.9]:
- Total rework of all files and forms to make plugin fully compatible with the moodle coding style.
- [Bugfix]: Exam labels now usable even if course name is very long.
- SVGs now have the correct width.
- Some other small fixes and improvements.

- [1.5.8]:
- Removed some validation of matriculation numbers to allow a broader variety of numbers for the participants import.
- Fixed some warnings related to json_decode functions that are displayed in current php versions.

- [1.5.7]:
- Added monologo version of the plugin icon for Moodle 4.0 and above.
- Added changes.md to keep track of plugin changes.
55 changes: 46 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ In the lecturers view a lecturer can

- set the basic exam data
- export documents that are useful for the exam, such as seating plans and lists of participants
- enter the exam results for the participants manually or using a barcode scanner
- enter the exam results for the participants manually or using a barcode scanner or a smartphone with qr codes
- export all results in various documents for further use (e.g. by the exam office)

The exam participants, on the other hand, can see all the relevant information about the exam, such as the date, their seat or the bonus grade steps achieved for the exam in their own view. In addition, the notification function allows an easy and reliable communication with the participants.
The exam participants, on the other hand, can see all the relevant information about the exam, such as the date, their seat, the bonus grade steps achieved for the exam or the exam results in their own view. In addition, the notification function allows an easy and reliable communication with the participants.

## Quick installation instructions ##

Expand All @@ -40,14 +40,51 @@ The exam participants, on the other hand, can see all the relevant information a
5) Open the site admninistration to start plugin installation.
6) Wait untill installation is finished.
7) Set plugin settings.
8) Create an exam management activity and add or import default exam rooms that can be used by all teachers.
9) Optional: Enable the possibility for all teachers to request a passwort reset.
10) Have fun organizing your exams!
8) Make sure you have all necessarry components active and configured (see next chapter of this file)
9) Create an exam management activity and add or import default exam rooms that can be used by all teachers.
10) Optional: Enable the possibility for all teachers to request a passwort reset (see below).
11) Have fun organizing your exams!

## Dependencies ##

To ensure that the exam management plugin works as intended make sure that
To ensure that the exam management plugin works as intended make sure that ...

- you have configured the mail server for your moodle
- sheduled tasks are performed automatically
- the ldap authentication plugin is installed within your moodle and that you have configured it to connect to your own ldap server to fetch matriculation numbers for your participants
- you have configured the mail server for your moodle (if not no external mails for groupmessages or resetting password can be send)
- sheduled tasks are performed automatically (if not old exam data won't be deleted by moodle)
- the ldap authentication plugin "LDAP server" (auth_ldap) is installed within your moodle and that you have configured it to connect to your own ldap server (see https://docs.moodle.org/403/en/LDAP_authentication)
- you have entered the correct ldap settings in the admin plugin settings (see the next chapter of this file) to fetch matriculation numbers for the participants (else you can't use matriculation numbers and depending features like exam labels)

## Configure ldap in the plugin settings ##

If you want to use some very usefull plugin functionalities like the import of participants (even without a moodle account) from an external exam list, the entering of results by matriculation number or the export of exam labels you have to make sure that the ldap authentication plugin "LDAP server" (auth_ldap) is enabled and configured. Then you have to enable and configure the ldap part in the settings of this plugin.

To achieve this you have to do the following steps:
- (Required) Enable the use of an external ldap server specified in ldap authentication plugin "LDAP server" ("auth_ldap") by ticking the enableldap admin setting of the plugin.
- (Optional) If you want to use a different ldap then the one speicifed in the auth_ldap plugin you can set it's "distinguished name" dn here. If this field is left empty, the plugin uses the value "contexts" from the global settings of auth_ldap. If neither of these two fields is filled in, the ldap dependent plugin functions cannot be used.
- (Optional) You can specify the name of the ldap field where the username of the participant is located. This username must match the username of the participant in moodle. If this field is left empty, the plugin uses the value "field_map_idnumber" from the global settings of auth_ldap. If neither of these two fields is filled in, the ldap dependent plugin functions cannot be used.
- (Required) You have to enter the name of the ldap field where the participants matriculation number is located here. If this field is not filled in, the ldap dependent plugin functions cannot be used.
- (Optional) You can also specify the ldap fields containing the names and email adresses of the users. These information is saved for all exam participants that don't have an account in moodle. If these fields are left empty, the plugin uses the corresponding values from the global settings of auth_ldap.
- (Optional) You can also set a class name that is then used as an additional filter criterion for the participant object in ldap.

If all necessary steps are done the plugin automatically uses the data stored in the ldap.

## Additional plugin settings

As an admin you can set the following additional plugin settings:

- moodlesystemname: The name of the moodle installation that will be displayed in the plugin (e.g. in helptexts).
- enableglobalmessage & globalmessage: You can enable and set a short message that will be shown to all teachers when they create a new exam management.
- enablehelptexts & additionalressources: You can enable the module internal helptexts for each work step in the plugin and set a link to an additional external ressource (e.g. your own documentation or the plugin page in the moodle docs).
- enablepasswordresetrequest: You can enable teachers to request the reset of a password in an exam management. If a teacher does so, all users with the role "Manager" receive an automatically generated message both as internal notification and forwarded to the e-mail address stored in their profile and can then reset the password by clicking on the link contained in this message. This means that all teachers of the exam management concerned are automatically informed via internal notification and e-mail that the password has been resetted and that the contents of the exam management can be accessed again without entering a password. If this function is not activated, users cannot automatically request the password reset in their exam management, but managers and administrators can still reset the password of any exam management.

## For themes ##

To change the color of the panels or the table headers through a theme just override exammanagement_brand_backgroundcolor.

## Use of logos in documents ##

If you want to customize the exported result documents with a logo you can add two files to a /data folder in the plugins base folder.

A file called logo.ai will be used in the documents from exportresultsexamreview.php and exportresultspercentages.php while logo_full.ai will be used in documents from participantsList.php and seatingplan.php.

If no files are uploaded to /data the exported result files will not contain any logos.
Loading

0 comments on commit 7ae0645

Please sign in to comment.