Quantcast
Channel: Web services
Viewing all 2363 articles
Browse latest View live

Missing functions at Web Service Test Client

$
0
0
by Aung Pyae Sone.  

I've added the all functions in Custom Service as external service. When I tried to test the function, I could fund the functions that I've added at Web Service Test Client. Check the screenshot below;




GET request: core_course_get_courses

$
0
0
by neptune 1.  

Hi,

I'm making the following GET request in postman:  ...?wstoken=********&wsfunction=core_course_get_courses and it's returning all 8 courses that I have set up in Moodle for testing and the user token that I'm using in the URL is only enrolled to 7 of them.

Is there a way to only return the users courses that they're enrolled in?

Thanks,
Chris

Re: GET request: core_course_get_courses

$
0
0
by Neill Magill.  

It sounds like you want to use the core_enrol_get_users_courses web service

Why does a category idnumber return null?

$
0
0
by Peter de Jong.  

I use the Moodle API and GetToken to log-in with a user. Then I retrieve the categories information here:

api.GetCategories(siteInfo.Userid, categories =>
                {
                    DataManager.Instance.categories.Clear();
                    if (categories.Length > 0)
                    {
                        foreach (var category in categories)
                        {
                            // Save category info.
                            Debug.Log(category.Idnumber);
                            DataManager.Instance.categories.Add(category);
                        }
                    }
                    queuedRequestCount--;
                });


However, category.Idnumber returns null. It shouldn't be null, it's definitely filled in.

Is it an issue with account privilege? Or what could it be..?

Thank you.

Post payload didn't send to Web Service via RAW/JSON

$
0
0
by Sergio Ricardo Bernardi.  

Hello,

I try to make a request via POST to Moodle Web Service API but the payload didn't send to web service, only url.

 If i try to send my parameters via GET it works.


Is there a place where I have to configure it to enable sending the payload in raw / json format?




Re: core_user_get_users_by_field return blank array

$
0
0
by Jose Lorenzo Espeso.  

Yes, this is the solution. Thank You! Give the capacity "Moodle/user:viewalldetails" to the rol of web services.

Only number ID at token

$
0
0
by Matheus Reis Cascardo.  

We have been using Moodle only in PC and the students "ID" working well only with numbers.
Now, using the Token at mobile application, we needed to change the student ID for their names (string).
Does anybody know how to enable the student ID only with numbers?

web services with personal access token

$
0
0
by Abdelrahman Magdi.  

when use moodle_mobile_app web service i can user user token to access any function on it 

but when i create any web service i must create a client token 


i need to create web service and use user token like moodle_mobile_app

how can i do that ?


Rest Web Service - Getting List of System Cohorts

$
0
0
by Robert Payne.  

Hello,


I'm trying to use Moodle Rest Web Service to get a list of all system cohorts so that I can compare it with a list from outside moodle and then update the cohort to match that list if it does not match.

I'm currently caught up on the first step though as I'm not sure how to get the list of cohorts. I'm trying to use the "core_cohort_search_cohorts" but am not sure how to use the context array parameter.

Currently I'm trying to use the default options from the generated documentation of [0,'',0] but it still returns the error of:

{ exception: 'invalid_parameter_exception',
  errorcode: ' invalidparameter',
  message: 'Invalid parameter value detected',
  debuginfo: 'context => Invalid parameter value detected: Unexpected keys (0, 1, 2) detected in parameter array.' }

I'm not sure what I should be passing here. Anyone used this before or have any idea of what I should be doing here?


Thanks for your time,

Rob

Re: Rest Web Service - Getting List of System Cohorts

$
0
0
by Robert Payne.  

Never mind I worked out that I needed to use system context. Using the following arguments got me all the cohorts in my moodle test site.

args: {	query:'',
	context:{instanceid:10,contextlevel:'system'},
	limitnum:100
}

How to get token or login/password of already logged in user?

$
0
0
by Rustam Rakhimov.  

Hello!

I want to embed to Moodle course Unity WebGL mini-games as quizzes/questions and to exchange data with Moodle such as attempts, correct/wrong answers and so on. To do so I must send requests to Moodle Web Services from Unity code. But how can I get user token or user login/password when he is already logged in? 


Thanks in advance.

Re: Why does a category idnumber return null?

$
0
0
by Peter de Jong.  

Bump.

How can I retrieve category idNumber through WEB API?

Thanks.

Moodle core_user_create_users Access control exception

Re: error when adding external functions to a web service.

$
0
0
by Eswar k.  

Hi Rama,


upgrade joomdle plugin,in your plugins tab(using administrator login),then it works.


Thanks

Enroling course and role assignment through rest api

$
0
0
by Eswar k.  

Hi All,


Im using moodle version-3.3 ,iam able to create users through rest API,but i m failing to assign roles and coures to that user presently im facing this error,plz check below.


{"exception":"moodle_exception","errorcode":"wsusercannotassign","message":"You don't have the permission to assign this role (5) to this user (323) in this course(26)."}


Thanks,

Eswar


Can you get the feedback in the grade book with a webservice?

$
0
0
by Richard van Iwaarden.  

Is it possible to get the feedback that has been given to a student for an assignment with a web service?

We would like to archive not just the grade but also the feedback AND submission in an archive system.

Re: Can you get the feedback in the grade book with a webservice?

Re: Enroling course and role assignment through rest api

$
0
0
by Zadok Lindt.  

You have to muck around with the permissions in the System Admin section of Moodle to get it to work.

(I forget the name of the screen, I think its in "Plugins" or "Webservice" or something like that.

Which web service call allows fetching gradebook categories?

$
0
0
by Zadok Lindt.  

When we invoke gradereport_user_get_grade_items, to get a full list of all student grades in a course, the results include a field named categoryid. But the results do not provide information about the category it refers to. (formulas, etc...) Which web service do we invoke to get this information?

Re: Which web service call allows fetching gradebook categories?

$
0
0
by Zadok Lindt.  

Consider the data extracted from a course with a category

itemtype: course,       categoryid: 71,    grade: 61.07
    itemtype: category, category: 80,  grade: 50.87
       itemtype: mod, itemname: test 1, grade: 71.6
       itemtype: mod, itemname: test 2, grade: 81.00
       itemtype: mod, itemname: test 3, grade: 0.00

  1. What is the name (displayed in the gradebook) for category 80, how do we get it?
  2. What is the formula for category 80, how do we get it?

The above two questions are not in the data returned by gradereport_user_get_grade_items.

Thanks!

Viewing all 2363 articles
Browse latest View live


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