Disable the back button

Disable the back button

by James Jones -
Number of replies: 10
Hello,

I'm looking for a way to disable the browser back button within a lesson. I was thinking that adding the secure window feature from the quiz module would be a good option, but I'm not sure about how. I did find a post from 2007 here http://moodle.org/mod/forum/discuss.php?d=65977 that answers the question but when I go looking for the javascript I'm kinda lost. Also, I'm not sure this is the best option.

Can anyone help? I'm up for any solution.

Thanks,
James
Average of ratings: -
In reply to James Jones

Re: Disable the back button

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators
Hi James,
Forget it. It's technically not feasible and from an accessibility point of view not a good idea to try to tamper with the "normal" features of a browser.
Joseph
In reply to James Jones

Re: Disable the back button

by Chris Collman -
Picture of Documentation writers
Hi James,
Joseph has said it in a nutshelll smile

Perhaps if you expand on the why you want to disable the the back button, we might be able to come up with a work around involving Lesson or some other activity.

Best Chris
In reply to James Jones

Re: Disable the back button

by James Jones -
Hi Joseph and Chris,

First, thanks for responding so quickly!

I work in medical education and the teachers are asking for this.

Here is an example of why they would like to disable the back button; they present the students with a scenario and then they move on to a question, the student should not be able to return to the scenerio, or one question contains text that answers a later question, this student shouldn't be able to go back and read that question.

We got rid of Angel Learning LMS and switched to Moodle. Angel had a disable trackback option which the teachers miss. Also, they find the function of the lesson to fit their need best. So, a secure window quiz is out.

As for accessability, I don't want to show the back button and have it just reload the current page in a never ending loop (like most javascript solutions suggest). Nor do I want to disable the back button in any way that it is still seen, as this presents a usability issue. I would prefer a secure window that doesn't display the toolbar, and disables right click.

I hope this clears it up a bit.

Thanks,
James
In reply to James Jones

Re: Disable the back button

by Chris Collman -
Picture of Documentation writers

Hi James,
We do similar things in Lesson. We only let the students have one shot at answering it. They can use that back browser button as much as they want, we set the number of attempts at 1.

I am guessing that the answer to one question might be A+B=C, then a little further along there is a question which deals with C that is leading to a question C-D= Z. The C scenario gives the A and B conditions and then student "remembers" that it is A+B not A-B=C. My point is that the 1 attempt, will not allow the student to improve their score if the questions are in the "right" order.

In theory there is also the fear of the almighty COMPUTER (aka, honor code). A different approach I don't really favor but I do use a milder variation. I proctor tests. I start with smile and the "all of you know the old rule of never do anything on a computer that you would not want your mother to see?" lecture, which includes true war stories examples. In your case, I would add, "People, the server records each page view, it's start time, end time and scores each answer. I am a Moodle Maven and you get the idea."

Just some thoughts. Hope this helps.
Best Chris






In reply to Chris Collman

Re: Disable the back button

by Mary Cooch -
Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators
Maven! You taught me a new word Chris! And it's alliterative as well!
In reply to Mary Cooch

Re: Disable the back button

by Chris Collman -
Picture of Documentation writers
My useage was not strickly technically accurate, but it does have a nice ring. Wikapedia says: "A maven is a trusted expert in a particular field, who seeks to pass knowledge on to others. The word maven "comes from the Yiddish, and it means one who accumulates knowledge."

A former boss used that phrase. "Chris, don't waste this guy's time. He is an SCO Xenix Maven, do what ever he says." I sort of knew DOS but was clueless about anything else. The Maven listened, had me type a few commands, told me what to do and actually called me back to see how it was going. The whole story is a classic IT war story of new users smile

That Maven made me look like a knight in shining armor. I have noticed that tends to be a shared trait of many in the Moodle community. smile



In reply to Chris Collman

Re: Disable the back button

by James Jones -
Thank you for the advice. However, some of these "students"will be fellows or physicians, therefore proctoring the test is not always an option. Their schedules dictate individual test times which is why an online LMS is so handy. We don't even grade in it due to the amount of offline assignments.

As for the example... that's kind of it, but a bit more multifactoral. For instance one diagnosis cannot be made without revealing many factors which in some cases must be detailed. One of these details may be asked about in a future question. The user should not be allowed to go back to the previous question and view it before answering the later question. This is only an example, as I am not a teacher, it's the best i can do... I'm sure they have a plethora of other reasons.

The problem remains that I need to restrict the user from going backwards within the lesson.

Thanks,
James
In reply to James Jones

Re: Disable the back button

by Chris Collman -
Picture of Documentation writers
Hi James,
I was using the proctor speech as an example. Most of the time, I deal with certified training in public safety. Cheating is something which is grounds for not only loss of course credit, but total professional de-certification. Not an action someone who has a career before or behind them really wants to have happen.

I am sure that your physicians and fellows understand this. In the worst case you catch one or more persons, put their virtual rotting heads in the Hall of Shame lesson which is always a condition of passage before any Lesson with a test. big grin

As you can tell, I have no sympathy for slimy professionals. I do appreciate the investment teachers in a certified environment have to make when they make changes in a course, much less a test (usually done by committee!). You have my complete sympathies for dealing with both!

Happy New Year! Chris






In reply to James Jones

Re: Disable the back button

by Adam Northenscold -

Be warned, this may be an entirely ingnorant response, from a serious amateur in the world of Moodle and programming, but: 

Would it be possible to change the program so that the quiz opens in a new window, and then edit the format of that window?  For example, in the past I had created some websites using Macromedia Dreamweaver, and we could set some of the links to open a new window that did not contain any of the standard browser options (i.e. it was simply a window with the contents, and the minimize/maximize/close buttons in the upper right, but the rest of the browser banner was not there). 

Do any of the moodle experts know if it would be possible to do something like this and still have the quiz results feed into the lessons gradebook? 

I would think that many users would appreciate the ability to open lessons in a new window that force the user to go through the information/questions using only the navigational buttons created by the teacher. 

In reply to James Jones

Re: Disable the back button

by Adam Northenscold -

Be warned, this may be an entirely ingnorant response, from a serious amateur in the world of Moodle and programming, but: 

Would it be possible to change the program so that the quiz opens in a new window, and then edit the format of that window?  For example, in the past I had created some websites using Macromedia Dreamweaver, and we could set some of the links to open a new window that did not contain any of the standard browser options (i.e. it was simply a window with the contents, and the minimize/maximize/close buttons in the upper right, but the rest of the browser banner was not there). 

Do any of the moodle experts know if it would be possible to do something like this and still have the quiz results feed into the lessons gradebook? 

I would think that many users would appreciate the ability to open lessons in a new window that force the user to go through the information/questions using only the navigational buttons created by the teacher.