Tips & Tricks

Please do NOT use this section of the forum to request help if Joomdle does not work for you in some particular way. Your post will be deleted.

How to show end course date with Joomdle Course Content Plug

  • JRocamora
  • Topic Author
  • Offline
  • New Member
  • New Member
More
7 years 6 months ago #1 by JRocamora
Hi!
I need to show the end date of a course. I used joomdle content plugin to show this information, but I only can view the start date but not the finish date. I dont need show the enrol dates. Is there a way to do this? I see on the plugin folder the view.php file and added enddate as way to show this data with no success.

Thanks in advanced!

Please Log in or Create an account to join the conversation.

More
7 years 6 months ago #2 by Antonio Durán
Hi.

I checked the code, and this plugin is using the get_course_info web service call, which is not returning the end date.
So, in order to make it work in the plugin, aside from adding on the view.php file, you would need to modify the Joomdle web service.
As I think it is a good addition, I added right away for next release.
If you want to do the changes now, here they are:
File: /moodle/auth/joomdle/helpers/externallib.php
Function: get_course_info_returns
After:
Code:
'startdate' => new external_value(PARAM_INT, 'start date'),
Add:
Code:
'enddate' => new external_value(PARAM_INT, 'end date'),

File: moodle/auth/joomdle/auth.php
Function: get_course_info
After:
Code:
co.startdate,
Add:
Code:
co.enddate,

Please test and let us know how it works for you.

Please Log in or Create an account to join the conversation.

  • JRocamora
  • Topic Author
  • Offline
  • New Member
  • New Member
More
7 years 6 months ago #3 by JRocamora
Thanks for your fast support!

I tried adding the code, after test I get this error message
Code:
XML-RPC Error (28260048): Detectado valor de respuesta no válido | ERRORCODE: invalidresponse

Also all the items on the site crash showing this message.

¿Any idea?

Thanks again!

Please Log in or Create an account to join the conversation.

More
7 years 6 months ago #4 by Antonio Durán
You can enable debugging in Moodle to try to get more info... it seems that it is not returning the expected data type.

Please Log in or Create an account to join the conversation.