A Moodle plugin to allow, as far as possible, a student to continue working on a deferred-feedback quiz attempt even if the network connection goes down.
5
stars
4
forks
source link
Consider better name for CSS selector #dialogue-login #2
I'm probably too picky here but as I know you are perfectionist, I am reporting it anyway. The CSS selector #dialogue-login you use in your JS can in theory collide with some hypothetical plugin that would use the same id. What I usually think is a good idea is to name such selectors (that have some CSS styling attached) prefixed with the owner's component name. I know this would lead to rather cryptic HTML id="quizaccess_offlinemode-dialogue-login" yet then it's really obvious that it's yours and only yours (and not, for example, mod_dialogue's one).
These things were not an issue until we started to concatenate styles.css from all plugins. I know this suggestion is not ideal from pragmatic point of view. But I have not come to a better rule that we could recommend.
In the end I went for 'quiz-relogin-dialogue'. I have used quiz as a namespace elsewhere in this code. (There is hope that some or all of this will go into standard Moodle at some point.)
I'm probably too picky here but as I know you are perfectionist, I am reporting it anyway. The CSS selector
#dialogue-login
you use in your JS can in theory collide with some hypothetical plugin that would use the same id. What I usually think is a good idea is to name such selectors (that have some CSS styling attached) prefixed with the owner's component name. I know this would lead to rather cryptic HTMLid="quizaccess_offlinemode-dialogue-login"
yet then it's really obvious that it's yours and only yours (and not, for example, mod_dialogue's one).These things were not an issue until we started to concatenate styles.css from all plugins. I know this suggestion is not ideal from pragmatic point of view. But I have not come to a better rule that we could recommend.