original_string: public function cleanup() {
          global $DB;
          $courseid = $this->controller->get_courseid();
          if ($this->is_temporary_course_created($courseid) && $course = $DB->get_record('course', array('id' => $courseid))) {
              $course->deletesource = 'restore';
              delete_course($course, false);
          }
      }
code: public function cleanup() {
          global $DB;
          $courseid = $this->controller->get_courseid();
          if ($this->is_temporary_course_created($courseid) && $course = $DB->get_record('course', array('id' => $courseid))) {
              $course->deletesource = 'restore';
              delete_course($course, false);
          }
      }
code_tokens: public function cleanup ( ) { global $ DB ; $ courseid = $ this -> controller -> get_courseid ( ) ; if ( $ this -> is_temporary_course_created ( $ courseid ) && $ course = $ DB -> get_record ( 'course' , array ( 'id' => $ courseid ) ) ) { $ course -> deletesource = 'restore' ; delete_course ( $ course , false ) ; } }
docstring: Delete course which is created by restore process
docstring_tokens: Delete course which is created by restore process