[FINER] Services.Api.MoodleApiService: Calling local_lbplanner_courses_update_course with body {courseid: 2, color: #fff9a826, shortname: AM, enabled: true}
[FINER] Services.Api.MoodleApiService: local_lbplanner_courses_update_course returned body {exception: invalid_parameter_exception, errorcode: invalidparameter, message: Invalid parameter value detected (enabled => Invalid parameter value detected (Invalid external api parameter: the value is "true", the server was expecting "bool" type): Invalid external api parameter: the value is "true", the server was expecting "bool" type), debuginfo: enabled => Invalid parameter value detected (Invalid external api parameter: the value is "true", the server was expecting "bool" type): Invalid external api parameter: the value is "true", the server was expecting "bool" type}
[WARNING] Services.Api.MoodleApiService: Error calling function local_lbplanner_courses_update_course ApiServiceException: Invalid parameter value detected (enabled => Invalid parameter value detected (Invalid external api parameter: the value is "true", the server was expecting "bool" type): Invalid external api parameter: the value is "true", the server was expecting "bool" type) (status code: 200) {exception: invalid_parameter_exception, errorcode: invalidparameter, message: Invalid parameter value detected (enabled => Invalid parameter value detected (Invalid external api parameter: the value is "true", the server was expecting "bool" type): Invalid external api parameter: the value is "true", the server was expecting "bool" type), debuginfo: enabled => Invalid parameter value detected (Invalid external api parameter: the value is "true", the server was expecting "bool" type): Invalid external api parameter: the value is "true", the server was expecting "bool" type}
[WARNING] Datasources.MoodleCourse.StdMoodleCourseDatasource: Failed to update course ApiServiceException: Invalid parameter value detected (enabled => Invalid parameter value detected (Invalid external api parameter: the value is "true", the server was expecting "bool" type): Invalid external api parameter: the value is "true", the server was expecting "bool" type) (status code: 200) {exception: invalid_parameter_exception, errorcode: invalidparameter, message: Invalid parameter value detected (enabled => Invalid parameter value detected (Invalid external api parameter: the value is "true", the server was expecting "bool" type): Invalid external api parameter: the value is "true", the server was expecting "bool" type), debuginfo: enabled => Invalid parameter value detected (Invalid external api parameter: the value is "true", the server was expecting "bool" type): Invalid external api parameter: the value is "true", the server was expecting "bool" type}
#0 MoodleApiService.callFunction (package:lb_planner/modules/auth/infra/services/moodle_api_service.dart:68:7)
<asynchronous suspension>
#1 StdMoodleCourseDatasource.updateCourse (package:lb_planner/modules/moodle/infra/datasources/std_moodle_course_datasource.dart:34:24)
<asynchronous suspension>
#2 MoodleCoursesRepository.updateCourse (package:lb_planner/modules/moodle/presentation/repositories/moodle_courses_repository.dart:33:5)
<asynchronous suspension>
#3 MoodleCoursesRepository.enableCourse (package:lb_planner/modules/moodle/presentation/repositories/moodle_courses_repository.dart:60:5)
<asynchronous suspension>
btw, if you're simply updating whether the course is enabled or not, you can leave out color and shortname, they're optional.
and then:
from what I can tell, the frontend is likely sending a string
"true"to the backend.btw, if you're simply updating whether the course is enabled or not, you can leave out color and shortname, they're optional.