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

require_login_exception received when attempting to delete a course with core_course_delete_courses webservice

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not a bug
    • Icon: Minor Minor
    • None
    • 2.3
    • Web Services
    • None
    • MOODLE_23_STABLE

      i've been trying to use 'core_course_delete_courses' and am getting errors about 'Not enrolled'

      { 'errorcode' => 'requireloginerror', 'exception' => 'require_login_exception', 'debuginfo' => 'Not enrolled', 'message' => 'Course or activity not accessible.' }

      ;

      the courses i am trying to delete have no one enrolled in them. in fact, i am doing testing with moodle and have loaded very few users, but courses and categories with webservices. all of them ok.

      during my dev, i wanted to tear things down and try again, so i thought i'd use the core_course_delete_courses webservice, since courses and categories were created that way. but i kept getting the error.

      the wstoken i used was accepted just fine for calls to core_course_create_courses or categories.

      i even tried sending the web services user's login credentials in URL http://username:password@host.tld/: FAIL! (which is good, i don't know if you support that construction, but you shouldn't)

        1. courses-ws.pl
          7 kB
        2. delete_courses-1347464702.json
          0.8 kB
        3. Webservices.pm
          10 kB

            jerome Jérôme Mouneyrac
            jsaylor john saylor
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.