Quiz forcing log in after each attempt

Quiz forcing log in after each attempt

by Stephen Hooley -
Number of replies: 12

Upgraded from 2.0.4 -> 2.1.1

When a quiz is started the following error (possibly unrelated) occurs:

Error: Could not insert a new entry to the Moodle log

  • line 1713 of /lib/datalib.php: call to debugging()
  • line 94 of /mod/quiz/attempt.php: call to add_to_log()

When a user completes the quiz the user is redirected to the log in screen and forced to log back in.

When the user logs back in one of two things happens:

1. The user is redirected to summary.php?attempt=##### but all questions are listed as 'Not yet answered' and the quiz can be submitted. (this normally occurs if the questions are left unanswered or a few question are answered and quickly submitted.)

2. They are redirected to processattempt.php and get the following error:

A required parameter (attempt) was missing

More information about this error

Stack trace:
  • line 429 of /lib/setuplib.php: moodle_exception thrown
  • line 468 of /lib/moodlelib.php: call to print_error()
  • line 40 of /mod/quiz/processattempt.php: call to required_param()

Clicking continue sends the user back into the quiz and persistent loop then occurs of complete attempt... log in... error... Once this loop has started logging out and reattempting the quiz drops back into the loop.

This only happens on some of the quizzes that have been updated? Any ideas what is happening?

(This problem relates to my earlier forum post which had become messy)

 Thanks in advance

Steve

Average of ratings: -
In reply to Stephen Hooley

Re: Quiz forcing log in after each attempt

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Are you sure that your upgrade worked properly? In Moodle 2.1.1, the call to add_to_log is on line 85 of attempt.php, not line 94 (https://github.com/moodle/moodle/blob/v2.1.1/mod/quiz/attempt.php#L85). This suggests that there was a problem when the 2.1.1 files were copied to your server. You need to check that out.

In reply to Tim Hunt

Re:I WANT the quiz to require log-in...

by Jonathan Anderson -

Moodle DOES have a feature "Require Password" before taking a quiz, but it requires the teacher to enter one into the field.  Is there any way to REQUIRE STUDENT TO RE-ENTER THEIR LOG-IN for every chapter test?

We are trying to comply with a requirement that the student's identity is periodically re-confirmed throughout the taking of the course.

In reply to Jonathan Anderson

Re:I WANT the quiz to require log-in...

by ben reynolds -

This may seem rather simple, but you can simply tell students to log out and log in again before taking the chapter test. The activity record for each student will show them as having logged in.

Of course, that doesn't prevent anyone with a user's login info from taking the test, but you have evidence that *somone* has logged in.

In reply to Jonathan Anderson

Re:I WANT the quiz to require log-in...

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers

Your post got me thinking a little.  It made me wonder what you are really trying to re-confirm?  The Moodle log keeps track of many events for the user, including the IP address.  If fact, I do believe that the log would show that the student is taking another quiz.  So I don't really understand what another pair of logout/login events in the log does to overall security.  I am not at all being critical, I am just a little ignorant of what this requirement is trying to achieve, or the scenario that it is trying to prevent.

I am going to attach an example of one of my student's logs, where I can see that this student, from the same IP, did two different quizzes.

I don't know how to prevent one student from giving their login and password to someone else, except to make the student take the quiz in front of an administrator.

(By the way, there is a lot of discussion that you can find here on the topic of cheating.)

Attachment Log.jpg
In reply to Rick Jerz

Re:I WANT the quiz to require log-in...

by ben reynolds -

Right, Rick. 100% agreement.
As long as the IP is legit, there's no need to logout/login.

In reply to ben reynolds

Re:I WANT the quiz to require log-in...

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers

Great!  It is always pleasing when a question already has a solution.  The only problem that I faced once (a cheating incident) was that the IP address was for our school's computer lab.  I couldn't get it down to the individual machines.  This has something to do with how schools assign IP addresses.  I knew that these two students were in the same lab at the same time, but I wanted to know if they were sitting next to each other.

My computer support department told me that they couldn't achieve any finer resolution from their end either.  I think that they just either didn't know how, or didn't want to help.  Oh well.

In reply to Rick Jerz

Re:I WANT the quiz to require log-in...

by Jonathan Anderson -

The reason for the mid-course identity-verifications is a State requirement.  In order to comply with their on-line Continuing Education course policies, we need to ensure two things:

[1] That the student has spent a minimum of 4 hours "attending" the course.

[2] That the student doesn't just have his spouse or teenager sit there and page through the course (i.e., cheat), by having him periodically answer a security question.

[1] TIME: Our course is all VIDEO clips (YouTube links). Together they equal the length of time required for the course.  Trouble is...a student only need ENTER THE VIDEO PAGE...and then could go right on to the next page without watching the video...and the system marks it as "completed."  This requires the instructor to MANUALLY review each student's LOG to confirm that they actually spent at least the length of the video in that section.  If they DIDN'T...instructor would have to "fail" them and contact them and tell them to re-watch the video.

We're trying to automate the course as much as possible to accomodate hundreds of students with a single instructor.

***The best way would be to require the video to PLAY TO THE END before allowing the student to proceed.  We don't know of any way to do this.  

***OR to put some kind of COUNTDOWN TIMER that will not allow the student to click "next" until it has reached zero.

 

[2] IDENTITY:  We would LIKE to be able to have a QUIZ QUESTION dynamically access and display one of eight PROFILE QUESTIONS the student entered during registration (e.g., "What was the color of your first car?").  

In the state's eyes, only the registered user will know the answers to those questions as they pop up every other section (of course they can cheat by writing down their answers and giving them to a proxy, but we can't prevent that).

