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

Re: Moodle Web Service functions : Can I do this?

$
0
0
by Bob Puffer.  

grade_tree() will supply you with a heirarchical list of grade objects for the given courseid.


Re: Moodle Web Service functions : Can I do this?

$
0
0
by Batiste Roger.  

That is a good new!


What version of moodle should I use (that provide this function)? Where can I find documentation about it?

 

Thanks!

Re: Moodle Web Service functions : Can I do this?

$
0
0
by Batiste Roger.  

Ok, thank you!
Are there other Open-LMS that I should consider using for my project if it turns out that developing a plug-in is too expensive / time consuming?

Re: Moodle Web Service functions : Can I do this?

$
0
0
by Bob Puffer.  

The function should be in all versions of Moodle.  Best documentation is to read the code -- I don't know of any other.

Re: Moodle Web Service functions : Can I do this?

Re: Using enrol_manual_enrol_users via XML-RPC.NET

$
0
0
by Jordi Barajas Gines.  

Hi Did you solve your problem?

Get all token

$
0
0
por Json Chau.  

I want to call all service from moodle.

So, I add a new service, then i add function to this service. After that, i add token to referent to my service i just add.

But I cant get this token

I found another serviceshortname, but i cant see it anywhere

Can anyone help me.

Re: Login webservice

$
0
0
por Json Chau.  

hi all.

I think if you want to login, just using token.

Because, i you have wrong username or password, i cant get your token.

That is my opinion.


Re: Moodle Web Service functions : Can I do this?

$
0
0
por Gregor McNish.  

The web services documentation (Site Admin, Plugins/Web Services/Api Documentation shows a mod_assign_get_grades function which claims to get grades given assignment ids (which are accessible through other web service functions).

 

How Can I Simply Store Responses to Questions

$
0
0
by Thomas Sample.  

Dear Helpful Moodle Community,

 

I'm hoping that you can provide some guidance relating to my issue at hand. I've been studying the moodle documentation for days, but it's massive and I'm having some trouble. My goal is to be able to submit student responses to questions using html form elements combined with some type of API. From what I can see, none of the default external functions allow me to do this. The only options are at a macro level (create course, enroll user, create group, etc). I need it at a micro level (submit an answer to 1 question). I'm looking to have the student click a submit button inside of a html form element and have that cause the answer to be stored in the moodle database for that user.

 

This is complicated by the fact that questions don't seem to be stand alone instances. It seems like questions are only available either within Quizes or Lessons.

 

The only possible route I can currently see towards acheiving my goal is to use some type of direct database manipulation. In other words, if I find out exactly what tables are being modified when a student submits an answer to a quiz question, theoretically I could make those same changes when a student submits their response via the html form.  This would involve creating my own custom web service function that would modify the required tables in the database directly using the parameters I pass in. However, I'm not sure this would even work.

 

Has anyone encountered anything similar to this? Is there an easier way to do what I want that I'm missing? I just want to submit the answer to a question through an external http function and store it in the moodle database correctly. Should be that hard, right? Any help would be greatly appreciated.

 

Thanks for your time and help,

Best Regards,

Your-Fellow-Moodler

Re: How Can I Simply Store Responses to Questions

$
0
0
by Gregor McNish.  

It depends on what you want to do. Have you looked at the questionnair or the choice plugins? They both allow submissions of answers to user defined questions.

You could also go the route of a custom block if you need a particular level of control over the display of a set of questions-- this isn't too hard if your question/answer format is simple and doesn't require the complexities of the quiz question types, gradebook, etc.

We did this for some learner-specific survey style information (ie it related to the learner, not the course), and then we wrote reports to pull out the aggregate responses by class groups. The moodle block development tutorial is quite good, and goes into detail about using moodleforms and storing the information in custom tables for the block.

You might also look at LTI; you can write the sort of activity you want outside of moodle, and set up a 2 way communication between moodle and your activity.

Re: Get all token

$
0
0
by Gregor McNish.  

I forgot where I read this, but you have to add the service shortname into the relevant table (external_services) manually. Then you use the get token function for the service.

This worked for me.

Create a web service for a block type plugin

$
0
0
by Sandareka Wickramanayake.  

Hi all, 

First of all I would say that I'm new to developing web services.

What I want to know is whether we can develop a web service for a block type plugin? 

Thank you in advance 

Re: Questions about token.php and database shortname.

$
0
0
by Steve Anatai.  

Not sure how it could be any clearer, but it's possible your phpmyadmin isn't configured correctly.  If you're using phpmyadmin then you should be able to display your moodle database tables by clicking the name of your moodle database.

The table you're looking for is mdl_external_services and after clicking on it you have to select the "Browse" tab.  After that you can select the cell in the "shortname" column against the row that matches your service under "name", and change it to the name of your service.

How to import and organize external resources

$
0
0
by Marco Andreatta.  

Hello,

I'm writing a php batch script to import external data into a moodle instance i.e. I have to import teachers, courses and for each course some folders, files and URLs.

I was able to set up webservices access and creating users ("core_user_create_users" call), courses ("core_course_create_courses") and files ("core_files_upload").

The problem is how to create the correct skeleton into courses i.e. I need files being  visible into course sections (and into folders, if needed) to each enrolled user (teacher or student).

It looks like there is no web service to do the above task, and I couldn't find an API to do the same thing so far...

Any suggestion?

Thanks!

Marco.


Re: REST Service Create User C# Example [Moodle 2.3.1]

$
0
0
by shruti daga.  

I am building a project which is in windows 8 so i am using c#. i have a client application and a server application. i want the application to run with my gui but i want the backend as moodle. i dont know where to write the code for api's and how to go about with making moodle as backend. i am very new to this whole thing but i have to submit this project in 10 days. please let me know the codes i will have to write so that moodle works as backend of my project. I want moodle to do all the work.I should be able to search documents. enrol for courses upload and download documents and run group management. please help asap

Anonymous / Guest access via web services

$
0
0
by Dhruv Gami.  

Hello, I am trying to expose the list of courses available on my site via web services to all users. I have been unable to find a way to make a service available without the token requirement.

Is there a way I could allow core_course_get_courses() to be accessed without a token?

Re: How to create a webservice client in moodle 2.0 using php

$
0
0
by Nitin Sankar.  

Hi Niranjan

Very well said I was also facing this problem and now I got the solution. Thank for this discussion regarding to the web service.

Regards

Software company in Lucknow

Re: Anonymous / Guest access via web services

$
0
0
by Raymond Cosgrave.  

You can use either the token or webservice username and password to get the return from core_courses_get_courses() and format/print out the list to the person viewing the page. You can use the ID of the course of the course and append it to the view of the course

example:

<a href="http://mymoodle.com/course/view.php?id=" . $course_return['ID'] . "> Course ID 4</a>

*** Thats probably not the return structure but you get the idea ***

You would just have to set your moodle courses to allow guest access.

 

Im not sure why you would want to be able to use the Web Service without some sort of auth...

Re: Anonymous / Guest access via web services

$
0
0
by Dhruv Gami.  

Thanks Raymond ...

I'm actually trying to create a service that can publish a list of all courses available in the system (prior to login/auth) so that a user can see what's available, and then when they decide to take the course, they'll be required to sign in. 

This is similar to how the moodle site has a block that displays all courses in the system and gives info about them. I want to be able to expose that list over a service to embed in a different location and mobile app.

Any thoughts on how that could be achieved? Maybe a different approach?

Viewing all 2366 articles
Browse latest View live


Latest Images

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