Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 1441
Línea 26... Línea 26...
26
    $course = $DB->get_record('course', array('id'=>$cm->course), '*', MUST_EXIST);
26
    $course = $DB->get_record('course', array('id'=>$cm->course), '*', MUST_EXIST);
27
    require_course_login($course, true, $cm);
27
    require_course_login($course, true, $cm);
28
    $entry->glossaryname = $glossary->name;
28
    $entry->glossaryname = $glossary->name;
29
    $entry->cmid = $cm->id;
29
    $entry->cmid = $cm->id;
30
    $entry->courseid = $cm->course;
30
    $entry->courseid = $cm->course;
-
 
31
    $entry->concept = format_string($entry->concept, true, ["escape" => false]);
31
    $entries = array($entry);
32
    $entries = array($entry);
Línea 32... Línea 33...
32
 
33
 
33
} else if ($concept) {
34
} else if ($concept) {
34
    $course = $DB->get_record('course', array('id'=>$courseid), '*', MUST_EXIST);
35
    $course = $DB->get_record('course', array('id'=>$courseid), '*', MUST_EXIST);
Línea 70... Línea 71...
70
    $strglossaries = get_string('modulenameplural', 'glossary');
71
    $strglossaries = get_string('modulenameplural', 'glossary');
71
    $strsearch = get_string('search');
72
    $strsearch = get_string('search');
Línea 72... Línea 73...
72
 
73
 
73
    $PAGE->navbar->add($strglossaries);
74
    $PAGE->navbar->add($strglossaries);
-
 
75
    $PAGE->navbar->add($strsearch);
74
    $PAGE->navbar->add($strsearch);
76
 
-
 
77
    $PAGE->set_title(implode(\moodle_page::TITLE_SEPARATOR, [
-
 
78
        $strsearch,
-
 
79
        $strglossaries,
-
 
80
        $course->shortname,
75
    $PAGE->set_title(strip_tags("$course->shortname: $strglossaries $strsearch"));
81
    ]));
76
    $PAGE->set_heading($course->fullname);
82
    $PAGE->set_heading($course->fullname);
77
    echo $OUTPUT->header();
83
    echo $OUTPUT->header();
78
} else {
84
} else {
79
    echo $OUTPUT->header();    // Needs to be something here to allow linking back to the whole glossary
85
    echo $OUTPUT->header();    // Needs to be something here to allow linking back to the whole glossary
Línea 80... Línea 86...
80
}
86
}
81
 
87
 
82
if ($glossary) {
88
if (isset($glossary)) {
83
    $url = new moodle_url('view.php', ['id' => $cm->id]);
89
    $url = new moodle_url('view.php', ['id' => $cm->id]);
84
    $backlink = html_writer::link($url, get_string('back'), ['class' => 'btn btn-secondary']);
90
    $backlink = html_writer::link($url, get_string('back'), ['class' => 'btn btn-secondary']);