示例#1
0
 public function __construct($browser, $course, $cm, $context, $areas, $filearea) {
     parent::__construct($browser, $context);
     $this->course   = $course;
     $this->cm       = $cm;
     $this->areas    = $areas;
     $this->filearea = $filearea;
 }
示例#2
0
 public function __construct($browser, $course, $cm, $context, $areas)
 {
     global $DB;
     parent::__construct($browser, $context);
     $this->course = $course;
     $this->cm = $cm;
     $this->areas = $areas;
 }
示例#3
0
 public function __construct($browser, $context, $storedfile, $urlbase, $topvisiblename, $itemidused, $readaccess, $writeaccess, $areaonly)
 {
     parent::__construct($browser, $context);
     $this->lf = $storedfile;
     $this->urlbase = $urlbase;
     $this->topvisiblename = $topvisiblename;
     $this->itemidused = $itemidused;
     $this->readaccess = $readaccess;
     $this->writeaccess = $writeaccess;
     $this->areaonly = $areaonly;
 }
示例#4
0
 public function __construct($browser, $context)
 {
     global $DB, $USER;
     parent::__construct($browser, $context);
     $userid = $context->instanceid;
     if ($userid == $USER->id) {
         $this->user = $USER;
     } else {
         // if context exists user record should exist too ;-)
         $this->user = $DB->get_record('user', array('id' => $userid));
     }
 }
 public function __construct($browser, $context, $course, $cm, $modname)
 {
     global $CFG;
     parent::__construct($browser, $context);
     $this->course = $course;
     $this->cm = $cm;
     $this->modname = $modname;
     include_once "{$CFG->dirroot}/mod/{$modname}/lib.php";
     //find out all supported areas
     $functionname = 'mod_' . $modname . '_get_file_areas';
     $functionname_old = $modname . '_get_file_areas';
     if (function_exists($functionname)) {
         $this->areas = $functionname($course, $cm, $context);
     } else {
         if (function_exists($functionname_old)) {
             $this->areas = $functionname_old($course, $cm, $context);
         } else {
             $this->areas = array();
         }
     }
     unset($this->areas['intro']);
     // hardcoded, ignore attempts to override it
 }
 /**
  * Constructor
  *
  * @param file_browser $browser file browser instance
  * @param stdClass $context context object
  * @param stdClass $course course object
  * @param file_info_context_course $courseinfo file info instance
  */
 public function __construct($browser, $context, $course, file_info_context_course $courseinfo)
 {
     parent::__construct($browser, $context);
     $this->course = $course;
     $this->courseinfo = $courseinfo;
 }
 public function __construct($browser, $context, $course)
 {
     global $DB;
     parent::__construct($browser, $context);
     $this->course = $course;
 }
示例#8
0
 /**
  * Constructor (in case you did not realize it ;-)
  *
  * @param file_browser $browser
  * @param stdClass $course
  * @param stdClass $cm
  * @param stdClass $context
  * @param array $areas
  * @param string $filearea
  */
 public function __construct($browser, $course, $cm, $context, $areas, $filearea)
 {
     parent::__construct($browser, $context);
     $this->browser = $browser;
     $this->course = $course;
     $this->cm = $cm;
     $this->component = 'mod_data';
     $this->context = $context;
     $this->areas = $areas;
     $this->filearea = $filearea;
 }
 /**
  * Constructor
  *
  * @param file_browser $browser file browser instance
  * @param stdClass $context context object
  * @param stdClass $category category object
  */
 public function __construct($browser, $context, $category)
 {
     parent::__construct($browser, $context);
     $this->category = $category;
 }
示例#10
0
 /**
  * Constructor
  *
  * @param file_browser $browser
  * @param stdClass $context
  * @param stdClass $user
  */
 public function __construct($browser, $context, $user)
 {
     parent::__construct($browser, $context);
     $this->user = $user;
 }
 /**
  * Constructor
  *
  * @param file_browser $browser file_browser instance
  * @param stdClass $context context object
  */
 public function __construct($browser, $context)
 {
     parent::__construct($browser, $context);
 }
示例#12
0
 public function __construct($browser)
 {
     parent::__construct($browser, get_context_instance(CONTEXT_SYSTEM));
 }