| @@ 389-400 (lines=12) @@ | ||
| 386 | } |
|
| 387 | ||
| 388 | // Add attachment. |
|
| 389 | if (isset($attachmentArray) && !empty($attachmentArray)) { |
|
| 390 | $counter = 0; |
|
| 391 | foreach ($attachmentArray as $attachmentItem) { |
|
| 392 | $this->addAttachment( |
|
| 393 | $id, |
|
| 394 | $attachmentItem, |
|
| 395 | $attachmentCommentList[$counter], |
|
| 396 | $this->course |
|
| 397 | ); |
|
| 398 | $counter++; |
|
| 399 | } |
|
| 400 | } |
|
| 401 | } |
|
| 402 | break; |
|
| 403 | case 'admin': |
|
| @@ 965-977 (lines=13) @@ | ||
| 962 | } |
|
| 963 | ||
| 964 | // Add attachment. |
|
| 965 | if (isset($attachmentArray) && !empty($attachmentArray)) { |
|
| 966 | $counter = 0; |
|
| 967 | foreach ($attachmentArray as $attachmentItem) { |
|
| 968 | $this->updateAttachment( |
|
| 969 | $attachmentItem['id'], |
|
| 970 | $id, |
|
| 971 | $attachmentItem, |
|
| 972 | $attachmentCommentList[$counter], |
|
| 973 | $this->course |
|
| 974 | ); |
|
| 975 | $counter++; |
|
| 976 | } |
|
| 977 | } |
|
| 978 | ||
| 979 | return true; |
|
| 980 | } else { |
|