function course_editing_start in Course 6
Same name and namespace in other branches
- 8.3 course.module \course_editing_start()
- 8.2 course.module \course_editing_start()
- 7.2 course.module \course_editing_start()
- 7 course.module \course_editing_start()
- 3.x course.module \course_editing_start()
Start an editing session for this course. Populate the session from persistent storage.
Parameters
2 calls to course_editing_start()
- course_object_options_form_submit in ./
course.module - Form submission handler for course_object_options_form().
- course_outline_overview_form in includes/
course.outline.inc - Form constructor for course outline form.
File
- ./
course.module, line 400 - course.module Core functionality for Courses.
Code
function course_editing_start($course) {
if (empty($_SESSION['course'][$course
->getNode()->nid]['editing'])) {
// Start editing cache from what we have in DB.
foreach ($course
->getObjects() as $courseObject) {
$_SESSION['course'][$course
->getNode()->nid]['editing'][$courseObject
->getId()] = $courseObject
->getOptions();
}
}
}