moodle-mod_attendance icon indicating copy to clipboard operation
moodle-mod_attendance copied to clipboard

Attandance on mobile app is having error with moodlecloud.com hosting.

Open aliallawati opened this issue 1 year ago • 4 comments

Hi, i am moodlecloud.com user with Premium plan, i am trying to use "Attendance" Activity/Plugin to submit student attendance through moodle app, when i select the appropriate class> attendance activity> select session (submit attendance button) , i get an error "template has some errors and can not be displayed"

Need your support to fix the issue, our teachers are depending on the app to record student attendance Thank you. Ali

select_session_in_app

err

aliallawati avatar Sep 15 '23 10:09 aliallawati

Hi @aliallawati - thanks for the report, sounds like a recent change to the app or to the version of the attendance plugin installed on moodlecloud.com has an issue as this definitely used to work - pinging @jleyva FYI - I'm not sure I'll get time to look into this in the short term so any further help anyone can give to identify this issue would be useful.

thanks!

danmarsden avatar Sep 17 '23 23:09 danmarsden

@dpalou is this error caused by the server, particularly, the moustache template not properly rendering?

jleyva avatar Sep 25 '23 14:09 jleyva

Hi @danmarsden , I was able to reproduce the error in a local site and it seems to be an error in the plugin's code.

The template returned by the plugin contains an empty (ionSelect), and Angular doesn't allow that so an error is thrown:

<ion-radio-group [(ngModel)]="CONTENT_OTHERDATA.statusall" (ionChange)="">

I debugged it a bit, and the list of users in this line is empty. This means that $data['selectall'] is an empty string, and it causes this error.

I don't know the attendance plugin's code and use cases enough to fix this myself. E.g. I don't know if the problem is that this line should always return users but now it isn't for some reason, or this is a real use case that isn't treated properly.

dpalou avatar Sep 26 '23 08:09 dpalou

thanks heaps @dpalou - that's really useful - This is pretty high on my list of things to look at but of course it will need to be done in my "free time" which is not easy to find... :-) happy for anyone else to dig further and send a pull request though!!

danmarsden avatar Sep 28 '23 06:09 danmarsden