For some reason when i click on an auto-link and it goes to "mod/glossary/showentry.php?courseid=2&concept=Navigate"
it does not display any search results. I've double checked all of my settings.
Help...
Yes I've enabled it.. and the links are created throughout the course fine its just that when you click on them and the popup window shows up there are no results displayed.
Im using Postgresql.. might it be something with the db?
Thanks,..
Im using Postgresql.. might it be something with the db?
Thanks,..
ok here is what i get with debug on..
Notice: Undefined variable: glossary in /var/www/html/ctc/training/mod/glossary/showentry.php on line 25
ERROR: function ucase(character varying) does not exist HINT: No function matches the given name and argument types. You may need to add explicit type casts.
select e.* from mdl_glossary_entries e, mdl_glossary g where e.glossaryid = g.id and (e.casesensitive != 0 and ucase(concept) = 'NAVIGATE' or e.casesensitive = 0 and concept = 'Navigate') and (g.course = 2 or g.globalglossary) and e.usedynalink != 0 and g.usedynalink != 0
I think that maybe my Postgres doesnt support ucase ??
strange..
the problem is mentioned here:
http://moodle.org/mod/forum/discuss.php?d=5275
and here:
http://moodle.org/mod/forum/discuss.php?d=5524#25548
but i thought these issues where fixed.. ?
Notice: Undefined variable: glossary in /var/www/html/ctc/training/mod/glossary/showentry.php on line 25
ERROR: function ucase(character varying) does not exist HINT: No function matches the given name and argument types. You may need to add explicit type casts.
select e.* from mdl_glossary_entries e, mdl_glossary g where e.glossaryid = g.id and (e.casesensitive != 0 and ucase(concept) = 'NAVIGATE' or e.casesensitive = 0 and concept = 'Navigate') and (g.course = 2 or g.globalglossary) and e.usedynalink != 0 and g.usedynalink != 0
I think that maybe my Postgres doesnt support ucase ??
strange..
the problem is mentioned here:
http://moodle.org/mod/forum/discuss.php?d=5275
and here:
http://moodle.org/mod/forum/discuss.php?d=5524#25548
but i thought these issues where fixed.. ?
I am on dev version from cvs and have the same problem under postgres. I just noticed it now after I added a few hundred entries to a glossary (using Maxi's nice time-saver).
My copy is a few weeks behind cvs, so I'll grab showentry and see if that fixes it first, otherwise I'll fix it and post back coz I need this working.
Glad I found this thread - was out in the weeds looking through my setup to see what was wrong.
My copy is a few weeks behind cvs, so I'll grab showentry and see if that fixes it first, otherwise I'll fix it and post back coz I need this working.
Glad I found this thread - was out in the weeds looking through my setup to see what was wrong.
Sorry, I don't have time to fix this properly.
I suppose creating the table with 'globalglossary' as bool vs. int2 would fix the second problem. Not sure of the 'correct' (moodle-wise) fix for the first.
Here it is working under postgres:
$entries = get_records_sql("select e.* from
{$CFG->prefix}glossary_entries e, {$CFG->prefix}glossary g".
" WHERE e.glossaryid = g.id AND". " (e.casesensitive != 0 AND upper(concept) = '" . strtoupper(trim($concept)). "' OR". " (e.casesensitive = 0 AND concept = '$concept') ) AND". " (g.course = $courseid OR g.globalglossary = 1 ) AND". " e.usedynalink != 0 AND g.usedynalink != 0");
That is, I just changed ucase for 'upper' and added a test to g.globalglossary to produce a bool for the OR comparison.
I suppose creating the table with 'globalglossary' as bool vs. int2 would fix the second problem. Not sure of the 'correct' (moodle-wise) fix for the first.
Here it is working under postgres:
$entries = get_records_sql("select e.* from
{$CFG->prefix}glossary_entries e, {$CFG->prefix}glossary g".
" WHERE e.glossaryid = g.id AND". " (e.casesensitive != 0 AND upper(concept) = '" . strtoupper(trim($concept)). "' OR". " (e.casesensitive = 0 AND concept = '$concept') ) AND". " (g.course = $courseid OR g.globalglossary = 1 ) AND". " e.usedynalink != 0 AND g.usedynalink != 0");
That is, I just changed ucase for 'upper' and added a test to g.globalglossary to produce a bool for the OR comparison.