Problems during navigation

Problems during navigation

by Neelima Ramesh -
Number of replies: 25
Hi all,

I've been facing this problem every time i want to navigate from one page to another.
There are 2 main problems;

1) In any page, have a navigation button "Next" which directs to another page. Every time i click on it, it takes me to the Quizport page from where i have to choose the next page. I checked the url and its points to the correct page.

2) When I finish an exercise in the quizport, it gives me this error. unitattemptnotfound. While usually, it is supposed to direct me to the next exercise in the quizport.

I don't understand. Could someone help me?

Thanks
Neelima
Average of ratings: -
In reply to Neelima Ramesh

Re: Problems during navigation

by Gordon Bateson -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers
Hi Neelima,
are you talking about the HotPot module or the QuizPort module or something else?

> In any page, have a navigation button "Next" which directs to another page.

Is this a button that you made yourself, or a button inserted by Hot Potatoes, maybe the "=>" button, or QuizPort, maybe the "Give up" button?

> Every time i click on it, it takes me to the Quizport page
> from where i have to choose the next page.

Sorry, but I don't understand what you mean by "the QuizPort page". Please could you attach a screenshot of "the QuizPort page" to your next post to this forum. Also, how do you choose the "next page" from the "QuizPort page"? Do you click a button? Click a link?

If possible please build a copy of your QuizPort on my server so we can look at it together:
> When I finish an exercise in the quizport,
> it gives me this error. unitattemptnotfound.


Does this happen, always, often, sometimes, or occasionally? Can you reproduce the error on my server? Or give me access to your server so I can come and have a look?

thanks
Gordon
In reply to Gordon Bateson

Re: Problems during navigation

by Neelima Ramesh -
Hi Gordon!

I have uploaded my exercises into server in the quizport called "Neelima". The name of the folder in the database is "navigation".

The 2nd exercise doesn't have a "next" button so when you solve the exercise, you'll be able to see the error. (the answers are: 1:new; 2:good; 3:favorite; 4:tall, green; 5: fast)

The error "unitattemptnotfound" occurs only sometimes. As far as I have observed, its mostly when you attempt the exercises for the 1st time. So you might have to try them out 2,3 times before you understand what I'm talking about.

About the button, this is the next button from hotpotatoes; which is the same as "=>".

Sorry for not explaining my query properly.

What I meant by "Every time i click on it, it takes me to the Quizport page" is, when I click on the next button(which is => button), instead of directing me to the next exercise, it directs me to the home page (which is the page from where the student selects his courses). You can see the screen shot of that page below.

But this doesn't seem to be happening when I upload my quizzes on your server...
I don't understand why..

Neelima
Attachment sc.JPG
In reply to Neelima Ramesh

Re: Problems during navigation

by Gordon Bateson -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers
Hi Neelima,
thanks for uploading the quizzes to my server.

The 2nd quiz, adjectives_Exc1_try.htm, gives a Javascript error:

Error: GapList[q] is undefined
Source File: mod/quizport/output/hp/6/jcloze/findit.a.js
Line: 68

... so I am currently investigating that.
Gordon
In reply to Gordon Bateson

Re: Problems during navigation

by Gordon Bateson -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers
Hi Neelima,
looks like adjectives_Exc1_try.htm used to have 17 blanks in it but now it only has 6.

I imagine you created the original htm file with 17 blanks and then removed ones you didn't want. Well, unfortunately QuizPort wasn't expecting this situation so it tries to look for all 17 blanks, and this is the cause of the javascript error which results in the quiz not moving on.

I will modify the software so it it can handle this situation. The modified files will be included in the next downloadable zip file.

Gordon
In reply to Gordon Bateson

Re: Problems during navigation

by Gordon Bateson -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers
The 3rd activity, "adjectives_Exc3_try.htm", also has a javascript error:

... this is caused by the fact that you have commented out the timer in the following line:
  • <!-- <div id="Timer"><span id="TimerText">&nbsp;&nbsp;</span></div> -->
but the Javascript is still looking for that html element. You need to comment out the following line as well:
  • change this: StartTimer();
  • to this: //StartTimer();
Also, in this exercise there are some nouns that should be clickable that aren't:
  • bag
  • arm
  • grip
  • deed
  • present
  • owner
In reply to Gordon Bateson

Re: Problems during navigation

by Gordon Bateson -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers
the 4th activity, "adjectives_Exc3_try.htm", has the same problem with the timer that the 3rd has, so you need to comment out the "StartTimer()" lin.

Also, in this activity, "anxious" is marked as a noun, but it is an "adjective".
In reply to Gordon Bateson

Re: Problems during navigation

