| Línea 133... | Línea 133... | 
          
            | 133 |         }
 | 133 |         }
 | 
          
            | Línea 134... | Línea 134... | 
          
            | 134 |  
 | 134 |  
 | 
          
            | Línea 135... | Línea 135... | 
          
            | 135 |         $labelbyid = $qa->get_qt_field_name('attachments') . '_label';
 | 135 |         $labelbyid = $qa->get_qt_field_name('attachments') . '_label';
 | 
          
            | 136 |  
 | 136 |  
 | 
          
            | 137 |         $fileslabel = $options->add_question_identifier_to_label(get_string('answerfiles', 'qtype_essay'));
 | 137 |         $fileslabel = $options->add_question_identifier_to_label(get_string('answerfiles', 'qtype_essay'));
 | 
          
            | 138 |         $output = html_writer::tag('h4', $fileslabel, ['id' => $labelbyid, 'class' => 'sr-only']);
 | 138 |         $output = html_writer::tag('h4', $fileslabel, ['id' => $labelbyid, 'class' => 'visually-hidden']);
 | 
          
            | 139 |         $output .= html_writer::tag('ul', implode($filelist), [
 | 139 |         $output .= html_writer::tag('ul', implode($filelist), [
 | 
          
            | 140 |             'aria-labelledby' => $labelbyid,
 | 140 |             'aria-labelledby' => $labelbyid,
 | 
          
            | 141 |             'class' => 'list-unstyled m-0',
 | 141 |             'class' => 'list-unstyled m-0',
 | 
          
            | Línea 160... | Línea 160... | 
          
            | 160 |         $pickeroptions->maxfiles = $numallowed;
 | 160 |         $pickeroptions->maxfiles = $numallowed;
 | 
          
            | 161 |         $pickeroptions->itemid = $qa->prepare_response_files_draft_itemid(
 | 161 |         $pickeroptions->itemid = $qa->prepare_response_files_draft_itemid(
 | 
          
            | 162 |                 'attachments', $options->context->id);
 | 162 |                 'attachments', $options->context->id);
 | 
          
            | 163 |         $pickeroptions->context = $options->context;
 | 163 |         $pickeroptions->context = $options->context;
 | 
          
            | 164 |         $pickeroptions->return_types = FILE_INTERNAL | FILE_CONTROLLED_LINK;
 | 164 |         $pickeroptions->return_types = FILE_INTERNAL | FILE_CONTROLLED_LINK;
 | 
          
            | 165 |  
 | - |   | 
          
            | 166 |         $pickeroptions->itemid = $qa->prepare_response_files_draft_itemid(
 | - |   | 
          
            | 167 |                 'attachments', $options->context->id);
 | - |   | 
          
            | 168 |         $pickeroptions->accepted_types = $qa->get_question()->filetypeslist;
 | 165 |         $pickeroptions->accepted_types = $qa->get_question()->filetypeslist;
 | 
          
            | Línea 169... | Línea 166... | 
          
            | 169 |  
 | 166 |  
 | 
          
            | 170 |         $fm = new form_filemanager($pickeroptions);
 | 167 |         $fm = new form_filemanager($pickeroptions);
 | 
          
            | 171 |         $fm->options->maxbytes = get_user_max_upload_file_size(
 | 168 |         $fm->options->maxbytes = get_user_max_upload_file_size(
 | 
          
            | Línea 185... | Línea 182... | 
          
            | 185 |             $text .= $this->render_from_template('core_form/filetypes-descriptions', $filetypedescriptions);
 | 182 |             $text .= $this->render_from_template('core_form/filetypes-descriptions', $filetypedescriptions);
 | 
          
            | 186 |         }
 | 183 |         }
 | 
          
            | Línea 187... | Línea 184... | 
          
            | 187 |  
 | 184 |  
 | 
          
            | 188 |         $output = html_writer::start_tag('fieldset');
 | 185 |         $output = html_writer::start_tag('fieldset');
 | 
          
            | 189 |         $fileslabel = $options->add_question_identifier_to_label(get_string('answerfiles', 'qtype_essay'));
 | 186 |         $fileslabel = $options->add_question_identifier_to_label(get_string('answerfiles', 'qtype_essay'));
 | 
          
            | 190 |         $output .= html_writer::tag('legend', $fileslabel, ['class' => 'sr-only']);
 | 187 |         $output .= html_writer::tag('legend', $fileslabel, ['class' => 'visually-hidden']);
 | 
          
            | 191 |         $output .= $filesrenderer->render($fm);
 | 188 |         $output .= $filesrenderer->render($fm);
 | 
          
            | 192 |         $output .= html_writer::empty_tag('input', [
 | 189 |         $output .= html_writer::empty_tag('input', [
 | 
          
            | 193 |             'type' => 'hidden',
 | 190 |             'type' => 'hidden',
 | 
          
            | 194 |             'name' => $qa->get_qt_field_name('attachments'),
 | 191 |             'name' => $qa->get_qt_field_name('attachments'),
 | 
          
            | Línea 301... | Línea 298... | 
          
            | 301 |  
 | 298 |  
 | 
          
            | 302 |     public function response_area_read_only($name, $qa, $step, $lines, $context) {
 | 299 |     public function response_area_read_only($name, $qa, $step, $lines, $context) {
 | 
          
            | Línea 303... | Línea 300... | 
          
            | 303 |         $labelbyid = $qa->get_qt_field_name($name) . '_label';
 | 300 |         $labelbyid = $qa->get_qt_field_name($name) . '_label';
 | 
          
            | 304 |  
 | 301 |  
 | 
          
            | 305 |         $responselabel = $this->displayoptions->add_question_identifier_to_label(get_string('answertext', 'qtype_essay'));
 | 302 |         $responselabel = $this->displayoptions->add_question_identifier_to_label(get_string('answertext', 'qtype_essay'));
 | 
          
            | 306 |         $output = html_writer::tag('h4', $responselabel, ['id' => $labelbyid, 'class' => 'sr-only']);
 | 303 |         $output = html_writer::tag('h4', $responselabel, ['id' => $labelbyid, 'class' => 'visually-hidden']);
 | 
          
            | 307 |         $output .= html_writer::tag('div', $this->prepare_response($name, $qa, $step, $context), [
 | 304 |         $output .= html_writer::tag('div', $this->prepare_response($name, $qa, $step, $context), [
 | 
          
            | 308 |             'role' => 'textbox',
 | 305 |             'role' => 'textbox',
 | 
          
            | 309 |             'aria-readonly' => 'true',
 | 306 |             'aria-readonly' => 'true',
 | 
          
            | Línea 339... | Línea 336... | 
          
            | 339 |         $editor->use_editor($id, $this->get_editor_options($context),
 | 336 |         $editor->use_editor($id, $this->get_editor_options($context),
 | 
          
            | 340 |                 $this->get_filepicker_options($context, $draftitemid));
 | 337 |                 $this->get_filepicker_options($context, $draftitemid));
 | 
          
            | Línea 341... | Línea 338... | 
          
            | 341 |  
 | 338 |  
 | 
          
            | 342 |         $responselabel = $this->displayoptions->add_question_identifier_to_label(get_string('answertext', 'qtype_essay'));
 | 339 |         $responselabel = $this->displayoptions->add_question_identifier_to_label(get_string('answertext', 'qtype_essay'));
 | 
          
            | 343 |         $output = html_writer::tag('label', $responselabel, [
 | 340 |         $output = html_writer::tag('label', $responselabel, [
 | 
          
            | 344 |             'class' => 'sr-only',
 | 341 |             'class' => 'visually-hidden',
 | 
          
            | 345 |             'for' => $id,
 | 342 |             'for' => $id,
 | 
          
            | 346 |         ]);
 | 343 |         ]);
 | 
          
            | 347 |         $output .= html_writer::start_tag('div', array('class' =>
 | 344 |         $output .= html_writer::start_tag('div', array('class' =>
 | 
          
            | Línea 551... | Línea 548... | 
          
            | 551 |  
 | 548 |  
 | 
          
            | 552 |     public function response_area_read_only($name, $qa, $step, $lines, $context) {
 | 549 |     public function response_area_read_only($name, $qa, $step, $lines, $context) {
 | 
          
            | Línea 553... | Línea 550... | 
          
            | 553 |         $id = $qa->get_qt_field_name($name) . '_id';
 | 550 |         $id = $qa->get_qt_field_name($name) . '_id';
 | 
          
            | 554 |  
 | 551 |  
 | 
          
            | 555 |         $responselabel = $this->displayoptions->add_question_identifier_to_label(get_string('answertext', 'qtype_essay'));
 | 552 |         $responselabel = $this->displayoptions->add_question_identifier_to_label(get_string('answertext', 'qtype_essay'));
 | 
          
            | 556 |         $output = html_writer::tag('label', $responselabel, ['class' => 'sr-only', 'for' => $id]);
 | 553 |         $output = html_writer::tag('label', $responselabel, ['class' => 'visually-hidden', 'for' => $id]);
 | 
          
            | 557 |         $output .= $this->textarea($step->get_qt_var($name), $lines, ['id' => $id, 'readonly' => 'readonly']);
 | 554 |         $output .= $this->textarea($step->get_qt_var($name), $lines, ['id' => $id, 'readonly' => 'readonly']);
 | 
          
            | Línea 558... | Línea 555... | 
          
            | 558 |         return $output;
 | 555 |         return $output;
 | 
          
            | 559 |     }
 | 556 |     }
 | 
          
            | 560 |  
 | 557 |  
 | 
          
            | Línea 561... | Línea 558... | 
          
            | 561 |     public function response_area_input($name, $qa, $step, $lines, $context) {
 | 558 |     public function response_area_input($name, $qa, $step, $lines, $context) {
 | 
          
            | 562 |         $inputname = $qa->get_qt_field_name($name);
 | 559 |         $inputname = $qa->get_qt_field_name($name);
 | 
          
            | 563 |         $id = $inputname . '_id';
 | 560 |         $id = $inputname . '_id';
 | 
          
            | 564 |  
 | 561 |  
 | 
          
            | Línea 565... | Línea 562... | 
          
            | 565 |         $responselabel = $this->displayoptions->add_question_identifier_to_label(get_string('answertext', 'qtype_essay'));
 | 562 |         $responselabel = $this->displayoptions->add_question_identifier_to_label(get_string('answertext', 'qtype_essay'));
 | 
          
            | 566 |         $output = html_writer::tag('label', $responselabel, ['class' => 'sr-only', 'for' => $id]);
 | 563 |         $output = html_writer::tag('label', $responselabel, ['class' => 'visually-hidden', 'for' => $id]);
 |