Closed mdjnelson closed 1 year ago
@leonstr I have pushed a commit to fix number 4.
@leonstr I believe this is all fixed now, can you confirm? Thanks.
@mdjnelson Apologies for the delay in responding. I've had a test and see the following issues:
Tested with 7ee063e (MOODLE_401_STABLE) on Moodle 4.1.3+ (build: 20230526).
As a first go at fixing these I've added branch 564-401 commit 1941274.
Another issue: I don't like that every _pageupdated also has a _templateupdated, if there's one action then two events seems wrong. Having one _templateupdated + one or more _pageupdated would make sense. I'd need to do a bit more testing to see if the _templateupdated could be removed from template->save_page(), i.e. does a _templatecreated or _templateupdated definitely get triggered every time save_page() is called? I haven't tried to fix this.
Opened a new issue for this. Sorry if my posts were noisy.
Hi @leonstr, no problem at all. I am in the middle of moving country for a job and don't have time to work on this. Would you be able to? Cheers.
I'll try! Good luck with your move.
Thanks to @leonstr for pointing these out.
template_created
and atemplate_updated
event. The latter is a result ofadd_page()
triggering both apage_created
and atemplate_updated
. Having bothtemplate_created
andtemplate_updated
on creating a template doesn't make sense to me as 'create' is one action.template_updated
events. The second one is a result ofsave_page()
triggering both apage_updated
and atemplate_updated
. Again, two events -- this time the same event -- for one action feels like a bug.page_updated
is triggered for each page even though only one has been changed.element_*
andpage_*
events I thinkget_description()
should use 'the', not 'a'/'an', e.g. The user with id '...' updated the page with id '...', not The user with id '...' updated a page with id '...'. Trivial but the later reads wrong to me, and it seems to be what Moodle uses, e.g. for course events.I'll try to find time to see if I can patch these in which case I'll open an issue with a PR for you to review. For 1. and 2. it's not a case of simply removing the
template_created
andtemplate_updated
fromadd_page()
andsave_page()
, otherwise there'd be notemplate_updated
when you click + Add page.