Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.10.x will end 8 November 2021 (12 months).
  • Bug fixes for security issues in 3.10.x will end 9 May 2022 (18 months).
  • PHP version: minimum PHP 7.2.0 Note: minimum PHP version has increased since Moodle 3.8. PHP 7.3.x and 7.4.x are supported too.

Differences Between: [Versions 310 and 311] [Versions 310 and 400] [Versions 310 and 401] [Versions 310 and 402] [Versions 310 and 403] [Versions 39 and 310]

Essay

Copyright: 2009 Sam Hemelryk
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 441 lines (18 kb)
Included or required:0 times
Referenced: 3 times
Includes or requires: 0 files

Defines 3 classes

lesson_page_type_essay:: (15 methods):
  get_typeid()
  get_typestring()
  get_idstring()
  extract_useranswer()
  display()
  create_answers()
  on_after_write_attempt()
  format_answer()
  check_answer()
  update()
  stats()
  report_answers()
  is_unanswered()
  requires_manual_grading()
  get_earnedscore()

lesson_add_page_form_essay:: (1 method):
  custom_definition()

lesson_display_answer_form_essay:: (1 method):
  definition()


Class: lesson_page_type_essay  - X-Ref

get_typeid()   X-Ref
No description

get_typestring()   X-Ref
No description

get_idstring()   X-Ref
No description

extract_useranswer($useranswer)   X-Ref
Unserialize attempt useranswer and add missing responseformat if needed
for compatibility with old records.

param: string $useranswer serialized object
return: object

display($renderer, $attempt)   X-Ref
No description

create_answers($properties)   X-Ref
No description

on_after_write_attempt($attempt, $result)   X-Ref
Overridden function

param: object $attempt
param: object $result
return: array

format_answer($answer, $context, $answerformat, $options = [])   X-Ref
Custom formats the answer to display

param: string $answer
param: context $context
param: int $answerformat
param: array $options Optional param for additional options.
return: string Returns formatted string

check_answer()   X-Ref
No description

update($properties, $context = null, $maxbytes = null)   X-Ref
No description

stats(array &$pagestats, $tries)   X-Ref
No description

report_answers($answerpage, $answerdata, $useranswer, $pagestats, &$i, &$n)   X-Ref
No description

is_unanswered($nretakes)   X-Ref
No description

requires_manual_grading()   X-Ref
No description

get_earnedscore($answers, $attempt)   X-Ref
No description

Class: lesson_add_page_form_essay  - X-Ref

custom_definition()   X-Ref
No description

Class: lesson_display_answer_form_essay  - X-Ref

definition()   X-Ref
No description