showentry.php not working..

Re: showentry.php not working..

by Paul Evans -
Number of replies: 0
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.