Select Git revision
questiontype.php
-
Chris Sangwin authored
Squashed commit of the following: commit ca5c2a34c95b63df46bca81cb4875e42425ddbe5 Author: Chris Sangwin <C.J.Sangwin@ed.ac.uk> Date: Tue Jul 5 21:11:35 2022 +0100 Support bulk tester in Moodle 4 and earlier. commit 9da5f96575acc6c378dd469b7390df1dae78bf0a Author: Chris Sangwin <C.J.Sangwin@ed.ac.uk> Date: Tue Jul 5 18:55:47 2022 +0100 Make sure the testing page always tests the last question version. This allows the question author to reload the question testing page after a question has been saved. commit 3c3fcf09d38a5fc981850f037ba8221b21400c24 Author: Chris Sangwin <C.J.Sangwin@ed.ac.uk> Date: Tue Jul 5 18:14:23 2022 +0100 WIP commit for testing on both Moodle 4.0 and earlier. commit d00a6f11400fd6af29fb5a646cc83fbb6670ea20 Author: Chris Sangwin <C.J.Sangwin@ed.ac.uk> Date: Tue Jul 5 17:51:40 2022 +0100 Support on both Moodle 4 and earlier versions (WIP for testing). commit 07402d5c8249e6d320404973451b819b78a661ca Author: Chris Sangwin <C.J.Sangwin@ed.ac.uk> Date: Tue Jul 5 16:46:17 2022 +0100 Support both Moodle 4.0 and previous versions (WIP for testing). commit 1dccc92e1b0805305505afc3b8a7174792b6dfd2 Author: Chris Sangwin <C.J.Sangwin@ed.ac.uk> Date: Tue Jul 5 16:07:46 2022 +0100 Add coverage information to unit tests. commit c8d16b1f829b62f1c8dd8ee7f99e725c178debe2 Author: Chris Sangwin <C.J.Sangwin@ed.ac.uk> Date: Tue Jul 5 08:36:17 2022 +0100 Add coverage information for auto-generated ast tests. commit 6ae39e5063fa5d2d4c0a78a10ad56343c78c8fa2 Author: Chris Sangwin <C.J.Sangwin@ed.ac.uk> Date: Tue Jul 5 08:16:20 2022 +0100 Fix broken unit tests. commit 38daee7cf0b54dbacf4016bc3fa15dba6adc4b27 Author: Chris Sangwin <C.J.Sangwin@ed.ac.uk> Date: Tue Jun 14 20:02:36 2022 +0100 Fix broken test case. commit ad2f8b04f6e4227c9f525e2650f03e891d69e0ad Author: Chris Sangwin <csangwin@coulomb.maths.ed.ac.uk> Date: Tue Jun 14 18:22:16 2022 +0100 Fix bug with test case & seed copying between versions. commit b4ce5ee24a6f12e724f7c74f9dd53207a426906c Merge: 9b325b9a 0e20187b Author: Chris Sangwin <C.J.Sangwin@ed.ac.uk> Date: Sun Jun 12 19:20:03 2022 +0100 Merge remote-tracking branch 'origin/dev' into moodle4 commit 9b325b9aa2b5e01dd5fbd399931e62423262ee3f Author: Chris Sangwin <C.J.Sangwin@ed.ac.uk> Date: Sun Jun 12 11:34:44 2022 +0100 Update question basic useage report for Moodle 4. commit f57cffeba5dd643b107f7dbf3b478b4a48fc2af0 Author: Chris Sangwin <C.J.Sangwin@ed.ac.uk> Date: Sat Jun 11 18:26:09 2022 +0100 Fix failing unit test (artefact of test case construction) + code tidy. commit e85d6508a3e9f6efcef666cab7cf59fd36c38c24 Author: Chris Sangwin <C.J.Sangwin@ed.ac.uk> Date: Sat Jun 11 17:01:01 2022 +0100 Seeds copy over to a new version. commit 9bb4aec386b478468f8af04c515d598c029da932 Author: Chris Sangwin <C.J.Sangwin@ed.ac.uk> Date: Sat Jun 11 16:46:16 2022 +0100 Fix to issue #805. commit 52828b431bcd01f59ea1401915962f8e039aba79 Merge: e311ad72 cb8d8a74 Author: Chris Sangwin <C.J.Sangwin@ed.ac.uk> Date: Fri Jun 10 14:41:54 2022 +0100 Merge remote-tracking branch 'origin/dev' into moodle4 commit e311ad72f63bc7d7605e0ec68bf2b9faa752bf78 Author: Chris Sangwin <C.J.Sangwin@ed.ac.uk> Date: Fri Jun 10 11:44:39 2022 +0100 WIP enable bulk tester to run with moodle 4 (unblocks question testing). commit 4145bb1064a5755c1fb2cb8a2b013ba34adf9d2f Merge: fc6a81cb 49f70d7f Author: Chris Sangwin <C.J.Sangwin@ed.ac.uk> Date: Thu Jun 9 15:46:28 2022 +0100 Merge branch 'moodle4' of https://github.com/maths/moodle-qtype_stack into moodle4 commit fc6a81cb011d9b74d8d4b1a5b63bc87abbe38b28 Author: Chris Sangwin <C.J.Sangwin@ed.ac.uk> Date: Thu Jun 9 15:46:17 2022 +0100 Update todo and developer docs. commit 49f70d7f9c71e887fe7a6266d40aea9a44a14769 Author: Matti Harjula <aharjula@konsta.hut.fi> Date: Tue Jun 7 09:19:22 2022 +0300 Codestyle *castext*. commit d52180b635f2e6f2f18279b1f36ee28d2d509802 Author: Chris Sangwin <C.J.Sangwin@ed.ac.uk> Date: Thu Jun 2 09:58:55 2022 +0100 Audit very stack-specific issues when running on Moodle 4.0.
Chris Sangwin authoredSquashed commit of the following: commit ca5c2a34c95b63df46bca81cb4875e42425ddbe5 Author: Chris Sangwin <C.J.Sangwin@ed.ac.uk> Date: Tue Jul 5 21:11:35 2022 +0100 Support bulk tester in Moodle 4 and earlier. commit 9da5f96575acc6c378dd469b7390df1dae78bf0a Author: Chris Sangwin <C.J.Sangwin@ed.ac.uk> Date: Tue Jul 5 18:55:47 2022 +0100 Make sure the testing page always tests the last question version. This allows the question author to reload the question testing page after a question has been saved. commit 3c3fcf09d38a5fc981850f037ba8221b21400c24 Author: Chris Sangwin <C.J.Sangwin@ed.ac.uk> Date: Tue Jul 5 18:14:23 2022 +0100 WIP commit for testing on both Moodle 4.0 and earlier. commit d00a6f11400fd6af29fb5a646cc83fbb6670ea20 Author: Chris Sangwin <C.J.Sangwin@ed.ac.uk> Date: Tue Jul 5 17:51:40 2022 +0100 Support on both Moodle 4 and earlier versions (WIP for testing). commit 07402d5c8249e6d320404973451b819b78a661ca Author: Chris Sangwin <C.J.Sangwin@ed.ac.uk> Date: Tue Jul 5 16:46:17 2022 +0100 Support both Moodle 4.0 and previous versions (WIP for testing). commit 1dccc92e1b0805305505afc3b8a7174792b6dfd2 Author: Chris Sangwin <C.J.Sangwin@ed.ac.uk> Date: Tue Jul 5 16:07:46 2022 +0100 Add coverage information to unit tests. commit c8d16b1f829b62f1c8dd8ee7f99e725c178debe2 Author: Chris Sangwin <C.J.Sangwin@ed.ac.uk> Date: Tue Jul 5 08:36:17 2022 +0100 Add coverage information for auto-generated ast tests. commit 6ae39e5063fa5d2d4c0a78a10ad56343c78c8fa2 Author: Chris Sangwin <C.J.Sangwin@ed.ac.uk> Date: Tue Jul 5 08:16:20 2022 +0100 Fix broken unit tests. commit 38daee7cf0b54dbacf4016bc3fa15dba6adc4b27 Author: Chris Sangwin <C.J.Sangwin@ed.ac.uk> Date: Tue Jun 14 20:02:36 2022 +0100 Fix broken test case. commit ad2f8b04f6e4227c9f525e2650f03e891d69e0ad Author: Chris Sangwin <csangwin@coulomb.maths.ed.ac.uk> Date: Tue Jun 14 18:22:16 2022 +0100 Fix bug with test case & seed copying between versions. commit b4ce5ee24a6f12e724f7c74f9dd53207a426906c Merge: 9b325b9a 0e20187b Author: Chris Sangwin <C.J.Sangwin@ed.ac.uk> Date: Sun Jun 12 19:20:03 2022 +0100 Merge remote-tracking branch 'origin/dev' into moodle4 commit 9b325b9aa2b5e01dd5fbd399931e62423262ee3f Author: Chris Sangwin <C.J.Sangwin@ed.ac.uk> Date: Sun Jun 12 11:34:44 2022 +0100 Update question basic useage report for Moodle 4. commit f57cffeba5dd643b107f7dbf3b478b4a48fc2af0 Author: Chris Sangwin <C.J.Sangwin@ed.ac.uk> Date: Sat Jun 11 18:26:09 2022 +0100 Fix failing unit test (artefact of test case construction) + code tidy. commit e85d6508a3e9f6efcef666cab7cf59fd36c38c24 Author: Chris Sangwin <C.J.Sangwin@ed.ac.uk> Date: Sat Jun 11 17:01:01 2022 +0100 Seeds copy over to a new version. commit 9bb4aec386b478468f8af04c515d598c029da932 Author: Chris Sangwin <C.J.Sangwin@ed.ac.uk> Date: Sat Jun 11 16:46:16 2022 +0100 Fix to issue #805. commit 52828b431bcd01f59ea1401915962f8e039aba79 Merge: e311ad72 cb8d8a74 Author: Chris Sangwin <C.J.Sangwin@ed.ac.uk> Date: Fri Jun 10 14:41:54 2022 +0100 Merge remote-tracking branch 'origin/dev' into moodle4 commit e311ad72f63bc7d7605e0ec68bf2b9faa752bf78 Author: Chris Sangwin <C.J.Sangwin@ed.ac.uk> Date: Fri Jun 10 11:44:39 2022 +0100 WIP enable bulk tester to run with moodle 4 (unblocks question testing). commit 4145bb1064a5755c1fb2cb8a2b013ba34adf9d2f Merge: fc6a81cb 49f70d7f Author: Chris Sangwin <C.J.Sangwin@ed.ac.uk> Date: Thu Jun 9 15:46:28 2022 +0100 Merge branch 'moodle4' of https://github.com/maths/moodle-qtype_stack into moodle4 commit fc6a81cb011d9b74d8d4b1a5b63bc87abbe38b28 Author: Chris Sangwin <C.J.Sangwin@ed.ac.uk> Date: Thu Jun 9 15:46:17 2022 +0100 Update todo and developer docs. commit 49f70d7f9c71e887fe7a6266d40aea9a44a14769 Author: Matti Harjula <aharjula@konsta.hut.fi> Date: Tue Jun 7 09:19:22 2022 +0300 Codestyle *castext*. commit d52180b635f2e6f2f18279b1f36ee28d2d509802 Author: Chris Sangwin <C.J.Sangwin@ed.ac.uk> Date: Thu Jun 2 09:58:55 2022 +0100 Audit very stack-specific issues when running on Moodle 4.0.
delayed_courses_table.php 9.74 KiB
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Table listing all delayed courses
*
* @package tool_lifecycle
* @copyright 2019 Justus Dieckmann WWU
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
namespace tool_lifecycle\local\table;
defined('MOODLE_INTERNAL') || die;
require_once($CFG->libdir . '/tablelib.php');
/**
* Table listing all delayed courses
*
* @package tool_lifecycle
* @copyright 2019 Justus Dieckmann WWU
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class delayed_courses_table extends \table_sql {
/** @var null|int|string $workflow workflow to filter for. Might be workflowid or "global" to filter for global delays. */
private $workflow;
/**
* Constructor for delayed_courses_table.
*
* @param object|null $filterdata filterdata from moodle form.
* @throws \coding_exception
*/
public function __construct($filterdata) {
parent::__construct('tool_lifecycle-delayed-courses');
$fields = 'c.id as courseid, c.fullname as coursefullname, cat.name as category, ';
$selectseperatedelays = true;
$selectglobaldelays = true;
$workflowfilterid = null;
if ($filterdata && $filterdata->workflow) {
if ($filterdata->workflow == 'global') {
$selectseperatedelays = false;
$this->workflow = 'global';
} else if (is_number($filterdata->workflow)) {
$selectglobaldelays = false;
$workflowfilterid = $filterdata->workflow;
$this->workflow = $filterdata->workflow;
} else {
throw new \coding_exception('workflow has to be "global" or a int value');
}
}
if ($selectseperatedelays) {
$fields .= 'wfdelay.workflowid, wfdelay.workflow, wfdelay.workflowdelay, wfdelay.workflowcount, ';