openequella/moodle-mod_openEQUELLA

Missing required function equella_update_grades in lib.php

troywilliams opened this issue · 4 comments

Missing required function equella_update_grades in lib.php

Stacktrace:

You have declared one of equella_grade_item_update and equella_update_grades but not both. This will cause broken behaviour.
• line 1401 of /lib/gradelib.php: call to debugging()
• line 1367 of /lib/gradelib.php: call to grade_update_mod_grades()
• line 1121 of /lib/gradelib.php: call to grade_grab_course_grades()
• line 2006 of /lib/enrollib.php: call to grade_recover_history_grades()
• line 207 of /enrol/cohort/locallib.php: call to enrol_plugin->enrol_user()
• line 120 of /enrol/cohort/lib.php: call to enrol_cohort_sync()
• line 96 of /enrol/editinstance.php: call to enrol_cohort_plugin->add_instance()

Platform:

Moodle version = 2019052009.00 (v3.7.9)
Plugin version = 2019050800;

To Reproduce:

  1. Enable cohort sync enrolment method
  2. Create a system cohort
  3. Add students to cohort
  4. Create a course
  5. Add cohort sync enrolment method to course, choose cohort previously created

Heya @troywilliams

Thanks for raising the issue!

Just a quick check on the impact. Does it just result in stacktraces, or does it also impact your moodle and/or the oEQ Moodle Module from functioning?

Thank you.

I don't think the function has an impact on module functioning that I know of. This message only displays with the developer debugging turned on. There is no real information or indication to why this would cause broken behaviour.

If you leave this open I can work on the fix when I get a few minutes spare ;-) The fix looks straight forward based on having a quick at other modules implementation.

Cheers

Excellent, that'd be great thanks @troywilliams

(Just to check, have you signed the Apereo CLA? It's a requirement for use to accept code contributions.)

stale commented

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.