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.70.127.202
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 /
essay /
[ 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_essay_form.php
6.71
KB
-rw-r--r--
lib.php
1.65
KB
-rw-r--r--
question.php
8.78
KB
-rw-r--r--
questiontype.php
7.03
KB
-rw-r--r--
renderer.php
20.56
KB
-rw-r--r--
styles.css
620
B
-rw-r--r--
version.php
1.06
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : edit_essay_form.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/>. /** * Defines the editing form for the essay question type. * * @package qtype * @subpackage essay * @copyright 2007 Jamie Pratt me@jamiep.org * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ defined('MOODLE_INTERNAL') || die(); /** * Essay question type editing form. * * @copyright 2007 Jamie Pratt me@jamiep.org * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ class qtype_essay_edit_form extends question_edit_form { protected function definition_inner($mform) { $qtype = question_bank::get_qtype('essay'); $mform->addElement('header', 'responseoptions', get_string('responseoptions', 'qtype_essay')); $mform->setExpanded('responseoptions'); $mform->addElement('select', 'responseformat', get_string('responseformat', 'qtype_essay'), $qtype->response_formats()); $mform->setDefault('responseformat', 'editor'); $mform->addElement('select', 'responserequired', get_string('responserequired', 'qtype_essay'), $qtype->response_required_options()); $mform->setDefault('responserequired', 1); $mform->disabledIf('responserequired', 'responseformat', 'eq', 'noinline'); $mform->addElement('select', 'responsefieldlines', get_string('responsefieldlines', 'qtype_essay'), $qtype->response_sizes()); $mform->setDefault('responsefieldlines', 15); $mform->disabledIf('responsefieldlines', 'responseformat', 'eq', 'noinline'); $mform->addElement('select', 'attachments', get_string('allowattachments', 'qtype_essay'), $qtype->attachment_options()); $mform->setDefault('attachments', 0); $mform->addElement('select', 'attachmentsrequired', get_string('attachmentsrequired', 'qtype_essay'), $qtype->attachments_required_options()); $mform->setDefault('attachmentsrequired', 0); $mform->addHelpButton('attachmentsrequired', 'attachmentsrequired', 'qtype_essay'); $mform->disabledIf('attachmentsrequired', 'attachments', 'eq', 0); $mform->addElement('filetypes', 'filetypeslist', get_string('acceptedfiletypes', 'qtype_essay')); $mform->addHelpButton('filetypeslist', 'acceptedfiletypes', 'qtype_essay'); $mform->disabledIf('filetypeslist', 'attachments', 'eq', 0); $mform->addElement('select', 'maxbytes', get_string('maxbytes', 'qtype_essay'), $qtype->max_file_size_options()); $mform->setDefault('maxbytes', '0'); $mform->disabledIf('maxbytes', 'attachments', 'eq', 0); $mform->addElement('header', 'responsetemplateheader', get_string('responsetemplateheader', 'qtype_essay')); $mform->addElement('editor', 'responsetemplate', get_string('responsetemplate', 'qtype_essay'), array('rows' => 10), array_merge($this->editoroptions, array('maxfiles' => 0))); $mform->addHelpButton('responsetemplate', 'responsetemplate', 'qtype_essay'); $mform->addElement('header', 'graderinfoheader', get_string('graderinfoheader', 'qtype_essay')); $mform->setExpanded('graderinfoheader'); $mform->addElement('editor', 'graderinfo', get_string('graderinfo', 'qtype_essay'), array('rows' => 10), $this->editoroptions); } protected function data_preprocessing($question) { $question = parent::data_preprocessing($question); if (empty($question->options)) { return $question; } $question->responseformat = $question->options->responseformat; $question->responserequired = $question->options->responserequired; $question->responsefieldlines = $question->options->responsefieldlines; $question->attachments = $question->options->attachments; $question->attachmentsrequired = $question->options->attachmentsrequired; $question->filetypeslist = $question->options->filetypeslist; $question->maxbytes = $question->options->maxbytes; $draftid = file_get_submitted_draft_itemid('graderinfo'); $question->graderinfo = array(); $question->graderinfo['text'] = file_prepare_draft_area( $draftid, // Draftid $this->context->id, // context 'qtype_essay', // component 'graderinfo', // filarea !empty($question->id) ? (int) $question->id : null, // itemid $this->fileoptions, // options $question->options->graderinfo // text. ); $question->graderinfo['format'] = $question->options->graderinfoformat; $question->graderinfo['itemid'] = $draftid; $question->responsetemplate = array( 'text' => $question->options->responsetemplate, 'format' => $question->options->responsetemplateformat, ); return $question; } public function validation($fromform, $files) { $errors = parent::validation($fromform, $files); // Don't allow both 'no inline response' and 'no attachments' to be selected, // as these options would result in there being no input requested from the user. if ($fromform['responseformat'] == 'noinline' && !$fromform['attachments']) { $errors['attachments'] = get_string('mustattach', 'qtype_essay'); } // If 'no inline response' is set, force the teacher to require attachments; // otherwise there will be nothing to grade. if ($fromform['responseformat'] == 'noinline' && !$fromform['attachmentsrequired']) { $errors['attachmentsrequired'] = get_string('mustrequire', 'qtype_essay'); } // Don't allow the teacher to require more attachments than they allow; as this would // create a condition that it's impossible for the student to meet. if ($fromform['attachments'] != -1 && $fromform['attachments'] < $fromform['attachmentsrequired'] ) { $errors['attachmentsrequired'] = get_string('mustrequirefewer', 'qtype_essay'); } return $errors; } public function qtype() { return 'essay'; } }
Close