Welcome, Guest
R0.25 No Longer Supported

TOPIC: new method in moodle/auth/joomdle/auth.php

new method in moodle/auth/joomdle/auth.php 7 years 11 months ago #1

  • Munish Sethi
  • Munish Sethi's Avatar
  • Offline
  • Karma: 0
Hi.

We are trying to show users who did courses. By default there is no such api in JoomdleHelper. So we did create one function in auth.php (under moodle) and corresponding function in JoomdleHelper(in joomla).

But i m seeing an exception which says (Function is not defined). Kindly tell me if there is anywhere else we need to declare these new functions?
Or can you pls show me the steps to create a new APi to fetch data from moodle to joomla.

Regards.
Munish Sethi
The topic has been locked.

Re: new method in moodle/auth/joomdle/auth.php 7 years 11 months ago #2

  • Chris
  • Chris's Avatar
  • Offline
  • Karma: 37
When you say show users who "did courses" do you mean show those students who are enrolled in a course? Those users who have completed a course?
The topic has been locked.

Re:new method in moodle/auth/joomdle/auth.php 7 years 11 months ago #3

  • Munish Sethi
  • Munish Sethi's Avatar
  • Offline
  • Karma: 0
Yes. I want to show a list of courses with a detailed information that what all users have enrolled into this course. What was their marks, time took to complete the course.

But my question was not specifically in this relation only. My question is how to create a new method to get data from moodle database to joomla front end. My question was to find out the procedure of creating a new API in JoomdleHelper to fetch some information from moodle application.
The topic has been locked.

Re:new method in moodle/auth/joomdle/auth.php 7 years 11 months ago #4

  • Munish Sethi
  • Munish Sethi's Avatar
  • Offline
  • Karma: 0
Looks like admin is little busy, but i solved the issue myself looking at others posts on this forum.
If others want info here is that.

1. Add a new method as getTestingValues inside JoomdleHelper under joomdle in joomla..
2. Add same name method inside moodle/auth/joomdle/auth.php and do the logic and return values there from.
3. Add this method name in the same file(auth.php) in the list of methods under a function "mnet_publishes".
4. Go to moodle and login as admin. Click on Notifications on the top left links. And then try to call the Api.that will result the values.
The topic has been locked.

Re:new method in moodle/auth/joomdle/auth.php 7 years 11 months ago #5

  • Chris
  • Chris's Avatar
  • Offline
  • Karma: 37
Yes admin is a little busy - on the beach surfing :) After all this is a weekend, Joomdle is a community product and its not even a day from your first post :)

Thanks for sharing your findings.
The topic has been locked.
Cron Job Starts