The assignment has been deleted - remove the plugin specific data

@return bool
762128
public function delete_instance() {
        global $DB;
        $grades = $DB->get_records('assign_grades', array('assignment'=>$this->assignment->get_instance()->id), '', 'id');
        if ($grades) {
            list($gradeids, $params) = $DB->get_in_or_equal(array_keys($grades), SQL_PARAMS_NAMED);
            $DB->delete_records_select('assignfeedback_editpdf_annot', 'gradeid ' . $gradeids, $params);
            $DB->delete_records_select('assignfeedback_editpdf_cmnt', 'gradeid ' . $gradeids, $params);
        }
        return true;
    }
475378
protected function _reset()
    {
        if ($this->_sourceType !== self::TYPE_DIR && $this->_workingDir) {
            $source = new Folder($this->_workingDir);
            $source->delete();
        }

        $this->_addedOptions = [];
        $this->_workingDir = null;
        $this->_sourceType = null;
        $this->_plugin = [
            'name' => '',
            'packageName' => '',
            'type' => '',
            'composer' => [],
        ];

        Plugin::dropCache();
        $this->_detachListeners();

        return false;
    }
1181674
public function delete()
    {
        if ($this->exists())
        {
            $deletedLeft = $this->left->delete();
            $deletedRight = $this->right->delete();

            return $deletedLeft && $deletedRight;
        }

        return false;
    }
992949
public function clear()
    {
        $keys = self::$instance->keys($this->options['prefix'].'*');
        if ($keys) {
            self::$instance->del(...$keys);
        }

        return true;
    }
741174
public function clear(): bool
    {
        $pattern = $this->path . '/' . $this->prefix . '*' . $this->extension;

        foreach (glob($pattern) as $file) {
            if (!is_dir($file)) {
                if (unlink($file) === false) {
                    return false;
                }
            }
        }

        return true;
    }
1114387
public function delete ()
	{
		$this->before_delete();

		$statement = 'DELETE FROM ' . static::$table_name;

		$pk = $this->primary_key_condition();

		$statement .= ' WHERE ' . $pk->statement;

		$result = $this->db->query($statement, $pk->values->getArrayCopy(), 'multi', null, false);

		$this->stored = true;
		$this->updated = false;

		$this->after_delete();

		return true;
	}
217674
public function remove()
    {
        if (!isset($this->_pkValue)) {
            return false;
        }
        if (self::delete($this->_pkValue) > 0) {
            $this->_pkValue = null;
            return true;
        }
        return false;
    }
1274475
public function delete()
	{
		$asset = Model::oneByName($this->getAssetName());

		if ($asset->get('id'))
		{
			if (!$asset->destroy())
			{
				return false;
			}
		}

		return true;
	}
1225347
public function deletePayPalOrder()
    {
        $result = false;
        if ($this->loadPayPalOrder()) {
            $this->getPayPalOrder()->delete();

            $result = $this->delete();
        }

        return $result;
    }
724224
public function delete()
    {
        if (is_resource($this->handle)) {
            fclose($this->handle);
            $this->handle = null;
        }
        if ($this->exists()) {
            return unlink($this->path);
        }

        return false;
    }
95749
public function clearCache()
	{
	    $path = $this->getCompiledPath();
	    if (is_dir($path)) {
	        return Dir::delete($path);
	    }
	    return true;
	}
120467
public function remove()
    {
        //if user selected not to update modules, skipping all updates
        if (\OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter("noButton")) {
            \OxidEsales\Eshop\Core\Registry::getSession()->setVariable("blSkipDeletedExtChecking", true);

            return;
        }

        $oModuleList = oxNew(\OxidEsales\Eshop\Core\Module\ModuleList::class);
        $oModuleList->cleanup();
    }
1190933
public function remove() : bool
    {
        $private = self::PRIVATE_ABSOLUTE_PATH . $this->destination . $this->privateFileName;
        $public = self::PUBLIC_ABSOLUTE_PATH . $this->destination;

        if (file_exists($private) || file_exists($public))
        {
            FileSystem::delete($private);
            FileSystem::delete($public);

            return TRUE;
        }

        return FALSE;
    }
34579
public function delete_definition() {
        global $DB;

        if (!$this->is_form_defined()) {
            // nothing to do
            return;
        }

        // firstly, let the plugin delete everything from their own tables
        $this->delete_plugin_definition();
        // then, delete all instances left
        $DB->delete_records('grading_instances', array('definitionid' => $this->definition->id));
        // finally, delete the main definition record
        $DB->delete_records('grading_definitions', array('id' => $this->definition->id));

        $this->definition = false;
    }
579205
public function isDelete() {
		if ( isset( $_SERVER['REQUEST_METHOD'] ) ) {

			if ( $_SERVER['REQUEST_METHOD'] == 'DELETE' || ( isset( $_POST['_METHOD'] ) && $_POST['_METHOD'] == 'DELETE' ) ) {
				parse_str( file_get_contents( "php://input" ), $vars );

				if ( isset( $vars['_METHOD'] ) ) {
					unset( $vars['_METHOD'] );
				}

				$GLOBALS['_DELETE'] = $_DELETE = $vars;

				return TRUE;
			} else {
				return FALSE;
			}

		} else {
			return FALSE;
		}

	}
967685
public function delete()
    {
        $this->getLogger()->info('Deleting scheduled event ID ' . $this->eventId);
        $this->doDelete('/schedule/' . $this->eventId);

        return true;
    }
535136
public function onRemovePlugin()
    {
        if ($pluginCode = post('code')) {
            PluginManager::instance()->deletePlugin($pluginCode);
            Flash::success(Lang::get('system::lang.plugins.remove_success'));
        }

        return Redirect::refresh();
    }