Auto assign cohort (deprecated for local_cohortauto)
Maintained by
Dan Marsden, Catalyst IT
This Authentication plugin automatically assigns users into cohorts based on information in their user profile fields.
Comments
Comments are no longer open for new posts. Existing comments remain available to read.
require_once($CFG->dirroot.'/user/profile/lib.php');
at the vry beginning of auth/mcae/auth.php
and it works now!
I get the following error message:
Fatal error: Call to undefined function profile_load_data() in [...]/auth/mcae/auth.php on line 227
with moodle 2.2+ and the decaf theme.
A stated in the readme file, in moodle/themes/decaf/layout/general.php, I added the code <?php
global $SESSION, $USER;
if ($USER->id != 0) { // Only for autenticated users
$mcae = get_auth_plugin('mcae'); //Get mcae plugin
if (isset($SESSION->mcautoenrolled)) {
if (!$SESSION->mcautoenrolled) {
$mcae->user_authenticated_hook($USER,$USER->username,""); //Autoenrol if mcautoenrolled FALSE
}
} else {
$mcae->user_authenticated_hook($USER,$USER->username,""); //Autoenrol if mcautoenrolled NOT SET
}
}
?>
Please help!
I use user upload function to create or update user accounts and http://moodle.org/plugins/view.php?plugin=local_user_bulk_editor to create cohorts
Okay so i installed the plug in and it works great! Except that it only works after the second log in. I saw in the read me for us to insert a .php coding into the server to possibly fix this problem? We tried that and it did not work. Is there a specific place we have to put that coding in or do we just insert it anywhere?
also by anychance would you know how to edit the email confirmation message moodle sends when a new user registers via email?
Any help would be great thank you!
Tested on:
moodle 2.1.5+ (Build: 20120412)
moodle 2.2.2+ (Build: 20120412)
mcae 2012040219
server OS: win2003 server
apache: 2.2.15
php: 5.3.2
Debug msg: DEVELOPER
Show origin of languages strings: on
Show page information: on
Invalid get_string() identifier: 'pluginname' or component 'auth_mcae'. Perhaps you are missing $string['pluginname'] = ''; in /var/www/vhosts/s2learning.net/httpdocs/vans/lms/auth/mcae/lang/en/auth_mcae.php?
line 6386 of /lib/moodlelib.php: call to debugging()
line 6978 of /lib/moodlelib.php: call to core_string_manager->get_string()
line 99 of /admin/settings/plugins.php: call to get_string()
line 5933 of /lib/adminlib.php: call to require()
line 3015 of /lib/navigationlib.php: call to admin_get_root()
line 2923 of /lib/navigationlib.php: call to settings_navigation->load_administration_settings()
line 601 of /lib/pagelib.php: call to settings_navigation->initialise()
line 617 of /lib/pagelib.php: call to moodle_page->magic_get_settingsnav()
line 2679 of /lib/navigationlib.php: call to moodle_page->__get()
line 659 of /lib/pagelib.php: call to navbar->has_items()
line 4 of /theme/base/layout/general.php: call to moodle_page->has_navbar()
line 685 of /lib/outputrenderers.php: call to include()
line 637 of /lib/outputrenderers.php: call to core_renderer->render_page_layout()
line 62 of /backup/restore.php: call to core_renderer->header()
Invalid get_string() identifier: 'auth_cohorttoolmcae' or component 'auth_mcae'. Perhaps you are missing $string['auth_cohorttoolmcae'] = ''; in /var/www/vhosts/s2learning.net/httpdocs/vans/lms/auth/mcae/lang/en/auth_mcae.php?
line 6386 of /lib/moodlelib.php: call to debugging()
line 6978 of /lib/moodlelib.php: call to core_string_manager->get_string()
line 20 of /auth/mcae/settings.php: call to get_string()
line 105 of /admin/settings/plugins.php: call to include()
line 5933 of /lib/adminlib.php: call to require()
line 3015 of /lib/navigationlib.php: call to admin_get_root()
line 2923 of /lib/navigationlib.php: call to settings_navigation->load_administration_settings()
line 601 of /lib/pagelib.php: call to settings_navigation->initialise()
line 617 of /lib/pagelib.php: call to moodle_page->magic_get_settingsnav()
line 2679 of /lib/navigationlib.php: call to moodle_page->__get()
line 659 of /lib/pagelib.php: call to navbar->has_items()
line 4 of /theme/base/layout/general.php: call to moodle_page->has_navbar()
line 685 of /lib/outputrenderers.php: call to include()
line 637 of /lib/outputrenderers.php: call to core_renderer->render_page_layout()
line 62 of /backup/restore.php: call to core_renderer->header()
Invalid get_string() identifier: 'auth_cohortviewmcae' or component 'auth_mcae'. Perhaps you are missing $string['auth_cohortviewmcae'] = ''; in /var/www/vhosts/s2learning.net/httpdocs/vans/lms/auth/mcae/lang/en/auth_mcae.php?
line 6386 of /lib/moodlelib.php: call to debugging()
line 6978 of /lib/moodlelib.php: call to core_string_manager->get_string()
line 24 of /auth/mcae/settings.php: call to get_string()
line 105 of /admin/settings/plugins.php: call to include()
line 5933 of /lib/adminlib.php: call to require()
line 3015 of /lib/navigationlib.php: call to admin_get_root()
line 2923 of /lib/navigationlib.php: call to settings_navigation->load_administration_settings()
line 601 of /lib/pagelib.php: call to settings_navigation->initialise()
line 617 of /lib/pagelib.php: call to moodle_page->magic_get_settingsnav()
line 2679 of /lib/navigationlib.php: call to moodle_page->__get()
line 659 of /lib/pagelib.php: call to navbar->has_items()
line 4 of /theme/base/layout/general.php: call to moodle_page->has_navbar()
line 685 of /lib/outputrenderers.php: call to include()
line 637 of /lib/outputrenderers.php: call to core_renderer->render_page_layout()
line 62 of /backup/restore.php: call to core_renderer->header()