moodlepy icon indicating copy to clipboard operation
moodlepy copied to clipboard

[BUG 🐞] CourseCompletionStatus boolean properties cast issue

Open jbpenrath opened this issue 1 year ago • 0 comments

Describe the bug

core_completion_get_course_completion_status response has a cast issue. The class CourseCompletionStatus cast boolean values as integer that is weird.

To Reproduce Steps to reproduce the behavior:

  1. Call the 'core_completion_get_course_completion_status' ws function for a relevant courseid/userid couple
  2. See that completed and complete property returned by Moodle are boolean values but once passed to CourseCompletionStatus there are integers...

Expected behavior Boolean values returned by the Moodle API should be cast as bool by MoodlePy.

Desktop (please complete the following information):

  • Python Version 3.10
  • Version 0.24.1

jbpenrath avatar Jan 13 '25 15:01 jbpenrath