You are here

function course_outline_delete_object in Course 6

Same name and namespace in other branches
  1. 7.2 course.module \course_outline_delete_object()
  2. 7 course.module \course_outline_delete_object()

Delete a course object.

Parameters

array $mixed: An array representing a course object (containing 'coid').

2 calls to course_outline_delete_object()
CourseObjectTestCase::testCourseObjectBasicCrud in tests/CourseObjectTestCase.test
Test basic save/load of CourseObjects.
course_outline_overview_form_submit in includes/course.outline.inc
Submit handler.

File

./course.module, line 2456
course.module Core functionality for Courses.

Code

function course_outline_delete_object($mixed) {
  if (is_object($mixed)) {
    $mixed = (array) $mixed;
  }
  $sql = "DELETE FROM {course_outline} WHERE coid = %d";
  db_query($sql, $mixed['coid']);
  $sql = "DELETE FROM {course_outline_fulfillment} WHERE coid = %d";
  db_query($sql, $mixed['coid']);
}