CourseObjectWebformFulfillment.php in Course 7.2
File
modules/course_webform/CourseObjectWebformFulfillment.php
View source
<?php
class CourseObjectWebformFulfillment extends CourseObjectNodeFulfillment {
function optionsDefinition() {
return array(
'sids' => array(),
);
}
function delete() {
parent::delete();
$co = $this
->getCourseObject();
$node = $co
->getNode();
if ($sids = $this
->getOption('sids')) {
module_load_include('inc', 'webform', 'includes/webform.submissions');
foreach ($sids as $sid) {
if ($submission = webform_get_submission($node->nid, $sid)) {
webform_submission_delete($node, $submission);
}
}
}
}
}