Quantcast
Viewing all articles
Browse latest Browse all 2363

mod_quiz_start_attempt -> require_login_exception

by James Foster.  

Dear Moodle people Image may be NSFW.
Clik here to view.
smile
,

I'm running Moodle 4.4.2+ on Ubuntu 20.04, with PHP 8.3.6.

I'm new to API programming and I'm having difficulty accessing my quizzes through the API that I'm trying to create on my Android system.

Image may be NSFW.
Clik here to view.

When using Postman (above) I can login to the 'moodle_mobile_app' with no issue.  When pasting the received token into the mod_quiz_start_attempt function I get the 'requireloginerror'.

The user is valid, has a valid token, and is enrolled on the course that I'm trying to access.  Through the 'actual' Android Moodle App, it works just fine for this user, so it's obviously something that I'm missing.

As an aside - when I create a 'new' web service attempting to do the same thing I get the below - 

Image may be NSFW.
Clik here to view.

It says that it's missing capabilities.  I have looked through my system and added any relevant quiz capabilities, including add and review:

Image may be NSFW.
Clik here to view.

when I try and retrieve a token through Postman on my service, I'm ok, but when I try to get to start the quiz I get the same error.

I'm not sure if they would be considered related, as I might be missing other core services that should be included in my new service...still trying to find out what they are.

Anyway, based on the reading I've done already, I should be using the Moodle_Mobile_App service.

Any help would be greatly appreciated.

James


Viewing all articles
Browse latest Browse all 2363

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>