Beispiel #1
0
 /**
  * Delete a e-book from the course.
  *
  * @param Course $course
  * @param array $ebooks
  * @return bool
  */
 public function deleteEbooks(Course $course, array $ebooks)
 {
     foreach ($ebooks as $ebook_path) {
         \Resource::deleteCourseResource($course, $ebook_path);
         $ebook = $this->getEbook($course, $ebook_path);
         $this->repository->deleteEbook($ebook);
     }
     return true;
 }
Beispiel #2
0
 /**
  * Delete a image from the course.
  *
  * @param Course $course
  * @param array $images
  * @return bool
  */
 public function deleteImages(Course $course, array $images)
 {
     foreach ($images as $image_path) {
         \Resource::deleteCourseResource($course, $image_path);
         $image = $this->getImage($course, $image_path);
         $this->repository->deleteImage($image);
     }
     return true;
 }
Beispiel #3
0
 /**
  * Delete a video from the course.
  *
  * @param Course $course
  * @param array $videos
  * @return bool
  */
 public function deleteVideos(Course $course, array $videos)
 {
     foreach ($videos as $video_path) {
         \Resource::deleteCourseResource($course, $video_path);
         $video = $this->getVideo($course, $video_path);
         $this->repository->deleteVideo($video);
     }
     return true;
 }