Moodle
  1. Moodle
  2. MDL-31183

Multiple problems in glossary_count_unrated_entries()

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.1.4, 2.2, 2.3
    • Fix Version/s: 2.1.5, 2.2.2
    • Component/s: Glossary
    • Labels:
    • Rank:
      37624

      Description

      Multiple problems in glossary_count_unrated_entries()

      • /mod/glossary/lib.php glossary_count_unrated_entries() uses undefined $context->id
      • {ratings}
      • invalid use of count_sql

      Luckily this function is not used

        Activity

        Hide
        Eloy Lafuente (stronk7) added a comment -

        Integrated, thanks!

        Show
        Eloy Lafuente (stronk7) added a comment - Integrated, thanks!
        Hide
        Eloy Lafuente (stronk7) added a comment -

        Tested with:

        <?php
        require_once('config.php');
        require_once('mod/glossary/lib.php');
        
        print_object(glossary_count_unrated_entries(2, 2));
        

        (with 2, 2 being valid glossary->id and user->id)

        Show
        Eloy Lafuente (stronk7) added a comment - Tested with: <?php require_once('config.php'); require_once('mod/glossary/lib.php'); print_object(glossary_count_unrated_entries(2, 2)); (with 2, 2 being valid glossary->id and user->id)
        Hide
        Eloy Lafuente (stronk7) added a comment -

        It works ok, so passing...ciao

        Show
        Eloy Lafuente (stronk7) added a comment - It works ok, so passing...ciao
        Hide
        Eloy Lafuente (stronk7) added a comment -

        Your nice code represents only 1/46 of the issues that have been sent upstream this week, so thanks, but not many.

        Nah, joking, many thanks! Closing this a fixed, ciao

        Show
        Eloy Lafuente (stronk7) added a comment - Your nice code represents only 1/46 of the issues that have been sent upstream this week, so thanks, but not many. Nah, joking, many thanks! Closing this a fixed, ciao

          People

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

            Dates

            • Created:
              Updated:
              Resolved: