Lessons event ref for event type 'lessonbuilder.read' is ambiguous
Description
relates to
Activity
Brian J. April 13, 2017 at 12:59 PM
Yeah we have had this in production for several months now. Thanks !
Neal Caidin April 13, 2017 at 12:57 PM
, do you have it in production yet? Either way, if you consider it "verified" locally , please click the Tested button to move this through the Jira workflow. Thanks!
Brian J. December 8, 2016 at 10:13 AMEdited
Yeah, without a tool that resolves event refs to actual objects, this is impossible to test without database access. We have this for our local institution flavour of Sakai, but not yet in production. However, it has gone through both DEV and QA testing with success. We will be including it in our next production release in a few weeks.
I would say this is a good fix to include in 11.3. I think it's up to the community to decide if we want to take our (Western's) word for it as already 'verified' locally; if not it will require database access for verification.
Neal Caidin December 8, 2016 at 10:06 AM
It doesn't look like the QA team can test this, if it requires looking in DB tables.
Do we want to get this into 11.3? How can we get this verified?
Thanks!
Brian J. October 13, 2016 at 8:18 AM
I'm not sure what constitutes a Page vs. a PageItem. I think if you created/used a Lessons instance with lots of pages and "items", you should see both types of events being fired into the DB table.
All lessons event refs are in the following format:
"/lessonbuilder/[page|item|comment]/<ID>"
The middle chunk of the ref determines what type of object the event is referring to; either a SimplePage, SimplePageItem, or SimplePageComment.
However, there is a problem in the code for the "lessonbuilder.read" events. These events can refer to either a SimplePage or a SimplePageItem, however the code always builds the event ref with the "/page/" identifier.
Due to the way IDs are used in Lessons, it becomes impossible to determine if this event refers to a SimplePage or a SimplePageItem, because the IDs for both are just incrementing integers. So you could very well have both a SimplePage and a SimplePageItem with the same ID.
There is code already in Lessons to determine the correct object the event refers to, but when building the event ref it always just sticks the "/page/" part in there regardless. This is a bug. It should be using the "/page/" OR "/item/" part depending on what object is being operated on. The solution is very simple, it's just two lines.