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

Require in courses' externallib should be absolute

    XMLWordPrintable

Details

    • MOODLE_310_STABLE, MOODLE_39_STABLE
    • MOODLE_310_STABLE, MOODLE_39_STABLE
    • Hide
      1. As an admin, enable "Mobile services": Site administration ► Mobile app ► Mobile settings
      2. Create a Token in the mobile app service
        • Click on Site administration ► Plugins ► Web services ► Manage tokens
      3. Open the console and execute this new curl request, replacing wstoken with the token you just created and the site url with yours.

        curl 'http://YOUR_SITE/webservice/rest/server.php?moodlewsrestformat=json' --data 'wsfunction=core_course_get_recent_courses&wstoken=WS_TOKEN'

      1. Confirm that you get an array with the courses. This could be an empty array as well, before this fix you would get an error saying "Call to undefined function course_get_recent_courses()".
      Show
      As an admin, enable "Mobile services": Site administration ► Mobile app ► Mobile settings Create a Token in the mobile app service Click on Site administration ► Plugins ► Web services ► Manage tokens Open the console and execute this new curl request, replacing wstoken with the token you just created and the site url with yours. curl 'http://YOUR_SITE/webservice/rest/server.php?moodlewsrestformat=json' --data 'wsfunction=core_course_get_recent_courses&wstoken=WS_TOKEN' Confirm that you get an array with the courses. This could be an empty array as well, before this fix you would get an error saying " Call to undefined function course_get_recent_courses() ".

    Description

      The require statement in course/externallib.php is relative and this can cause some errors when webservices are called. This seems to have been fixed in 311 and master, but the issue still remains for 310 and 39 stables.

      Attachments

        Issue Links

          Activity

            People

              noeldemartin Noel De Martin
              noeldemartin Noel De Martin
              Carlos Escobedo Carlos Escobedo
              Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
              Gladys Basiana Gladys Basiana
              Amaia Anabitarte, Carlos Escobedo, Laurent David, Mikel Martín Corrales, Sabina Abellan, Sara Arjona (@sarjona)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                8/Nov/21

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 55 minutes
                  55m