Example #1
0
/**
 * Output a standard heading block
 *
 * @deprecated
 * @param string $heading The text to write into the heading
 * @param string $class An additional Class Attr to use for the heading
 * @param bool $return If set to true output is returned rather than echoed, default false
 * @return string|void HTML String if return=true nothing otherwise
 */
function print_heading_block($heading, $class='', $return=false) {
    global $OUTPUT;
    debugging('print_heading_with_block() has been deprecated. Please change your code to use $OUTPUT->heading().');
    $output = $OUTPUT->heading($heading, 2, 'headingblock header ' . renderer_base::prepare_classes($class));
    if ($return) {
        return $output;
    } else {
        echo $output;
    }
}
Example #2
0
 /**
  * Outputs the opening section of a container.
  *
  * @param string $classes A space-separated list of CSS classes
  * @param string $id An optional ID
  * @return string the HTML to output.
  */
 public function container_start($classes = null, $id = null) {
     $this->opencontainers->push('container', html_writer::end_tag('div'));
     return html_writer::start_tag('div', array('id' => $id,
             'class' => renderer_base::prepare_classes($classes)));
 }
 /**
  * Generates and returns HTML code to display information about the rubric editor.
  *
  * @param string $message The message to print out
  * @param string $classes The classes for the returned div
  * @return string The HTML to output.
  */
 public function notification($message, $classes = 'notifyproblem')
 {
     return html_writer::tag('div', clean_text($message), array('class' => renderer_base::prepare_classes($classes)));
 }
Example #4
0
 /**
  * Renders a notification
  *
  * @param string $message
  * @param string $classes
  * @return string
  */
 public function notification($message, $classes = 'notifyproblem') {
     return html_writer::tag('div', clean_text($message), array('data-role'=>'none', 'data-icon'=>'alert', 'data-theme'=>'d', 'class' => renderer_base::prepare_classes($classes)));
 }
 public function notification($message, $classes = 'notifyproblem')
 {
     $classes = renderer_base::prepare_classes($classes);
     $classes = str_replace(array('notifyproblem', 'notifysuccess', 'notifymessage', 'redirectmessage'), array('alert alert-danger', 'alert alert-success', 'alert alert-info', 'alert alert-block alert-info'), $classes);
     return parent::notification($message, $classes);
 }