We don't know of any way to accomplish this...having consulted some Moodle development companies, they've told us it would require custom coding and SQL queries with a minimum cost of $1000 just for the R&D.

So when I saw the PASSWORD REQUIRED feature in the QUIZ SETTINGS, I was discouraged to see that there was no way to simply make the password the STUDENT'S CUSTOM LOGIN PASSWORD.  then we could do away with trying the profile question solution.  But I'm afraid, if that's even possible, it would require expensive custom coding.

In reply to Jonathan Anderson

Re:I WANT the quiz to require log-in...

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers

Good luck.  Honestly.

It always puzzles me when "time" is used instead of "outcomes".  So a good student, who learns quickly, still has to spend a minimum time behind the computer.  Right.  big grin

And of course this "time" element is always present in face-to-face courses (i.e., a student should spend at least the amount of time studying on their own as the hours of credit, sure.)  (sorry for the sarcasm).

For a number of years, I have been hearing a lot of talk about "outcomes" based learning.  Then, we see some states wanting to measure time.

Oh well.  Students will probably always figure out how to betray any time-based system. An outcomes-based approach is more difficult.

These are just some of my own opinions and ideas.

I will offer one positive idea.  I have heard about video-based solutions.  Basically, a student is required to sit behind a webcam and be recorded.   This solution could verify that the student was sitting behind the computer for a length of time.  Then, combine this with screen-capture software, and you could verify what the student was doing.

In reply to Jonathan Anderson

Re:I WANT the quiz to require log-in...

by Paula Clough -

Don't know if this would help or not...

What if you use the quiz module with 2 attempts allowed. Set the quiz up so that the time between the first and second attempts the time between attempts are timed so that there is enough time to watch the video.  Students click on the quiz and answer security questions. At the end of this attempt they are given the link to the video.  It would not be available any where else on the site.  They watch the video then come back and hit the quiz again.  You can enter all the security questions (if you had all the students answer them) as random questions so that they will get different ones every time they come through.  Someone would have to match up the answers and make sure they are correct.

 

Paula Clough cool

In reply to Paula Clough

Re:I WANT the quiz to require log-in...

by Rob Johnson -

I like Paula's approach, but I had thought of a different one before reading her post.

For the time spent, you could include the video in a SCORM package and have the student answer questions at the end.  The video slide can be set to play completly through and advance to the question slide afterward.  These questions would serve more as verification than a summative assessment.  Of course, the student could go and make a sandwich while the clip plays. ;)

You could then make the quiz conditional on a minimum score instead of a simple view record.  We use this approach with our high school credit recovery program for students that are in danger of not graduating.  Our instructional content is packaged as a SCORM with four or five questions to unlock the next item in the course.  The student must score a minimum of 70% to move on in the course.

Rob

In reply to Rob Johnson

Re:I WANT the quiz to require log-in...

by Paula Clough -

Rob,

That sounds like an excellent approach! Especially since you have a course set up like that. It's sometimes easier to work with the familiar.

Paula cool

In reply to Jonathan Anderson

Re:I WANT the quiz to require log-in...

by Sandra King -

Hello, Greg Smith has been using security questions since 2007.  He wrote his own script which uses Resource pages and a java script to serve the questions, and send the student from the questions to a lesson - it should be a simple modification to change it to send students to a quiz...  Search his name and you will find his program and notes.  He recently emailed me that it seems to work for him in 2.2 - don't know how far he has tested it though. 

I use videos in one of my courses that has a time requirement (state mandated) and I enforce the time by embedding the videos in a lesson page and not allowing students to progress to the next lesson until they have spent enough time to watch the whole video (and read anything I have on the page).  I originally did all of this in 1.8 and 1.9 and am in the process of upgrading to newer versions of moodle.

 

Hope this helps...

Sandra