Ignore:
Timestamp:
May 2, 2016, 12:09:23 PM (3 years ago)
Author:
jrpelegrina
Message:

Updated to moodle 3.0.3

File:
1 edited

Legend:

Unmodified
Added
Removed
  • moodle/trunk/fuentes/availability/renderer.php

    r136 r1331  
    4141     * This function will not be called unless there are at least two messages.
    4242     *
    43      * @param bool $root True if this is a root-level list for an activity
    44      * @param bool $andoperator True if the messages are being combined as AND
    45      * @param bool $roothidden True if the root level should use 'hidden' message
    46      * @param array $messages Messages to render
     43     * @param core_availability_multiple_messages $renderable Multiple messages
    4744     * @return string Combined HTML
    4845     */
    49     public function multiple_messages($root, $andoperator, $roothidden, array $messages) {
     46    public function render_core_availability_multiple_messages(
     47            core_availability_multiple_messages $renderable) {
    5048        // Get initial message.
    51         $out = get_string('list_' . ($root ? 'root_' : '') .
    52                 ($andoperator ? 'and' : 'or') . ($roothidden ? '_hidden' : ''),
     49        $out = get_string('list_' . ($renderable->root ? 'root_' : '') .
     50                ($renderable->andoperator ? 'and' : 'or') . ($renderable->treehidden ? '_hidden' : ''),
    5351                'availability');
    5452
    5553        // Make the list.
    5654        $out .= html_writer::start_tag('ul');
    57         foreach ($messages as $message) {
    58             $out .= html_writer::tag('li', $message);
     55        foreach ($renderable->items as $item) {
     56            if (is_string($item)) {
     57                $str = $item;
     58            } else {
     59                $str = $this->render($item);
     60            }
     61            $out .= html_writer::tag('li', $str);
    5962        }
    6063        $out .= html_writer::end_tag('ul');
Note: See TracChangeset for help on using the changeset viewer.