public function get_feedbackauthor_form($actionurl, stdclass $submission, $options=array()) {
        global $CFG;
        require_once(__DIR__ . '/feedbackauthor_form.php');

        $current = new stdclass();
        $current->submissionid          = $submission->id;
        $current->published             = $submission->published;
        $current->grade                 = $this->real_grade($submission->grade);
        $current->gradeover             = $this->real_grade($submission->gradeover);
        $current->feedbackauthor        = $submission->feedbackauthor;
        $current->feedbackauthorformat  = $submission->feedbackauthorformat;
        if (is_null($current->grade)) {
            $current->grade = get_string('nullgrade', 'workshop');
        }
        if (!isset($options['editable'])) {
            $editable = true;   // by default
        } else {
            $editable = (bool)$options['editable'];
        }

        // prepare wysiwyg editor
        $current = file_prepare_standard_editor($current, 'feedbackauthor', array());

        return new workshop_feedbackauthor_form($actionurl,
                array('workshop' => $this, 'current' => $current, 'editoropts' => array(), 'options' => $options),
                'post', '', null, $editable);
    }
public function get_feedbackauthor_form($actionurl, stdclass $submission, $options=array()) {
        global $CFG;
        require_once(__DIR__ . '/feedbackauthor_form.php');

        $current = new stdclass();
        $current->submissionid          = $submission->id;
        $current->published             = $submission->published;
        $current->grade                 = $this->real_grade($submission->grade);
        $current->gradeover             = $this->real_grade($submission->gradeover);
        $current->feedbackauthor        = $submission->feedbackauthor;
        $current->feedbackauthorformat  = $submission->feedbackauthorformat;
        if (is_null($current->grade)) {
            $current->grade = get_string('nullgrade', 'workshop');
        }
        if (!isset($options['editable'])) {
            $editable = true;   // by default
        } else {
            $editable = (bool)$options['editable'];
        }

        // prepare wysiwyg editor
        $current = file_prepare_standard_editor($current, 'feedbackauthor', array());

        return new workshop_feedbackauthor_form($actionurl,
                array('workshop' => $this, 'current' => $current, 'editoropts' => array(), 'options' => $options),
                'post', '', null, $editable);
    }
public function get_feedbackauthor_form ( $ actionurl , stdclass $ submission , $ options = array ( ) ) { global $ CFG ; require_once ( __DIR__ . '/feedbackauthor_form.php' ) ; $ current = new stdclass ( ) ; $ current -> submissionid = $ submission -> id ; $ current -> published = $ submission -> published ; $ current -> grade = $ this -> real_grade ( $ submission -> grade ) ; $ current -> gradeover = $ this -> real_grade ( $ submission -> gradeover ) ; $ current -> feedbackauthor = $ submission -> feedbackauthor ; $ current -> feedbackauthorformat = $ submission -> feedbackauthorformat ; if ( is_null ( $ current -> grade ) ) { $ current -> grade = get_string ( 'nullgrade' , 'workshop' ) ; } if ( ! isset ( $ options [ 'editable' ] ) ) { $ editable = true ; // by default } else { $ editable = ( bool ) $ options [ 'editable' ] ; } // prepare wysiwyg editor $ current = file_prepare_standard_editor ( $ current , 'feedbackauthor' , array ( ) ) ; return new workshop_feedbackauthor_form ( $ actionurl , array ( 'workshop' => $ this , 'current' => $ current , 'editoropts' => array ( ) , 'options' => $ options ) , 'post' , '' , null , $ editable ) ; }
Returns the mform the teachers use to put a feedback for the author on their submission

@mixed moodle_url|null $actionurl
@param stdClass $submission
@param array $options editable
@return workshop_feedbackauthor_form
Returns the mform the teachers use to put a feedback for the author on their submission