Skip to content
Browse files

Merge branch 'w41_MDL-28980_m24_expirywarning' of git://github.com/sk…

…odak/moodle
  • Loading branch information...
2 parents 05c301a + 9f4a3c7 commit 566682e8e5495fb97fa9a27bb9d66c4d84e5d4a1 @stronk7 stronk7 committed Oct 10, 2012
Showing with 9 additions and 2 deletions.
  1. +9 −2 enrol/manual/lib.php
View
11 enrol/manual/lib.php
@@ -150,12 +150,19 @@ public function get_newinstance_link($courseid) {
* @return int id of new instance, null if can not be created
*/
public function add_default_instance($course) {
+ $expirynotify = $this->get_config('expirynotify', 0);
+ if ($expirynotify == 2) {
+ $expirynotify = 1;
+ $notifyall = 1;
+ } else {
+ $notifyall = 0;
+ }
$fields = array(
'status' => $this->get_config('status'),
'roleid' => $this->get_config('roleid', 0),
'enrolperiod' => $this->get_config('enrolperiod', 0),
- 'expirynotify' => $this->get_config('expirynotify', 0),
- 'notifyall' => $this->get_config('notifyall', 0),
+ 'expirynotify' => $expirynotify,
+ 'notifyall' => $notifyall,
'expirythreshold' => $this->get_config('expirythreshold', 86400),
);
return $this->add_instance($course, $fields);

0 comments on commit 566682e

Please sign in to comment.
Something went wrong with that request. Please try again.