1. course profiles by category (department) including pages to define:
- course settings including base/topic zero activities
- course blocks
- forum, glossary and wiki profiles
2. user profiles
I have modified Dan Stowell's IMS Enterprise enrolment plugin to work with these profiles, but could be made to work with any other enrolment/course creation method. The plugin has been created for Moodle 1.6 (pre-multi-enrol).
Here are some images:
I welcome all comments and suggestions.
Paolo
Re: Plugin to create user and course profiles by category
I don't have anything very fundamental to add, but here are some small "proofreading" points:
- After I've saved the data, I don't want to go back to the Moodle front page! I want to go back to the profiles config main page.
- There's a problem in admin/profiles/defaultcourses.php - on line 21 you use "short PHP tags" rather than long, i.e. <? instead of <?php - please avoid this since many people (including us!) turn off the short tags option, and as a result the PHP code is written to the page rather than executed!
- The trick of creating the tables the first time the form is submitted is nice and convenient. Not the way Moodle normally does it though! It seems fine in this context, but I wonder what the big cheeses will make of it.
- I strongly recommend using the <label> tag to associate form elements with their labels - it's important for accessibility. It's convenient too - allows you to click the text next to a checkbox to turn it on and off! Nice.
- You've created links dynamically by using $PHP_SELF, which works fine, but isn't Moodle coding style. It's preferable to use $CFG->wwwroot and add on the rest of the URL.
Re: Plugin to create user and course profiles by category
Thanks for your feedback. I have attached the modified files so that manual course creation references the course profile tables too. I agree with all your points and have made the suggested changes with the exception of the <label> tag. This needs to be added to the appropriate functions (print_checkbox, print_radiobuttons) of weblib.php. The changes made in the admin/profiles directory are attached too.
I am really excited about this because it is so easy and scalable. Big cheeses, get a whiff of this. It will be as easy to add the functions to the LDAP and External Database enrolment methods so they reference the course / user profiles (by category, of course) as it was to add them to manual course creation. If anyone wants me to do it, and is willing to test it for me, please ask - it won't take a moment. It would also be easy to tweak authentication methods or the addusers method to reference the user profile.
Paolo
p.s I think $PHP_SELF is deprecated anyway - should have been $_SERVER['PHP_SELF']
Re: Plugin to create user and course profiles by category
<td align="right"><?php print_string("chooseauthmethod","auth") ?>:</td>to
<td><?php
choose_from_menu ($auth_options, 'auth', $form->auth);
helpbutton('authchange', get_string('chooseauthmethod', 'auth'));
?>
</td>
<td align="right"><label for="auth"><?php print_string("chooseauthmethod","auth") ?>:</label></td>
<td><?php
choose_from_menu ($auth_options, 'auth', $form->auth);
helpbutton('authchange', get_string('chooseauthmethod', 'auth'));
?>
</td>
The example is from defaultusers.html.
It's very picky of me to go on about this - since a lot of Moodle forms don't currently do this yet! Just thought I would mention it, since it's going to have to happen to all forms eventually, and because it makes it easier to hit checkboxes...
Have you added the functionality to the manual course creation? Nice one - I'll try that out when I can.
Re: Plugin to create user and course profiles by category
Will have a look into this when I get time.
Paolo
Re: Plugin to create user and course profiles by category
Thanks a lot for this useful plugin.
I am New in moodle. (as a Technical Support)
I using moodle 1.5.3+ on windows server + MySQL
I have some Questions:
1. Would you please clarify me about this in Install.txt file?
"... If using MySQL the database it will be created the first time you
submit a profile form else look into the "/admin/profiles/db"
folder of the Moodle server directory to create you database ..."
What should i do exactly?
2. when i choose "Define course profile by category" and press "save changes" button i get this error message:
"Error could not insert course default record"
What is wrong with me?
Re: Plugin to create user and course profiles by category
Did you download the course_default_admin.zip posted on the Friday, 9 June 2006, 11:51 PM or the zip file on the first posting?
Re: Plugin to create user and course profiles by category
Thanks a lat for fast answer.
The result till now:
- I download the course_default_admin.zip and use it. but after that i get this message(see the attachment):
2. Which tables and How Should i create them?
Re: Plugin to create user and course profiles by category
What do you see if you create a new course or go to enrolment plugins at/admin/enrol.php?
my college will be installing a live version of moodle on 4 august and this plug-in would appear to be exactly what i have been looking for, we have a number of different schools (departments) who will all want their own identity on the college moodle.
i am currently able to test version 1.6 on my laptop although i do have a live test site it is only running 'fantastico 1.5.2'.
which files do i need to download to give me the most options and a fully working version of the plug-in. i could download everything on the page but i think that will probably end up confusing me more than i already am.
your help would be appreciated.
ian
Great! Like you, at Sussex Uni we think giving departments their own identity will get more buy-in to the software. This plugin won't work on versions before 1.6. Having said that I could easily tweak it so that it runs without the enrolment error. The only other problem I can think of would be that you have more options than are possible on Moodle 1.5.2, but this would have no adverse effect.
I have split up the files because it is likely that each instutution will have chosen their enrolment methods. It will only be these methods that will need to access the defaults this plugin creates. So before I can answer your question, which files you should download, I must know which methods will students and staff enrol/sign up and how will you create courses.
There are two things to mention:
1) In the latest version of Moodle 1.6+ /admin/index.php has been changed so attached is the new version. (It is basically a list of links to admin functions, which you can only get to through the navigation of the breadcrumb bar).
2) Currently, if no default profile has been set the course profile will be the internal Moodle default, but I think I should change that so it is the Miscellaneous category default.
many thanks for the prompt reply. the college is likely to enrol via ldap although that might all change so the other option would be e-mail based authentication.
what i was hoping to do was to run the windows version of v1.6 (with xampp) on my laptop and then export the course templates to the college moodle on demand.
alternatively - actually thinking about it there probably is no alternative other than to run the plug in on the college server but as moodle is going to be a new toy from the college point of view i don't want to burden them with too much and would like some element of surprise when demonstrating moodle capabilities.
using the hosted 1.5.2 version is really a non-runner, that site will be used as an information portal for the learning centres with all the college side of things run from the college moodle.
i tried this morning to run the plug in on my laptop but received an error - which i did not record but had something to do with line 127 in moodle admin. but i'm not worried, i'll try again.
You will need to download both zip files for creating user and course default tables user_admin_default.zip and course_default_admin.zip
There are two ways Moodle may run with LDAP. The first is simply for authentication - making sure the person is associated with institution. The second is enrolment where ldap will create the course and add the students on to it.
Download /auth/ldap/lib.php if you are using the first - we use this with IMS Enterprise enrolment and it is tested
Download /auth/ldap/lib.php and /enrol/ldap/enrol.php if you are using the second - we don't use this and cannot test it
I am not sure if you are going to test either method on your local machine unless it is connected to the LDAP server.
If you are using the email-based authentication system I think this file will suffice: /user/edit.php
And you will probably be manually creating courses so download: courseedit.zip
Manual course creation removes the urgent need for a default, but there are advantages nevertheless.
many thanks for this.
i have downloaded all the files but will not as you surmised be using the ldap stuff just yet.
could i trouble you just one more time and ask if there is an idiots guide to installation.
many thanks
ian
Once installed:
1. Follow links to setup user profiles from the administration pages.
2. Setup as desired
3. Follow links to setup course profiles from the administration pages.
4. Setup as desired.
5. Try adding users - hopefully, they will use the profile settings by default
6. Try setting up a course - hopefully, they will use the profile settings by default
Let me know how you get on.
Two of the mails I sent you yesterday have been returned. I don't think your mailbox is working properly.
Best wishes, Paolo
the college is in the process of moving from one building to another and consequently network traffic and mail is 'chaotic'. could you please resend them to ianlake@mynow.co.uk
many thanks
ian
Re: Plugin to create user and course profiles by category
Thanks a lot for your attention.
My Moodle version is 1.5.3 and as i understand this plug, just works with moodle 1.6, is it?
Re: Plugin to create user and course profiles by category
1) it does not recognise the enrolment classes that were introduced in 1.6, and
2) you have more options than are available on 1.5.3
I may be able to tweak it so it does work but what course and user creation methods and enrolment method do you use or do you intend to use with this?
Paolo
Re: Plugin to create user and course profiles by category
I get this error message when i want to create a new course:
Fatal error: Call to undefined function: update_restricted_mods() in e:\easyphp1-7\www\sandbox\course\edit.php on line 132
Re: Plugin to create user and course profiles by category
Re: Plugin to create user and course profiles by category
When ever you have time and do it, I'll thankful.
I'll be very glad to use this plugin for this term.
Re: Plugin to create user and course profiles by category
I think this looks really interesting and useful - thanks for posting it.
Seems to me that the features you've developed here, of being able to manage multiple default course profiles according to category, will be extremely useful for any medium/large institution wanting to adopt Moodle, as it will mean that different departments can define their own default course template etc.
V sensible too to allow the glossary to be based on category.
Cheers
Carol
Re: Plugin to create user and course profiles by category
yes , all modules are based on category, but warning - this doesn't mean glossaries now have the functionality to span a category - indeed, it would be cool, but for now glossaries are still either by site (global) or by course.
Hi Dan,
got you... will add <label> tags in profiles_plugin_0.3. Let me know if the manual course creation works for you.
Cheers,
Paolo
Re: Plugin to create user and course profiles by category
I have corrected the database table structure for $CFG->prefix.'_course_defaults' so you can create profile course blocks and I have modified it so if a form variable is submitted incorrectly and you are prompted to re-enter it, the form variables are not lost (and importantly you are modifying the same category profile).
Dan, I still haven't added the <label> tag as I have hardly been in the office, but I certainly will when I get time. The above changes seemed more vital for anyone finding this plugin of interest.
Paolo
Re: Plugin to create user and course profiles by category HOW to Do.
I found it difficult to know how to properly use profilespluggin 0.2 and IMS Enterprise enrolment plugin? (concept?)
Its really effective if you can instruct me to how to use profilespluggin 0.2 and IMS Enterprise enrolment plugin to categorise users and enroll them to particular courses?
Any help materials that are more instructive on these pluggins?
Thank you.
Re: Plugin to create user and course profiles by category HOW to Do.
Please vote for it if you want it included in the general release:
http://moodle.org/bugs/bug.php?op=show&bugid=5452
Paolo
Re: Plugin to create user and course profiles by category
I'm new to the whole moodle development world, but would it make sense to to use the adodb library to try to create these cross platform? Maybe not, but I thought I'd ask to get some suggestions.
Re: Plugin to create user and course profiles by category
I copied the database table creation method from the standard Moodle method. I should try to compare and contrast say mysql.php to postgres7.php in lib/db or any mod/ { module } / db and create an adapted progres7.php for the plugin. If you do, please, post it here and I will include it in the plugin.
I did think of using adodb and changing the database defaults, but the idea was not liked by the programming community for maintenance reasons.
Paolo
admin/profiles/defaultsusers.php (new file)
admin/profiles/defaultsusers.html (new file)
admin/users.php (updated file to link to user profiles)
admin/profiles/db/mysql.php (new file)
lang/en_utf8/profiles.php (new file)
For it to work you will have to also install one of the plugins attached to the postings below so the user creation mechanism you use references the user defaults table.
Still not modified to work in Postgres. If there's big demand I will make it so it does, but I shan't be able to test it.
Hopefully the zipped attachment won't have any extraneous mac files
Attached is the following file.
/user/edit.php (modified file)
It should be copied over the current edit.php in folder: user
Attached is the following file.
/admin/uploadusers.php (modified file)
It should be copied over the current uploadusers.php in folder: admin
Attached is the following file.
/auth/ldap/lib.php (modified file)
It should be copied over the current lib.php in folder: auth/ldap
admin/profiles/defaultcourses.php (new file)
admin/profiles/defaultcourses.html (new file)
admin/profiles/defaultblocks.php (new file)
admin/profiles/defaultblocks.html (new file)
admin/profiles/defaultforum.php (new file)
admin/profiles/defaultforum.html (new file)
admin/profiles/defaultglossary.php (new file)
admin/profiles/defaultglossary.html (new file)
admin/profiles/defaultwiki.php (new file)
admin/profiles/defaultwiki.html (new file)
admin/configure.php (updated file to link to user profiles)
admin/profiles/db/mysql.php (new file)
lang/en_utf8/profiles.php (new file)
lib/courseprofileslib.php (new file)
For it to work you will have to also install one of the plugins attached to the postings below so the user creation mechanism you use references the course defaults table.
Still not modified to work in Postgres. If there's big demand I will make it so it does, but I shan't be able to test it.
Hopefully the zipped attachment won't have any extraneous mac files
Attached to this post are:
course/edit.php (modifed file)
course/edit.html (modified file)
Both files to be copied into the course directory.
Attached to this post is:
enrol/ldap/enrol.php (modifed file)
File to be copied into the directory: enrol/ldap.
Attached to this post is:
enrol/imsenterprise/enrol.php (modifed file)
enrol/imsenterprise/config.html (modifed file)
Both files to be copied into the directory: enrol/imsenterprise.
This version of the imsenterprise enrolment has been altered quite a lot. One key change is that it will unenrol people who have been enrolled using imsenterprise, but are no longer enrolled according to the central records system.
For more information about changes to this enrolment method see our blog:
http://www.sussex.ac.uk/its/minted
Hi Paolo,
You plugin seems very interesting. Could you post a new zip with the latest files? I'm not sure which files to use now with alle these different files attachted to different postings in this thread...
Thanks in advance,
Marion
Are you using Moodle 1.6?
How do manage user and course creation and course enrolments?
Paolo
I'm using both: I have a current site that uses 1.5.3. and I'm building a new site for which I'd like to use 1.6 (if I can get all the custom modules I need to work with 1.6)
On my site are courses for medical doctors. They can do these courses to keep their knowledge up to date and gain study points ( every medical doctor needs e certain number of study points every year in order to keep their licence in the Netherlands ). I'd like all my members to have their own group, based on their medical specialism. My members enrol by email, my courses are made seperatly by hand. But they all have the same structure, the same length etc. So I thought: there should be a way to do this quicker and easier. I thought maybe your module could help me do this?
Marion
Sorry for my lateness in replying.
I think, perhaps, the best way to do what you want is to backup and restore one course with the desired structure on to your other courses, including only modules you want to copy
I am not quite sure what you mean here, but I believe you can maintain groups through courses with metacourses.
On testing recently, prompted in part by problems Ian Lake was having, I noticed some trivial, but annoying bugs in the latest course profiles zip I uploaded. Also I saw some more worrying differences in behaviours of the peer-to-peer activity profiles in 1.6.1 that needs more investigation.
The good thing is that on talking to Martin Dougiamos at the Moot he said he was keen on implementing this feature after Google Summer of Code project has finished enhancing the administration pages.
Hi, i wanna know if there is some changes to Work in a postgres database.
Thanks!
I'm trying to use it with 1.9, and not having a lot of luck. I don't want to replace my admin/index.php or course/edit.php because they're 1.6 versions....
Cheers!
Hello paolo,
How to create a contract and multiple organizations account in moodle and courses mapped with organization.
Also mapped the organization administrator -> to create a user for organization and mapped the external user with organization.
Please, give me suggestions.
Ashwani