Stud.IP  4.2 Revision
HomeworkFolder Class Reference
Inheritance diagram for HomeworkFolder:
Inheritance graph
Collaboration diagram for HomeworkFolder:
Collaboration graph

Public Member Functions

 __construct ($folderdata=null)
 
 getIcon ($role=Icon::DEFAULT_ROLE)
 
 isSubfolderAllowed ($user_id)
 
 getDescriptionTemplate ()
 
 getEditTemplate ()
 
 isFileEditable ($fileref_or_id, $user_id)
 
 isFileWritable ($fileref_or_id, $user_id)
 
- Public Member Functions inherited from PermissionEnabledFolder
 __construct ($folderdata=null)
 
 getPermissionString ()
 
 checkPermission ($perm, $user_id=null)
 
 getIcon ($role=Icon::DEFAULT_ROLE)
 
 isVisible ($user_id=null)
 
 isReadable ($user_id=null)
 
 isWritable ($user_id=null)
 
 isSubfolderAllowed ($user_id)
 
 getDescriptionTemplate ()
 
 validateUpload ($uploadedfile, $user_id)
 
 getEditTemplate ()
 
 isFileDownloadable ($fileref_or_id, $user_id)
 
- Public Member Functions inherited from StandardFolder
 __construct ($folderdata=null)
 
 getIcon ($role=Icon::DEFAULT_ROLE)
 
 getId ()
 
 __get ($attribute)
 
 __set ($name, $value)
 
 isVisible ($user_id)
 
 isReadable ($user_id)
 
 isWritable ($user_id)
 
 isEditable ($user_id)
 
 isSubfolderAllowed ($user_id)
 
 getDescriptionTemplate ()
 
 getEditTemplate ()
 
 setDataFromEditTemplate ($request)
 
 store ()
 
 validateUpload ($uploadedfile, $user_id)
 
 getSubfolders ()
 
 getFiles ()
 
 getParent ()
 
 createFile ($file)
 
 deleteFile ($file_ref_id)
 
 createSubfolder (FolderType $foldertype)
 
 deleteSubfolder ($subfolder_id)
 
 delete ()
 
 isFileDownloadable ($fileref_or_id, $user_id)
 
 isFileEditable ($fileref_or_id, $user_id)
 
 isFileWritable ($fileref_or_id, $user_id)
 
 getRangeObject ()
 

Static Public Member Functions

static getTypeName ()
 
static availableInRange ($range_id_or_object, $user_id)
 
- Static Public Member Functions inherited from PermissionEnabledFolder
static availableInRange ($range_id_or_object, $user_id)
 
static getTypeName ()
 
- Static Public Member Functions inherited from StandardFolder
static getTypeName ()
 
static availableInRange ($range_id_or_object, $user_id)
 

Static Public Attributes

static $sorter = 2
 
- Static Public Attributes inherited from StandardFolder
static $sorter = 0
 

Additional Inherited Members

- Protected Attributes inherited from PermissionEnabledFolder
 $permission = 7
 
 $perms = ['x' => 1
 
 $must_have_perm => 2, 'r' => 4, 'f' => 8]
 
- Protected Attributes inherited from StandardFolder
 $folderdata
 

Constructor & Destructor Documentation

◆ __construct()

__construct (   $folderdata = null)

Member Function Documentation

◆ availableInRange()

static availableInRange (   $range_id_or_object,
  $user_id 
)
static

This method tells if the FolderType implementation can be created in a specific range type.

Some FolderType implementations aren't useful in conjunction with a specific range type. An FolderType implementation therefore must provide this method so that other parts of the file area system can easily check if folders of the FolderType implementation can be placed inside standard folders.

Parameters
string | Object$range_id_or_objectid or object of type "course", "user", "institute", "message"
string$user_id
Returns
boolean True, if creatable, false otherwise.

Implements FolderType.

Here is the call graph for this function:

◆ getDescriptionTemplate()

getDescriptionTemplate ( )

Returns the description template for a HomeworkFolder instance.

Returns
string A description for the HomeworkFolder instance.

Implements FolderType.

Here is the call graph for this function:

◆ getEditTemplate()

getEditTemplate ( )

Folders of this type don't have an edit template.

Returns
string

Implements FolderType.

◆ getIcon()

getIcon (   $role = Icon::DEFAULT_ROLE)

Returns the Icon object for the HomeworkFolder type.

Returns
Icon An icon object with the icon for this folder type.

Implements FolderType.

Here is the call graph for this function:

◆ getTypeName()

static getTypeName ( )
static

Returns a localised name of the HomeworkFolder type.

Returns
string The localised name of this folder type.

Implements FolderType.

◆ isFileEditable()

isFileEditable (   $fileref_or_id,
  $user_id 
)
Parameters
FileRef | string$fileref_or_id
string$user_id
Returns
bool

Implements FolderType.

◆ isFileWritable()

isFileWritable (   $fileref_or_id,
  $user_id 
)

Checks if a user has write permissions to a file.

For standard folders write permissions are granted if the user is the owner of the file or if the user has at least tutor permissions on the Stud.IP object specified by range_id (such objects may be courses or institutes for example).

Parameters
FileRef | string$fileref_or_id
string$user_id
Returns
bool

Implements FolderType.

◆ isSubfolderAllowed()

isSubfolderAllowed (   $user_id)

Homework folders don't allow subfolders.

Returns
bool False

Implements FolderType.

Field Documentation

◆ $sorter

$sorter = 2
static

The documentation for this class was generated from the following file: