Suppress function in Moodle tests
I’d like to share this user story.
If a user has hit the full screen button and then starts a Moodle test (an exam) that full screen also affects the quiz navigation.
It would be good if quiz navigation was exempt from the full screen mechanism.
I can totally go and try to develop this myself if I get a hint on how to proceed and would then go create a pull request.
Best,
Luca
Comments (6)
-
-
We are just about to start our Moodle 3.10 upgrade cycle so I could take a look at this during that.
So we don’t duplicate effort if one of us starts working on it we should note it on this ticket.
-
reporter Thanks a lot, Neill!
Note that this isn’t the requirement to suppress the button but to assure to show the blocks during a test no matter how the status of fullscreen is.
I’ve fiddeled around myself a bit and omitted the fullscreen button in some places Moodle has no blocks anyway. E.g. in content bank, private files etc.
Feel free to inspire yourself in the fork https://bitbucket.org/lucaboesch/moodle-local_fullscreen/ and specifically in the notoneachpage branch in https://bitbucket.org/lucaboesch/moodle-local_fullscreen/src/notoneachpage/styles.css where you see big exception things likebody:not(#page-contentbank):not(#page-mod-hvp-mod):not([id*='-edit']):not([id*='page-report']):not([id*="page-admin-tool"]):not([id*="page-local-"]):not([id*="page-admin-"]):not([id*="page-user-files"]):not([id*="my-media-"]):not([id*="page-local-staticpage-"]):not([id*="page-mod-quiz-attempt"]) .local-fullscreen-padding { }
which do look ugly but do work.
(You’ll notice some non core plugins mentioned there too, like local_staticpage for example.)Best,
Luca -
reporter Neill, I managed to include this in lib.php and to cover it with a Behat test.
The pull request is pending under https://bitbucket.org/uonmoodle/moodle-local_fullscreen/pull-requests/23.
Best,
Luca -
- changed status to resolved
Suppress the fullscreen function in quizzes fixes
#4.→ <<cset 190250e61816>>
-
Thanks for the fix Luca
- Log in to comment
Hi Luca,
We have normally supressed the fullscreen button via:
local_fullscreen_before_footer()
in the lib.php file.
That would stop it appearing/functioning at all.
Alternatively I guess you could selectively disable parts of the hiding we do when on a quiz page using some of the body classes in the css, i.e. if you want to retain the parts that remove the minimum width.
It might also be worth having a behat test to ensure that the quiz navigation is still present when full screen mode is active (so if things in Moodle change enough to break the exemptions we would find out from them)