by Gordon Bateson -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers
The buttons on the first and second quizzes seem unnecessary to me.

If I were you, I would put that first quiz, adjectives_intro.htm. into a plain html file. Then QuizPort will put a "Continue" button on hte bottom of the page for you.

In all the other quizzes, you may like to add a "Stop" button so that students can stop before they have found all the answers. You can add a "Stop" button using the "Display" settings on the "Editing a quiz" page within QuizPort (see attached screenshot).

HTH
Gordon
Attachment quizport.stopbutton.png
In reply to Gordon Bateson

Re: Problems during navigation

by Neelima Ramesh -
Dear Gordon,

First of all, thanks for your suggestions. I think they are some great ideas. smile

I still have this problem lurking in my site. You're right. I did have 17 gaps before, and i removed them just before putting the exercises up on your site to make it easier for you. And it was the same case with the timer (though we accidentally discovered another undesirable behavior in the process. smile)

I have some Jgloss exercises too. they don't have timers or gaps to be filler in. The next button for these exercises are behaving the same way too.

I also observe that the first time i open a particular exercise and try to navigate, it works perfectly. But when I try it again, I face this problem.
I have checked the link of the next button and it remains the same the first time and after that too.
Do you think it might be a virus problem or something?

Neelima
In reply to Neelima Ramesh

Re: Problems during navigation

by Gordon Bateson -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers
You should not use the history.back() on the buttons. That is what causes the "unit attempt is not in progress".

When QuizPort sends stuff to the browser, it does a careful check of what quiz is in progress and what is not. Then when someone moves on to another quiz, the first quiz is marked as not in progress any more. If you then use the back button, the browser uses the stale quiz attempt information and when it tries to resend it Quizport complains.

So to fix your problem, you will have to either remove the back button, or fix it so that the back button does not use history.back(), but instead uses the actual name of the file of the quiz you want to go to.

However, I feel that the first "quiz" is just displaying information, so you would do better to put it on the "Entry" page of the QuizPort of just put it in a static html page.

Gordon
In reply to Gordon Bateson

Re: Problems during navigation

by Gordon Bateson -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers
> Do you think it might be a virus problem or something?

No, there is no virus. The problem is caused by using ...
  • onclick="history.back(); return false;"

You should change that to ...

  • onclick="location='adjectives_intro.htm'; return false;"
Gordon
In reply to Gordon Bateson

Re: Problems during navigation

by Gordon Bateson -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers
hi Neelima,
I have just modified the QuizPort module so that it will replace the "history.back()" javascript, with some which goes back to the previous quiz *via QuizPort*. That way QuizPort can keep track of the attempt ids and statuses. I hope this will prevent the message "Attempt is not in progress" that you got.

Please could you download the latest version of QuizPort and let me know if it works better for you?
thanks
Gordon
Average of ratings: Useful (1)
In reply to Gordon Bateson

Re: Problems during navigation

by Neelima Ramesh -
Hi Gordon!

This works perfectly!
Thanks a tone. smile

Neelima
In reply to Neelima Ramesh

Re: Problems during navigation

by Neelima Ramesh -
Hi Gordon,

I'm really sorry to be posting this problem again here. The quizport you modified recent worked fine for all these days but when I checked this morning, i found the problem has creeped up again. sad

It still works fine on your server but I don't understand why its not working on my server. And I can't understand how it can work for a few days and suddenly stop working again like this.

I have noticed that even the button that directs to the homepage (which is the hotpotatoes Index button) directs to the same page (which is the page from which you choose the courses; whose screen shot has been put up with one of the earlier posts.)

The only explanation that I can think of is some kind of a virus. But I did a full system scan and nothing came up.

Any idea why this might be happening?

I'm sorry for being so pushy again.

Neelima
In reply to Neelima Ramesh

Re: Problems during navigation

by Gordon Bateson -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers
Hi Neelima,
It's not a virus - I am 99.9% sure of that.

Please could you try emptying and disabling the QuizPort cache (Site administration -> Modules -> Activities -> QuizPort), and let me know if that helps.

thanks
Gordon
Average of ratings: Useful (1)
In reply to Gordon Bateson

Re: Problems during navigation

by Neelima Ramesh -
Yes!!
This works.
Thanks a lot! smile
In reply to Neelima Ramesh

Re: Problems during navigation

by Gordon Bateson -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers
Hi Neelima,
I had another look at your quizzes today, the ones you uploaded to my site, and I was able to isolate the conditions under which you can sometimes get the "quiz attempt not in progress" message.

There was a problem with the url that was inserted into the "next" buttons.

I have fixed that now, and if you download the new QuizPort scripts I am confident that you will not see that message again.

