protected function get_submissionstatement($adminconfig, $instance, $context) {
        $submissionstatement = '';

        if (!($context instanceof context)) {
            return $submissionstatement;
        }

        // Single submission.
        if (!$instance->teamsubmission) {
            // Single submission statement is not empty.
            if (!empty($adminconfig->submissionstatement)) {
                // Format the submission statement before its sent. We turn off para because this is going within
                // a form element.
                $options = array(
                    'context' => $context,
                    'para'    => false
                );
                $submissionstatement = format_text($adminconfig->submissionstatement, FORMAT_MOODLE, $options);
            }
        } else { // Team submission.
            // One user can submit for the whole team.
            if (!empty($adminconfig->submissionstatementteamsubmission) && !$instance->requireallteammemberssubmit) {
                // Format the submission statement before its sent. We turn off para because this is going within
                // a form element.
                $options = array(
                    'context' => $context,
                    'para'    => false
                );
                $submissionstatement = format_text($adminconfig->submissionstatementteamsubmission,
                    FORMAT_MOODLE, $options);
            } else if (!empty($adminconfig->submissionstatementteamsubmissionallsubmit) &&
                $instance->requireallteammemberssubmit) {
                // All team members must submit.
                // Format the submission statement before its sent. We turn off para because this is going within
                // a form element.
                $options = array(
                    'context' => $context,
                    'para'    => false
                );
                $submissionstatement = format_text($adminconfig->submissionstatementteamsubmissionallsubmit,
                    FORMAT_MOODLE, $options);
            }
        }

        return $submissionstatement;
    }
protected function get_submissionstatement($adminconfig, $instance, $context) {
        $submissionstatement = '';

        if (!($context instanceof context)) {
            return $submissionstatement;
        }

        // Single submission.
        if (!$instance->teamsubmission) {
            // Single submission statement is not empty.
            if (!empty($adminconfig->submissionstatement)) {
                // Format the submission statement before its sent. We turn off para because this is going within
                // a form element.
                $options = array(
                    'context' => $context,
                    'para'    => false
                );
                $submissionstatement = format_text($adminconfig->submissionstatement, FORMAT_MOODLE, $options);
            }
        } else { // Team submission.
            // One user can submit for the whole team.
            if (!empty($adminconfig->submissionstatementteamsubmission) && !$instance->requireallteammemberssubmit) {
                // Format the submission statement before its sent. We turn off para because this is going within
                // a form element.
                $options = array(
                    'context' => $context,
                    'para'    => false
                );
                $submissionstatement = format_text($adminconfig->submissionstatementteamsubmission,
                    FORMAT_MOODLE, $options);
            } else if (!empty($adminconfig->submissionstatementteamsubmissionallsubmit) &&
                $instance->requireallteammemberssubmit) {
                // All team members must submit.
                // Format the submission statement before its sent. We turn off para because this is going within
                // a form element.
                $options = array(
                    'context' => $context,
                    'para'    => false
                );
                $submissionstatement = format_text($adminconfig->submissionstatementteamsubmissionallsubmit,
                    FORMAT_MOODLE, $options);
            }
        }

        return $submissionstatement;
    }
protected function get_submissionstatement ( $ adminconfig , $ instance , $ context ) { $ submissionstatement = '' ; if ( ! ( $ context instanceof context ) ) { return $ submissionstatement ; } // Single submission. if ( ! $ instance -> teamsubmission ) { // Single submission statement is not empty. if ( ! empty ( $ adminconfig -> submissionstatement ) ) { // Format the submission statement before its sent. We turn off para because this is going within // a form element. $ options = array ( 'context' => $ context , 'para' => false ) ; $ submissionstatement = format_text ( $ adminconfig -> submissionstatement , FORMAT_MOODLE , $ options ) ; } } else { // Team submission. // One user can submit for the whole team. if ( ! empty ( $ adminconfig -> submissionstatementteamsubmission ) && ! $ instance -> requireallteammemberssubmit ) { // Format the submission statement before its sent. We turn off para because this is going within // a form element. $ options = array ( 'context' => $ context , 'para' => false ) ; $ submissionstatement = format_text ( $ adminconfig -> submissionstatementteamsubmission , FORMAT_MOODLE , $ options ) ; } else if ( ! empty ( $ adminconfig -> submissionstatementteamsubmissionallsubmit ) && $ instance -> requireallteammemberssubmit ) { // All team members must submit. // Format the submission statement before its sent. We turn off para because this is going within // a form element. $ options = array ( 'context' => $ context , 'para' => false ) ; $ submissionstatement = format_text ( $ adminconfig -> submissionstatementteamsubmissionallsubmit , FORMAT_MOODLE , $ options ) ; } } return $ submissionstatement ; }
Get the correct submission statement depending on single submisison, team submission or team submission
where all team memebers must submit.

@param array $adminconfig
@param assign $instance
@param context $context

@return string
Get the correct submission statement depending on single submisison team submission or team submission where all team memebers must submit .