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

Configuring a Random Glossary Entry block with no Glossary

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: 1.5.2
    • Fix Version/s: None
    • Component/s: Blocks
    • Labels:
      None
    • Environment:
      All
    • Database:
      Any
    • Affected Branches:
      MOODLE_15_STABLE

      Description

      When trying to configure Random Glossary Entry block with no Glossary defined you get PHP Warning

      Warning: Invalid argument supplied for foreach() in /moodle/blocks/glossary_random/block_glossary_random.php on line 122

      it's foreach that //format menu texts to avoid html and to filter multilang values

      simple resolution would be adding

      if (is_array($glossaries))

      { foreach.... }

      else

      { // optional - warning like - you should define Glossary // let's say $string['notyetglossary'] }

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            dougiamas Martin Dougiamas added a comment -

            From Jon Papaioannou (pj at moodle.org) Saturday, 23 July 2005, 08:54 AM:

            Fixed by adding empty($glossaries) check.

            Show
            dougiamas Martin Dougiamas added a comment - From Jon Papaioannou (pj at moodle.org) Saturday, 23 July 2005, 08:54 AM: Fixed by adding empty($glossaries) check.
            Hide
            mblake Michael Blake added a comment -

            Temporary transition to reassign bug to "pj".

            Show
            mblake Michael Blake added a comment - Temporary transition to reassign bug to "pj".
            Hide
            mblake Michael Blake added a comment -

            Re-closing bugs after re-assigning to "pj".

            Show
            mblake Michael Blake added a comment - Re-closing bugs after re-assigning to "pj".

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: