How to use Random Glossary Entry block?

How to use Random Glossary Entry block?

by ChanHan Hy -
Number of replies: 23
Dear,

Somebody can help me about how to use Random Glossary Entry block?

Especially, "Take entries from this glossary" i can't choose any thing i saw only "choose".(How to create it?)

Thanks,

Hy ChanHan
Average of ratings: -
In reply to ChanHan Hy

Re: How to use Random Glossary Entry block?

by Joseph (Len) Kamiensky -
Hy ChanHan,

You have probably already solved your problem but in the event that you haven't . . .

There are 2 elements to any Glossary -- (1) Glossary Block which appears on one of the side columns; and (2) actual Glossary to be used by the Glossary Block which appears in the Center Column.

You create the entries by 'Add an Activity' -> 'Glossary'. There you input the items ('new entry') of text and/or image. Once you have at few items, you can then go back to the Glossary Block and select the Glossary you've created.

I use one such for images of the seasons, so I created several Glossaries and just change the selection in the Glossary Block as needed.

Warning: the size of images can be problematic. For the set up we have at school, I cannot allow an image 'wider' than 175 units. Unfortunately, when you input your images, it will tell the size it is but you have to shrink them or the program will just not show the 'extra'.

Hope this helps . . .

Len Kamiensky



Average of ratings:Useful (1)
In reply to Joseph (Len) Kamiensky

Re: How to use Random Glossary Entry block?

by Kathreja Mills -
I have created a glossary and loaded info into it, set up the random entry block but still can't choose the glossary I created, I still get the choose drop down but I don't get the option to select the root glossary I created.
In reply to Kathreja Mills

Re: How to use Random Glossary Entry block?

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators
Where did you create your glossary : at site level or at course level? Where do you want to put your random entry block : at site level or at course level?
What do you call a "root glossary"?
Joseph
In reply to Joseph Rézeau

Re: How to use Random Glossary Entry block?

by Anthony Borrow -
Picture of Core developers Picture of Plugin developers Picture of Testers
Joseph - Thanks for inquiring into Kathreja's problem. She had created a global glossary in a course and was trying to use that glossary in the site frontpage's random glossary block; however, the block was not able to see global glossaries. I created MDL-20131 (patch attached) that resolves this issue. A review of the patch and testing would of course be welcome as well as comments, watching and voting for MDL-20131. Peace - Anthony
Average of ratings:Useful (2)
In reply to Anthony Borrow

Re: How to use Random Glossary Entry block?

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators
Thanks, Anthony!
In reply to Joseph Rézeau

Re: How to use Random Glossary Entry block?

by Tony McMonagle -
Would anyone be able to clarify as I seem to be having the same issue.

If I create a course and store a glossary with in this by adding as an activity, then can I link it to the front page as a Random glossary?

I seem to only have the choose option.

I have set up 2 glossaries and can see neither. I've added data and the same.
In reply to Tony McMonagle

Re: How to use Random Glossary Entry block?

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

Tony "If I create a course and store a glossary with in this by adding as an activity, then can I link it to the front page as a Random glossary? "

No you can't. Bug MDL-20131 is still pending.

Joseph

In reply to Joseph Rézeau

Re: How to use Random Glossary Entry block?

by John White -

Hi All,

The issue of putting up a front page Random Glossary Entry block with its content sourced from a global Glossary in another course has not gone away in Moodle 2.0, and Antony Borrow's patch won't actually run correctly in Moodle 2 because things have moved round a bit! But I have had just the same problem as others above and I've modified Anthony's patch to fix this.

I don't have the tools to creating a patch to hand at present, so I will list the code edits here. Perhaps a proper patch will come in due course. All these edits follow Anthony's patch closely, or emulate the same thing at least.

In file /blocks/glossary_random/edit_form.php we change the line:

$glossaries = $DB->get_records_menu('glossary', array('course' => $this->block->course->id), 'name', 'id,name');

to

$glossaries = $DB->get_records_select_menu('glossary', 'course = '.$this->block->course->id.' OR globalglossary = 1', NULL, 'name', 'id,name');

so that global glossaries can now be found in the block's config page.

We then make a fair number of small edits to the file /blocks/glossary_random/blocks_glossary_random.php but there are too many to list so I've attached this file. This file replaces the one in Moodle 2.0.1 in fact.

Now the random glossary entries taken from another course appear in the front page block, so long as the user has the right to view the content in the donor course. This implies that the administrator will want to be very sure that all bona fide users have moodle/course:view rights there.

Well it solved my problem. John

In reply to John White

Re: How to use Random Glossary Entry block?

by John White -

Hi,

I have found one bug in my fix (above) which I will seek to fix properly when I get the opportunity. Its where I inserted an extra check to see if the user has the right to see the glossary entry, within the donor course, before displaying any content. The main effect of inserting this bit was to block the glossary view to someone not logged on. In fact I was being fooled into thinking this was working, probably by 'sessions' on my computer. So for the moment we need to change back one in my block_glossary_random.php edits...

