| @@ 655-668 (lines=14) @@ | ||
| 652 | if ($sendTo['everyone']) { |
|
| 653 | ||
| 654 | // Delete all from group |
|
| 655 | if (isset($eventInfo['send_to']['groups']) && |
|
| 656 | !empty($eventInfo['send_to']['groups']) |
|
| 657 | ) { |
|
| 658 | foreach ($eventInfo['send_to']['groups'] as $group) { |
|
| 659 | api_item_property_delete( |
|
| 660 | $this->course, |
|
| 661 | TOOL_CALENDAR_EVENT, |
|
| 662 | $id, |
|
| 663 | 0, |
|
| 664 | $group, |
|
| 665 | $this->sessionId |
|
| 666 | ); |
|
| 667 | } |
|
| 668 | } |
|
| 669 | ||
| 670 | // Storing the selected users. |
|
| 671 | if (isset($eventInfo['send_to']['users']) && |
|
| @@ 671-684 (lines=14) @@ | ||
| 668 | } |
|
| 669 | ||
| 670 | // Storing the selected users. |
|
| 671 | if (isset($eventInfo['send_to']['users']) && |
|
| 672 | !empty($eventInfo['send_to']['users']) |
|
| 673 | ) { |
|
| 674 | foreach ($eventInfo['send_to']['users'] as $userId) { |
|
| 675 | api_item_property_delete( |
|
| 676 | $this->course, |
|
| 677 | TOOL_CALENDAR_EVENT, |
|
| 678 | $id, |
|
| 679 | $userId, |
|
| 680 | $groupId, |
|
| 681 | $this->sessionId |
|
| 682 | ); |
|
| 683 | } |
|
| 684 | } |
|
| 685 | ||
| 686 | // Add to everyone only. |
|
| 687 | api_item_property_update( |
|