Proyectos de Subversion Moodle

Rev

Rev 1 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 1 Rev 1441
Línea 150... Línea 150...
150
     * Returns HTML to display a message
150
     * Returns HTML to display a message
151
     * @param string $message
151
     * @param string $message
152
     * @param single_button $button
152
     * @param single_button $button
153
     * @return string
153
     * @return string
154
     */
154
     */
155
    public function message($message, single_button $button = null) {
155
    public function message($message, ?single_button $button = null) {
156
        $output  = $this->output->box_start('generalbox boxaligncenter');
156
        $output  = $this->output->box_start('generalbox boxaligncenter');
157
        $output .= $message;
157
        $output .= $message;
158
        if ($button !== null) {
158
        if ($button !== null) {
159
            $output .= $this->output->box($this->output->render($button), 'lessonbutton standardbutton');
159
            $output .= $this->output->box($this->output->render($button), 'lessonbutton standardbutton');
160
        }
160
        }
Línea 615... Línea 615...
615
 
615
 
Línea 616... Línea 616...
616
        $output .= $this->box_end(); // End of Lesson button to Continue.
616
        $output .= $this->box_end(); // End of Lesson button to Continue.
617
 
617
 
618
        if ($data->reviewlesson !== false) {
618
        if ($data->reviewlesson !== false) {
619
            $output .= html_writer::link($data->reviewlesson, get_string('reviewlesson', 'lesson'),
619
            $output .= html_writer::link($data->reviewlesson, get_string('reviewlesson', 'lesson'),
620
                array('class' => 'centerpadded lessonbutton standardbutton pr-3'));
620
                array('class' => 'centerpadded lessonbutton standardbutton pe-3'));
621
        }
621
        }
622
        if ($data->modattemptsnoteacher !== false) {
622
        if ($data->modattemptsnoteacher !== false) {
Línea 627... Línea 627...
627
            $output .= $data->activitylink;
627
            $output .= $data->activitylink;
628
        }
628
        }
Línea 629... Línea 629...
629
 
629
 
630
        $url = new moodle_url('/course/view.php', array('id' => $course->id));
630
        $url = new moodle_url('/course/view.php', array('id' => $course->id));
631
        $output .= html_writer::link($url, get_string('returnto', 'lesson', format_string($course->fullname, true)),
631
        $output .= html_writer::link($url, get_string('returnto', 'lesson', format_string($course->fullname, true)),
Línea 632... Línea 632...
632
                array('class' => 'centerpadded lessonbutton standardbutton pr-3'));
632
                array('class' => 'centerpadded lessonbutton standardbutton pe-3'));
633
 
633
 
634
        if (has_capability('gradereport/user:view', context_course::instance($course->id))
634
        if (has_capability('gradereport/user:view', context_course::instance($course->id))
635
                && $course->showgrades && $lesson->grade != 0 && !$lesson->practice) {
635
                && $course->showgrades && $lesson->grade != 0 && !$lesson->practice) {
636
            $url = new moodle_url('/grade/index.php', array('id' => $course->id));
636
            $url = new moodle_url('/grade/index.php', array('id' => $course->id));
637
            $output .= html_writer::link($url, get_string('viewgrades', 'lesson'),
637
            $output .= html_writer::link($url, get_string('viewgrades', 'lesson'),
638
                array('class' => 'centerpadded lessonbutton standardbutton pr-3'));
638
                array('class' => 'centerpadded lessonbutton standardbutton pe-3'));
639
        }
639
        }
Línea 640... Línea 640...
640
        return $output;
640
        return $output;