protected function render_workshop_final_grades(workshop_final_grades $grades) {

        $out = html_writer::start_tag('div', array('class' => 'finalgrades'));

        if (!empty($grades->submissiongrade)) {
            $cssclass = 'grade submissiongrade';
            if ($grades->submissiongrade->hidden) {
                $cssclass .= ' hiddengrade';
            }
            $out .= html_writer::tag(
                'div',
                html_writer::tag('div', get_string('submissiongrade', 'mod_workshop'), array('class' => 'gradetype')) .
                html_writer::tag('div', $grades->submissiongrade->str_long_grade, array('class' => 'gradevalue')),
                array('class' => $cssclass)
            );
        }

        if (!empty($grades->assessmentgrade)) {
            $cssclass = 'grade assessmentgrade';
            if ($grades->assessmentgrade->hidden) {
                $cssclass .= ' hiddengrade';
            }
            $out .= html_writer::tag(
                'div',
                html_writer::tag('div', get_string('gradinggrade', 'mod_workshop'), array('class' => 'gradetype')) .
                html_writer::tag('div', $grades->assessmentgrade->str_long_grade, array('class' => 'gradevalue')),
                array('class' => $cssclass)
            );
        }

        $out .= html_writer::end_tag('div');

        return $out;
    }
protected function render_workshop_final_grades(workshop_final_grades $grades) {

        $out = html_writer::start_tag('div', array('class' => 'finalgrades'));

        if (!empty($grades->submissiongrade)) {
            $cssclass = 'grade submissiongrade';
            if ($grades->submissiongrade->hidden) {
                $cssclass .= ' hiddengrade';
            }
            $out .= html_writer::tag(
                'div',
                html_writer::tag('div', get_string('submissiongrade', 'mod_workshop'), array('class' => 'gradetype')) .
                html_writer::tag('div', $grades->submissiongrade->str_long_grade, array('class' => 'gradevalue')),
                array('class' => $cssclass)
            );
        }

        if (!empty($grades->assessmentgrade)) {
            $cssclass = 'grade assessmentgrade';
            if ($grades->assessmentgrade->hidden) {
                $cssclass .= ' hiddengrade';
            }
            $out .= html_writer::tag(
                'div',
                html_writer::tag('div', get_string('gradinggrade', 'mod_workshop'), array('class' => 'gradetype')) .
                html_writer::tag('div', $grades->assessmentgrade->str_long_grade, array('class' => 'gradevalue')),
                array('class' => $cssclass)
            );
        }

        $out .= html_writer::end_tag('div');

        return $out;
    }
protected function render_workshop_final_grades ( workshop_final_grades $ grades ) { $ out = html_writer :: start_tag ( 'div' , array ( 'class' => 'finalgrades' ) ) ; if ( ! empty ( $ grades -> submissiongrade ) ) { $ cssclass = 'grade submissiongrade' ; if ( $ grades -> submissiongrade -> hidden ) { $ cssclass .= ' hiddengrade' ; } $ out .= html_writer :: tag ( 'div' , html_writer :: tag ( 'div' , get_string ( 'submissiongrade' , 'mod_workshop' ) , array ( 'class' => 'gradetype' ) ) . html_writer :: tag ( 'div' , $ grades -> submissiongrade -> str_long_grade , array ( 'class' => 'gradevalue' ) ) , array ( 'class' => $ cssclass ) ) ; } if ( ! empty ( $ grades -> assessmentgrade ) ) { $ cssclass = 'grade assessmentgrade' ; if ( $ grades -> assessmentgrade -> hidden ) { $ cssclass .= ' hiddengrade' ; } $ out .= html_writer :: tag ( 'div' , html_writer :: tag ( 'div' , get_string ( 'gradinggrade' , 'mod_workshop' ) , array ( 'class' => 'gradetype' ) ) . html_writer :: tag ( 'div' , $ grades -> assessmentgrade -> str_long_grade , array ( 'class' => 'gradevalue' ) ) , array ( 'class' => $ cssclass ) ) ; } $ out .= html_writer :: end_tag ( 'div' ) ; return $ out ; }
Renders the user's final grades

@param workshop_final_grades $grades with the info about grades in the gradebook
@return string HTML
Renders the user s final grades