Course Merge Helper

Maintained by Charles Fulton, Andrew Zito
This local module allows teachers to create a new course shell from existing courses using the Course Meta Link enrollment method.
Price option: Free

Supports Moodle 3.1-5.2 See all versions
Latest release: 5 years ago
Installations: 152
Downloads (last 90 days): 54

Frankenstyle name: local_course_merge
Local plugins

Comments

Comments are no longer open for new posts. Existing comments remain available to read.

Update:
Although I cannot insert a character with regular expressions, I managed to figure out that I can use that space between CRN and the number (e.g. CRN 65432) as part of the expression...
/^[^(]*\([CRN]{3}(\s\d{5})[\)]/
resulting in this:
MATH 1111 - Introduction to Statistics CRNs 60509 61398 61403
I'm content with that.
Good to know.
We rarely refer actual section numbers (e.g. 001,002,003... at our school). Instead we refer to 5-digit CRNs. So I'm grabbing the CRNs from the original course names and then using that as the section field so that I can include each CRN in the new name.
Only for the purpose of understanding...
In our example, the three original course NAMES are:
MATH 1111 - Introduction to Statistics (CRN 60509)
MATH 1111 - Introduction to Statistics (CRN 61398)
MATH 1111 - Introduction to Statistics (CRN 61403)
Which, with my workaround ends up building a new name of
MATH 1111 - Introduction to Statistics CRNs 605096139861403
That's why this has come up for me.
For now, I could just get the instructors to add their own delimiters.
Again, thanks for your very quick responses and help. 10 out 10 from me!
That's correct, that's not supported right now. At Lafayette the sections are numbered starting from 1, so we never got results that unreasonable, though it gets messy when there are a dozen lab sections. A delimiter is a good idea, subject to whatever limitations there are with that field in Moodle.
You are awesome, Charles. Thank you.
I've learned a lot about regular expressions, and I'm nearly at the point where I have the results I want for the new course name, but I have one more issue to resolve: Adding a delimiter between the [SECTIONS]. For example, I have 3 sections: 60509, 61398, and 61403. Right now, the result shows as 605096139861403 and I'd like it be something like 60509,61398,61403 or 60509.61398.61403 or 60509/61398/61403. I see no way of doing that, am I correct?
Hi Blair, you're welcome, and I'm glad you got to the bottom of the issue. I've updated the plugin README based on your experience.
Thank you, Charles.
Your comment got me to think the settings of the Course Meta Link and I found that the problem was that I was NOT syncing the Teacher role (enrol_meta | nosyncroleids). Once I included the Teacher in the sync, it worked as expected.
THANK YOU for taking the time to help me with this.
The specific capability check is for moodle/course:managegroups; I believe the context being checked here is actually the that of the "source" courses, and not the new shell. The plugin itself isn't doing the permissions check; it's being done by the enrol_meta core plugin.
Thank you for looking into this! Here it is. I have also tried all morning to track down where this capability might be blocking the user, but I haven't found anything.
-------------------------
Sorry, but you do not currently have permissions to do that (Manage groups).
More information about this error
Debug info:
Error code: nopermissions×Dismiss this notification
Stack trace:
line 870 of /lib/accesslib.php: required_capability_exception thrown
line 160 of /enrol/meta/lib.php: call to require_capability()
line 111 of /local/course_merge/classes/merge_course.php: call to enrol_meta_plugin->update_instance()
line 88 of /local/course_merge/classes/merge_course.php: call to local_course_merge\merge_course::create_groups()
line 73 of /local/course_merge/index.php: call to local_course_merge\merge_course::create_course()
Hi Blair,
Can you post the full error and stack trace (with debugging enabled)?
Charles
This plugin could be amazing for us, so I'm pretty excited. However, I cannot get it to work due to a permissions error that I cannot figure out. It tells the instructor that they don't have the capability to create groups. But they do, from everything I can see.
I have checked the site, as well as the category in which the shell is being created.
Hey Charles, many thanks. That does clarify things. In my case I was missing that I needed to include start and stop characters (/) and use parens to group each element for extraction. Working great for me now!
Hi Ben,
You're quite right; the settings page doesn't contain any real examples. I think I must have copy-pasted text from the course template plugin (which does). Anyway, I've created https://github.com/LafColITS/moodle-local_course_merge/wiki which does explain how the regex functionality works. Please let me know if you have any further questions.
Best,
Charles
Hi, apologies if this isn't the best place to post, I also asked this on the Moodle forums: https://moodle.org/mod/forum/discuss.php?d=396110#p1596966
My question is on how to use the Regex component to standardize the names of the merged courses. The readme.md says that there are examples in the settings page of the plugin but that does not seem to be the case for me after installing the plugin on a dev site.
Can anyone offer any pointers or point me to resources? Note I don't necessarily need help writing a regex, just need to understand how they are applied via this plugin. Many thanks!
That sounds like a permissions problem on your web server; it's not related to the plugin. See https://moodle.org/mod/forum/discuss.php?d=349465.
Hi! I'm having this error when I an trying to install the plugins.
Debugging output enabled
Validating local_course_merge ... Error
[OK] Name of the plugin to be installed [course_merge]
Help with Name of the plugin to be installed
[OK] Plugin version [2016122100]
[OK] Required Moodle version [2016052300]
[OK] Full component name [local_course_merge]
[OK] Declared maturity level [MATURITY_STABLE]
Help with Declared maturity level
[OK] Plugin release [v1.1.0]
[Debug] Found language file [local_course_merge]
[Error] Write access check [/webapps/apps/app1/public_html/moodle/local]
Installation aborted due to validation failure
Hope you can help me with this. Thank you.