Suppress function in Moodle tests

Issue #4 resolved
Luca Bösch created an issue

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)

  1. Neill Magill

    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)

  2. Neill Magill

    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.

  3. Luca Bösch 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 like

    body: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

  4. Log in to comment