Enrolling on courses that dont exist.

Enrolling on courses that dont exist.

by Jalil K -
Number of replies: 10

Hi Guys,

Im using the enrolment plugin quite well thanks to those guys that have helped me understand how it works. At present the enrolment plugin allows courses to be created in one specific folder, i.e. Miscellaneous by default. Is there a plugin that will allow me to specify if a course does not exist, take the first three characters of the shortname in the remote courseid and then match those characters to the folder, and create a course and that rellevant folder.

Many thanks to all that reply.

Average of ratings: -
In reply to Jalil K

Re: Enrolling on courses that dont exist.

by Eric Merrill -
Picture of Core developers Picture of Moodle HQ Picture of Peer reviewers Picture of Plugin developers Picture of Testers
Which enrolment plugin are you using?

-Eric
In reply to Eric Merrill

Re: Enrolling on courses that dont exist.

by Jalil K -

Hi Eric,

I'm using the standard external database for enrolment that comes with Moodle.

J

In reply to Jalil K

Re: Enrolling on courses that dont exist.

by Iñaki Arenaza -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
The standard plugin doesn't, but we've developed a patch that does that, but instead of relaying on the shortname, it takes a column from the external db where you put the name of the category where a given course belongs to.

You can get the patch at:

http://orodruin.escomposlinux.org/~iarenaza/moodle/

I'll update the patches in the following hours so they apply cleanly to the lastests available versions of Moodle (they should do for versions 1.7.x and below).

Saludos. Iñaki.
In reply to Iñaki Arenaza

Re: Enrolling on courses that dont exist.

by Jalil K -

Thankyou Iñaki,

This is a feature I could definately put to good use. How do I patch my current files, ive never used a patch with a .diff extension.

Best regards,

Jalil

In reply to Jalil K

Re: Enrolling on courses that dont exist.

by Iñaki Arenaza -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
If you don't know how to apply patches (the .diff files), you can also use the fully updated files.

You can get them from the enrol_db_files_for_1x subdirectories that are available at the same place.

They have the patch already applied and you can simply overwrite the ones you have (well, I'd do a backup of them first, just in case you want to go back wink)

Saludos. Iñaki.
In reply to Iñaki Arenaza

Re: Enrolling on courses that dont exist.

by Jalil K -

Thank you Iñaki

I have searched the url you gave me (http://orodruin.escomposlinux.org/~iarenaza/moodle/) for the patched up versions of moodle but couldn't locate them.

ANyways thanks to your other post on how to patch I have managed to patch my version of moodle (v1.8.1 stable). I did encounter some errors, which I have submitted a screenshot of. Do you know how I can rectify this.

Many Thanks

JalilK

Attachment patch.gif
In reply to Jalil K

Re: Enrolling on courses that dont exist.

by Jalil K -

Hi Iñaki,

I have managed to get the patch to work with Moodle 1.8 I believe.

Many Thanks

In reply to Iñaki Arenaza

Re: Enrolling on courses that dont exist.

by Jalil K -

Hi Iñaki,

Any chance you can update this module for the latest 1.8.2 build please. I believe thats the build we use, and cant apply the 1.8.diff to it.

Many Thanks

JalilK

In reply to Jalil K

Re: Enrolling on courses that dont exist.

by Iñaki Arenaza -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
The patch available at http://orodruin.escomposlinux.org/~iarenaza/moodle/enrol_db_patch_for_18/
applies cleanly to the latest 1.8.2+ build as of today (I have tried both with the download package and the CVS checkout).

If you have any problem, just tell me the version number of your build (the numbers inside version.php at the top Moodle directory).

Saludos. Iñaki.
In reply to Iñaki Arenaza

Re: Enrolling on courses that dont exist.

by Jalil K -

Thankyou,

Yes you aer right it seems ot work with the latest build!

Happy Moodleing!