thanks for your patience
Gordon
In reply to Gordon Bateson

Re: Problems during navigation

by Neelima Ramesh -
Hi Gordon

Could you tell me where I can download these scripts from?
In reply to Neelima Ramesh

Re: Problems during navigation

by Gordon Bateson -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers
You can download the latest version of QuizPort from here:
regards
Gordon
Average of ratings: Useful (1)
In reply to Gordon Bateson

Re: Problems during navigation

by Neelima Ramesh -
Hi Gordon,

I'm sorry for posting this problem again. I thought I solved it the first time but turns out its something else. Could you have a look at it and tell me what is causing it?

I have a few jquiz(multiple choice) exercises that I have customized a bit and put them into a quizport.
The problem is that, after I solve these exercises, the quizport doesn't take me to the next exercises automatically as it has to. Instead it remains in the same page. Nothing else happens.
I guess the quizport is waiting for some action to take place but I'm unable to figure out what.

I hava taken the liberty to put up my quizport into your site so you can have a look at it. The name of the quizport is "Neelima" and the name of the folder in the database is called "quizzes".

Thanks

Neelima
In reply to Neelima Ramesh

Re: Problems during navigation

by Gordon Bateson -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers
> Could you have a look at it and tell me what is causing it?

The final "it" here means "the page failing to move on" does it?

I had a quick look, but the situation is not simple. I will try to have another look when I get more time.

> exercises that I have customized a bit

If I have to go through and discover these "customized bits" for myself, that will take quite a while. You could help me to help you if you described what you have customized.

Another way you could help me is to supply the jqz files.

thanks
Gordon
In reply to Gordon Bateson

Re: Problems during navigation

by Gordon Bateson -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers
Thanks for uploading the jqz files. I added them to the QuizPort and they return their results OK.

So the reason your quizzes do not move on is that they do not return their results to Moodle. The modifications that you have made prevent the HP and QuizPort javascript from detecting when the quiz is finished.

What is supposed to happen is that the "StartUp" function is is modified to create a new object, called "HP", which stores the user's actions and scores. When the user clicks the Check button, the "CheckMCAnswer" function is called, which is modified to register the click. Also the "CheckFinished" function is modified to return the results to Moodle if the quiz is finished.

Perhaps your modifications sidestep the "StartUp", "CheckMCAnswer" or the "CheckFinished" functions?

HTH
Gordon
In reply to Gordon Bateson

Re: Problems during navigation

by Neelima Ramesh -
Yes. "it" here means "the page failing to move on".

The customizations are as follows;

-If you look at the left container, you'll find a push button a the bottom left saying "Click to Read/Hide story".
When clicked this button revels some text(which is the story).
This story is entered in the "Exercise subtitle" area of the jqz file.

The functions that have been added to the js_ for this push button to works as it does are;

(i) show()
(ii) StretchCanvasToCoverContent() - this is the function that you gave me sometime back if you remember.

Alterations that have been made to the ht_ file are;

(i) If you look at the the div of the left container, i have included a push button inside a form (which is the button that says "Click to Read/Hide Story")
and a div called "story" that contains, obviously the story(which is in the subtitle block)

- I have also glossed a few words with text and images in the story (ie. in the subtitle section). And this is where I got the instructions of how to do it.
http://www.ewbooks.info/hotpot/tutorials/hotpotatoes-tutorials/glosses.html


-Other than this only a flash player that is placed just above the push button just mentioned. (don't think this hinders the working of the jquiz in any way.)

I must have probably made a mistake some were with this push button but I don't know what the mistake is.

I've also loaded the jqz files in the same folder (quizzes) as you had asked.

Before I sign off, I really appreciate all your help with my work. Thanks a lot! smile

Thanks again. smile

Neelima
In reply to Neelima Ramesh

Re: Problems during navigation

by Gordon Bateson -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers
Thanks for the extra info. I suggest you go back to a standard HTML file version of you quiz and check that it sends results back to Moodle. Then add your modifications one by one until the quiz stops working as required in QuizPort. At that point you will be well on the way to isolating the cause of you difficulty. I will do my best to help when you get that far, but at the moment I do not have time to do the work you are asking me to volunteer for.

all the best
Gordon
In reply to Neelima Ramesh

Re: Problems during navigation

by Neelima Ramesh -
Yes, in a jcloze exercise, where there is a check button, this will happen. And I do have some jcloze exercises that also have been altered in the same way as the jquiz which are working fine.

But you see, there is no check button in a jquiz exercise. I think it is supposed to check if all the questions have been altered.

And I don't know how the customizations are effecting the number of solved questions.