Stud.IP  4.0
 All Data Structures Namespaces Files Functions Variables Groups
EvaluationDB Class Reference
Inheritance diagram for EvaluationDB:
EvaluationObjectDB DatabaseObject AuthorObject

Public Member Functions

 __construct ()
 
 load (&$evalObject)
 
 save (&$evalObject)
 
 delete (&$evalObject)
 
 exists ($evalID)
 
 hasVoted ($evalID, $userID="")
 
 getType ($objectID)
 
 connectWithUser ($evalID, $userID)
 
 removeUser ($evalID, $userID="")
 
 search_range ($search_str)
 
- Public Member Functions inherited from EvaluationObjectDB
 __construct ()
 
 getRangename ($rangeID, $html_decode=true)
 
 getValidRangeIDs (&$permObj, &$userObj, $rangeID)
 
 getPublicTemplateIDs ($searchString)
 
 getEvaluationIDs ($rangeID="", $state="")
 
 getEvalID ($objectID)
 
 getType ($objectID)
 
- Public Member Functions inherited from DatabaseObject
 __construct ()
 
 getObjectID ()
 
 setObjectID ($objectID)
 
 getAuthorID ()
 
 setAuthorID ($authorID)
 
 getRangeID ()
 
 setRangeID ($rangeID)
 
- Public Member Functions inherited from AuthorObject
 __construct ()
 
 x_instanceof ()
 
 isError ()
 
 getErrors ()
 
 resetErrors ()
 
 throwError ($errcode, $errstring)
 
 throwErrorFromClass (AuthorObject $class)
 

Static Public Member Functions

static getNumberOfVotes ($evalID)
 
static getUserVoted ($evalID, $answerIDs=[], $questionIDs=[])
 
- Static Public Member Functions inherited from EvaluationObjectDB
static getGlobalPerm ($as_value=false)
 
static getRangePerm ($rangeID, $userID=NULL, $as_value=false)
 
static getEvalUserRangesWithNoPermission (&$eval, $return_ids=false)
 

Additional Inherited Members

- Data Fields inherited from DatabaseObject
 $authorID
 
 $objectID
 
 $rangeID
 
- Data Fields inherited from AuthorObject
 $errorArray
 
 $instanceof
 

Constructor & Destructor Documentation

__construct ( )

Member Function Documentation

connectWithUser (   $evalID,
  $userID 
)

Connect a user with an evaluation public

Parameters
string$evalIDThe evaluation id
string$userIDThe user id
delete ( $evalObject)

Deletes an evaluation public

Parameters
objectEvaluation &$evalObject The evaluation to delete
Exceptions
error
exists (   $evalID)

Checks if evaluation with this ID exists public

Parameters
string$evalIDThe evalID
Returns
bool YES if exists
static getNumberOfVotes (   $evalID)
static

Get number of users who participated in the eval public

Parameters
string$evalIDThe eval id
Returns
integer The number of users
getType (   $objectID)

Returns the type of an objectID public

Parameters
string$objectIDThe objectID
Returns
string INSTANCEOF_x, else NO
static getUserVoted (   $evalID,
  $answerIDs = [],
  $questionIDs = [] 
)
static

Get users who participated in the eval public

Parameters
string$evalIDThe eval id
array$answerIDsThe answerIDs to get the pseudonym users
Returns
string[] Ids of the users who voted
hasVoted (   $evalID,
  $userID = "" 
)

Checks if someone used the evaluation public

Parameters
string$evalIDThe eval id
string$userIDThe user id
Returns
bool YES if evaluation was used
load ( $evalObject)

Loads an evaluation from DB into an object

public

Parameters
objectEvaluationObject &$evalObject The evaluation to load
Exceptions
error
removeUser (   $evalID,
  $userID = "" 
)

Removes the connection of an evaluation with a user or all users public

Parameters
string$evalIDThe evaluation id
string$userIDThe user id
save ( $evalObject)

Saves an evaluation public

Parameters
objectEvaluation &$evalObject The evaluation to save
Exceptions
error
search_range (   $search_str)

public

Parameters
string$search_str
Returns
array

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