protected function print_field($name, $caption, $field, $helpicon = null) {
        global $OUTPUT;
        // Attempt to generate HTML like formslib.
        echo '<div class="fitem row form-group">';
        echo '<div class="fitemtitle col-md-3">';
        if ($name) {
            echo '<label for="' . $name . '">';
        }
        echo $caption;
        if ($name) {
            echo "</label>\n";
        }
        if ($helpicon) {
            echo '<span class="pull-xs-right text-nowrap">'.$helpicon.'</span>';
        }
        echo '</div>';
        if (isset($this->errors[$name])) {
            $extraclass = ' error';
        } else {
            $extraclass = '';
        }
        echo '<div class="felement col-md-9 form-inline' . $extraclass . '">';
        echo $field;
        if (isset($this->errors[$name])) {
            echo $OUTPUT->error_text($this->errors[$name]);
        }
        echo '</div>';
        echo '</div>';
    }
protected function print_field($name, $caption, $field, $helpicon = null) {
        global $OUTPUT;
        // Attempt to generate HTML like formslib.
        echo '<div class="fitem row form-group">';
        echo '<div class="fitemtitle col-md-3">';
        if ($name) {
            echo '<label for="' . $name . '">';
        }
        echo $caption;
        if ($name) {
            echo "</label>\n";
        }
        if ($helpicon) {
            echo '<span class="pull-xs-right text-nowrap">'.$helpicon.'</span>';
        }
        echo '</div>';
        if (isset($this->errors[$name])) {
            $extraclass = ' error';
        } else {
            $extraclass = '';
        }
        echo '<div class="felement col-md-9 form-inline' . $extraclass . '">';
        echo $field;
        if (isset($this->errors[$name])) {
            echo $OUTPUT->error_text($this->errors[$name]);
        }
        echo '</div>';
        echo '</div>';
    }
protected function print_field ( $ name , $ caption , $ field , $ helpicon = null ) { global $ OUTPUT ; // Attempt to generate HTML like formslib. echo '<div class="fitem row form-group">' ; echo '<div class="fitemtitle col-md-3">' ; if ( $ name ) { echo '<label for="' . $ name . '">' ; } echo $ caption ; if ( $ name ) { echo "</label>\n" ; } if ( $ helpicon ) { echo '<span class="pull-xs-right text-nowrap">' . $ helpicon . '</span>' ; } echo '</div>' ; if ( isset ( $ this -> errors [ $ name ] ) ) { $ extraclass = ' error' ; } else { $ extraclass = '' ; } echo '<div class="felement col-md-9 form-inline' . $ extraclass . '">' ; echo $ field ; if ( isset ( $ this -> errors [ $ name ] ) ) { echo $ OUTPUT -> error_text ( $ this -> errors [ $ name ] ) ; } echo '</div>' ; echo '</div>' ; }
Print labels, fields and help icon on role administration page.

@param string $name The field name.
@param string $caption The field caption.
@param string $field The field type.
@param null|string $helpicon The help icon content.
Print labels fields and help icon on role administration page .