Pre and Post conditions lost

Pre and Post conditions lost

by Deborah Delin -
Number of replies: 26

Oh no!  All of the pre and post conditions I have set on all of my Quizports have been lost.  They all now simply display as "previous quiz" and "next quiz".  The bizarre thing is that the same thing has happened on two separate sites, and on Quizports which I haven't touched for weeks.

What on earth did I do?

Deborah

Average of ratings: -
In reply to Deborah Delin

Re: Pre and Post conditions lost

by Gordon Bateson -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers
Maybe QuizPort was upgraded?
The latest version number ends in 3149.
Could you check please?
Gordon
In reply to Gordon Bateson

Re: Pre and Post conditions lost

by Gordon Bateson -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers
The conditions on lingotango, courseid=33, QuizPort name="Developing Reading Skills B1 - B1 מפתחים כישורי קרואה" seem ok to me (see attached screenshot).

That site is using QuizPort 2008033146.

I need more specific info if you want me to try and investigate further.

thanks
Gordon
Attachment dd.conditions.png
In reply to Gordon Bateson

Re: Pre and Post conditions lost

by Gordon Bateson -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers
In you initial post you said ...

> All of the pre and post conditions I have set on all of my Quizports have been lost.

But did you mean just that all the *pre* conditions has been set to "previous quiz", so that when you try and view a quizport nothing appears because no quiz is available.

If you remove the pre-condition from the first quiz it becomes available and then the students can start working through the quizzes.

Maybe this explains the blank screen too ...
Gordon
In reply to Gordon Bateson

Re: Pre and Post conditions lost

by Deborah Delin -

Hi Gordon

Sorry, there is a correction to what I said.  Not all of the pre and post conditions were lost in all of my Quizports.  But they were lost in the two large Quizports I have on two separate sites.

Sorry also Gordon, I should have told you before.  I am phasing out that Lingotango site.  My new sites are at www.strivney.co.il and www.strivney.com .  Same passwords and logins. 

No, I do understand that the first quiz has to not have any pre-conditions in order for the Quizport to be viewed.  It wasn't that.  All of the pre-conditions were re-set to "previous quiz".  And all the post conditions were re-set to "next quiz".  I have just spent two hours ploughing through and re-doing the post conditions.  I would really like to understand what I did.  I did re-set the cache - and I also played around with the filters and navigation.  I just don't want it to happen again....

Maybe what I did will come to me.  In which case I will let you know. 

Sorry to be so inconclusive. 

Deborah

In reply to Deborah Delin

Re: Pre and Post conditions lost

by Gordon Bateson -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers
> I do understand that the first quiz has to not have any pre-conditions
> in order for the Quizport to be viewed.

If all the quizzes have a pre-condition of previous quiz, then when someone comes into the QuizPort to start a new attempt, there are no quizzes that can be started because they all need their previous quiz to be done first. If you remove the pre-condition from just one quiz, any quiz, then people will be able to access that when the first come into the QuizPort.

At the moment, it seems to me that you might have inadvertently set all quizzes to have particular pre- and post-condition by choosing the "Apply selected default values". Is that possible at all?

BTW, the QuizPort cache doesn't store conditions at all so I don't thnk clearing or not clearing the cache is not related to this issue.

quite a puzzle?!
Gordon
In reply to Gordon Bateson

Re: Pre and Post conditions lost

by Deborah Delin -

Yes, maybe I did inadvertently apply the wrong default values to that Quizport.  But I was certain that the Quizport on the other site had the conditions set too.  Seems a bit far fetched that I would have made the same mistake on both sites........but maybe I am just losing my sanity!!!!

Oh well, as long as there is no mysterious reason why the conditions would have vanished I feel reassured.

Thanks for all your help Gordon.

In reply to Deborah Delin

Re: Pre and Post conditions lost

by Gordon Bateson -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers
Hi Deborah,
as you say, it seems improbable that the duplicate courses had their conditions reset at the same time on different domains.

