47 public function __construct($a_container_id = 0, $a_ass_id = 0)
49 $this->ass_id = $a_ass_id;
51 $this->path_conversion =
true;
52 $this->container_id = $a_container_id;
68 $num = $a_container_id;
69 for (
$i = self::MAX_EXPONENT;
$i > 0;
$i--) {
70 $factor = pow(self::FACTOR,
$i);
71 if (($tmp = (
int) ($num / $factor)) or $found) {
73 $num = $num % $factor;
79 $path_string = (implode(
'/',
$path) .
'/');
81 return $path_string . $a_name .
'_' . $a_container_id;
91 $this->path = CLIENT_DATA_DIR;
99 $this->path .= self::_createPathFromId($this->container_id, $this->
getPathPostfix());
101 $this->path.=
"/ass_" . $this->ass_id;
133 if (!is_dir($this->path)) {
137 $dp = opendir($this->path);
138 while (
$file = readdir($dp)) {
139 if (!is_dir($this->path .
'/' .
$file)) {
142 'size' => filesize($this->path .
'/' . $file),
143 'ctime' => filectime($this->path .
'/' . $file),
144 'fullpath' => $this->path .
'/' . $file);
static sortArray( $array, $a_array_sortby, $a_array_sortorder=0, $a_numeric=false, $a_keep_keys=false)
sortArray
__construct($a_container_id=0, $a_ass_id=0)
Constructor.
getFiles()
Get assignment files.
getPathPrefix()
Implementation of abstract method.
getPathPostfix()
Implementation of abstract method.
static _createPathFromId($a_container_id, $a_name)
Create a path from an id: e.g 12345 will be converted to 12/34/<name>_5.
static removeTrailingPathSeparators($path)
Create styles array
The data for the language used.
if(!file_exists("$old.txt")) if($old===$new) if(file_exists("$new.txt")) $file