Search moodle.org's
Developer Documentation

  • Bug fixes for general core bugs in 3.11.x will end 14 Nov 2022 (12 months plus 6 months extension).
  • Bug fixes for security issues in 3.11.x will end 13 Nov 2023 (18 months plus 12 months extension).
  • PHP version: minimum PHP 7.3.0 Note: minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is supported too.
  • Backend generic code.

    Copyright: 2013 The Open University
    License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
    File Size: 199 lines (6 kb)
    Included or required:0 times
    Referenced: 0 times
    Includes or requires: 0 files

    Defines 1 class

    tool_generator_backend:: (5 methods):
      __construct()
      size_for_name()
      log()
      dot()
      end_log()


    Class: tool_generator_backend  - X-Ref

    Backend generic code for all tool_generator commands.

    __construct($size, $fixeddataset = false, $filesizelimit = false, $progress = true)   X-Ref
    Generic generator class

    param: int $size Size as numeric index
    param: bool $fixeddataset To use fixed or random data
    param: int|bool $filesizelimit The max number of bytes for a generated file
    param: bool $progress True if progress information should be displayed

    size_for_name($sizename)   X-Ref
    Converts a size name into the numeric constant.

    param: string $sizename Size name e.g. 'L'
    return: int Numeric version

    log($langstring, $a = null, $leaveopen = false)   X-Ref
    Displays information as part of progress.

    param: string $langstring Part of langstring (after progress_)
    param: mixed $a Optional lang string parameters
    param: bool $leaveopen If true, doesn't close LI tag (ready for dots)

    dot($number, $total)   X-Ref
    Outputs dots. There is up to one dot per second. Once a minute, it
    displays a percentage.

    param: int $number Number of completed items
    param: int $total Total number of items to complete

    end_log()   X-Ref
    Ends a log string that was started using log function with $leaveopen.