|
Hi,
i've attached a new cron_course_pending.php which is called by an new crontab-entry e.g. twice a day. Possible crontab-entry: //0 6,18 * * * root wget -O /var/log/moodle-cron-course-pending http://localhost/moodle/admin/cron-course-pending.php Notice: every time you call this skript admin will receive a email if pending courses are available - so think about your cron-intervall you will call this script... Bertold oh. forgot about this, sorry :-O
this should definitely be in 1.9.x We did something similar, but not in cron.ph instead in course/request.php:
//Begin: Informing Admin notice(get_string('courserequestsuccess')); Thanks to Andre Krüger from Berlin who suggested this to me at moodle.de. We did something similar to this in course_request.php
but used the form: $admin = get_admin(); This way it is easy to reply to the requesting user and also link to /course/pending.php Tim and Petr, thanks a lot for fixing this issue
It's now noted in the documentation: http://docs.moodle.org/en/Course_request Thinking a bit more about this feature, it seems weird to enter a username for the user to be notified when new course requested.
Why not instead have email notification sent to all admins or have a field for entering an email address to which notification should be sent? Hi Tim,
In Administration > Security > Notifications the notifyloginfailures setting has 3 options - Nobody, Administrator and All administrators (I'm not sure how this is working since the implementation of roles!) Alternatively, perhaps we could have a notifycourserequest capability similar to mod/quiz:emailnotifysubmission. The attached patch (HEAD only) changes to admin setting to be a multi-select box with a list of all the users who have the 'moodle/site:approvecourse' capability, and lets you select any number of those users.
What do people think? And should we do something similar for notify login failures? I think the multi-select box for course notification is great! It's really clever that only relevant users are listed.
A Nobody option would be helpful for people like me who don't know about CTRL+click. Alternatively, the following text could be added to the lang string: Multiple users may be selected/deselected by holding down the Apple or Ctrl key whilst clicking on the users' names. +1 for a multi-select box for notifyloginfailures. I can't find any other admin settings which would benefit from the same treatment. I think there's a problem here... please see:
Tim, thanks a lot for further improving course request notifications. Everything seems to be working fine
notifyloginfailures improvement noted in the documentation:
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
mtrace("Checking course creation requests");
if ($pending = get_records("course_request")) { $admin = get_admin(); $subject = "Course requests pending approval"; $messagetext = "Course requests have been submitted for approval. Please check pending.html."; email_to_user($admin,$admin,$subject,$messagetext); }
mtrace("Course requests checked");