SafeExamBrowser / seb-server

The Safe Exam Browser Server web application simplifies and centralizes the configuration of SEB clients for exams. It interacts with a learning management or exam system for setting up and conducting e-assessments with Safe Exam Browser. It also improves security by allowing to monitor connected SEB clients in real time during e-assessments.
Mozilla Public License 2.0
46 stars 38 forks source link

Unable to lookup exams from Moodle in SEB Server #39

Closed AnjanaSenanayake closed 3 years ago

AnjanaSenanayake commented 3 years ago

We have setup a LMS connection successfully with our Moodle platform. When the connection is tested, it is successful as well. Yet any quizzes from the LMS does not appear in the LMS exam lookup section. The seb-server container logs shows the following error message.

image

But calling the same Rest API endpoint with Postman, delivers quiz data successfully without any issues. Therefore we are stuck with progressing of the integration of Moodle with SEB server. We kindly appreciate some assistance to resolve the issues.

Expected behavior All quizzes in the Moodle should appear in LMS exam lookup.

All setups we have tested

anhefti commented 3 years ago

Hi, sorry the late answer, I was out of office last week.

This should work at least with Moodle version 3.9. Please make sure that the quizzes are not hidden within Moodle. If this does not help it would be helpful if you can give us the API endpoint request you have applied with Postman and that is working.

But SEB Server do not use only this endpoint to get the quiz data but also some other to store/cache course data on SEB Server side. Maybe some of them is failing. The probably most efficient way to solve this and find the cause, is if you can give us access to your Moodle instance and a Moodle account for testing and creating a LMS Setup locally on our side where we easily can debug and have a closer look on whats happening when accessing your Moodle instance.

If this is not possible, we would probably need more SEB Server logs from the failing LMS Setup with Moodle.

AnjanaSenanayake commented 3 years ago

@anhefti, No worries and thank you for your kind reply. Anyhow we have identified this was due to a strange bug(though we are not certain it is a bug) which occurs when there is only a single Course/Quiz in the Moodle. After having more than one course in Moodle, all the quizzes under each of the courses were able to successfully retrieved from the SEB Server exam lookup. And again we deleted a course and had one course only in the Moodle, whereas retrieval failed again with the same issue as mentioned before. But we could not further verify what internal situation causes this. Hope this helps. Thank you.

Moodle versions used: 3.11.3 and 3.9.10 SEB Server: Latest available under Production/dockerhub container

anhefti commented 3 years ago

@AnjanaSenanayake Thank you very much for this information. This may indeed be a bug since I remember, we had a similar issue with a Moodle API request with only one course id in the past.

We will investigate this further and try to fix this within the next version of SEB Server. Until then others that faces the same issues will have to stick with the suggested workaround.