ILIAS
release_5-2 Revision v5.2.25-18-g3f80b828510
◀ ilDoc Overview
class.ilAssQuestionProcessLockFileStorage.php
Go to the documentation of this file.
1
<?
php
2
/* Copyright (c) 1998-2013 ILIAS open source, Extended GPL, see docs/LICENSE */
3
4
require_once
'Services/FileSystem/classes/class.ilFileSystemStorage.php'
;
5
12
class
ilAssQuestionProcessLockFileStorage
extends
ilFileSystemStorage
13
{
14
private
$subPath
;
15
16
public
function
__construct
($questionId, $userId)
17
{
18
parent::__construct(
ilFileSystemStorage::STORAGE_DATA
,
true
, $questionId);
19
20
$this->
initSubPath
($userId);
21
}
22
31
protected
function
getPathPrefix
()
32
{
33
return
'ilAssQuestionProcessLocks'
;
34
}
35
45
protected
function
getPathPostfix
()
46
{
47
return
'question'
;
48
}
49
50
public
function
getPath
()
51
{
52
return
parent::getPath() .
'/'
.
$this->subPath
;
53
}
54
55
public
function
create
()
56
{
57
if
(!file_exists($this->
getPath
()))
58
{
59
ilUtil::makeDirParents
($this->
getPath
());
60
}
61
return
true
;
62
}
63
64
private
function
initSubPath
($userId)
65
{
66
$userId = (
string
)$userId;
67
68
$path
=
array
();
69
70
for
($i = 0, $max = strlen($userId); $i < $max; $i++)
71
{
72
$path
[] = substr($userId, $i, 1);
73
}
74
75
$this->subPath = implode(
'/'
,
$path
);
76
77
}
78
}
ilUtil\makeDirParents
static makeDirParents($a_dir)
Create a new directory and all parent directories.
Definition:
class.ilUtil.php:2430
ilAssQuestionProcessLockFileStorage
Definition:
class.ilAssQuestionProcessLockFileStorage.php:12
ilAssQuestionProcessLockFileStorage\__construct
__construct($questionId, $userId)
Definition:
class.ilAssQuestionProcessLockFileStorage.php:16
ilAssQuestionProcessLockFileStorage\getPathPrefix
getPathPrefix()
Get path prefix.
Definition:
class.ilAssQuestionProcessLockFileStorage.php:31
string
Add rich text string
The name of the decorator.
Definition:
05featuredemo.inc.php:117
ilFileSystemStorage\STORAGE_DATA
const STORAGE_DATA
Definition:
class.ilFileSystemStorage.php:37
ilAssQuestionProcessLockFileStorage\$subPath
$subPath
Definition:
class.ilAssQuestionProcessLockFileStorage.php:14
ilFileSystemStorage\$path
$path
Definition:
class.ilFileSystemStorage.php:48
ilAssQuestionProcessLockFileStorage\create
create()
Definition:
class.ilAssQuestionProcessLockFileStorage.php:55
ilAssQuestionProcessLockFileStorage\initSubPath
initSubPath($userId)
Definition:
class.ilAssQuestionProcessLockFileStorage.php:64
ilAssQuestionProcessLockFileStorage\getPath
getPath()
Definition:
class.ilAssQuestionProcessLockFileStorage.php:50
array
Create styles array
The data for the language used.
Definition:
40duplicateStyle.php:19
ilAssQuestionProcessLockFileStorage\getPathPostfix
getPathPostfix()
Get directory name.
Definition:
class.ilAssQuestionProcessLockFileStorage.php:45
ilFileSystemStorage
Definition:
class.ilFileSystemStorage.php:34
php
Modules
TestQuestionPool
classes
class.ilAssQuestionProcessLockFileStorage.php
Generated on Fri Feb 21 2025 19:01:06 for ILIAS by
1.8.13 (using
Doxyfile
)