× Feature Requests

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.

[Closed] Add timemodified to get_user_grades

3 years 3 months ago 3 years 2 months ago by Antonio Durán.
chawbs
Posts: 4
More
Topic Author
[Closed] Add timemodified to get_user_grades #1
Hi
I have a couple of requests:

1. Can 'timemodified' be added to the get_user_grades call in joomdle:
I add "$rdo[$i] = $sum->timemodified; // DCJ" to the return array and find it most useful (also add parameter to call stack)

2. Is it possible to have an "add user defined call" feature or something like that. I have created a specific call to go alongside my code, which I obviously have to re-apply each time a new release comes out. My call is "get_my_courses_grades ($username)" which differs from the standard function because of the way the teacher has written the courses. The grades come from a quiz near the end of the course (same title each time) and not from the last quiz which they use as a feedback mechanism. I therefore have to check the 'itemname' in the $tareas array and pass back the grade, and also the 'timemodified' again. Not sure how that would work, but it would allow me to upgrade without worrying about losing the extra fields and functionality... something to think about longer term...

Thanks
DJ

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

3 years 3 months ago
Antonio Durán
Posts: 7417
More
[Closed] Add timemodified to get_user_grades #2
Hi.

1) Thanks for the suggestion. We'll look into it for next release.

As for 2) I thought I had documented this already, but found I did not, so I went ahead and wrote some notes at:
www.joomdle.com/wiki/Adding_custom_web_service_functions k

You can create a new plugin and have your functions there so you don't need to worry about them being overwritten on upgrades. We already do this for some users and it works nice.

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

3 years 3 months ago
chawbs
Posts: 4
More
Topic Author
[Closed] Add timemodified to get_user_grades #3
Thank you :) Will get started on my plugin then!
Thanks
DJ
*thumbsup*

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

3 years 3 months ago
Antonio Durán
Posts: 7417
More
[Closed] Add timemodified to get_user_grades #4
You got lucky with the timing: we found a bug in Joomdle 1.2.2, so we had to release 1.2.3 with a fix.
We also added the timemodified param as you requested.

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

3 years 3 months ago
chawbs
Posts: 4
More
Topic Author
[Closed] Add timemodified to get_user_grades #5
Thanks so much - just released my plugin into live environment last night too.
Installed 1.2.3 on test server and all functions work without code changes - woot woot!
Thanks so much

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

3 years 3 months ago
Antonio Durán
Posts: 7417
More
[Closed] Add timemodified to get_user_grades #6
Great, thanks for the feedback.

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

3 years 3 months ago
chawbs
Posts: 4
More
Topic Author
[Closed] Add timemodified to get_user_grades #7
Just spotted a cosmetic error in moodle/auth/joomdle/auth.php which I realize I did without thinking...
Function "get_course_completion" does not initialize $i and throws an error in php7.1
Could not the code circa 5223 be changed to "$data[] = $e" to dispense with the $i problem?
-DJ

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

3 years 3 months ago
Antonio Durán
Posts: 7417
More
[Closed] Add timemodified to get_user_grades #8
Thanks for the bug report. I applied you change for next release, as $i is not really needed there.

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