Context for a sub plugin - but I can't find my sub plug in

Context for a sub plugin - but I can't find my sub plug in

by Justin Wyllie -
Number of replies: 0

Hi

I have a sub -plug. I want to use the capabilities and permissions for my sub plugin.

This means I have to be able to do something like this:

$cm = get_course_module_from_id(subplugin, course_module_id, 0, false);

$context = get_context_instance(CONTEXT_MODULE,$cm->id);

However; I don't have a course module id  for my subplug in, only for its parent.

The sub plug was installed via the notifications tab but it does not appear in mdl_modules and thus its courses instances cannot appear in mdl_course_module. It does not appear in the Plug-ins ... Activity Modules ... Manage Activities list (but its parent does).

So - is it the case that a) my sub-plug in not full installed and it should appear in this list - and table or b) that this is expected, sub-plugins and not registered independently of their parents? If the latter, then it would seem to me you can't use get_context_instance on it?

 

 

Average of ratings: -