I had a hunch that maybe the two domains used the same database behind the scenes, but changes I made on one site were not reflected on the other site, so conclude that the two sites are currently completely separate entities.

However at some point they were copied, either one from the other, or perhaps both from lingotango, weren't they? I seems to me that the conditions got mangled before the duplication. Maybe *during* the duplication, but I imagine you just copied the database and I can't see how the conditions would go awry during a MySQL dump and restore.

Could it be that the conditions got zapped before the duplication or courses?

One further point - the quiz conditions can also be reset from the "Edit all units" page. That is a different page from the "Edit quizzes" page for an individual QuizPort. The "Edit all units" page allows you to set settings for multiple QuizPorts are the same time.

Could it be that the conditions got reset from the "Edit all units" page?

regards
Gordon
In reply to Gordon Bateson

Re: Pre and Post conditions lost

by Deborah Delin -

Hi Gordon

Thanks for trying to get to the bottom of this.

Yes, the two sites were copied from the same original site.  But they have been functioning fine for several weeks since the copy.

I am certain I didn't reset them from the Edit all Units page.

Oh well, maybe it will come clear at some stage how I did it! 

Thanks so much for your help.

Deborah

In reply to Gordon Bateson

Re: Pre and Post conditions lost

by Deborah Delin -

Gordon, this is really horrible.

My pre and post conditions have been wiped again! 

All the post conditions have re-set themselves to "Next Quiz" and all the pre conditions have re-set themselves to "Previous Quiz". 

I have a slight clue this time.  I had been playing around with different navigation methods, as I was when it happened at the weekend,  and therefore setting the edit quizzes menu to "display".  In each of the three cases when the conditions have been lost, when I entered the edit quizzes menu the menu was in "display" mode.  When I re-set it to conditions, the conditions I had set weren't there.

I tried to test this out by setting a test Quizport to "Display", exiting and returning, but the conditions stuck in that case.

Also, though I set the menu to "Conditions" when I come back to it it is in "Display" mode.  That never used to happen, I had my menu set to conditions all the time and it stayed that way.*

Also the URL in the compromised Quizport was weird:

http://www.strivney.co.il/mod/quizport/editquizzes.php without an identifying number.  I don't know if that is relevant.

This is one of the Quizports in question.

http://www.strivney.co.il/mod/quizport/editquizzes.php?id=1405&tab=edit&sesskey=uutSSd4Gg4

I have a feeling these three Quizports have been corrupted in some way.

Gordon, when I copied a site a while ago the post and pre-conditions were preserved.  Could you please suggest how I might go about resurrecting the conditions from the database?  I have the same 3 Quizports, in English only on my www.strivney.com site.  The conditions are all intact there.  Is there a way I could copy them?  I really don't feel like spending another 2 hours re-doing the conditions, especially if there is a risk they could be lost again.

Hope we can get to the bottom of this.

Deborah

*I just tried this several times - setting the menu to "Conditions" leaving and returning - and each time it is re-set to "Display" when I go back in.  So that is defnitely incorrect behaviour right?

In reply to Deborah Delin

Re: Pre and Post conditions lost

by Gordon Bateson -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers

Please arrange for you site to be updated to the latest version of QuizPort as soon as possible.

To restore the conditions safely you need to restore the quizport_conditions table to the database. To do this, you will need:

  • direct access to your database, e.g. via phpMyAdmin
  • an sql file of the database containing the conditions you would lke to restore

Bear in mind that conditions for any QuizPort quizzes that you have created since the backup will be lost.

I suggest you do not restore the DB table yourself. Either let me do it, or ask you server administrator to do it.

But first, it is important that you update your QuizPort module.

thanks
Gordon

In reply to Gordon Bateson

Re: Pre and Post conditions lost

by Deborah Delin -

My Quizport version has been updated.

I have emailed you about trying to sort out my problem with the conditions.

Thanks.

Deborah

In reply to Gordon Bateson

Re: Pre and Post conditions lost

by Deborah Delin -

Hi Gordon,

