예제 #1
0
 /**
  * Constructs object ready to create course.
  *
  * @param string $shortname Course shortname
  * @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
  */
 public function __construct($shortname, $size, $fixeddataset = false, $filesizelimit = false, $progress = true)
 {
     // Set parameters.
     $this->shortname = $shortname;
     parent::__construct($size, $fixeddataset, $filesizelimit, $progress);
 }
예제 #2
0
 /**
  * Constructs object ready to make the site.
  *
  * @param int $size Size as numeric index
  * @param bool $bypasscheck If debugging level checking was skipped.
  * @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
  * @return int Course id
  */
 public function __construct($size, $bypasscheck, $fixeddataset = false, $filesizelimit = false, $progress = true)
 {
     // Set parameters.
     $this->bypasscheck = $bypasscheck;
     parent::__construct($size, $fixeddataset, $filesizelimit, $progress);
 }
예제 #3
0
 /**
  * Constructs object ready to create course.
  *
  * @param string $shortname Course shortname
  * @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
  */
 public function __construct($shortname, $size, $fixeddataset = false, $filesizelimit = false, $progress = true, $fullname = null, $summary = null, $summaryformat = FORMAT_HTML)
 {
     // Set parameters.
     $this->shortname = $shortname;
     // We can't allow fullname to be set to an empty string.
     if (empty($fullname)) {
         $this->fullname = get_string('fullname', 'tool_generator', array('size' => get_string('shortsize_' . $size, 'tool_generator')));
     } else {
         $this->fullname = $fullname;
     }
     // Summary, on the other hand, should be empty-able.
     if (!is_null($summary)) {
         $this->summary = $summary;
         $this->summaryformat = $summaryformat;
     }
     parent::__construct($size, $fixeddataset, $filesizelimit, $progress);
 }