Stud.IP
6.0
|
Static Public Member Functions | |
static | exportUserData (StoredUserData $storage) |
static | findAll ($user_id, $begin=null, $end=null, $course_id=null, $file_limit=0, $file_offset=0) |
static | countAll ($user_id, $begin=null, $end=null, $course_id=null) |
static | findPublicFiles ($user_id, $begin=null, $end=null, $file_limit=0, $file_offset=0) |
static | countPublicFiles ($user_id, $begin=null, $end=null) |
static | findUploadedFiles ($user_id, $begin=null, $end=null, $course_id='', $unknown_license_only=false, $file_limit=0, $file_offset=0) |
static | countUploadedFiles ($user_id, $begin=null, $end=null, $course_id='', $unknown_license_only=false) |
Static Public Member Functions inherited from SimpleORMap | |
static | tableScheme ($db_table) |
static | expireTableScheme () |
static | exists ($id) |
static | countBySql ($sql='1', $params=[]) |
static | create ($data) |
static | build ($data, $is_new=true) |
static | buildExisting ($data) |
static | import ($data) |
static | findBySQL ($sql, $params=[]) |
static | findOneBySQL ($where, $params=[]) |
static | findThru ($foreign_key_value, $options) |
static | findEachBySQL ($callable, $sql, $params=[]) |
static | findMany ($pks=[], $order='', $order_params=[]) |
static | findEachMany ($callable, $pks=[], $order='', $order_params=[]) |
static | findAndMapBySQL ($callable, $where, $params=[]) |
static | findAndMapMany ($callable, $pks=[], $order='', $order_params=[]) |
static | deleteBySQL ($where, $params=[]) |
static | toObject ($id_or_object) |
static | __callStatic (string $name, array $arguments) |
Data Fields | |
$path_to_blob | |
Data Fields inherited from SimpleORMap | |
const | ID_SEPARATOR = '_' |
Static Protected Member Functions | |
static | configure ($config=[]) |
static | getAllSql ($user_id, $begin=null, $end=null, $course_id='', $file_limit=0, $file_offset=0) |
static | getPublicFilesSql ($user_id, $begin=null, $end=null, $file_limit=0, $file_offset=0) |
static | getUploadedFilesSql ($user_id, $begin=null, $end=null, $course_id='', $unknown_license_only=false, $file_limit=0, $file_offset=0) |
Static Protected Member Functions inherited from SimpleORMap | |
static | db_table () |
static | db_fields () |
static | pk () |
static | default_values () |
static | serialized_fields () |
static | alias_fields () |
static | i18n_fields () |
static | additional_fields () |
static | has_many () |
static | has_one () |
static | belongs_to () |
static | has_and_belongs_to_many () |
static | registered_callbacks () |
static | known_slots () |
static | notification_map () |
static | getter_setter_map () |
static | configure ($config=[]) |
static | config ($key) |
static | registerCallback ($types, $cb) |
static | unregisterCallback ($types, $cb) |
Protected Attributes | |
$folder_type | |
$download_url | |
Protected Attributes inherited from SimpleORMap | |
$content = [] | |
$content_db = [] | |
$is_new = true | |
$is_deleted = false | |
$relations = [] | |
$additional_data = [] | |
Additional Inherited Members | |
Static Public Attributes inherited from SimpleORMap | |
static | $schemes = null |
Protected Member Functions inherited from SimpleORMap | |
_getId ($field) | |
_setId ($field, $value) | |
_getAdditionalValueFromRelation ($field) | |
_setAdditionalValueFromRelation ($field, $value) | |
_getAdditionalValue ($field) | |
_setAdditionalValue ($field, $value) | |
parseRelationOptions ($type, $name, $options) | |
storeRelations ($only_these=null) | |
deleteRelations () | |
initializeContent () | |
applyCallbacks ($type) | |
cbNotificationMapper ($cb_type) | |
cbAfterInitialize ($cb_type) | |
setSerializedValue ($field, $value) | |
setI18nValue ($field, $value) | |
Static Protected Attributes inherited from SimpleORMap | |
static | $config = [] |
static | $reserved_slots = ['value','newid','iterator','tablemetadata', 'relationvalue','wherequery','relationoptions','data','new','id'] |
static | $performs_batch_operation = false |
cbLogDeleteFileRef | ( | ) |
cbMakeUniqueFilename | ( | ) |
cbRemoveFeedbackElements | ( | ) |
cbRemoveFileIfOrphaned | ( | ) |
|
staticprotected |
|
static |
This method counts all the FileRef objects a user has access to.
|
static |
This method counts the FileRef objects in public folders which can be accessed by a user.
|
static |
Counts all uploaded files a user has uploaded.
|
static |
Export available data of a given user into a storage object (an instance of the StoredUserData class) for that user.
StoredUserData | $storage | object to store data into |
Implements PrivacyObject.
|
static |
This method retrieves the FileRef objects a user has access to.
|
static |
This method retrieves the FileRef objects in public folders which can be accessed by a user.
|
static |
Retrieves all uploaded files a user has uploaded.
getAccessibility | ( | ) |
Returns true if the file is accessible
|
staticprotected |
This is a helper method to generate the SQL query for the findAll and countAll methods. Relevant FileRef objects for these methods can be limited by a time range and a specific course. The amount and the offset of the FileRef objects to be retrieved can also be set.
string | $user_id | The ID of the user that is used to count or retrieve FileRef objects. |
DateTime | null | $begin | The begin of the time range. |
DateTime | null | $end | The end of the time range. |
string | $course_id | The ID of the course from which FileRef objects shall be retrieved. |
int | $file_limit | The maximum amount of FileRef objects to be retrieved. |
int | $file_offset | The offset in the FileRef data from which to start retrieving objects. |
getAuthorName | ( | ) |
getDownloadURL | ( | $dltype = 'normal' | ) |
getFileType | ( | ) |
getFolderType | ( | ) |
getLicenseObject | ( | ) |
Returns the license object for this file.
|
staticprotected |
This is a helper method to generate the SQL query for the findPublicFiles and countPublicFiles methods. Relevant FileRef objects for these methods can be limited by a time range. The amount and the offset of the FileRef objects to be retrieved can also be set.
string | $user_id | The ID of the user that is used to count or retrieve FileRef objects in public folders. |
DateTime | null | $begin | The begin of the time range. |
DateTime | null | $end | The end of the time range. |
int | $file_limit | The maximum amount of FileRef objects to be retrieved from public folders. |
int | $file_offset | The offset in the FileRef data from which to start retrieving objects from public folders. |
getRangeCourseId | ( | ) |
Returns the course id of FeedbackRange object instance
Implements FeedbackRange.
getRangeIcon | ( | $role | ) |
Returns the icon object that shall be used with the FeedbackRange object instance.
string | $role | role of icon |
Implements FeedbackRange.
getRangeName | ( | ) |
Returns a human-friendly representation of the FeedbackRange object instance's name.
Implements FeedbackRange.
getRangeUrl | ( | ) |
Returns the URL of FeedbackRange view, where the object instance is visible together with the related feedback element(s).
Implements FeedbackRange.
|
staticprotected |
This is a helper method to generate the SQL query for the findUploadedFiles and countUploadedFiles methods. Relevant FileRef objects for these methods can be limited by a time range and a specified course. Furthermore, it is possible to limit the search to FileRef objects without a license set or with the "unknown" license set. The amount and the offset of the FileRef objects to be retrieved can also be set.
string | $user_id | The ID of the user whose uploaded files shall be retrieved or counted. |
DateTime | null | $begin | The begin of the time range. |
DateTime | null | $end | The end of the time range. |
string | $course_id | The ID of the course from which FileRef objects shall be retrieved. |
bool | $unknown_license_only | Whether to only query for FileRef objects without a license or with the "unknown" license set (true) or to query all uploaded FileRef objects (false). Defaults to false. |
int | $file_limit | The maximum amount of FileRef objects to be retrieved from public folders. |
int | $file_offset | The offset in the FileRef data from which to start retrieving objects from public folders. |
incrementDownloadCounter | ( | ) |
This method increments the download counter of the FileRef.
isAudio | ( | ) |
Determines if the FileRef references an audio file.
isImage | ( | ) |
Determines if the FileRef references an image file.
isLink | ( | ) |
isRangeAccessible | ( | string | $user_id = null | ) |
Returns the accessebility of FeedbackRange object instance for current active user
string | $user_id | optional; use this ID instead of $GLOBALS['user']->id |
Implements FeedbackRange.
isVideo | ( | ) |
Determines if the FileRef references a video file.
setDownloadURL | ( | $field, | |
$url | |||
) |
Overrides the usual download url that this file_ref would get by the system (sendfile.php...) Use this method by cloud plugins. If you set download URL to null, the normal sendfile.php will be set as default download URL.
$url | : string as URL or null to set URL to sendfile.php-URL |
setFolderType | ( | $field, | |
FolderType | $folder_type | ||
) |
|
protected |
|
protected |
$path_to_blob |