About the PHPMyAdmin plugin, my host say they cannot install it.

 They say:

" I can send you complete SQL dump which Gordon can see in his local development box (This will give him access to all data in your site). We cannot install phpMyAdmin."

Would this help?

Please advise if you have any further ideas which would make investigating this problem possible.

thanks.

Deborah

In reply to Deborah Delin

Re: Pre and Post conditions lost

by Deborah Delin -

Hi Gordon

Key to School have sent me the sql files of my Quizport tables - one of my original files and two of their backups, for information.  Would they be of any interest to you to throw light on the reason the conditions were lost?

Deborah

In reply to Deborah Delin

Re: Pre and Post conditions lost

by Deborah Delin -

Hi Gordon

Key to School restored my Quizport conditions on the Strivney.co.il Moodle.  They appeared nicely yesterday evening.  This morning they have gone again.  Everything is back to "Previous Quiz" and "Next Quiz". sad  As before, each time I went into the Edit Quizzes page it was in "display" mode, which is not how I left it.  This has happened to every Quizport on that site, including those I didn't touch yesterday.

My conditions on the strivney.com Moodle are still there, but I haven't been working on that site as I was on the other site.

 The Quizport version was updated yesterday morning.

Please advise.

Thanks.

Deborah

In reply to Deborah Delin

Re: Pre and Post conditions lost

by Gordon Bateson -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers
Oh dear. This is most unusual and most perplexing. I haven't seen or heard of anything like this anywhere else.

We need to try and isolate what cause the conditions to be reset. Could you possibly adjusting the conditions on just one quiz to what they should be, and then go through some of the actions that you were doing on the site today and occasionally test to see if the conditions have disappeared?

thanks
Gordon
In reply to Gordon Bateson

Re: Pre and Post conditions lost

by Deborah Delin -

Yes, I will do as you suggest.

And I will send you the db files by email.

Deborah

In reply to Deborah Delin

Re: Pre and Post conditions lost

by Gordon Bateson -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers
Hi Deborah,
please could you send the db files to me, or put them somewhere where I can download them.
thanks
Gordon
In reply to Gordon Bateson

Re: Pre and Post conditions lost

by Deborah Delin -

Hi Gordon!

I know you are away, but I wanted to let you know that the mystery of the missing conditions is solved.

Predictably, I have egg on my face, but I would like to warn all Quizporter/Task Chainers to beware of making the same mistake I did and causing untold angst.

It all started when I created some example Quizports on the Front Page for guests to try out. 

Whey using "apply selected default values" the course name of Front Page quizzes doesn't appear in the "courses" dropdown menu so I left it as "all", thinking "all quizzes in this Quizport" and not realising that this would apply the default values to ALL my Quizports on the site.  I expect more experienced Moodlers would realise that Course: All means just that - but it didn't occur to me that what I was doing in this Course woud affect my courses sitewide.  

So there it is.  I am just happy that I don't now have to open my Quizports dreading the loss of data.

I hope you are having a wonderful time.  Sorry for the bother I caused.

Deborah

Average of ratings: Useful (2)
In reply to Deborah Delin

Re: Pre and Post conditions lost

by Gordon Bateson -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers
Dear Deborah,
thank you for your very helpful post approve

You have identified the cause - no "Front page" in the list of courses, and this clearly indicates a solution, namely we need to add "Front page" to the list of courses that a Moodle admin can apply default values in a QuizPort.

To this end, I have modified the QuizPort scripts and I checked the changes work on a simple text case I created on my own server.

The new functionality will be available to you the next time the QuizPort module on your server is updated.

many thanks and best regards
Gordon
In reply to Gordon Bateson

Re: Pre and Post conditions lost

by Deborah Delin -

Hi Gordon!

Great news about the modification to include Front Page in the list of courses!!

Deborah

In reply to Deborah Delin

Re: Pre and Post conditions lost

by Deborah Delin -

Hi Gordon

The conditions I put in place three days ago are still there. 

