ExtraMethods

Its a Moodle Plugin, list courses completed by username and userid. Work with RPC, SOAP adn REST. Have two methods at this moment.

local_extramethods_get_user_finised_by_uid

list couses completed by user id.

local_extramethods_get_user_finised_by_username

list courses completed by username.

 

You can download here https://github.com/jmanuelguerrero/moodle-extramethods

To install: 1- install the plugin in moodle/local/extramethods/

 

local_extramethods_get_user_finised_by_uid 
 
Return courses finished by uid

Arguments
iduser (Required)
        The user id,"
 

General structure

string   //The user id,"

XML-RPC (PHP structure)

[iduser] => string
REST (POST parameters)

iduser= string

Response

General structure

list of ( 
object {
id int   //id of course finished
userid string   //User id
course int   //Course id
timeenrolled string   //Time enrolled in the course
timestarted string   //When the user start
timecompleted string   //when the user end
reaggregate string   //reagregate to a course
} 
)
XML-RPC (PHP structure)


    Array 
        (
        [0] =>
            Array 
                (
                [id] => int                
                [userid] => string                
                [course] => int                
                [timeenrolled] => string                
                [timestarted] => string                
                [timecompleted] => string                
                [reaggregate] => string                
                )
        )
REST

<?xml version="1.0" encoding="UTF-8" ?>
<RESPONSE>
    <MULTIPLE>
        <SINGLE>
            <KEY name="id">
                <VALUE>int</VALUE>
            </KEY>
            <KEY name="userid">
                <VALUE>string</VALUE>
            </KEY>
            <KEY name="course">
                <VALUE>int</VALUE>
            </KEY>
            <KEY name="timeenrolled">
                <VALUE>string</VALUE>
            </KEY>
            <KEY name="timestarted">
                <VALUE>string</VALUE>
            </KEY>
            <KEY name="timecompleted">
                <VALUE>string</VALUE>
            </KEY>
            <KEY name="reaggregate">
                <VALUE>string</VALUE>
            </KEY>
        </SINGLE>
    </MULTIPLE>
</RESPONSE>

Error message
 

REST

<?xml version="1.0" encoding="UTF-8"?>
<EXCEPTION class="invalid_parameter_exception">
    <MESSAGE>Invalid parameter value detected</MESSAGE>
    <DEBUGINFO></DEBUGINFO>
</EXCEPTION>
 

Y para el segundo metodo:

local_extramethods_get_user_finised_by_username 
 
Return courses finished by username

Arguments
username (Required)
        The user name,"
 

General structure

string   //The user name,"

XML-RPC (PHP structure)

[username] => string
REST (POST parameters)

username= string

Response

General structure

list of ( 
object {
id int   //id of course finished
userid string   //User id
course int   //Course id
timeenrolled string   //Time enrolled in the course
timestarted string   //When the user start
timecompleted string   //when the user end
reaggregate string   //reagregate to a course
} 
)
XML-RPC (PHP structure)


    Array 
        (
        [0] =>
            Array 
                (
                [id] => int                
                [userid] => string                
                [course] => int                
                [timeenrolled] => string                
                [timestarted] => string                
                [timecompleted] => string                
                [reaggregate] => string                
                )
        )
REST

<?xml version="1.0" encoding="UTF-8" ?>
<RESPONSE>
    <MULTIPLE>
        <SINGLE>
            <KEY name="id">
                <VALUE>int</VALUE>
            </KEY>
            <KEY name="userid">
                <VALUE>string</VALUE>
            </KEY>
            <KEY name="course">
                <VALUE>int</VALUE>
            </KEY>
            <KEY name="timeenrolled">
                <VALUE>string</VALUE>
            </KEY>
            <KEY name="timestarted">
                <VALUE>string</VALUE>
            </KEY>
            <KEY name="timecompleted">
                <VALUE>string</VALUE>
            </KEY>
            <KEY name="reaggregate">
                <VALUE>string</VALUE>
            </KEY>
        </SINGLE>
    </MULTIPLE>
</RESPONSE>

Error message
 

REST

<?xml version="1.0" encoding="UTF-8"?>
<EXCEPTION class="invalid_parameter_exception">
    <MESSAGE>Invalid parameter value detected</MESSAGE>
    <DEBUGINFO></DEBUGINFO>
</EXCEPTION>
 

Añadir nuevo comentario

Plain text

  • No se permiten etiquetas HTML.
  • Las direcciones de las páginas web y las de correo se convierten en enlaces automáticamente.
  • Saltos automáticos de líneas y de párrafos.
By submitting this form, you accept the Mollom privacy policy.