Can't get autolinks to work

Can't get autolinks to work

by Jeffery Watkins -
Number of replies: 23
I cannot seem to get any terms in a glossary to autolink anywhere else in moodle?  What am I missing?
Average of ratings: -
In reply to Jeffery Watkins

Re: Can't get autolinks to work

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
a) Do you have a complete set of new Moodle code?
b) Do you have this in your moodle/config.php?

$CFG->textfilter1 = "mod/glossary/dynalink.php";
In reply to Martin Dougiamas

Re: Can't get autolinks to work

by Williams Castillo -

In addition:

c) Do you have your glossary AND the entries correctly configured? I meant, its settings.
d) Not really critic, but might be a pain in the neck sometimes: Did you create the new style?

In reply to Williams Castillo

Re: Can't get autolinks to work

by Jeffery Watkins -

c) I believe so...

d) If by style you mean theme, then yes, it is a variation on one of the stadard themes.

 

Jeff

In reply to Williams Castillo

AutoLinks work great!

by Kam Vento -
Got autolinks working by updating CVS to current and changing theme. Very nicely done!

BTW, If it's of any interest, my development server is running RedHat 9, Apache 2.0.47, & PHP 4.3.4RC1. So far Moodle is very happy on this system smile
In reply to Williams Castillo

Re: Can't get autolinks to work

by Timothy Takemoto -

Hello,
I updated my production moodle and, yippee, my course page is covered in delicate patches of pale yellow (since that is the colour I have set autolinking too - FFFFCC).

However the autolinks do not show up in the resources of the same course. And alas it is the resources that are the important bit. My guess is that the Japanese characters may be getting in the way, as you suspected it might. When I saw the autolinks on the main page I thought that autolinks were working generally.

Here is the non linked resource (note the word "globalisation" and "Globalisation" are not yellow)


notlinked_resource.jpg

 

 

 

 

 

 

And this is the main page. I had my mouse over the central "globalisation" when I did this screen capture.

linked_main.jpg

 

 

 

 

 

I am using a 1.2 development moodle from 10/22 which I uploaded this evening.
I have

$CFG->textfilter1 = "mod/glossary/dynalink.php"; in the config.php in the moodle directory.
As you can see, I have something in mystyle sheet.
Again as you can
see, I have set the autolinking in both the entries and glossary as a whole.
And I just tried setting the language of my site and me the admin user to "en" but still resources (both text and html) in the same course are not linked, whereas the words in the main page are, even if I create a new resource.

And the strange thing is that the high lighing appears in the main page and the excercise page (I am setting an essay this week) as well. So if I get students to ignore the icon and the submission date, I could upload all the texts as excercises.

I don't know whether this is relevant but, the problem with Japanese is often that some Japanese characters contain the "/" character which is used in databases to seperate entries. Only some EUC encoded Japanese characters contain the character "/"  and I seem to remember that one of these was the Japanese character "so" which is used in the word "riso-su" (resource). But this may have no connection with the problem. Especially since it seems to have the same problem when I set the moodle lang settings to en.  

Congratulations on the good news though Will. We are trying.

In reply to Timothy Takemoto

Re: Can't get autolinks to work

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
Fixed in CVS - some code in the resource module hadn't been updated yet to use the format_text() function.
In reply to Martin Dougiamas

Re: Can't get autolinks to work

by Timothy Takemoto -
Thanks Martin!
I will have a look at the CVS. I guess it says which files need to be uploaded.
In reply to Timothy Takemoto

Re: Can't get autolinks to work

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
Unfortunately the public interface to CVS is still delayed, so it can take a while for things to appear there:

http://cvs.sourceforge.net/viewcvs.py/moodle/moodle/mod/resource/view.php

