Testing a quiz before date start?!?

Testing a quiz before date start?!?

by Harald H -
Number of replies: 7
is it possible to test a quiz before it's starting?
TIA
Average of ratings: -
In reply to Harald H

Re: Testing a quiz before date start?!?

by Przemyslaw Stencel -

No, but if you want to test a quiz without opening it for students, you can do the following:

  1. hide the quiz
  2. change the opening date to make the quiz available
  3. test the quiz
  4. change the opening date back
  5. reveal the quiz
In reply to Harald H

Re: Testing a quiz before date start?!?

by Bernard Boucher -
Hi Harald,
              Przemyslaw answer is right.

But if you are taker for two small hacks then yours teachers will never have to worry about it:

moodle/mod/quiz/attempt.php

around line 244  add :      if (!$available and !isteacher($course->id)) {
                                           error("Sorry, this quiz is not available", "view.php?id=$cm->id");


moodle/mod/quiz/view.php
around line 157  add :                  if ($available or isteacher($course->id)) { 
                                                        $options["id"] = $cm->id;

Please test it on a "sandbox" before.

Have good hack,

Bernard









In reply to Bernard Boucher

Re: Testing a quiz before date start?!?

by Przemyslaw Stencel -

It would be nice to have it in the standard distribution. Or, are there any downsides of this?

In reply to Przemyslaw Stencel

Re: Testing a quiz before date start?!?

by Harald H -
hi bernhard, thanks for this,
i will try this, only thing it will get lost everytime i update with csv.
thanks

In reply to Przemyslaw Stencel

Re: Testing a quiz before date start?!?

by Bernard Boucher -
Hi Przemyslaw,
                        I use it for more than one year ( it was my first Moodle hackevil not too bigwink ) on some Moodle versions and I didn't notice downsides.

If others test it may be in standard distribution with maybe, a configuration switch to enable it.

Bye,

Bernard


In reply to Bernard Boucher

Re: Testing a quiz before date start?!?

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
This capability is now in MOODLE_14_STABLE and HEAD branches: teachers can always take a quiz regardless of start/end dates.