original_string: public function save_answers_files($context, $maxbytes, &$answer, $answereditor = '', $responseeditor = '') {
          global $DB;
          if (isset($answereditor['itemid'])) {
              $answer->answer = file_save_draft_area_files($answereditor['itemid'],
                      $context->id, 'mod_lesson', 'page_answers', $answer->id,
                      array('noclean' => true, 'maxfiles' => EDITOR_UNLIMITED_FILES, 'maxbytes' => $maxbytes),
                      $answer->answer, null);
              $DB->set_field('lesson_answers', 'answer', $answer->answer, array('id' => $answer->id));
          }
          if (isset($responseeditor['itemid'])) {
              $answer->response = file_save_draft_area_files($responseeditor['itemid'],
                      $context->id, 'mod_lesson', 'page_responses', $answer->id,
                      array('noclean' => true, 'maxfiles' => EDITOR_UNLIMITED_FILES, 'maxbytes' => $maxbytes),
                      $answer->response, null);
              $DB->set_field('lesson_answers', 'response', $answer->response, array('id' => $answer->id));
          }
      }
code: public function save_answers_files($context, $maxbytes, &$answer, $answereditor = '', $responseeditor = '') {
          global $DB;
          if (isset($answereditor['itemid'])) {
              $answer->answer = file_save_draft_area_files($answereditor['itemid'],
                      $context->id, 'mod_lesson', 'page_answers', $answer->id,
                      array('noclean' => true, 'maxfiles' => EDITOR_UNLIMITED_FILES, 'maxbytes' => $maxbytes),
                      $answer->answer, null);
              $DB->set_field('lesson_answers', 'answer', $answer->answer, array('id' => $answer->id));
          }
          if (isset($responseeditor['itemid'])) {
              $answer->response = file_save_draft_area_files($responseeditor['itemid'],
                      $context->id, 'mod_lesson', 'page_responses', $answer->id,
                      array('noclean' => true, 'maxfiles' => EDITOR_UNLIMITED_FILES, 'maxbytes' => $maxbytes),
                      $answer->response, null);
              $DB->set_field('lesson_answers', 'response', $answer->response, array('id' => $answer->id));
          }
      }
code_tokens: public function save_answers_files ( $ context , $ maxbytes , & $ answer , $ answereditor = '' , $ responseeditor = '' ) { global $ DB ; if ( isset ( $ answereditor [ 'itemid' ] ) ) { $ answer -> answer = file_save_draft_area_files ( $ answereditor [ 'itemid' ] , $ context -> id , 'mod_lesson' , 'page_answers' , $ answer -> id , array ( 'noclean' => true , 'maxfiles' => EDITOR_UNLIMITED_FILES , 'maxbytes' => $ maxbytes ) , $ answer -> answer , null ) ; $ DB -> set_field ( 'lesson_answers' , 'answer' , $ answer -> answer , array ( 'id' => $ answer -> id ) ) ; } if ( isset ( $ responseeditor [ 'itemid' ] ) ) { $ answer -> response = file_save_draft_area_files ( $ responseeditor [ 'itemid' ] , $ context -> id , 'mod_lesson' , 'page_responses' , $ answer -> id , array ( 'noclean' => true , 'maxfiles' => EDITOR_UNLIMITED_FILES , 'maxbytes' => $ maxbytes ) , $ answer -> response , null ) ; $ DB -> set_field ( 'lesson_answers' , 'response' , $ answer -> response , array ( 'id' => $ answer -> id ) ) ; } }
docstring: save editor answers files and update answer record
  
  @param object $context
  @param int $maxbytes
  @param object $answer
  @param object $answereditor
  @param object $responseeditor
docstring_tokens: save editor answers files and update answer record