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/calendar/renderer.php

    r136 r1331  
    3434
    3535    /**
    36      * Creates a basic export form
    37      *
    38      * @param bool $allowthisweek
    39      * @param bool $allownextweek
    40      * @param bool $allownextmonth
    41      * @param int $userid
    42      * @param string $authtoken
    43      * @return string
    44      */
    45     public function basic_export_form($allowthisweek, $allownextweek, $allownextmonth, $userid, $authtoken) {
    46         global $CFG;
    47 
    48         $output  = html_writer::tag('div', get_string('export', 'calendar'), array('class'=>'header'));
    49         $output .= html_writer::start_tag('fieldset');
    50         $output .= html_writer::tag('legend', get_string('commontasks', 'calendar'));
    51         $output .= html_writer::start_tag('form', array('action'=>new moodle_url('/calendar/export_execute.php'), 'method'=>'get'));
    52 
    53         $output .= html_writer::tag('div', get_string('iwanttoexport', 'calendar'));
    54 
    55         $output .= html_writer::start_tag('div', array('class'=>'indent'));
    56         $output .= html_writer::empty_tag('input', array('type'=>'radio', 'name'=>'preset_what', 'id'=>'pw_all', 'value'=>'all', 'checked'=>'checked'));
    57         $output .= html_writer::tag('label', get_string('eventsall', 'calendar'), array('for'=>'pw_all'));
    58         $output .= html_writer::empty_tag('br');
    59         $output .= html_writer::empty_tag('input', array('type'=>'radio', 'name'=>'preset_what', 'id'=>'pw_course', 'value'=>'courses'));
    60         $output .= html_writer::tag('label', get_string('eventsrelatedtocourses', 'calendar'), array('for'=>'pw_course'));
    61         $output .= html_writer::empty_tag('br');
    62         $output .= html_writer::end_tag('div');
    63 
    64         $output .= html_writer::tag('div', get_string('for', 'calendar').':');
    65 
    66         $output .= html_writer::start_tag('div', array('class'=>'indent'));
    67         if ($allowthisweek) {
    68             $output .= html_writer::empty_tag('input', array('type'=>'radio', 'name'=>'preset_time', 'id'=>'pt_wknow', 'value'=>'weeknow', 'checked'=>'checked'));
    69             $output .= html_writer::tag('label', get_string('weekthis', 'calendar'), array('for'=>'pt_wknow'));
    70             $output .= html_writer::empty_tag('br');
    71         }
    72         if ($allownextweek) {
    73             $output .= html_writer::empty_tag('input', array('type'=>'radio', 'name'=>'preset_time', 'id'=>'pt_wknext', 'value'=>'weeknext'));
    74             $output .= html_writer::tag('label', get_string('weeknext', 'calendar'), array('for'=>'pt_wknext'));
    75             $output .= html_writer::empty_tag('br');
    76         }
    77         $output .= html_writer::empty_tag('input', array('type'=>'radio', 'name'=>'preset_time', 'id'=>'pt_monnow', 'value'=>'monthnow'));
    78         $output .= html_writer::tag('label', get_string('monththis', 'calendar'), array('for'=>'pt_monnow'));
    79         $output .= html_writer::empty_tag('br');
    80         if ($allownextmonth) {
    81             $output .= html_writer::empty_tag('input', array('type'=>'radio', 'name'=>'preset_time', 'id'=>'pt_monnext', 'value'=>'monthnext'));
    82             $output .= html_writer::tag('label', get_string('monthnext', 'calendar'), array('for'=>'pt_monnext'));
    83             $output .= html_writer::empty_tag('br');
    84         }
    85         $output .= html_writer::empty_tag('input', array('type'=>'radio', 'name'=>'preset_time', 'id'=>'pt_recupc', 'value'=>'recentupcoming'));
    86         $output .= html_writer::tag('label', get_string('recentupcoming', 'calendar'), array('for'=>'pt_recupc'));
    87         $output .= html_writer::empty_tag('br');
    88 
    89         if ($CFG->calendar_customexport) {
    90             $a = new stdClass();
    91             $now = time();
    92             $time = $now - $CFG->calendar_exportlookback * DAYSECS;
    93             $a->timestart = userdate($time, get_string('strftimedatefullshort', 'langconfig'));
    94             $time = $now + $CFG->calendar_exportlookahead * DAYSECS;
    95             $a->timeend = userdate($time, get_string('strftimedatefullshort', 'langconfig'));
    96             $output .= html_writer::empty_tag('input', array('type' => 'radio', 'name' => 'preset_time', 'id' => 'pt_custom', 'value' => 'custom'));
    97             $output .= html_writer::tag('label', get_string('customexport', 'calendar', $a), array('for' => 'pt_custom'));
    98             $output .= html_writer::empty_tag('br');
    99         }
    100 
    101         $output .= html_writer::end_tag('div');
    102         $output .= html_writer::start_tag('div', array('class'=>'rightalign'));
    103         $output .= html_writer::empty_tag('input', array('type'=>'hidden', 'name'=>'cal_d', 'value'=>''));
    104         $output .= html_writer::empty_tag('input', array('type'=>'hidden', 'name'=>'cal_m', 'value'=>''));
    105         $output .= html_writer::empty_tag('input', array('type'=>'hidden', 'name'=>'cal_y', 'value'=>''));
    106         $output .= html_writer::empty_tag('input', array('type'=>'hidden', 'name'=>'userid', 'value'=>$userid));
    107         $output .= html_writer::empty_tag('input', array('type'=>'hidden', 'name'=>'authtoken', 'value'=>$authtoken));
    108 
    109         $output .= html_writer::empty_tag('input', array('type'=>'submit', 'name' => 'generateurl', 'id'=>'generateurl', 'value'=>get_string('generateurlbutton', 'calendar')));
    110         $output .= html_writer::empty_tag('input', array('type'=>'submit', 'value'=>get_string('exportbutton', 'calendar')));
    111 
    112         $output .= html_writer::end_tag('div');
    113 
    114         $output .= html_writer::end_tag('form');
    115         $output .= html_writer::end_tag('fieldset');
    116 
    117         $output .= html_writer::start_tag('div', array('id'=>'urlbox', 'style'=>'display:none;'));
    118         $output .= html_writer::tag('p', get_string('urlforical', 'calendar'));
    119         $output .= html_writer::tag('div', '', array('id'=>'url', 'style'=>'overflow:scroll;width:650px;'));
    120         $output .= html_writer::end_tag('div');
    121 
    122         return $output;
    123     }
    124 
    125     /**
    12636     * Starts the standard layout for the page
    12737     *
     
    267177        if (empty($events)) {
    268178            // There is nothing to display today.
    269             $output .= $this->output->heading(get_string('daywithnoevents', 'calendar'), 3);
     179            $output .= html_writer::span(get_string('daywithnoevents', 'calendar'), 'calendar-information calendar-no-results');
    270180        } else {
    271181            $output .= html_writer::start_tag('div', array('class' => 'eventlist'));
     
    285195            // Then, show a list of all events that just span this day
    286196            if (!empty($underway)) {
    287                 $output .= $this->output->heading(get_string('spanningevents', 'calendar'), 3);
     197                $output .= html_writer::span(get_string('spanningevents', 'calendar'),
     198                    'calendar-information calendar-span-multiple-days');
    288199                foreach ($underway as $event) {
    289200                    $event->time = calendar_format_event_time($event, time(), null, false, $calendar->timestamp_today());
     
    627538            $output .= html_writer::end_tag('div');
    628539        } else {
    629             $output .= $this->output->heading(get_string('noupcomingevents', 'calendar'));
     540            $output .= html_writer::span(get_string('noupcomingevents', 'calendar'), 'calendar-information calendar-no-results');
    630541        }
    631542
     
    702613        if (empty($subscriptions)) {
    703614            $cell = new html_table_cell(get_string('nocalendarsubscriptions', 'calendar'));
    704             $cell->colspan = 4;
     615            $cell->colspan = 5;
    705616            $table->data[] = new html_table_row(array($cell));
    706617        }
Note: See TracChangeset for help on using the changeset viewer.