-
Couldn't load subscription status.
- Fork 12
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
Unfortunately, the course statistics do not seem to work at all but lead to an SQL Server error. Anyhow, we would like to give it a try.
Maybe the most important fact is that our Moodle platform runs with Microsoft SQL Server as database.
System
- Moodle 3.9.4+ (Build: 20210226)
- DB: Microsoft SQL Server
- Plug-ins:
- Learning Analytics Log v0.8.0 (Build: 2020102200)
- Learning Analytics v0.16.0 (Build: 2021021500)
Steps to reproduce
- Set up Moodle with SQL Server
- Install plug-ins Learning Analytics Log and Learning Analytics
- Enable log store
- Navigate to the course statistics of an arbitrary course (e.g. https://moodle.example.org/local/learning_analytics/index.php/reports/coursedashboard?course=42)
- The error message appears immediately
Screenshot
Full error message
Debug info: SQLState: 42S22<br>
Error Code: 207<br>
Message: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Invalid column name 'week'.<br>
SELECT (FLOOR((l.timecreated - 1604271600) / (7 * 60 * 60 * 24)) + 1)
AS WEEK,
COUNT(*) clicks
FROM mdl_logstore_lanalytics_log l
WHERE l.courseid = '26'
GROUP BY week
ORDER BY week;
[array (
0 => 26,
)]
Error code: dmlreadexception
Stack trace:
line 486 of /lib/dml/moodle_database.php: dml_read_exception thrown
line 324 of /lib/dml/sqlsrv_native_moodle_database.php: call to moodle_database->query_end()
line 431 of /lib/dml/sqlsrv_native_moodle_database.php: call to sqlsrv_native_moodle_database->query_end()
line 900 of /lib/dml/sqlsrv_native_moodle_database.php: call to sqlsrv_native_moodle_database->do_query()
line 976 of /lib/dml/sqlsrv_native_moodle_database.php: call to sqlsrv_native_moodle_database->get_recordset_sql()
line 63 of /local/learning_analytics/reports/coursedashboard/classes/query_helper.php: call to sqlsrv_native_moodle_database->get_records_sql()
line 50 of /local/learning_analytics/reports/coursedashboard/lareport_coursedashboard.php: call to lareport_coursedashboard\query_helper::query_weekly_activity()
line 460 of /local/learning_analytics/reports/coursedashboard/lareport_coursedashboard.php: call to lareport_coursedashboard->activiyoverweeks()
line 46 of /local/learning_analytics/classes/router.php: call to lareport_coursedashboard->run()
line 103 of /local/learning_analytics/classes/router.php: call to local_learning_analytics\router::run_report_or_page()
line 118 of /local/learning_analytics/index.php: call to local_learning_analytics\router::run()
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request