but you can download moodle-latest (it's updated hourly) and get mod/resource/view.php out.

http://moodle.sourceforge.net/latest/moodle-latest.zip

I don't want to post code here because it gets out of context later on ...
In reply to Martin Dougiamas

Re: Can't get autolinks to work

by Timothy Takemoto -
Aha. I was going to say, "I can't find 'format_text'" anywhere in the CVS.
But there it is in the view.php from the moodle-latest above.
I will upload it tomorrow.
Thanks again,
Timothy
In reply to Timothy Takemoto

Re: Can't get autolinks to work

by Timothy Takemoto -
Yes, using the zip you posted yesterday, it works. And it is beautiful (especially in yellow! why grey!?). I am going to put a pop up link to it from all my text resources. Thanks to you both.
In reply to Timothy Takemoto

Glossary crashes with null entries?

by Timothy Takemoto -

I got this message:   

Fatal error: Maximum execution time of 30 seconds exceeded in /home/tim/mootim/moodle/mod/glossary/dynalink.php on line 143

For a while.

The error message above seems to have been caused by someone adding an empty entry. After fretting here for a while, I had a look at the database and found that the last entry in the list had no defined word. The person that had entered it had put the word itself in the definition box.  (Probably my professor, who I had just been bragging to. Not mentioning that this wonderous tool had little to do with me. Hence, the error was an act of was God!)

When I changed the database, using Mysql Admin, to put the word into the right box. Everything is back. Joy, still greater than before!

Thank you,

Timothy 

In reply to Timothy Takemoto

If excess autolinking causes timeouts then reject short entries too?

by Timothy Takemoto -

Perhaps liking to all the "e"'s would case problems too, so I tried adding
        //check to see if the concept field is too small
        if (strlen($newentry->concept) <= 2 ) {
       error("You must define a word of 3 letters or more"); 
       }
To resource/edit.php, but php is difficult.
The new editor is great  smiley.gif

In reply to Timothy Takemoto

Re: If excess autolinking causes timeouts then reject short entries too?

by Williams Castillo -

Hey,

I added a change yesterday that prevent this... Give it a try.

Will

In reply to Martin Dougiamas

Re: Can't get autolinks to work

by Jeffery Watkins -
I am running 1.1, not 1.1.1, should I switch?
In reply to Jeffery Watkins

Re: Can't get autolinks to work

by Tom Murdock -
Is your glossary inside a course or on the main page? I haven't been able to link anything from the main page, yet.

(yes, switch to a recent CVS because the filters are new, too).
In reply to Tom Murdock

Re: Can't get autolinks to work

by Williams Castillo -

I haven't been able to link anything from the main page, yet.

No.. You can't link from the main page anymore... Now the links are done from glossaries within the same course so links from a glossary in a main page would link only resources and html IN the main page.

It would be done, however, if I implement the globalglossary setting.

Regarding this feature I would like an answer: Should this setting be stablish ONLY by an admin? or any course creator/teacher?

In reply to Williams Castillo

Re: Can't get autolinks to work

by Tom Murdock -
I think creator/teacher, if I understand what you are asking.

cool
In reply to Williams Castillo

global glossaries

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
I'm not sure if we're all talking about the same thing ... I don't think it makes sense for individual teachers to be able to make their glossary links global across the site (because the glossaries themselves are not available).

If an admin creates a glossary at the site level, though, it makes sense to me for it to be applied across the whole site (much like Library works), since anyone can access a site-level glossary.

Yes? or am I misunderstanding what you mean?
In reply to Martin Dougiamas

Re: global glossaries

by Tom Murdock -
Yes, sorry that I wasn't clear. I agree with the concept of the whole site glossary. But I hope that it can be a collaborative endeavor from teachers and students across the site. Is that possible?
In reply to Martin Dougiamas

Re: global glossaries

by Williams Castillo -

if you are talking to me (what a mess!!! XD), no, you didn't misunderstood me. That's exactly what I was talking about (at least that's what i TRIED to talk about smile)

It doesn't makes sense to me either that any teacher could create such kind of glossaries.

 

In reply to Martin Dougiamas

Re: global glossaries

by Kam Vento -

A "Global Glossary" Feature available at the site level would be very useful to me. Especially since the course glossaries are not visible to the general public, when I don't have guest access turned on.

I like the idea of a main page glossary. I'd also like to be able to move entries from one glossary to another . . .

You know how it goes, everyone always wants something more.