-
Bug
-
Resolution: Fixed
-
Minor
-
2.7
-
None
-
2.x dev (2014052800)
-
PostgreSQL
-
MOODLE_27_STABLE
-
MOODLE_27_STABLE
Hej,
I wanted to try out your plugin, but after installing (on Moodle 2.7+) and creating a schedule as admin, I get following exception, when I try to access the schedule:
Debug info |
ERROR: column "appointcnt" does not exist
|
LINE 1: ...3)) HAVING ((s.exclusivity = 0 OR s.exclusivity > appointcnt...
|
^
|
SELECT
|
s.*,
|
(SELECT COUNT(a.id) FROM mdl2_scheduler_appointment a WHERE a.slotid=s.id) AS appointcnt,
|
EXISTS(SELECT 1 FROM mdl2_scheduler_appointment a WHERE a.slotid=s.id AND a.attended=1) AS isattended
|
FROM
|
mdl2_scheduler_slots s
|
WHERE
|
schedulerid = $1 AND
|
((s.starttime > $2) AND
|
(s.hideuntil < $3))
|
HAVING
|
((s.exclusivity = 0 OR s.exclusivity > appointcnt) AND
|
NOT (EXISTS (SELECT 1 FROM mdl2_scheduler_appointment a WHERE a.studentid = $4 and a.slotid=s.id))) OR
|
(EXISTS (SELECT 1 FROM mdl2_scheduler_appointment a WHERE a.studentid = $5 and a.slotid=s.id AND a.attended = 0))
|
ORDER BY
|
s.starttime ASC
|
[array (
|
0 => '2',
|
1 => 1403267332,
|
2 => 1403267332,
|
3 => '5',
|
4 => '5',
|
)]
|
Error code |
dmlreadexception
|
Stack trace |
line 443 of /lib/dml/moodle_database.php: dml_read_exception thrown
|
line 244 of /lib/dml/pgsql_native_moodle_database.php: call to moodle_database->query_end()
|
line 764 of /lib/dml/pgsql_native_moodle_database.php: call to pgsql_native_moodle_database->query_end()
|
line 242 of /mod/scheduler/model/scheduler_instance.php: call to pgsql_native_moodle_database->get_records_sql()
|
line 351 of /mod/scheduler/model/scheduler_instance.php: call to scheduler_instance->fetch_slots()
|
line 75 of /mod/scheduler/studentview.php: call to scheduler_instance->get_slots_available_to_student()
|
line 92 of /mod/scheduler/view.php: call to include()
|
I have used standard settings and tried it without defining a slot a with a slot defined (also standard configuration). Both have the same result.