File tree Expand file tree Collapse file tree 12 files changed +20
-12
lines changed Expand file tree Collapse file tree 12 files changed +20
-12
lines changed Original file line number Diff line number Diff line change @@ -365,7 +365,7 @@ public function get_count_of_courses_to_trigger_for_workflow($workflow) {
365
365
$ obj ->excluded = 0 ;
366
366
// Only use triggers with true sql to display the real amounts for the others (instead of always 0).
367
367
$ obj ->sql = trigger_manager::get_trigger_sqlresult ($ trigger );
368
- $ obj ->response = $ lib ->check_course ();
368
+ $ obj ->response = $ lib ->check_course (null , null );
369
369
if ($ obj ->sql != "false " ) {
370
370
if ($ obj ->response == trigger_response::exclude ()) {
371
371
// Get courses excluded amount.
Original file line number Diff line number Diff line change 99
99
$ string ['create_step ' ] = 'Step erstellen ' ;
100
100
$ string ['create_trigger ' ] = 'Trigger erstellen ' ;
101
101
$ string ['create_workflow_from_existing ' ] = 'Kopie von bestehendem Workflow erstellen ' ;
102
+ $ string ['customfieldsemesterdescription ' ] = 'Löst Kurse gemäß dem benutzerdefinierten Kursfeld \'semester \' aus. ' ;
102
103
$ string ['date ' ] = 'Fällligkeitsdatum ' ;
103
104
$ string ['deactivated ' ] = 'Deaktiviert ' ;
104
105
$ string ['deactivated_workflows_header ' ] = 'Inaktive ' ;
Original file line number Diff line number Diff line change 99
99
$ string ['create_step ' ] = 'Create step ' ;
100
100
$ string ['create_trigger ' ] = 'Create trigger ' ;
101
101
$ string ['create_workflow_from_existing ' ] = 'Copy new workflow from existing ' ;
102
+ $ string ['customfieldsemesterdescription ' ] = 'Trigger courses by the course custom field \'semester \'' ;
102
103
$ string ['date ' ] = 'Due date ' ;
103
104
$ string ['deactivated ' ] = 'Deactivated ' ;
104
105
$ string ['deactivated_workflows_header ' ] = 'Deactivated ' ;
Original file line number Diff line number Diff line change 79
79
if ($ trigger == 'sitecourse ' || $ trigger == 'delayedcourses ' ) {
80
80
$ uninstall = html_writer::span (' Depracated. Will be removed with version 5.0. ' , 'text-danger ' );
81
81
}
82
- $ settings ->add (new admin_setting_description ('lifecycletriggersetting_ ' .$ trigger ,
83
- get_string ('pluginname ' , 'lifecycletrigger_ ' . $ trigger ),
84
- get_string ('plugindescription ' , 'lifecycletrigger_ ' . $ trigger ).$ uninstall ));
82
+ if ($ trigger == 'customfieldsemester ' ) {
83
+ $ settings ->add (new admin_setting_description ('lifecycletriggersetting_ ' .$ trigger ,
84
+ get_string ('pluginname ' , 'lifecycletrigger_ ' . $ trigger ),
85
+ get_string ('customfieldsemesterdescription ' , 'tool_lifecycle ' )));
86
+ } else {
87
+ $ settings ->add (new admin_setting_description ('lifecycletriggersetting_ ' .$ trigger ,
88
+ get_string ('pluginname ' , 'lifecycletrigger_ ' . $ trigger ),
89
+ get_string ('plugindescription ' , 'lifecycletrigger_ ' . $ trigger ).$ uninstall ));
90
+ }
85
91
}
86
92
} else {
87
93
$ settings ->add (new admin_setting_heading ('adminsettings_notriggers ' ,
Original file line number Diff line number Diff line change @@ -60,7 +60,7 @@ public function get_course_recordset_where($triggerid) {
60
60
* @param int $triggerid DEPRECATED
61
61
* @return trigger_response
62
62
*/
63
- public function check_course ($ course = null , $ triggerid = null ) {
63
+ public function check_course ($ course , $ triggerid ) {
64
64
return trigger_response::trigger ();
65
65
}
66
66
Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ class categories extends base_automatic {
47
47
* @param int $triggerid DEPRECATED
48
48
* @return trigger_response
49
49
*/
50
- public function check_course ($ course = null , $ triggerid = null ) {
50
+ public function check_course ($ course , $ triggerid ) {
51
51
return trigger_response::trigger ();
52
52
}
53
53
Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ class delayedcourses extends base_automatic {
44
44
* @param int $triggerid DEPRECATED
45
45
* @return trigger_response
46
46
*/
47
- public function check_course ($ course = null , $ triggerid = null ) {
47
+ public function check_course ($ course , $ triggerid ) {
48
48
return trigger_response::exclude ();
49
49
}
50
50
Original file line number Diff line number Diff line change @@ -143,7 +143,7 @@ abstract class base_automatic extends base {
143
143
* @param int $triggerid DEPRECATED
144
144
* @return trigger_response
145
145
*/
146
- abstract public function check_course ($ course = null , $ triggerid = null );
146
+ abstract public function check_course ($ course , $ triggerid );
147
147
148
148
/**
149
149
* Defines if the trigger subplugin is started manually or automatically.
Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ class semindependent extends base_automatic {
45
45
* @param int $triggerid DEPRECATED
46
46
* @return trigger_response
47
47
*/
48
- public function check_course ($ course = null , $ triggerid = null ) {
48
+ public function check_course ($ course , $ triggerid ) {
49
49
return trigger_response::trigger ();
50
50
}
51
51
Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ class sitecourse extends base_automatic {
42
42
* @param int $triggerid DEPRECATED
43
43
* @return trigger_response
44
44
*/
45
- public function check_course ($ course = null , $ triggerid = null ) {
45
+ public function check_course ($ course , $ triggerid ) {
46
46
return trigger_response::trigger ();
47
47
}
48
48
Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ class specificdate extends base_automatic {
47
47
* @param int $triggerid DEPRECATED
48
48
* @return trigger_response
49
49
*/
50
- public function check_course ($ course = null , $ triggerid = null ) {
50
+ public function check_course ($ course , $ triggerid ) {
51
51
return trigger_response::triggertime ();
52
52
}
53
53
Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ class startdatedelay extends base_automatic {
45
45
* @param int $triggerid DEPRECATED
46
46
* @return trigger_response
47
47
*/
48
- public function check_course ($ course = null , $ triggerid = null ) {
48
+ public function check_course ($ course , $ triggerid ) {
49
49
return trigger_response::trigger ();
50
50
}
51
51
You can’t perform that action at this time.
0 commit comments