Add a HTML Block to all quiz attempt pages

Add a HTML Block to all quiz attempt pages

av Advait Nandeshwar -
Antall svar: 2

Hi,

I'm sorry if this has already been discussed or if this is wrong forum for this question.

I have a custom JS code and I need that to run only on the quiz attempt page, for that I want to use the HTML block, but the problem is that, the HTML block has to be called upon manually each and every time the quiz is created. Is there any way I can have that particular HTML on the quiz attempt page (attempt.php) forever?

Thank you.

Gjennomsnittlig vurdering: -
Som svar til Advait Nandeshwar

Re: Add a HTML Block to all quiz attempt pages

av Tim Hunt -
Bilde av Core developers Bilde av Documentation writers Bilde av Particularly helpful Moodlers Bilde av Peer reviewers Bilde av Plugin developers

Yes, but to do it is a non-obvious two-step process:

  1. Go to the list of courses page (URL .../course/).
  2. Add the block there.
  3. Edit the block settings, and set it to appear on every page:


  4. Then go into a quiz, and start an attempt, then on that page, edit the block settings again. now you get an 'Attempt quiz page' option.
Gjennomsnittlig vurdering:Useful (1)