danmarsden / moodle-mod_attendance

Allows an attendance log to be kept in Moodle
https://moodle.org/plugins/mod_attendance
64 stars 151 forks source link

Inconsistency in "On activity completion" automark option when course completion tracking is disabled #748

Closed jumabgz closed 4 months ago

jumabgz commented 5 months ago

Hi,

Currently, it is possible to configure a session with "automatic marking" set to "on activity completion," even if the course does not have "completion tracking" enabled.

When "on activity completion" is selected for a session, a new field ("select activity") appears, which is a dropdown with no values (course with "completion tracking" disabled). In this state, the session can be saved, and if students do not register their attendance and the session time expires, then the scheduled task mod_attendance\task\auto_mark will mark the session for the students with the default status configured for the activity.

Although this behavior is not harmful, I understand that the intention of this option ("on activity completion") is different. Additionally, I believe that if the course has completion tracking disabled, this option should not be available.

Moodle 4.1.9+ (Build: 20240313) Attendance 2023020107

Thank you, Best regards

danmarsden commented 4 months ago

thanks for the suggestion! - pretty simple to add so I've just pushed a fix into the supported branches that does this.