public static function form_policydoc_update_overwrite(stdClass $form) {

        $form = clone($form);
        unset($form->timecreated);

        $summaryfieldoptions = static::policy_summary_field_options();
        $form = file_postupdate_standard_editor($form, 'summary', $summaryfieldoptions, $summaryfieldoptions['context'],
            'tool_policy', 'policydocumentsummary', $form->id);
        unset($form->summary_editor);
        unset($form->summarytrust);

        $contentfieldoptions = static::policy_content_field_options();
        $form = file_postupdate_standard_editor($form, 'content', $contentfieldoptions, $contentfieldoptions['context'],
            'tool_policy', 'policydocumentcontent', $form->id);
        unset($form->content_editor);
        unset($form->contenttrust);

        unset($form->status);
        unset($form->save);
        unset($form->saveasdraft);
        unset($form->minorchange);

        $policyversion = new policy_version($form->id, $form);
        $policyversion->update();

        return $policyversion;
    }