-
Bug
-
Resolution: Fixed
-
Major
-
4.1.4, 4.3
-
MOODLE_401_STABLE, MOODLE_403_STABLE
-
MOODLE_403_STABLE
-
MDL-78855-master -
-
3
-
Team Alpha - Planning I3-2023, Team Alpha - Sprint 1 I3-2023
Partially regression from MDL-73839 we shouldn't use add_instance (i.e. creation). But update was possible even before that.
Steps to reproduce:
# Try to upload csv with enrol method not yet supported like lti. Smth like this:
shortname,fullname,category_idnumber,enrolment_1,enrolment_1_role
|
test,test,cat1,lti,teacher
|
- It will pass validation an exception will be thrown when creating an instance:
Problem existed before 73839 actually - it was not possible to create enrolment of type lti by using course update, but it was possible to update it with csv which is not consistent or documented behavior. So on 4.1 for example:
- Create a course test in category cat1
- Create LTI enrolment instance in it. Make sure lti instance is enabled
- Upload csv with this data:
shortname,fullname,category_idnumber,enrolment_1,enrolment_1_role,enrolment_1_disable
test,test,cat1,lti,teacher,1
- Go to course test
- LTI instance is now disabled since csv data override it
I think this shouldn't be possible. You either can create and update enrolment by csv or can't. Shouldn't be situation where you can only update or only create