I was wondering if you thought it might be possible that the conditions I had created with the Quizport version which had the missing script might have been compromised because of the missing script and that is why they were lost?

In any case I will wait before I put any more complicated conditions in place.

Deborah 

In reply to Deborah Delin

Re: Pre and Post conditions lost

by Gordon Bateson -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers
> I was wondering if you thought it might be possible that the conditions
> I had created with the Quizport version which had the missing script
> might have been compromised because of the missing script
> and that is why they were lost

Yes sort of, but it wasn't a missing*script*. I think the problems were caused by the fact one of the tables on your site was missing a *field*.

Now that the missing field has been created I was hoping that the conditions would not disappear any more.

However, you have reported that the conditions have disappeared again since you updated, so it seems something is still amiss. I am not able to reproduce the problem on other servers and similar problems have not been reported to me privately or on these forums. Therefore, I think this issue is confined to your server. However, without direct access to your database or your Moodle scripts folder, I can't really investigate any further.

I did some testing of the dumps of the condition tables you sent me. It looks like the cast majority of your conditions are ...
  • pre-condition: previous quiz
  • post-condition: >= 100% next quiz
There were only about 20 conditions that were different form the above. These fell into the following categories:
  • skip next quiz
  • end of unit
You said it took you 2 hours to restore the conditions, but I the above analysis of the conditions is correct, then it should not take so long.

When you add condtions do you do something like the following:
  • open a QuizPort and go to the"Edit quizzes" page
  • set "Show columns" to "Condition"
  • set up one quiz with "pre-condtion: previous quiz" and "post-condition: next quiz"
  • select the "Pre-condition" and "Post-condition" columns
  • EITHER select all quizzes in this unit
    OR use the quiz filters to select all quizzes in all QuizPorts
  • click "Go"
That will allow you to add the basic conditions to all your hundreds of quizzes with one click.

If you are careful about the naming of your files and quizzes, you can also use the quiz filters to all the first quizzes, last quizzes with minimal clicks. That "Edit quizzes" is very powerful and intended to help you with just this kind of task.

I am off in the morning to go to a conference in Northern Japan and give a presentation. As a result, I won't be able to do any intensive computer tasks for the next few days.

Gordon
In reply to Gordon Bateson

Re: Pre and Post conditions lost

by Deborah Delin -

Hi Gordon

Thanks for your reply.

I did set up the conditions using filters but not all the quizzes required 100% to move on - there were several different categories and some complicated re-directing to different quizzes in some cases.  Also I have four different versions so it is about 4,000 quizzes in all.  And possibly because of the size of the edit quiz page, the page is slow and cumbersome.  So it did take me two hours.  But I have decided to make the whole thing less complex now.

The conditions that were lost the second time were indeed lost from an updated version of Quizport but were created when the field was missing so I wondered if that might be responsible and that now I might be in the clear.  But time will tell.....

Wishing you a successful and enjoyable presentation in Northern Japan.

Regards,

Deborah

In reply to Deborah Delin

Re: Pre and Post conditions lost

by Deborah Delin -

Thinking about it, I am certain I did nothing on those Quizports between seeing the newly restored conditions yesterday evening, and discovering that they had disappeared this morning.  So I am not sure the problem is connected to activity from my end.

I will, however, experiment to see if I can pinpoint exactly when they disappear.

In reply to Deborah Delin

Re: Pre and Post conditions lost

by Gordon Bateson -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers
Hi Deborah,
thanks for the update. Did you ask the hosting company whether or not they can make phpMyAdmin for Moodle plugin available on your Moodle site?
Then we could investigate ourselves much more easily without bothering them.

regards
Gordon
In reply to Gordon Bateson

Re: Pre and Post conditions lost

by Deborah Delin -

Hi Gordon,

I did ask and they weren't keen on creating phpMyAdmin backups, but maybe I asked the wrong question - I didn't know about the plugin.  So I will ask.  Did you get the database files I sent?

Meanwhile I am testing but nothing to report yet.

Deborah