Automatic logout after quiz submition

Automatic logout after quiz submition

by Tom T -
Number of replies: 3
Hi, is it possible to set automatic logout of moodle after the last submited answer by students and after pressing the button submit all and finish? If there is a way in back office it would be great to know and even if there is some code to put somewhere. I understand that there is some kind of variable session key for logout.
Average of ratings: -
In reply to Tom T

Odg: Automatic logout after quiz submition

by Tom T -

Anybody?

Is there a way through GUI that students logout after quiz submition or atleast they are redirected on first/front page?

Students only have one attempt. The quiz is quite strict since it is build for testing theory for getting driving permits.

In reply to Tom T

Re: Automatic logout after quiz submition

by Aaron Leggett -

i am also in need for this.

I have a demo user that people get auto logged into to try one of our test courses. once the course has finished i would like them to be auto logged out of the account.

This may help you if you wanted yours done on a button click or if you redirect to this page once the button has been clicked..

<?php echo $CFG->wwwroot . '/login/logout.php?sesskey=' . sesskey(); ?>

found this at this post here

https://moodle.org/mod/forum/discuss.php?d=210079

but the issue im having is that i want the user to be redirected to a page other than moodle home after they get logged out.

Anyone have any ideas on how this could be done?