public function user_enrolments_and_actions($enrolments) {
        $output = '';
        foreach ($enrolments as $ue) {
            $enrolmentoutput = $ue['text'].' '.$ue['period'];
            if ($ue['dimmed']) {
                $enrolmentoutput = html_writer::tag('span', $enrolmentoutput, array('class'=>'dimmed_text'));
            } else {
                $enrolmentoutput = html_writer::tag('span', $enrolmentoutput);
            }
            foreach ($ue['actions'] as $action) {
                $enrolmentoutput .= $this->render($action);
            }
            $output .= html_writer::tag('div', $enrolmentoutput, array('class'=>'enrolment'));
        }
        return $output;
    }
public function user_enrolments_and_actions($enrolments) {
        $output = '';
        foreach ($enrolments as $ue) {
            $enrolmentoutput = $ue['text'].' '.$ue['period'];
            if ($ue['dimmed']) {
                $enrolmentoutput = html_writer::tag('span', $enrolmentoutput, array('class'=>'dimmed_text'));
            } else {
                $enrolmentoutput = html_writer::tag('span', $enrolmentoutput);
            }
            foreach ($ue['actions'] as $action) {
                $enrolmentoutput .= $this->render($action);
            }
            $output .= html_writer::tag('div', $enrolmentoutput, array('class'=>'enrolment'));
        }
        return $output;
    }
public function user_enrolments_and_actions ( $ enrolments ) { $ output = '' ; foreach ( $ enrolments as $ ue ) { $ enrolmentoutput = $ ue [ 'text' ] . ' ' . $ ue [ 'period' ] ; if ( $ ue [ 'dimmed' ] ) { $ enrolmentoutput = html_writer :: tag ( 'span' , $ enrolmentoutput , array ( 'class' => 'dimmed_text' ) ) ; } else { $ enrolmentoutput = html_writer :: tag ( 'span' , $ enrolmentoutput ) ; } foreach ( $ ue [ 'actions' ] as $ action ) { $ enrolmentoutput .= $ this -> render ( $ action ) ; } $ output .= html_writer :: tag ( 'div' , $ enrolmentoutput , array ( 'class' => 'enrolment' ) ) ; } return $ output ; }
Generates the HTML for the given enrolments + available actions

@param int $userid
@param array $enrolments
@param moodle_url $pageurl
@return string
Generates the HTML for the given enrolments + available actions