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

Missing required file in core_course_get_courses_by_field WS

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.4.5, 3.5.2, 3.6
    • Fix Version/s: 3.4.6, 3.5.3
    • Component/s: Course
    • Labels:
    • Testing Instructions:
      Hide
      1. As admin, enable "Mobile services": Site administration ► Mobile app ► Mobile settings
      2. Using the search option in Site Administration, search for this option "courseoverviewfileslimit" and set its value ("Course summary files limit") to 0
      3. Download the Moodle app and access to your local site using a student account (user enrolled as student in at least one course)
      4. Access to the course via the Mobile app and check that you can see the course contents listed
      Show
      As admin, enable "Mobile services": Site administration ► Mobile app ► Mobile settings Using the search option in Site Administration, search for this option "courseoverviewfileslimit" and set its value ("Course summary files limit") to 0 Download the Moodle app and access to your local site using a student account (user enrolled as student in at least one course) Access to the course via the Mobile app and check that you can see the course contents listed
    • Affected Branches:
      MOODLE_34_STABLE, MOODLE_35_STABLE, MOODLE_36_STABLE
    • Fixed Branches:
      MOODLE_34_STABLE, MOODLE_35_STABLE
    • Pull from Repository:
    • Pull 3.5 Branch:
    • Pull Master Branch:
      MDL-63583-master

      Description

      Reported by the forum:
      https://moodle.org/mod/forum/discuss.php?d=376483

      If CFG->courseoverviewfileslimit is set to 0, course/lib.php is not loaded (see lib/coursecatlib.php) in function get_course_overviewfiles() and thus there is no "course_get_format" function available.

      The fix is just to require course/lib.php in the get_courses_by_field function

        Attachments

        1. MDL-63583 (p1).jpg
          MDL-63583 (p1).jpg
          22 kB
        2. MDL-63583 (p2).jpg
          MDL-63583 (p2).jpg
          22 kB
        3. MDL-63583 (p3).jpg
          MDL-63583 (p3).jpg
          21 kB

          Activity

            People

            • Assignee:
              jleyva Juan Leyva
              Reporter:
              jleyva Juan Leyva
              Peer reviewer:
              Dani Palou
              Integrator:
              Eloy Lafuente (stronk7)
              Tester:
              Anna Carissa Sadia
              Participants:
              Component watchers:
              Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona), Víctor Déniz Falcón
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                12/Nov/18

                Time Tracking

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 40 minutes
                40m