Skip to main content

Quickly Extracting Open LMS data for Spread sheet analysis

Comments

5 comments

  • Stephen Ladek

    Credit (Steven Bergen): 

    Very good article.

    Your URL for testing the API should be:
    <Your site url>/webservice/pluginfile.php/1/block_reports/def_report_json/<report id>/dfr.json?token=<Your file download token>

    You have the pluginfile.php/ twice in your example.

    0
  • Stephen Ladek

    Credit (David Castro):

    Fixed. Thanks again.

    About scheduling, that's a nice feature to have. A little shoutout to @Laura Martin Prieto .

    In the meantime, you can also add the function for queueing the reports to the web service, as we do for "core_files_get_files" (I know, we didn't do something with that function, lol), then call it via URL.

    <Your site>/webservice/rest/server.php?moodlewsrestformat=json&amp;wsfunction=block_reports_queue_deferred_report&amp;id=<report id>&amp;wstoken=<Your file download token>

    Once you do that, you can use an online service like the ones talked about here to schedule your requests:
    https://stackoverflow.com/questions/50793959/how-to-schedule-api-requests

    Or build a small client using your preferred language.

    We have other Deferred reports functions registered you can call. See:

    <Your site>/admin/webservice/documentation.php
    0
  • Jason Rodgers

    Related to the above.  I would love to be able to be able to schedule a deferred report like other Scheduled events in the system.

    Must me missing a step somewhere on the above 'add the function for queueing'

    3
  • Stephen Ladek

    @jason rogers would you do me the favor of adding your suggestion to the "Feedback" topic please? 

    0
  • Jiradett Kerdsri

    Agreed with @Jason the auto refresh report is a must have!

    0

Please sign in to leave a comment.