MDL-30975 Docs Documenting Logs API
[moodle.git] / report / log / locallib.php
CommitLineData
dfab77a2 1<?php
dfab77a2 2// This file is part of Moodle - http://moodle.org/
3//
4// Moodle is free software: you can redistribute it and/or modify
5// it under the terms of the GNU General Public License as published by
6// the Free Software Foundation, either version 3 of the License, or
7// (at your option) any later version.
8//
9// Moodle is distributed in the hope that it will be useful,
10// but WITHOUT ANY WARRANTY; without even the implied warranty of
11// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12// GNU General Public License for more details.
13//
14// You should have received a copy of the GNU General Public License
15// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
16
17/**
18 * This file contains functions used by the log reports
19 *
033af4b7
PS
20 * @package report
21 * @subpackage log
22 * @copyright 1999 onwards Martin Dougiamas (http://dougiamas.com)
23 * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
dfab77a2 24 */
0a935fb3 25
033af4b7
PS
26defined('MOODLE_INTERNAL') || die;
27
fad8e024
PS
28if (!defined('REPORT_LOG_MAX_DISPLAY')) {
29 define('REPORT_LOG_MAX_DISPLAY', 150); // days
30}
31
033af4b7
PS
32require_once(dirname(__FILE__).'/lib.php');
33
fad8e024
PS
34function report_log_print_graph($course, $userid, $type, $date=0) {
35 global $CFG;
36
37 if (empty($CFG->gdversion)) {
38 echo "(".get_string("gdneed").")";
39 } else {
40 echo '<img src="'.$CFG->wwwroot.'/report/log/graph.php?id='.$course->id.
41 '&amp;user='.$userid.'&amp;type='.$type.'&amp;date='.$date.'" alt="" />';
42 }
43}
44
45function report_log_print_mnet_selector_form($hostid, $course, $selecteduser=0, $selecteddate='today',
c215b32b 46 $modname="", $modid=0, $modaction='', $selectedgroup=-1, $showcourses=0, $showusers=0, $logformat='showashtml') {
47
928d4738 48 global $USER, $CFG, $SITE, $DB, $OUTPUT, $SESSION;
c215b32b 49 require_once $CFG->dirroot.'/mnet/peer.php';
aa6c1ced 50
c215b32b 51 $mnet_peer = new mnet_peer();
52 $mnet_peer->set_id($hostid);
53
29f83769 54 $sql = "SELECT DISTINCT course, hostid, coursename FROM {mnet_log}";
55 $courses = $DB->get_records_sql($sql);
c215b32b 56 $remotecoursecount = count($courses);
57
58 // first check to see if we can override showcourses and showusers
29f83769 59 $numcourses = $remotecoursecount + $DB->count_records('course');
c215b32b 60 if ($numcourses < COURSE_MAX_COURSES_PER_DROPDOWN && !$showcourses) {
61 $showcourses = 1;
62 }
aa6c1ced 63
09ee7b0d 64 $sitecontext = get_context_instance(CONTEXT_SYSTEM);
aa6c1ced 65
c215b32b 66 // Context for remote data is always SITE
67 // Groups for remote data are always OFF
68 if ($hostid == $CFG->mnet_localhost_id) {
69 $context = get_context_instance(CONTEXT_COURSE, $course->id);
70
71 /// Setup for group handling.
72 if ($course->groupmode == SEPARATEGROUPS and !has_capability('moodle/site:accessallgroups', $context)) {
928d4738 73 $selectedgroup = -1;
c215b32b 74 $showgroups = false;
928d4738 75 } else if ($course->groupmode) {
c215b32b 76 $showgroups = true;
928d4738 77 } else {
c215b32b 78 $selectedgroup = 0;
79 $showgroups = false;
80 }
81
928d4738 82 if ($selectedgroup === -1) {
83 if (isset($SESSION->currentgroup[$course->id])) {
84 $selectedgroup = $SESSION->currentgroup[$course->id];
85 } else {
86 $selectedgroup = groups_get_all_groups($course->id, $USER->id);
87 if (is_array($selectedgroup)) {
88 $selectedgroup = array_shift(array_keys($selectedgroup));
89 $SESSION->currentgroup[$course->id] = $selectedgroup;
90 } else {
91 $selectedgroup = 0;
92 }
93 }
94 }
95
c215b32b 96 } else {
97 $context = $sitecontext;
98 }
99
100 // Get all the possible users
101 $users = array();
102
ae1467bb 103 // Define limitfrom and limitnum for queries below
104 // If $showusers is enabled... don't apply limitfrom and limitnum
105 $limitfrom = empty($showusers) ? 0 : '';
106 $limitnum = empty($showusers) ? COURSE_MAX_USERS_PER_DROPDOWN + 1 : '';
107
c215b32b 108 // If looking at a different host, we're interested in all our site users
5841aa91 109 if ($hostid == $CFG->mnet_localhost_id && $course->id != SITEID) {
df997f84 110 $courseusers = get_enrolled_users($context, '', $selectedgroup, 'u.id, u.firstname, u.lastname, u.idnumber', 'lastname ASC, firstname ASC', $limitfrom, $limitnum);
c215b32b 111 } else {
79eaec48 112 // this may be a lot of users :-(
ae1467bb 113 $courseusers = $DB->get_records('user', array('deleted'=>0), 'lastaccess DESC', 'id, firstname, lastname, idnumber', $limitfrom, $limitnum);
c215b32b 114 }
115
116 if (count($courseusers) < COURSE_MAX_USERS_PER_DROPDOWN && !$showusers) {
117 $showusers = 1;
118 }
119
120 if ($showusers) {
121 if ($courseusers) {
122 foreach ($courseusers as $courseuser) {
123 $users[$courseuser->id] = fullname($courseuser, has_capability('moodle/site:viewfullnames', $context));
124 }
125 }
629e12fd 126 $users[$CFG->siteguest] = get_string('guestuser');
c215b32b 127 }
128
2c1833bd 129 // Get all the hosts that have log records
130 $sql = "select distinct
131 h.id,
132 h.name
133 from
29f83769 134 {mnet_host} h,
135 {mnet_log} l
2c1833bd 136 where
137 h.id = l.hostid
138 order by
139 h.name";
c215b32b 140
29f83769 141 if ($hosts = $DB->get_records_sql($sql)) {
dd2a21da 142 foreach($hosts as $host) {
143 $hostarray[$host->id] = $host->name;
144 }
c215b32b 145 }
146
147 $hostarray[$CFG->mnet_localhost_id] = $SITE->fullname;
148 asort($hostarray);
149
6770330d
PS
150 $dropdown = array();
151
c215b32b 152 foreach($hostarray as $hostid => $name) {
153 $courses = array();
154 $sites = array();
155 if ($CFG->mnet_localhost_id == $hostid) {
033af4b7 156 if (has_capability('report/log:view', $sitecontext) && $showcourses) {
29f83769 157 if ($ccc = $DB->get_records("course", null, "fullname","id,fullname,category")) {
c215b32b 158 foreach ($ccc as $cc) {
5577ceb3 159 if ($cc->id == SITEID) {
f054df17 160 $sites["$hostid/$cc->id"] = format_string($cc->fullname).' ('.get_string('site').')';
c215b32b 161 } else {
f054df17 162 $courses["$hostid/$cc->id"] = format_string($cc->fullname);
c215b32b 163 }
164 }
165 }
166 }
167 } else {
033af4b7 168 if (has_capability('report/log:view', $sitecontext) && $showcourses) {
29f83769 169 $sql = "SELECT DISTINCT course, coursename FROM {mnet_log} where hostid = ?";
170 if ($ccc = $DB->get_records_sql($sql, array($hostid))) {
c215b32b 171 foreach ($ccc as $cc) {
5577ceb3 172 if (1 == $cc->course) { // TODO: this might be wrong - site course may have another id
173 $sites["$hostid/$cc->course"] = $cc->coursename.' ('.get_string('site').')';
c215b32b 174 } else {
5577ceb3 175 $courses["$hostid/$cc->course"] = $cc->coursename;
c215b32b 176 }
177 }
178 }
179 }
180 }
181
182 asort($courses);
6770330d 183 $dropdown[] = array($name=>($sites + $courses));
c215b32b 184 }
185
186
187 $activities = array();
188 $selectedactivity = "";
189
190/// Casting $course->modinfo to string prevents one notice when the field is null
191 if ($modinfo = unserialize((string)$course->modinfo)) {
192 $section = 0;
d13864e6 193 $sections = get_all_sections($course->id);
c215b32b 194 foreach ($modinfo as $mod) {
195 if ($mod->mod == "label") {
196 continue;
197 }
198 if ($mod->section > 0 and $section <> $mod->section) {
d13864e6 199 $activities["section/$mod->section"] = '--- '.get_section_name($course, $sections[$mod->section]).' ---';
c215b32b 200 }
201 $section = $mod->section;
9a9012dc 202 $mod->name = strip_tags(format_string($mod->name, true));
138c7678
PS
203 if (textlib::strlen($mod->name) > 55) {
204 $mod->name = textlib::substr($mod->name, 0, 50)."...";
c215b32b 205 }
206 if (!$mod->visible) {
207 $mod->name = "(".$mod->name.")";
208 }
209 $activities["$mod->cm"] = $mod->name;
210
211 if ($mod->cm == $modid) {
212 $selectedactivity = "$mod->cm";
213 }
214 }
215 }
216
033af4b7 217 if (has_capability('report/log:view', $sitecontext) && !$course->category) {
c215b32b 218 $activities["site_errors"] = get_string("siteerrors");
219 if ($modid === "site_errors") {
220 $selectedactivity = "site_errors";
221 }
222 }
223
224 $strftimedate = get_string("strftimedate");
225 $strftimedaydate = get_string("strftimedaydate");
226
227 asort($users);
228
229 // Prepare the list of action options.
230 $actions = array(
231 'view' => get_string('view'),
232 'add' => get_string('add'),
233 'update' => get_string('update'),
234 'delete' => get_string('delete'),
235 '-view' => get_string('allchanges')
236 );
237
238 // Get all the possible dates
239 // Note that we are keeping track of real (GMT) time and user time
240 // User time is only used in displays - all calcs and passing is GMT
241
242 $timenow = time(); // GMT
243
244 // What day is it now for the user, and when is midnight that day (in GMT).
245 $timemidnight = $today = usergetmidnight($timenow);
246
247 // Put today up the top of the list
248 $dates = array("$timemidnight" => get_string("today").", ".userdate($timenow, $strftimedate) );
249
250 if (!$course->startdate or ($course->startdate > $timenow)) {
251 $course->startdate = $course->timecreated;
252 }
253
254 $numdates = 1;
255 while ($timemidnight > $course->startdate and $numdates < 365) {
256 $timemidnight = $timemidnight - 86400;
257 $timenow = $timenow - 86400;
258 $dates["$timemidnight"] = userdate($timenow, $strftimedaydate);
259 $numdates++;
260 }
261
262 if ($selecteddate == "today") {
263 $selecteddate = $today;
264 }
265
033af4b7 266 echo "<form class=\"logselectform\" action=\"$CFG->wwwroot/report/log/index.php\" method=\"get\">\n";
5577ceb3 267 echo "<div>\n";//invisible fieldset here breaks wrapping
c215b32b 268 echo "<input type=\"hidden\" name=\"chooselog\" value=\"1\" />\n";
269 echo "<input type=\"hidden\" name=\"showusers\" value=\"$showusers\" />\n";
270 echo "<input type=\"hidden\" name=\"showcourses\" value=\"$showcourses\" />\n";
033af4b7 271 if (has_capability('report/log:view', $sitecontext) && $showcourses) {
aa6c1ced 272 $cid = empty($course->id)? '1' : $course->id;
6770330d 273 echo html_writer::select($dropdown, "host_course", $hostid.'/'.$cid);
c215b32b 274 } else {
275 $courses = array();
5577ceb3 276 $courses[$course->id] = $course->fullname . ((empty($course->category)) ? ' ('.get_string('site').') ' : '');
d776d59e 277 echo html_writer::select($courses,"id",$course->id, false);
033af4b7 278 if (has_capability('report/log:view', $sitecontext)) {
fbaea88f 279 $a = new stdClass();
033af4b7 280 $a->url = "$CFG->wwwroot/report/log/index.php?chooselog=0&group=$selectedgroup&user=$selecteduser"
c215b32b 281 ."&id=$course->id&date=$selecteddate&modid=$selectedactivity&showcourses=1&showusers=$showusers";
282 print_string('logtoomanycourses','moodle',$a);
283 }
284 }
285
286 if ($showgroups) {
2c386f82 287 if ($cgroups = groups_get_all_groups($course->id)) {
c215b32b 288 foreach ($cgroups as $cgroup) {
289 $groups[$cgroup->id] = $cgroup->name;
290 }
291 }
292 else {
293 $groups = array();
294 }
d776d59e 295 echo html_writer::select($groups, "group", $selectedgroup, get_string("allgroups"));
c215b32b 296 }
297
298 if ($showusers) {
d776d59e 299 echo html_writer::select($users, "user", $selecteduser, get_string("allparticipants"));
c215b32b 300 }
301 else {
302 $users = array();
303 if (!empty($selecteduser)) {
29f83769 304 $user = $DB->get_record('user', array('id'=>$selecteduser));
c215b32b 305 $users[$selecteduser] = fullname($user);
306 }
307 else {
308 $users[0] = get_string('allparticipants');
309 }
d776d59e 310 echo html_writer::select($users, "user", $selecteduser, false);
033af4b7 311 $a->url = "$CFG->wwwroot/report/log/index.php?chooselog=0&group=$selectedgroup&user=$selecteduser"
c215b32b 312 ."&id=$course->id&date=$selecteddate&modid=$selectedactivity&showusers=1&showcourses=$showcourses";
313 print_string('logtoomanyusers','moodle',$a);
314 }
aa6c1ced 315
d776d59e
PS
316 echo html_writer::select($dates, "date", $selecteddate, get_string("alldays"));
317 echo html_writer::select($activities, "modid", $selectedactivity, get_string("allactivities"));
318 echo html_writer::select($actions, 'modaction', $modaction, get_string("allactions"));
aa6c1ced 319
c215b32b 320 $logformats = array('showashtml' => get_string('displayonpage'),
321 'downloadascsv' => get_string('downloadtext'),
5577ceb3 322 'downloadasods' => get_string('downloadods'),
c215b32b 323 'downloadasexcel' => get_string('downloadexcel'));
d776d59e 324 echo html_writer::select($logformats, 'logformat', $logformat, false);
c215b32b 325 echo '<input type="submit" value="'.get_string('gettheselogs').'" />';
5577ceb3 326 echo '</div>';
327 echo '</form>';
c215b32b 328}
329
fad8e024 330function report_log_print_selector_form($course, $selecteduser=0, $selecteddate='today',
92890025 331 $modname="", $modid=0, $modaction='', $selectedgroup=-1, $showcourses=0, $showusers=0, $logformat='showashtml') {
0a935fb3 332
928d4738 333 global $USER, $CFG, $DB, $OUTPUT, $SESSION;
0a935fb3 334
335 // first check to see if we can override showcourses and showusers
29f83769 336 $numcourses = $DB->count_records("course");
0a935fb3 337 if ($numcourses < COURSE_MAX_COURSES_PER_DROPDOWN && !$showcourses) {
338 $showcourses = 1;
339 }
aa6c1ced 340
09ee7b0d 341 $sitecontext = get_context_instance(CONTEXT_SYSTEM);
d02eeded 342 $context = get_context_instance(CONTEXT_COURSE, $course->id);
aa6c1ced 343
0a935fb3 344 /// Setup for group handling.
d02eeded 345 if ($course->groupmode == SEPARATEGROUPS and !has_capability('moodle/site:accessallgroups', $context)) {
928d4738 346 $selectedgroup = -1;
0a935fb3 347 $showgroups = false;
928d4738 348 } else if ($course->groupmode) {
0a935fb3 349 $showgroups = true;
928d4738 350 } else {
0a935fb3 351 $selectedgroup = 0;
352 $showgroups = false;
353 }
354
928d4738 355 if ($selectedgroup === -1) {
356 if (isset($SESSION->currentgroup[$course->id])) {
357 $selectedgroup = $SESSION->currentgroup[$course->id];
358 } else {
359 $selectedgroup = groups_get_all_groups($course->id, $USER->id);
360 if (is_array($selectedgroup)) {
361 $selectedgroup = array_shift(array_keys($selectedgroup));
362 $SESSION->currentgroup[$course->id] = $selectedgroup;
363 } else {
364 $selectedgroup = 0;
365 }
366 }
367 }
368
0a935fb3 369 // Get all the possible users
370 $users = array();
371
c1733742
DP
372 // Define limitfrom and limitnum for queries below
373 // If $showusers is enabled... don't apply limitfrom and limitnum
374 $limitfrom = empty($showusers) ? 0 : '';
375 $limitnum = empty($showusers) ? COURSE_MAX_USERS_PER_DROPDOWN + 1 : '';
376
377 $courseusers = get_enrolled_users($context, '', $selectedgroup, 'u.id, u.firstname, u.lastname', 'lastname ASC, firstname ASC', $limitfrom, $limitnum);
aa6c1ced 378
0a935fb3 379 if (count($courseusers) < COURSE_MAX_USERS_PER_DROPDOWN && !$showusers) {
380 $showusers = 1;
381 }
382
383 if ($showusers) {
384 if ($courseusers) {
385 foreach ($courseusers as $courseuser) {
d02eeded 386 $users[$courseuser->id] = fullname($courseuser, has_capability('moodle/site:viewfullnames', $context));
0a935fb3 387 }
388 }
629e12fd 389 $users[$CFG->siteguest] = get_string('guestuser');
0a935fb3 390 }
391
033af4b7 392 if (has_capability('report/log:view', $sitecontext) && $showcourses) {
29f83769 393 if ($ccc = $DB->get_records("course", null, "fullname", "id,fullname,category")) {
0a935fb3 394 foreach ($ccc as $cc) {
395 if ($cc->category) {
f054df17 396 $courses["$cc->id"] = format_string($cc->fullname);
0a935fb3 397 } else {
f054df17 398 $courses["$cc->id"] = format_string($cc->fullname) . ' (Site)';
0a935fb3 399 }
400 }
401 }
402 asort($courses);
403 }
404
405 $activities = array();
406 $selectedactivity = "";
407
fea43a7f 408/// Casting $course->modinfo to string prevents one notice when the field is null
409 if ($modinfo = unserialize((string)$course->modinfo)) {
0a935fb3 410 $section = 0;
d13864e6 411 $sections = get_all_sections($course->id);
0a935fb3 412 foreach ($modinfo as $mod) {
413 if ($mod->mod == "label") {
414 continue;
415 }
416 if ($mod->section > 0 and $section <> $mod->section) {
d13864e6 417 $activities["section/$mod->section"] = '--- '.get_section_name($course, $sections[$mod->section]).' ---';
0a935fb3 418 }
419 $section = $mod->section;
9a9012dc 420 $mod->name = strip_tags(format_string($mod->name, true));
138c7678
PS
421 if (textlib::strlen($mod->name) > 55) {
422 $mod->name = textlib::substr($mod->name, 0, 50)."...";
0a935fb3 423 }
424 if (!$mod->visible) {
425 $mod->name = "(".$mod->name.")";
426 }
427 $activities["$mod->cm"] = $mod->name;
428
429 if ($mod->cm == $modid) {
430 $selectedactivity = "$mod->cm";
431 }
432 }
433 }
434
033af4b7 435 if (has_capability('report/log:view', $sitecontext) && ($course->id == SITEID)) {
0a935fb3 436 $activities["site_errors"] = get_string("siteerrors");
437 if ($modid === "site_errors") {
438 $selectedactivity = "site_errors";
439 }
440 }
441
442 $strftimedate = get_string("strftimedate");
443 $strftimedaydate = get_string("strftimedaydate");
444
445 asort($users);
446
ee35e0b8 447 // Prepare the list of action options.
448 $actions = array(
449 'view' => get_string('view'),
450 'add' => get_string('add'),
451 'update' => get_string('update'),
452 'delete' => get_string('delete'),
453 '-view' => get_string('allchanges')
454 );
455
0a935fb3 456 // Get all the possible dates
457 // Note that we are keeping track of real (GMT) time and user time
458 // User time is only used in displays - all calcs and passing is GMT
459
460 $timenow = time(); // GMT
461
462 // What day is it now for the user, and when is midnight that day (in GMT).
463 $timemidnight = $today = usergetmidnight($timenow);
464
465 // Put today up the top of the list
466 $dates = array("$timemidnight" => get_string("today").", ".userdate($timenow, $strftimedate) );
467
468 if (!$course->startdate or ($course->startdate > $timenow)) {
469 $course->startdate = $course->timecreated;
470 }
471
472 $numdates = 1;
473 while ($timemidnight > $course->startdate and $numdates < 365) {
474 $timemidnight = $timemidnight - 86400;
475 $timenow = $timenow - 86400;
476 $dates["$timemidnight"] = userdate($timenow, $strftimedaydate);
477 $numdates++;
478 }
479
480 if ($selecteddate == "today") {
481 $selecteddate = $today;
482 }
483
033af4b7 484 echo "<form class=\"logselectform\" action=\"$CFG->wwwroot/report/log/index.php\" method=\"get\">\n";
5577ceb3 485 echo "<div>\n";
0a935fb3 486 echo "<input type=\"hidden\" name=\"chooselog\" value=\"1\" />\n";
487 echo "<input type=\"hidden\" name=\"showusers\" value=\"$showusers\" />\n";
488 echo "<input type=\"hidden\" name=\"showcourses\" value=\"$showcourses\" />\n";
033af4b7 489 if (has_capability('report/log:view', $sitecontext) && $showcourses) {
d776d59e 490 echo html_writer::select($courses, "id", $course->id, false);
0a935fb3 491 } else {
492 // echo '<input type="hidden" name="id" value="'.$course->id.'" />';
493 $courses = array();
5577ceb3 494 $courses[$course->id] = $course->fullname . (($course->id == SITEID) ? ' ('.get_string('site').') ' : '');
d776d59e 495 echo html_writer::select($courses,"id",$course->id, false);
033af4b7 496 if (has_capability('report/log:view', $sitecontext)) {
fbaea88f 497 $a = new stdClass();
033af4b7 498 $a->url = "$CFG->wwwroot/report/log/index.php?chooselog=0&group=$selectedgroup&user=$selecteduser"
0a935fb3 499 ."&id=$course->id&date=$selecteddate&modid=$selectedactivity&showcourses=1&showusers=$showusers";
500 print_string('logtoomanycourses','moodle',$a);
501 }
502 }
503
504 if ($showgroups) {
2c386f82 505 if ($cgroups = groups_get_all_groups($course->id)) {
0a935fb3 506 foreach ($cgroups as $cgroup) {
507 $groups[$cgroup->id] = $cgroup->name;
508 }
509 }
510 else {
511 $groups = array();
512 }
d776d59e 513 echo html_writer::select($groups, "group", $selectedgroup, get_string("allgroups"));
0a935fb3 514 }
515
516 if ($showusers) {
d776d59e 517 echo html_writer::select($users, "user", $selecteduser, get_string("allparticipants"));
0a935fb3 518 }
519 else {
520 $users = array();
521 if (!empty($selecteduser)) {
29f83769 522 $user = $DB->get_record('user', array('id'=>$selecteduser));
0a935fb3 523 $users[$selecteduser] = fullname($user);
524 }
525 else {
526 $users[0] = get_string('allparticipants');
527 }
d776d59e 528 echo html_writer::select($users, "user", $selecteduser, false);
fbaea88f 529 $a = new stdClass();
033af4b7 530 $a->url = "$CFG->wwwroot/report/log/index.php?chooselog=0&group=$selectedgroup&user=$selecteduser"
0a935fb3 531 ."&id=$course->id&date=$selecteddate&modid=$selectedactivity&showusers=1&showcourses=$showcourses";
532 print_string('logtoomanyusers','moodle',$a);
533 }
d776d59e 534 echo html_writer::select($dates, "date", $selecteddate, get_string("alldays"));
aa6c1ced 535
d776d59e
PS
536 echo html_writer::select($activities, "modid", $selectedactivity, get_string("allactivities"));
537 echo html_writer::select($actions, 'modaction', $modaction, get_string("allactions"));
aa6c1ced 538
92890025 539 $logformats = array('showashtml' => get_string('displayonpage'),
540 'downloadascsv' => get_string('downloadtext'),
ea49a66c 541 'downloadasods' => get_string('downloadods'),
92890025 542 'downloadasexcel' => get_string('downloadexcel'));
aa6c1ced 543
d776d59e 544 echo html_writer::select($logformats, 'logformat', $logformat, false);
92890025 545 echo '<input type="submit" value="'.get_string('gettheselogs').'" />';
5577ceb3 546 echo '</div>';
547 echo '</form>';
e3dfd1a1 548}