public static function get_submission($submissionid) {
        global $USER, $DB, $PAGE;

        $params = self::validate_parameters(self::get_submission_parameters(), array('submissionid' => $submissionid));
        $warnings = array();

        // Get and validate the submission and workshop.
        $submission = $DB->get_record('workshop_submissions', array('id' => $params['submissionid']), '*', MUST_EXIST);
        list($workshop, $course, $cm, $context) = self::validate_workshop($submission->workshopid);

        self::validate_submission($submission, $workshop);

        $submission = self::prepare_submission_for_external($submission, $workshop);

        $related = array('context' => $context);
        $exporter = new submission_exporter($submission, $related);
        return array(
            'submission' => $exporter->export($PAGE->get_renderer('core')),
            'warnings' => $warnings
        );
    }