Moodle provides many web services by default. You can just pass its token to your RPC and transact data.
Or you can create your web service as well as token for your purpose where your logic resides.
Moodle provides many web services by default. You can just pass its token to your RPC and transact data.
Or you can create your web service as well as token for your purpose where your logic resides.
use default we service features.
Hi All,
Can anyone help me, how file can be uploaded using core_files_upload, I am not able to use it. I have integrated my moodle (2.4) with drupal and want to trigger file uploading from drupal to moodle but don't know how to use it.
Thanks
Sumit
Same issue here.
The web services in Moodle are "unreliable at best".
I'am starting my new class to send instant messages, I have the core_message_send_instant_messages, but no function to get messages, is there a way to access the received messages by web services API? I also try to see if after a message was sent, the user have the field message but nothing... I'am not a genius but I cant see any advantage in develop a function to send and do not develop a Get.
It's the same as if I build a client app only with set's without any get and after expect to receive data.
Marti, have you get any opprtunity to solve this issue am also waiting for replay.
Thank you
Hi everyone. I am beginner, my problem is how to get the information of a user when he login into mobile app. the infomation includes courses which he enrol, his profile... I think to get the information I need to know his Id. but when he login, I just get his token by using API function. so how to get the user Id by user token? or is there any way to get the information of user without id?
please help me! thank so much!
i have installed the XAMPP and Moodle 2.5 INside it Along side, also installed No-ip client to convert this to webserver
now my question is, i woud like to use this server as intranet aswell as webserver for globally accessibility.
my Config file have base url like
$CFG->wwwroot = 'http://172.16.1.1/exam';
$CFG->dataroot = 'H:\\xampp\\moodledata';
$CFG->admin = 'admin';
but not limited to local ip address, i want to use it as webserver to access it from internet. please suggest me how to set the base url to use it from internet and also form intranet
bump
any news about this?
Dear Dang,
Hope you are doing good. I understand you are a beginner, and there is no end to the number of problems you may have to face in the initial stages of getting acquainted with Moodle. Don’t worry you will get a hang of it in sometime.
Dang, may I know what exactly you mean by "mobile app"?
To get the details of a logged in user, use the global variable $USER. Define global $USER; in the page where you want to get the user details and then view the full user details by print_r($USER);
To get the user id, you may do this,
$userId = $USER->id;
Do let me know if this helps.
All the best! Would love to hear from you again.
Purnendu (developer)
DualCube
Hello Sandeep,
I understand you are trying to create an app for Moodle.You have mentioned that you are getting the course details and its contents. In order to get the SCORM id you have to fetch the record from database using the course module
gloabl $DB;
$scorm = $DB->get_record("scorm", array("id"=>$cm->instance))
$scorm_ID = $scorm->id;
//where $cm is the course module//
This might solve your problem.
Let me know if this was of any help. Have a good day.
Thanks and regards
Purnendu (developer)
DualCube
No. You can't. This breaks various things.
Get your DNS set up correctly, so there is one URL to access Moodle whereven you are.
Hi Purnendu,
Thanks a lot.
This is what I have implemented using a middleware service. I am trying to create the SCORM url for a course. The URL requires two parameters scoid and cm. I found that the value for scoid was not actually required. The URL can be like this : /mod/scorm/player.php?scoid&cm=28&display=popup.
I did not have to mess up with the database, as the cm was available in the core_course_get_contents
Thanks,
Sandeep
Sandeep,
Good to know you’ve resolved the issue. Keep moodling!
Have a good day.
Cheers!
Purnendu
Hi,
Is there any way we can get the Quiz Password through the REST API call. We are trying to integrate our system with Moodle and found that we are not getting the Password (access_code) from Moodle. Is it expected or do we have to use any other methods/functions to get this data?
Thank you.
Ananth
I don't think there are any quiz web services yet. You would need a file like mod/forum/externallib.php, only for quiz.Specifically, it is a method like get_forums_by_courses that is needed.
Hi Tim,
Thank you for the response. We need to get the quiz/assignment password as part of our integration. Is there any way we can get it or at least a workaround. I am particularly looking to get Start Date, End Date, acces_code/password of the quiz/assignment.
Any help would be highly appreciated.
Thank you.
Ananth
Well, the data is in the database in the mdl_quiz and mdl_assign tables. Getting data out of a database is not a hard problem.
(Choosing the best way might be.)
Coding a basic get quiz and get assign web service, following teh forum example, and contributing it to Moodle core would probably be a good way.
Thank you Tim. I will try that and let you know.
Thanks
Ananth