× 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

1 year 4 weeks ago
JRocamora
Posts: 5
More
Topic Author
How to show end course date with Joomdle Course Content Plug #1
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!
1 year 4 weeks ago
Antonio Durán
Posts: 6874
More
How to show end course date with Joomdle Course Content Plug #2
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:
                    'startdate' => new external_value(PARAM_INT, 'start date'),
Add:
                    'enddate' => new external_value(PARAM_INT, 'end date'),

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

Please test and let us know how it works for you.
1 year 4 weeks ago
JRocamora
Posts: 5
More
Topic Author
How to show end course date with Joomdle Course Content Plug #3
Thanks for your fast support!

I tried adding the code, after test I get this error message
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!
1 year 4 weeks ago
Antonio Durán
Posts: 6874
More
How to show end course date with Joomdle Course Content Plug #4
You can enable debugging in Moodle to try to get more info... it seems that it is not returning the expected data type.