Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-21029

global glossary auto linking to glossary on start page is broken after last update

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 1.9.7
    • Fix Version/s: 1.9.8
    • Component/s: Glossary
    • Labels:
      None
    • Difficulty:
      Easy
    • Affected Branches:
      MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_19_STABLE

      Description

      After the last changes in showentry.php all glossaries not within the actual course are ignored. No autolinking to global glossaries on the start page works any more.

      The patch below is a workaround to integrate the modules on the start page into the check. For this solution the global glossary must be on the start page - global glossaries in other courses are not working.

      Patch
      Index: showentry.php
      ===================================================================
      RCS file: /cvsroot/moodle/moodle/mod/glossary/showentry.php,v
      retrieving revision 1.40.2.1
      diff -u -r1.40.2.1 showentry.php
      — showentry.php 22 Nov 2009 10:34:56 -0000 1.40.2.1
      +++ showentry.php 3 Dec 2009 09:21:29 -0000
      @@ -43,9 +43,12 @@

      if ($entries) {
      $modinfo = get_fast_modinfo($course);
      + if ($site = get_record("course", "id", 1))

      { + $sitemodinfo = get_fast_modinfo($site); + }

      foreach ($entries as $key => $entry) {
      // make sure the entry is visible

      • if (empty($modinfo->cms[$entry->cmid]->uservisible)) {
        + if (empty($modinfo->cms[$entry->cmid]>uservisible) && empty($sitemodinfo>cms[$entry->cmid]->uservisible)) { unset($entries[$key]); continue; }

        Gliffy Diagrams

          Activity

          Hide
          andreabix Andrea Bicciolo added a comment -

          The problem is confirmed on every site with global glossaries. Global glossaries are no longer working and a patch is needed also for global glossaries inside courses, since many sites cannot move glossaries in the front pages.

          Show
          andreabix Andrea Bicciolo added a comment - The problem is confirmed on every site with global glossaries. Global glossaries are no longer working and a patch is needed also for global glossaries inside courses, since many sites cannot move glossaries in the front pages.
          Hide
          andreabix Andrea Bicciolo added a comment -

          The problem looks related to the course id in the concept URL.

          When opening a concept from within the same course the global glossary is instantiated, concetp appers corretly.
          in id=x,
          When opening a concept from another course, in the concept URL inherits the current course id rather than the global glossary course id.

          So for example:
          global glossary course id = G
          other course id=X

          When opening concept from id=G, concept opens correctly. When opening concept from id=X, concept popup opens with id=X in the URL, thus fails.

          From within course id=X, manually entering the concept URL with id=G , the concept URL shows correctly.

          Show
          andreabix Andrea Bicciolo added a comment - The problem looks related to the course id in the concept URL. When opening a concept from within the same course the global glossary is instantiated, concetp appers corretly. in id=x, When opening a concept from another course, in the concept URL inherits the current course id rather than the global glossary course id. So for example: global glossary course id = G other course id=X When opening concept from id=G, concept opens correctly. When opening concept from id=X, concept popup opens with id=X in the URL, thus fails. From within course id=X, manually entering the concept URL with id=G , the concept URL shows correctly.
          Hide
          stronk7 Eloy Lafuente (stronk7) added a comment -

          Attaching 1.9.7+ patch that should fix all (site/course) global glossaries so entries are displayed again when linked from other courses.

          Please test. I'll commit once I receive one confirmation of both site and course global glossaries showing entries ok from another course.

          Ciao

          Show
          stronk7 Eloy Lafuente (stronk7) added a comment - Attaching 1.9.7+ patch that should fix all (site/course) global glossaries so entries are displayed again when linked from other courses. Please test. I'll commit once I receive one confirmation of both site and course global glossaries showing entries ok from another course. Ciao
          Hide
          urshunkler Urs Hunkler added a comment -

          Checking your patch with a global site and a global course glossary works.

          Thanks a lot Eloy.

          Show
          urshunkler Urs Hunkler added a comment - Checking your patch with a global site and a global course glossary works. Thanks a lot Eloy.
          Hide
          andreabix Andrea Bicciolo added a comment -

          Eloy, thanks a lot. According to out test, fix seems working. We are now waiting for more test form some sites that makes extensive uses of glossaries.

          Hop to be able to confirm fix working 100% shortly.

          Many thanks,
          Andrea

          Show
          andreabix Andrea Bicciolo added a comment - Eloy, thanks a lot. According to out test, fix seems working. We are now waiting for more test form some sites that makes extensive uses of glossaries. Hop to be able to confirm fix working 100% shortly. Many thanks, Andrea
          Hide
          stronk7 Eloy Lafuente (stronk7) added a comment -

          Fix committed both to 19_STABLE and HEAD (1.8 didn't seem to need it).

          Thanks for report and feedback, Urs & Andrea, resolving this a fixed. Ciao

          Offtopic: Andrea, I just met Danielle some hours ago, nice guy, although he doesn't stop to take photos to me, grrrr. LOL :-D

          Show
          stronk7 Eloy Lafuente (stronk7) added a comment - Fix committed both to 19_STABLE and HEAD (1.8 didn't seem to need it). Thanks for report and feedback, Urs & Andrea, resolving this a fixed. Ciao Offtopic: Andrea, I just met Danielle some hours ago, nice guy, although he doesn't stop to take photos to me, grrrr. LOL :-D

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                25/Mar/10