In Moodle, the admin can configure a tool's access to the assignment and grading service to either none, grade sync only, or grade sync and column management. In the grade sync only case, the scope https://purl.imsglobal.org/spec/lti-ags/scope/lineitem is not available, but the demo app tries to write to it anyway.
Also I think the get_lineitems_page() method should be checking for the lineitem.readonly scope not the lineitem scope, but find_or_create_lineitem() should check for the lineitem scope.
In Moodle, the admin can configure a tool's access to the assignment and grading service to either none, grade sync only, or grade sync and column management. In the grade sync only case, the scope
https://purl.imsglobal.org/spec/lti-ags/scope/lineitem
is not available, but the demo app tries to write to it anyway.Also I think the get_lineitems_page() method should be checking for the lineitem.readonly scope not the lineitem scope, but find_or_create_lineitem() should check for the lineitem scope.