To make this change open the file I gave above, look for

//Obtain the visible property from the instance, and the user's right to view the content

and put the next phrase back to being:

if (isset($cm->uservisible) && $cm->uservisible) {
$this->content->text = $this->config->cache;

...in other words we're getting rid of the condition...

&& has_capability('moodle/course:view', get_context_instance(CONTEXT_MODULE, $cm->id))

...don't accidentally insert a closing } or things will really foul up!

The effect of this is that the glossary entry is visible to all, so long as the glossary itself is 'visible' in its own course.

For the most part this is probably the setting admins would want anyway, as it is a good way of making the pre-login face attractive without giving away loads of content. But I will do some more research on this issue.

This fix is running on www.3dstorytelling.co.uk/Exchange

John

In reply to John White

Re: How to use Random Glossary Entry block?

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

John:

This fix is running on www.3dstorytelling.co.uk/Exchange

Found a bug on that site front page. Random glossary entries (from the "3D Glossary") are indeed displayed on the front page, to un-logged visitors. However, if a (randomly) displayed entry contains a link to another entry, clicking that link results in an error message (see attached).

Joseph

Attachment 13-03-2011 18-49-55.jpg
Average of ratings:Useful (1)
In reply to Joseph Rézeau

Re: How to use Random Glossary Entry block?

by John White -

Hi Joseph,

Thanks for testing that for me... I never thought about the glossary entry that just says 'see another glossary entry'!

What a shame it doesn't just say: 'you have to log in to do that' !!

Deep thought... ... ...

Cheers, John

In reply to John White

Re: How to use Random Glossary Entry block?

by Anthony Borrow -
Picture of Core developers Picture of Plugin developers Picture of Testers

John - Feel free to upload the 2.0 patch to the tracker issue. Peace - Anthony

In reply to Anthony Borrow

Re: How to use Random Glossary Entry block?

by John White -

Hi Anthony,

Just trying to get my head back round Cross XXL VC again (what jargon!) and then a patch will appear.

Regards, John

In reply to Anthony Borrow

Re: How to use Random Glossary Entry block?

by Peter Halverson -

Hello,

I wonder if this issue has been fixed yet?   I am using Moodle version Moodle 2.2.1 (Build: 20120109) and I would like to have random images appear in three different courses.  I have created a glossary at the site-wide home page (aka the "front page"), but this glossary is not accessible from within the courses.  To work around this problem I would have to re-create the glossary three times, once for each course.  (A lot of work!)

(To recap, the problem is that the "Take entries from this glossary" entry doesn't list the glossary if the glossary was created in the site-wide home page.  It only works if the glossary was made in the course.)

Sincerely,

Peter Halverson  (Physics and Chemistry teacher at El Rancho High School, California USA)

Average of ratings:Useful (1)
In reply to Peter Halverson

Re: How to use Random Glossary Entry block?

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

@Peter,

Bug MDL-20131 is still marked as unresolved.sad

Joseph

In reply to Joseph Rézeau

Re: How to use Random Glossary Entry block?

by Chris Baldwin -

I agree with the previous comments - I'd love to use the random glossary entry block with a site wide glossary.

Any workarounds?

In reply to Chris Baldwin

Re: How to use Random Glossary Entry block?

by Itamar Tzadok -

The Dataform is one possible workaround. You can populate the content of a frontpage dataform instance to any course either in a block (with the Dataform_view block) or in a label-like resource in the course section (with the Dataform embedded resource). Both the block and the label-like resource allow you to either display the content flat on the page or to embed the content in an iframe in which case you can interact with the content without leaving the course page. For instance, users can rate content from the course page. smile

In reply to Itamar Tzadok

Re: How to use Random Glossary Entry block?

by Chris Baldwin -

Thanks for the suggestion. Dataform only seems to be available for 2.1 though - we're on 2.2 now. That's always the trouble with plugins smile

In reply to Chris Baldwin

Re: How to use Random Glossary Entry block?

by Itamar Tzadok -

The Dataform is actively maintained and enhanced and is available from 2.0 to latest (currently on 222+, awaiting 2.3). The entry in the plugins repo is outdated and on hold. Latest releases of the Dataform and more info are available at http://substantialmethods.com/subject/view.php?id=4. A variety of applications may be found on many other pages of  http://substantialmethods.com and more applications, info and examples are underway. smile

In reply to Chris Baldwin

Re: How to use Random Glossary Entry block?

by Itamar Tzadok -

I've posted a demo of a few display capabilities of the Dataform - http://substantialmethods.com/subject/view.php?id=4&topic=8. The entries are simple and consist of one image. It would work the same for complex entries with different field types. The random or otherwise entries are displayed in a section by means of the Dataform embedded resources. There is also a block that displays a random image from that gallery. The gallery is hidden on the frontpage. smile

In reply to Peter Halverson

Re: How to use Random Glossary Entry block?

by Chris Baldwin -

I'm sure you know that you can import/export the glossary - you won't need to create it from scratch each time smile