Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 22 additions & 13 deletions .github/workflows/moodle-plugin-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,31 @@ jobs:
strategy:
fail-fast: false
matrix:
include:
php: ['8.1', '8.2', '8.3', '8.4']
moodle-branch: [
'MOODLE_405_STABLE',
'MOODLE_500_STABLE',
'MOODLE_501_STABLE',
'MOODLE_502_STABLE'
]
database: ['mariadb', 'pgsql']
exclude:
- php: '8.2'
moodle-branch: 'MOODLE_502_STABLE'
- php: '8.1'
moodle-branch: 'MOODLE_403_STABLE'
database: 'pgsql'
moodle-branch: 'MOODLE_502_STABLE'
- php: '8.2'
moodle-branch: 'MOODLE_501_STABLE'
- php: '8.1'
moodle-branch: 'MOODLE_403_STABLE'
database: 'mariadb'
moodle-branch: 'MOODLE_501_STABLE'
- php: '8.1'
moodle-branch: 'MOODLE_500_STABLE'
- php: '8.4'
moodle-branch: 'MOODLE_405_STABLE'

services:
postgres:
image: postgres:14
image: postgres:17
env:
POSTGRES_USER: 'postgres'
POSTGRES_HOST_AUTH_METHOD: 'trust'
Expand All @@ -30,7 +44,7 @@ jobs:
- 5432:5432

mariadb:
image: mariadb:10
image: mariadb:10.11
env:
MYSQL_USER: 'root'
MYSQL_ALLOW_EMPTY_PASSWORD: "true"
Expand Down Expand Up @@ -76,11 +90,6 @@ jobs:
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() }}
Expand All @@ -104,7 +113,7 @@ jobs:

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

- name: Grunt
if: ${{ always() }}
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ moodle-mod_scheduler
====================


[![Latest Release](https://img.shields.io/github/v/release/bostelm/moodle-mod_scheduler?sort=semver&color=orange)](https://github.com/bostelm/moodle-mod_scheduler/releases)
[![Moodle Plugin CI](https://github.com/bostelm/moodle-mod_scheduler/workflows/Moodle%20plugin%20CI/badge.svg?branch=master)](https://github.com/bostelm/moodle-mod_scheduler/actions?query=workflow%3A%22Moodle+plugin+CI%22+branch%3Amaster)
[![Latest Release](https://img.shields.io/github/v/release/learnweb/moodle-mod_scheduler?sort=semver&color=orange)](https://github.com/learnweb/moodle-mod_scheduler/releases)
[![Moodle plugin CI](https://github.com/learnweb/moodle-mod_scheduler/actions/workflows/moodle-plugin-ci.yml/badge.svg)](https://github.com/learnweb/moodle-mod_scheduler/actions/workflows/moodle-plugin-ci.yml)

Appointment
Scheduler for Moodle
Expand Down
11 changes: 5 additions & 6 deletions ajax.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,17 @@

define('AJAX_SCRIPT', true);

use \mod_scheduler\model\scheduler;
use \mod_scheduler\permission\scheduler_permissions;
use mod_scheduler\model\scheduler;
use mod_scheduler\permission\scheduler_permissions;

require_once(dirname(dirname(dirname(__FILE__))).'/config.php');
require_once(dirname(dirname(dirname(__FILE__))) . '/config.php');
require_once('locallib.php');

$id = required_param('id', PARAM_INT);
$action = required_param('action', PARAM_ALPHA);

$cm = get_coursemodule_from_id('scheduler', $id, 0, false, MUST_EXIST);
$course = $DB->get_record('course', array('id' => $cm->course), '*', MUST_EXIST);
$course = $DB->get_record('course', ['id' => $cm->course], '*', MUST_EXIST);
$scheduler = scheduler::load_by_coursemodule_id($id);

require_login($course, true, $cm);
Expand All @@ -46,9 +46,8 @@

switch ($action) {
case 'saveseen':

$appid = required_param('appointmentid', PARAM_INT);
list($slot, $app) = $scheduler->get_slot_appointment($appid);
[$slot, $app] = $scheduler->get_slot_appointment($appid);
$newseen = required_param('seen', PARAM_BOOL);

$permissions->ensure($permissions->can_edit_attended($app));
Expand Down
4 changes: 2 additions & 2 deletions amd/build/delselected.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion amd/build/delselected.min.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion amd/build/saveseen.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading