$id = optional_param('id', 0, PARAM_INT); $resetuser = optional_param('reset', 0, PARAM_INT); $delete = optional_param('delete', 0, PARAM_INT); $page = optional_param('page', 0, PARAM_INT); $sort = optional_param('tsort', '', PARAM_ALPHA); $dir = optional_param('dir', '', PARAM_ALPHA); $download = optional_param('download', '', PARAM_ALPHA); $exportfilename = 'UnplagDebugOutput.csv'; $limit = 20; $baseurl = new moodle_url('unplag_debug.php', array('page' => $page, 'sort' => $sort)); $table = new flexible_table('unplagfiles'); // Get list of Events in queue. $a = new stdClass(); $a->countallevents = $DB->count_records('events_queue_handlers'); $a->countheld = $DB->count_records_select('events_queue_handlers', 'status > 0'); if (!$table->is_downloading($download, $exportfilename)) { echo $OUTPUT->header(); $currenttab = 'unplagdebug'; require_once 'unplag_tabs.php'; $lastcron = $DB->get_field_sql('SELECT MAX(lastcron) FROM {modules}'); if ($lastcron < time() - 3600 * 0.5) { // Check if run in last 30min. echo $OUTPUT->box(get_string('cronwarning', 'plagiarism_unplag'), 'generalbox admin warning'); } $warning = ''; if (!empty($a->countallevents)) { $warning = ' warning'; } if ($resetuser == 1 && $id && confirm_sesskey()) { if (plagiarism_plugin_unplag::unplag_reset_file($id)) { echo $OUTPUT->notification(get_string('fileresubmitted', 'plagiarism_unplag'));
$userArray[$thisUser->id] = MoodletxtStringHelper::formatNameForDisplay($thisUser->firstname, $thisUser->lastname, $thisUser->username); } $GLOBALS['_HTML_QuickForm_default_renderer'] = new InlineFormRenderer(); $customData = array('userlist' => $userArray); $inboxForm = new MoodletxtInboundControlForm(null, $customData, 'post', '', array('class' => 'mdltxt_left')); /* * Create results table */ $table = new flexible_table('blocks-moodletxt-inboxmessages'); $table->define_baseurl($CFG->wwwroot . '/blocks/moodletxt/received.php?course=' . $courseId . '&instance=' . $instanceId); // Required in 2.2 for export $table->set_attribute('id', 'mdltxtReceivedMessagesList'); $table->set_attribute('class', 'generaltable generalbox boxaligncenter boxwidthwide mtxtCentredCells'); $table->collapsible(true); if ($download != '') { $table->is_downloading($download, get_string('exportsheetinbox', 'block_moodletxt'), get_string('exporttitleinbox', 'block_moodletxt')); } $table->is_downloadable(true); // Build table structure based on download status and user options $tablecolumns = array(); $tableheaders = array(); if (!$table->is_downloading()) { array_push($tablecolumns, 'checkbox'); array_push($tableheaders, html_writer::empty_tag('input', array('type' => 'checkbox', 'name' => 'selectAllMessages', 'value' => '1'))); } array_push($tablecolumns, 'ticket'); array_push($tablecolumns, 'messagetext'); array_push($tableheaders, get_string('inboxtableheaderticket', 'block_moodletxt')); array_push($tableheaders, get_string('inboxtableheadermessage', 'block_moodletxt')); if ($showInboundNumbers) { array_push($tablecolumns, 'source');
$tablecolumns = array("user", "account", "message", "time"); $tableheaders = array(get_string('tableheaderuser', 'block_moodletxt'), get_string('tableheadertxttoolsaccount', 'block_moodletxt'), get_string('tableheadermessagetext', 'block_moodletxt'), get_string('tableheadertimesent', 'block_moodletxt')); // ;) if ($includeEvents == TxttoolsSentMessageDAO::$EVENT_QUERY_INCLUDE || $includeEvents == TxttoolsSentMessageDAO::$EVENT_QUERY_EXCLUSIVE) { array_push($tablecolumns, "generation"); array_push($tableheaders, get_string('tableheadergeneration', 'block_moodletxt')); } $table->define_columns($tablecolumns); $table->define_headers($tableheaders); $table->sortable(true, 'time', SORT_DESC); $table->no_sorting('message'); $table->collapsible(true); $table->pageable(true); $table->pagesize($MESSAGES_PER_PAGE, $sentMessagesDAO->countMessagesSent(0, $USER->id)); if ($download != '') { $table->is_downloading($download, get_string('exportsheetsent', 'block_moodletxt'), get_string('exporttitlesent', 'block_moodletxt')); } $table->is_downloadable(true); $table->show_download_buttons_at(array(TABLE_P_BOTTOM)); $table->setup(); // BEGIN PAGE OUTPUT if (!$table->is_downloading()) { // Drop in page header echo $output->header(); echo $output->box($sentMessagesDAO->countMessagesSent() . get_string('sentnoticefrag1', 'block_moodletxt') . $sentMessagesDAO->countMessageRecipients() . get_string('sentnoticefrag2', 'block_moodletxt') . html_writer::empty_tag('br') . $sentMessagesDAO->countMessagesSent(0, $userToView) . get_string('sentnoticefrag3', 'block_moodletxt')); // Show select box allow user to show/hide event-generated messages $eventSelect = new single_select(new moodle_url('sent.php', array('course' => $courseId, 'instance' => $instanceId, 'user' => $userToView)), 'events', array(TxttoolsSentMessageDAO::$EVENT_QUERY_DISCARD => get_string('optioneventhide', 'block_moodletxt'), TxttoolsSentMessageDAO::$EVENT_QUERY_INCLUDE => get_string('optioneventshow', 'block_moodletxt'), TxttoolsSentMessageDAO::$EVENT_QUERY_EXCLUSIVE => get_string('optioneventonly', 'block_moodletxt')), $includeEvents, false); $eventSelect->set_label(get_string('labelshowmessagebygenerator', 'block_moodletxt')); echo $output->render($eventSelect); // Show user list if the user has permission to see other people's messages if ($canAdminUsers) {
$PAGE->navbar->add($strreport, new moodle_url('/mod/scorm/report.php', array('id' => $cm->id))); $PAGE->navbar->add("{$strattempt} {$attempt} - " . fullname($user), new moodle_url('/mod/scorm/report/userreport.php', array('id' => $id, 'user' => $userid, 'attempt' => $attempt))); $PAGE->navbar->add($selsco->title . ' - ' . get_string('details', 'scorm')); if ($trackdata = scorm_get_tracks($selsco->id, $userid, $attempt)) { if ($trackdata->status == '') { $trackdata->status = 'notattempted'; } } else { $trackdata = new stdClass(); $trackdata->status = 'notattempted'; $trackdata->total_time = ''; } $courseshortname = format_string($course->shortname, true, array('context' => context_course::instance($course->id))); $exportfilename = $courseshortname . '-' . format_string($scorm->name, true) . '-' . get_string('details', 'scorm'); $table = new flexible_table('mod_scorm-userreporttracks'); if (!$table->is_downloading($download, $exportfilename)) { echo $OUTPUT->header(); echo $OUTPUT->heading(format_string($scorm->name)); $currenttab = ''; require $CFG->dirroot . '/mod/scorm/report/userreporttabs.php'; echo $OUTPUT->box_start('generalbox boxaligncenter'); echo $OUTPUT->heading("{$strattempt} {$attempt} - " . fullname($user) . ': ' . format_string($selsco->title) . ' - ' . get_string('details', 'scorm'), 3); } $table->define_baseurl($PAGE->url); $table->define_columns(array('element', 'value')); $table->define_headers(array(get_string('element', 'scorm'), get_string('value', 'scorm'))); $table->set_attribute('class', 'generaltable generalbox boxaligncenter scormtrackreport'); $table->show_download_buttons_at(array(TABLE_P_BOTTOM)); $table->setup(); foreach ($trackdata as $element => $value) { if (substr($element, 0, 3) == 'cmi') {
$class_per_page = $wiziq_managecookie; } else if (!(isset($_COOKIE['wiziq_managecookie'])) && empty($paging)) { $class_per_page = WIZIQ_MAX_TABLE_SIZE; $selected = ""; } else { $class_per_page = $paging; $selected = $paging; } $table->pagesize($class_per_page, $total_wiziq_records); #-----naming of the table download file---------------- $wiziq_manage_classes_file = get_string('manage_classes_file', 'wiziq'); $wiziq_file_heading = $wiziq_manage_classes_file." ".$course_number; $manage_classes = get_string('wiziq_classes_file', 'wiziq'); $wiziq_mc_filename = $manage_classes.$course_number; $table->is_downloading($download, $wiziq_mc_filename, $wiziq_file_heading); #--required here so that the $OUTPUT and the html renders only when the page is not downloading-- if (!$table->is_downloading()) { echo $OUTPUT->header(); $schedulenewwiziqclass = new moodle_url("$CFG->wwwroot/course/modedit.php", array('add' => 'wiziq', 'type' => '', 'course' => $course->id, 'section' => '0', 'return' => '0')); $navigationtabsmanage = new moodle_url("$CFG->wwwroot/mod/wiziq/index.php", array('id' => $course->id, 'sesskey' => sesskey())); $navigationtabscontent = new moodle_url("$CFG->wwwroot/mod/wiziq/content.php", array('id' => $course->id, 'sesskey' => sesskey())); $tabs =array(); $row = array(); $row[] = new tabobject('wiziq_sch_class', $schedulenewwiziqclass, get_string('schedule_class', 'wiziq'));
$selected = ""; } else { $attendance_per_page = $paging; $selected = $paging; } $attendelist = $attendancexmlch_attlist->attendee; $total_attendence_record = count($attendelist); $table->pagesize($attendance_per_page, $total_attendence_record); #-----naming of the table download file---------------- $wiziq_attendence_file = get_string('attendence_file', 'wiziq'); $wiziq_attendence_file_heading = $wiziq_attendence_file." ".$course_number; $attendance_class = get_string('wiziq_attendence_file', 'wiziq'); $wiziq_atendnc_filename = $attendance_class.$course_number; $table->is_downloading($downloadattendence, $wiziq_atendnc_filename, $wiziq_attendence_file_heading); if (!$table->is_downloading()) { echo $OUTPUT->header(); $schedulenewwiziqclass = new moodle_url("$CFG->wwwroot/course/modedit.php", array('add' => 'wiziq', 'type' => '', 'course' => $course->id, 'section' => '0', 'return' => '0')); $navigationtabsmanage = new moodle_url("$CFG->wwwroot/mod/wiziq/index.php", array('id' => $course->id, 'sesskey' => sesskey())); $navigationtabscontent = new moodle_url("$CFG->wwwroot/mod/wiziq/content.php", array('id' => $course->id, 'sesskey' => sesskey())); $tabs =array(); $row = array(); $row[] = new tabobject('wiziq_sch_class', $schedulenewwiziqclass, get_string('schedule_class', 'wiziq')); $row[] = new tabobject('wizq_mange_class', $navigationtabsmanage, get_string('manage_classes', 'wiziq'));
$table->set_attribute('id', 'smsStatusList'); $table->set_attribute('class', 'generaltable generalbox boxaligncenter boxwidthwide mtxtCentredCells'); // Set structure $tablecolumns = array("recipient", "destination", "time", "status"); $tableheaders = array(get_string('tableheaderrecipient', 'block_moodletxt'), get_string('tableheaderdestination', 'block_moodletxt'), get_string('tableheadertimeupdated', 'block_moodletxt'), get_string('tableheaderstatus', 'block_moodletxt')); // ;) $table->define_columns($tablecolumns); $table->define_headers($tableheaders); $table->sortable(true, 'time', SORT_ASC); $table->no_sorting('destination'); $table->no_sorting('recipient'); $table->collapsible(true); $table->pageable(true); $table->pagesize($STATUSES_PER_PAGE, $sentMessagesDAO->countMessageRecipients($messageId)); if ($download != '') { $table->is_downloading($download, get_string('exportsheetsent', 'block_moodletxt'), get_string('exporttitlesent', 'block_moodletxt')); } $table->is_downloadable(true); $table->show_download_buttons_at(array(TABLE_P_BOTTOM)); $table->setup(); // Output page header and everything before the table. // This should only be output when not exporting the table. if (!$table->is_downloading()) { // Drop in page header echo $output->header(); // Message details box (top left) $messageDetails = $output->heading(get_string('headermessagedetails', 'block_moodletxt')); $messageDetails .= html_writer::tag('dt', get_string('labelmessageauthor', 'block_moodletxt')); $messageDetails .= html_writer::tag('dd', $messageObject->getUser()->getFullNameForDisplay(true)); $messageDetails .= html_writer::tag('dt', get_string('labeltimesent', 'block_moodletxt')); $messageDetails .= html_writer::tag('dd', $messageObject->getTimeSent('%H:%M:%S, %d %B %Y'));
$page = optional_param('page', 0, PARAM_INT); $sort = optional_param('tsort', '', PARAM_ALPHA); $dir = optional_param('dir', '', PARAM_ALPHA); $download = optional_param('download', '', PARAM_ALPHA); $showall = optional_param('showall', 0, PARAM_INT); $resetall = optional_param('resetall', '', PARAM_ALPHANUMEXT); $confirm = optional_param('confirm', 0, PARAM_INT); require_login(); $url = new moodle_url('/plagiarism/urkund/urkund_debug.php', array('showall' => $showall)); admin_externalpage_setup('plagiarismurkund', '', array(), $url); $context = context_system::instance(); $exportfilename = 'UrkundDebugOutput.csv'; $limit = 30; $baseurl = new moodle_url('urkund_debug.php', array('page' => $page, 'sort' => $sort)); $table = new flexible_table('urkundfiles'); if (!$table->is_downloading($download, $exportfilename)) { echo $OUTPUT->header(); $currenttab = 'urkunddebug'; require_once 'urkund_tabs.php'; $plagiarismsettings = plagiarism_plugin_urkund::get_settings(); if (!empty($resetall) && confirm_sesskey()) { // Check to see if there are any files in this state. if (!$confirm) { // Show confirmation message. $confirmurl = $baseurl; $confirmurl->params(array('resetall' => $resetall, 'confirm' => 1)); echo $OUTPUT->confirm(get_string('confirmresetall', 'plagiarism_urkund', $resetall), $baseurl, $confirmurl); echo $OUTPUT->footer(); exit; } else { $files = $DB->get_records('plagiarism_urkund_files', array('statuscode' => $resetall));