Via permanent activities
Maintained by
SVI eSolutions, Thomas Fauquignon
The Via Permanent Block can only be used if you have the Via activity module.
This block creates shortcuts to the Via permanent activities* that have been shared within the course.
*Permanent activities have no begining or end date, you may control its' access with the waiting room. See the Via guide for reference.
Comments
Comments are no longer open for new posts. Existing comments remain available to read.
Thanks guys for sharing the plugin with the community, and thanks Mike for the approval check. Especially thanks for the well caught issue with hard-coded table prefixes. From the discussion here I've understood it was the only blocker and should be fixed now, and the discussion on further improvements of the SQL queries can eventually continue in a separate issue (it seems to me the JOIN part is there to filter just the current user's activity modules).
You are cleared to land now, welcome to the Plugins directory.
I apologize, but I missed some other issues with the SQL statement. You should be using table aliases in the SQL, rather than full names with the "mdl_" prefix. That prefix is optional and can things other than "mdl_" for sites.
Review this page - https://docs.moodle.org/dev/Data_manipulation_API
You want your SQL to be "SELECT cm.id, v.name FROM {via} v" instead of "SELECT cm.id, v.name FROM mdl_via v", etc.
You also added this to the SQL - "JOIN moodletest.mdl_via_participants vp ON vp.activityid = v.id". I'm not sure what this is intended to do, and seems to be referring to another database called "moodletest"?
In the language file, you have two definitions for 'pluginname'. One that says, 'Via permanent activities' and another that says 'Courses'. I believe you only want the first definition. You should fix that and re-release this block.
Other than that, the block seems find codewise and functionality wise. One improvement you may want to consider is that as written, it displays a list of all of the visible "Via" activities in a specific course. This could include activities that the current user cannot access, due to capability assignments or conditional completion rules. If they click them, they won't be able to access them if that is true. You may want to consider adding logic to only return "Via" activities that are fully available to the current user.
https://integration.moodle.org/job/Precheck%20remote%20branch/27869/artifact/work/smurf.html