Lost sub categories

Lost sub categories

дэргэд Stephen Francis -
Хариу нийтлэлийн тоо: 13
Hi,

We are using 1.6.4+. I have added a lot of questions into Moodle. These questions were all divided into Sub Categories of a main Category and there were tests on each sub category. Having transfered it all over to a new course I have "lost" all the sub categories. They no longer appear in the main list on Categories tab, but they do appear in the drop down category tab in the Questions tab.
The tests are there in the new course but the Categorization has vanished. This is a real pain. Any ideas?

Steve
Үнэлгээний дундаж: -
Stephen Francis-н хариуд

Re: Lost sub categories

дэргэд Joseph Rézeau -
Core developers зураг Particularly helpful Moodlers зураг Plugin developers зураг Testers зураг Translators зураг
Stephen > Having transfered it all over to a new course...

Which method did you use for this transfer? There are quite a few: course total or partial backup/restore; question categories Export questions to file/Import questions from file (which export/import format?); Administration/Import activities from another course... Were all of those questions used by quizzes? Did you export/import the quizzes or the questions?

Unless we know exactly what you did it is difficult to know how to help you.

Joseph

Stephen Francis-н хариуд

Re: Lost sub categories

дэргэд Zuidhof Patrick -
Stephen Franics has a point. I explained this problem earlier in other quiz formum post but the developer want to wait anybody confirm this.

Testing this problem cost you 5 min.
I can only say: please try it:
make a course, make one question in a quiz and save it.
Then you can back up it, import it it really don't matter how you do it.


When you delete one of the courses the first one or the copy all questions which you made in THIS COURSE are gone from the central database. And you got the sentence : no questions find.


Zuidhof Patrick-н хариуд

Re: Lost sub categories

дэргэд John Isner -
It is not clear from his post that Stephen deleted the old course. This may be a different problem from yours. But as Joseph says, let's have some more information before we jump to conclusions.

I have experienced corrupted categories when copying a course using backup/restore. I was able to repair the categories by updating the 'parent' field in each row of the 'question_categories' table. Fortunately, you typically have many fewer categories than questions, so doing this is feasible if all else fails.
John Isner-н хариуд

Re: Lost sub categories

дэргэд Zuidhof Patrick -
Ok john, maybe i'm jumping too fast to conclusions but isn't it a big BUG that you can never, never delete a course with a quiz in it.

Besides what Stephen experiences this is real real problem!!

Sp please be my guest and make a course a make a quiz with only one question,
copy the course or import the quiz in another course it really don't matter and
delete one of the courses and all the questions are gone form the course which you don't have deleted.

I have done this in 1.6.1/ 1.6.2. / 1.6.3 / 1.7 / 1.7.1 but soo far nobodoy want too try it (it cost only 5 min) and confirm this to Tim Hunt уйтгартай.
Stephen Francis-н хариуд

Re: Lost sub categories

дэргэд Stephen Francis -
We use Multiple Choice Questions by the way.

I'm still trying to find out what happened since I didn't actually do it myself, i was problem solving what had happened on site. Anyway, I came across another problem. If you have questions categorized and then make tests on those categorized questioned, NEVER NEVER then change the category name. The reason is because the tests will have questions using the old category name and you cannot, cannot delete the questions from the old name and add questions from the new name, even if you delete the test and try again, it will pull the questions from your newly named category but it will still say they came from the old category name (even though the new category name was obviously where you selected them from).

See attached image. Top right red circle is the category I chose the questions from. Now, when you add them to the test on the left, the OLD category name appears next to the question. Hmmm argh...

And from the previous post I will certainly never transfer from one course to another again.
Хавсралт Pressure.JPG
Stephen Francis-н хариуд

Re: Lost sub categories

дэргэд John Isner -
Your random questions were created when the category name was PRES T1. Later you changed the category name, but the questions retained the old name. It is confusing but harmless because names are not used as keys or foreign keys in quiz tables (numeric id's are used). Your random questions contain the correct category ids, regardless of their names. To convince yourself, have a look at the database.
John Isner-н хариуд

Re: Lost sub categories

дэргэд Stephen Francis -
Ok i accept nothing dramatic has happened, but it's untidy and in my opinion it needs some resolution if thats possible because for someone who then took over the work or was checking the test the categories the test shows will not match the current category list.

Thanks for helping out

Steve
Stephen Francis-н хариуд

Re: Lost sub categories

дэргэд Stephen Francis -
I've now sorted the problem. It seems that by UN-CHECKING both the boxes "show sub categories AND old question" the new category id's are used (see above image in previous post). Not sure why this is necessary but hey ho.

Steve
Stephen Francis-н хариуд

Re: Lost sub categories

дэргэд Stephen Francis -
This is proving to be a pain and I'm convinced it's a bug. I get a similar thing with images for questions. I upload an image and call it "Image 1". Then I think "hmm, needs editing". So I delete the resource, and delete the image from the resource bank/image bank. I edit the image and upload with the same name "Image 1", BUT it displays the old image in the test or course.

It seems Moodle doesn't like deleting or edit of name or images or categories.
We're using 1.6.4+ by the way. When an image or category of questions are deleted or renamed is should be seriously deleted, but it's not and it causes problems.

Steve
Stephen Francis-н хариуд

Re: Lost sub categories

дэргэд John Isner -
You're seeing a cached image. After you upload a new image, you need to clear your browser cache.