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

Competency - list_competencies external API

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.2.3, 3.3.3, 3.4, 3.5
    • Fix Version/s: 3.3.4, 3.4.1
    • Component/s: Competencies
    • Labels:

      Description

      Inside the method:

      public static function list_competencies($filters, $sort, $order, $skip, $limit) {

      Line 843, the code uses:

      foreach ($params['filters'] as $filter) {
        if (!in_array($filter->column, $validcolumns)) {
          throw new invalid_parameter_exception('Filter column was invalid');
        }
        $safefilters[$filter->column] = $filter->value;
      }

      But, according to the list_competencies_parameters, the $filter is an array, not an sdclass, so when I call the external API, the $filter->column and $filter-> value returns null, where $filter["column"] and $filter["value"] returns correct value.

      The correct way should be using an array

       

        Attachments

          Activity

            People

            • Assignee:
              damyon Damyon Wiese
              Reporter:
              khangvo Khang Vo
              Peer reviewer:
              Mark Nelson
              Integrator:
              Eloy Lafuente (stronk7)
              Tester:
              CiBoT
              Participants:
              Component watchers:
              Damyon Wiese, Jean-Philippe Gaudreau, Steve Massicotte, Serge Gauthier, Issam Taboubi, Adrian Greeve, Mihail Geshoski, Peter Dias
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                15/Jan/18