Can't import a glossary into 2.0

Can't import a glossary into 2.0

بواسطة - brian avery
عدد الردود: 8

I have just tried importing glossary entries into 2.0. I located the file on my pc, uploaded it and then, when the upload was complete, I selected 'submit' as is required. After thinking about it, moodle displayed the message  "Field "lower(concept)" does not exist in table "glossary_entries".

Can anyone suggest how this can be?  I had this error message previously when trying to do something else when I first installed 2.0. After various problems and seeing database errors listed (without having any content on the site) I deleted the first install. I have a fresh install (Build: 20101130) and created a fresh empty database.

I have asked in 2 different posts if database errors which have been flagged by this moodle release have any relevance and how to shift them, without any sort of response in 4 days. It's heartbreaking. I'm off work for a week and thought I could upgrade and add some input. Instead I've been sitting here for 4 days trying to work out why things don't work.

This error suggests that the database issue is indeed causing problems, unless you know better........ Can anyone help?

Thanks,

Brian

متوسط التقييمات: -
رداً على brian avery

Re: Can't import a glossary into 2.0

بواسطة - brian avery

The error appears to relate to line 209 of mod/glossary/import.php which is:

$dupentry = $DB->get_record("glossary_entries", array("lower(concept)"=>moodle_strtolower($newentry->concept), "glossaryid"=>$glossary->id));

At least this is the only line I have found with this reference.

I don't know anything about databases but it obviously refers to a field name. I've spent some time looking at every file that might relate to the glossary and in mod/glossary/db/install.xml there is what appears to be a list of fields or tables that moodle creates at install. The field referred to in the error message and in import.php isn't one of the fields moodle thinks it has to set up. That's if I'm right. It's hard to believe I am, as otherwise this would affect everybody who downloaded this version, and I see no other comments. However, thoughts anybody?

رداً على brian avery

Re: Can't import a glossary into 2.0

بواسطة - Joseph Rézeau
صورة Core developers صورة Particularly helpful Moodlers صورة Plugin developers صورة Testers صورة Translators

This has been reported as bug MDL-25418. We are waiting for a complete fix.

In the meantime here is a workaround.

  1. Create a new glossary in moodle 2.0.
  2. Set it to Duplicate entries allowed Yes and save.
  3. Import entries from previously saved glossary.
  4. Set it to Duplicate entries allowed No. (if you wish).

Joseph

رداً على Joseph Rézeau

Re: Can't import a glossary into 2.0

بواسطة - brian avery

And I spent ages hunting for similar glossary import posts. I need training on keywords.

Thanks Joseph, worked like a dream.

Brian

رداً على brian avery

Re: Can't import a glossary into 2.0

بواسطة - Glenys Hanson

Hi Joseph,

This helped me too - but only after I'd worked out that the "Import" link was no longer at the top of the Glossary page itself, but outside in the Settings block. I don't know if this is explained somewhere but not here in the docs: Import Glossary Entries.

Cheers,

Glenys

رداً على Glenys Hanson

Re: Can't import a glossary into 2.0

بواسطة - Mary Cooch
صورة Documentation writers صورة Moodle HQ صورة Particularly helpful Moodlers صورة Testers صورة Translators

Hi Glenys.  I think that's a general Moodle 2.0 feature really, that tabs have been replaced all over by links in the module settings block - still confuses me when I forget and look for things elsewhere. I expect it hasn't been updated in the docs because that page relates to 1.9 and there doesn't seem yet to be a page for Glossary in Moodle 2.0 http://docs.moodle.org/en/Category:Moodle_2.0

رداً على Mary Cooch

Re: Can't import a glossary into 2.0

بواسطة - Glenys Hanson

Hi Mary,

Thanks for that - I'm only now really starting to use Moodle 2.0. It does make sense to have import/export links outside the Glossary page itself.

The Moodle docs Main Page could be clearer about where to find help for Moodle 1 and where for for Moodle 2. مفكّر I would change it myself if I really knew what's what.

Cheers,

Glenys