showentry.php not working..

showentry.php not working..

על ידי Alexis Maldonado בתאריך
מספר תגובות: 11
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...

ממוצע דרוגים: -
בתגובה ל: Alexis Maldonado

Re: showentry.php not working..

על ידי Herbert Keijers בתאריך
Hi Alexis,
You wrote "I've double checked all of my settings".
Have you enabled it in the admin pages --> filter ?
בתגובה ל: Herbert Keijers

Re: showentry.php not working..

על ידי Alexis Maldonado בתאריך
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,..
בתגובה ל: Alexis Maldonado

Re: showentry.php not working..

על ידי Alexis Maldonado בתאריך
Can anyone confirm this as a real bug?
I have 3 moodle installs versions:
1.3.2
1.3.3
1.3.3

All running on Postgresql.
They all suffer from the same problem.
בתגובה ל: Alexis Maldonado

Re: showentry.php not working..

על ידי Eloy Lafuente (stronk7) בתאריך
תמונה של Core developers תמונה של Documentation writers תמונה של Moodle HQ תמונה של Peer reviewers תמונה של Plugin developers תמונה של Testers
Hi Alexis,

is your server in a public address? Can I gain access to it to see the problem in action (as admin, privately of course)? I've reviewed the SQL code used to retrieve the data in the popup window and I don't see any problem (for PostgreSQL) there...

Ciao חיוך
בתגובה ל: Alexis Maldonado

Re: showentry.php not working..

על ידי Alexis Maldonado בתאריך
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.. ?
בתגובה ל: Alexis Maldonado

Re: showentry.php not working..

על ידי Martin Dougiamas בתאריך
תמונה של Core developers תמונה של Documentation writers תמונה של Moodle HQ תמונה של Particularly helpful Moodlers תמונה של Plugin developers תמונה של Testers
Can you try Moodle 1.4 dev?
בתגובה ל: Martin Dougiamas

Re: showentry.php not working..

על ידי Paul Evans בתאריך
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.

בתגובה ל: Martin Dougiamas

Re: showentry.php not working..

על ידי Paul Evans בתאריך
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.