File tree Expand file tree Collapse file tree 2 files changed +13
-6
lines changed
Expand file tree Collapse file tree 2 files changed +13
-6
lines changed Original file line number Diff line number Diff line change @@ -270,7 +270,7 @@ public function populate_recip_course_msg()
270270 // are added to the time of it being sent is within 1000s (plenty of time to send)
271271 // This msg recips can also be generated by viewing scheduled emails.
272272 $ diffy = time () - $ msgexists [0 ]->timemodified ;
273- error_log ("\n\nWhat is diffy: " . $ diffy );
273+ // error_log("\n\nWhat is diffy: ". $diffy);
274274 // This can get stale! Delete all recipients belonging to this
275275 // message and update with most current list.
276276 if ($ diffy > 1000 && count ($ recipientuserids ) > 0 ) {
Original file line number Diff line number Diff line change @@ -79,13 +79,20 @@ public function get_transformed_excluded_entity_ids() {
7979 */
8080 public function get_transformed_excluded () {
8181 $ excludes = "" ;
82- $ counter = count ($ this ->form_data ->excluded_entity_ids ) ?? 0 ;
83- for ($ c = 0 ; $ c < $ counter ; $ c ++) {
84- $ excludes .= $ this ->form_data ->excluded_entity_ids [$ c ];
85- if ($ c +1 < $ counter ) {
86- $ excludes .= ', ' ;
82+ // In the config/settings on the course level the instructor can use multiselect
83+ // instead of autocomplete which removes the excluded option in the form.
84+ // This check stops it from breaking.
85+ if (property_exists ($ this ->form_data , "excluded_entity_ids " )) {
86+
87+ $ counter = count ($ this ->form_data ->excluded_entity_ids ) ?? 0 ;
88+ for ($ c = 0 ; $ c < $ counter ; $ c ++) {
89+ $ excludes .= $ this ->form_data ->excluded_entity_ids [$ c ];
90+ if ($ c +1 < $ counter ) {
91+ $ excludes .= ', ' ;
92+ }
8793 }
8894 }
95+
8996 return $ excludes ;
9097 }
9198
You can’t perform that action at this time.
0 commit comments