export then import same glossary with different results
Number of replies: 9Already discovered that I had to upload them in the order I wanted since 'alphabetize' though it shows them in proper order when you look at the entire glossary does NOT display them in alphabetical order but order of upload. Don't know why; only know that that's how it works! Fine, I went back and re-uploaded all the entries. Works fine in the Moodle Class (Algebra) that I created them in.
Wanted to have same set of glossaries in different Moodle Class (Geometry). Set up glossaries, etc. Went to Algebra and exported Glossary A items in XML file and then shifted to Geometry and imported Glossary A items. Should be a cut and dried operation but . . . the items do not appear in the proper order! It picks an entry somewhere, say, in the middle, and proceeds from there in a systematic way.
Is the only solution to go and re-upload the entries again?!? That's over 300 puzzles and 300 solutions!
Should I have labeled the entries with letters instead of numbers? But what would you do after you've run thru a-z?
Any thought?
Len Kamiensky
Re: export then import same glossary with different results
I'm not sure why the order is changing but tave you thought about using the Course Import feature? Create the glossary in one course them import just that activity (by unticking everything else) in the Import screen. Note that the glossary will be imported to the same section number as it appeared in the original course.
I hope this helps
Cheers
Teresa
Re: export then import same glossary with different results
Hi Joseph (or is it Len?),
Please remember the usual forum rule: only one question per post. I will address your question #1, re the order in which glossary entries are displayed in the Random Glossary Entry block.
You are correct, when you select Next Entry, the online Help says: The option Next entry will cycle through the entries in order. Unfortunately it does not specify that "in order" means in the order in which the entries were created in the Glossary, not the alphabetical order, as you wish.
The way these settings work should be improved in Moodle core, and I will post a report in the bug tracker. When I've done that I will put the bug tracker report reference here so that you (and other interested moodle users) can vote for it.
By the way your idea of having a sequence of 2 "Random Glossary Entry" blocks, one with the "puzzle of the day" and the other with the solution (but on the following day) is quite ingenuous.
Joseph
Re: export then import same glossary with different results
change
if ($entry = get_records_sql(' SELECT concept, definition, format '.
' FROM '.$CFG->prefix.'glossary_entries'.
' WHERE glossaryid = '.$this->config->glossary.
' AND approved = 1 '.
'ORDER BY timemodified '.$SORT, $limitfrom, $limitnum)) {
to
if ($entry = get_records_sql(' SELECT concept, definition, format '.
' FROM '.$CFG->prefix.'glossary_entries'.
' WHERE glossaryid = '.$this->config->glossary.
' AND approved = 1 '.
'ORDER BY concept '.$SORT, $limitfrom, $limitnum)) {
Re: export then import same glossary with different results
Sorry about the 'multiple questions' but the first few paragraphs were not actually a question but a set up to the question. Trial & error led me to finding out that order of upload determined 'next entry'.
The question was why, when I exported then imported the glossary entries to a 2nd Moodle course, the order was mixed up? Obviously, the 'order of upload' gets mixed up again. Not very encouraging information.
By the way, FYI, I noticed that Moodle tolerates 'division by zero'! If you generate problems in 'calculated' quiz questions and get a denominator example of,say, 15/(4-4), rather than indicate an error, you get an overall answer of zero. Such an attack on the integrity of the order of the universe can be dangerous!

Thank you for your help (in passing on the qwerk).
Len Kamiensky
(everyone calls me Len, legal name is Joseph, so Moodle Admin enrolled me as Joseph)
Re: export then import same glossary with different results
Len:
You should post that remark to the Quiz forum; it might interest the maintainer of the calculated question type, Pierre Pichet.By the way, FYI, I noticed that Moodle tolerates 'division by zero'! If you generate problems in 'calculated' quiz questions and get a denominator example of,say, 15/(4-4), rather than indicate an error, you get an overall answer of zero. Such an attack on the integrity of the order of the universe can be dangerous!
Joseph
Re: export then import same glossary with different results
I cannot reproduce your problem. Here's my scenario.
In course A create a glossary, with concept entries purposefully created in an order which does not respect alphabetical order. Here are the contents of that Glossary:
Browse by alphabet
concept01:
concept01 created at 22:51 19/08/2009
concept02:
concept02 created at 22:49 19/08/2009
concept03:
concept03 entered at 15:31 19/08/2009
concept04:
concept04 created at 22:50 19/08/2009
Browse by date
concept03:
concept03 entered at 15:31 19/08/2009
concept02:
concept02 created at 22:49 19/08/2009
concept04:
concept04 created at 22:50 19/08/2009
concept01:
concept01 created at 22:51 19/08/2009
I export that Glossary and then import it into Course B.
If I Browse by alphabet or by date, I get exactly the same display as for Course A.
What do you mean by "The question was why, when I exported then imported the glossary entries to a 2nd Moodle course, the order was mixed up?" Which "order" do you mean?
Joseph
Re: export then import same glossary with different results
Dealing with 90 entries, I 1st uploaded them from my computer to the file folder on the Moodle server in reverse order (ie 390, 389, 388, etc) since the lowest numbers appear in the folder screen at the top - this meant a few less clicks & scrolls. Since I need entries (and solutions) for 9 months, we're talking a lot of clicks & scrolls!
I uploaded them in batches of 8 jpegs for that same reason - fewer clicks.
With each batch I then proceeded to upload them to the glossary and gave them 'concept' names 390, 389, 388, etc. (The concepts were the same as the jpeg file names.) Then went back and went thru the routine with the next batch until all 90 were done.
When I then did the 'next entry' choice on my Algebra page, I got 390 1st, next one to come up was 389, etc even though 'alphabetically' they showed up as 301, 302, 303, . . 389, 390.
I went back and did 'show date', I saw that alphabetical order was not followed. I went back and deleted the glossary and re-uploaded from the Moodle server folder to the glossary starting with 301, 302, etc. At this point, they show up as 301, 302, 303, etc both 'alphabetically' and 'by date'. Then did the 'next entry' choice on my Algebra page, and they showed up as 301, 302, 303, etc.
Now I wanted to have the same setup on my Geometry page. I switched over and created the Random Glossary Block and and created the Puzzle Glossary for the block. I went to the Algebra page and 'exported' the glossary to desktop; went to the Geometry page and 'imported' the glossary from the desktop; linked the glossary with the block; did the 'next entry' choice and they showed up on the Geometry page as 390, 389, 388, etc. This was the case with 6 of the 8 glossaries -- why not all 8? who knows.
Since other glossaries (Quote of the day & Pix of the day) are run randomly, it makes no difference but since the puzzle gets progressively more difficult (and have to be linked with the solution entry for the previous day's puzzle) proper order is necessary. At this point, I've redone 4 of the 6 qwerky glossaries entry by entry because once school starts I won't have the time to do it. At this point my greatest fear is that the admin will upgrade from 1.7 to 1.9 and all the links will go bonkers (as they did when we got the dedicated Moodle server).
Well, that's what i did and what happened . . .
Len Kamiensky
PS: I realize that this is a 2nd 'question' but how does one 'vote' for a bug report?
Re: export then import same glossary with different results
Hi Len,
Sorry I did not notice at the start of your original post that you said you were using moodle 1.7. Please note that that version was not really good. You should really upgrade to latest 1.9 version of moodle as soon as possible.
Thanks for the detailed information in your latest post. However I find it very hard to understand because you are not using the "moodle terminology". I do not understand those sentences : "Dealing with 90 entries, I 1st uploaded them from my computer to the file folder on the Moodle server in reverse order ...".
OK, I think I understand that in your Glossary entries you are using jpeg file names as "definitions" and numbers as "concepts". That is OK, but it should not make a difference to the results I mentioned in my previous post, that is to say that when you export a glossary and then import it into another course on your moodle site, the "order" of entries is not changed. In fact, the "order" in which glossary items are displayed in the Glossary is determined by the Browse by... tabs.
As far as I can see, the solution to your problem is the small hack I gave in my post here. But it is related to Moodle 1.9.
Sorry I can't help you any further.
Joseph
PS.- To vote for my bug report MDL-20130 just click on the link here and when you view the bug report click on the Vote link. You may need to register in the Moodle bug tracker to be allowed to vote.