Stud.IP  4.0
 All Data Structures Namespaces Files Functions Variables Groups
EvalTemplateGUI Class Reference

Public Member Functions

 __construct ()
 
 createSelections ($polTemplates, $skalaTemplates, $normalTemplates, $freeTemplates, $myuserid)
 
 createTemplateForm (&$question, $onthefly="")
 
 createTemplateFormFree (&$question)
 
 createHeadline ($text)
 
 createSubHeadline ($text)
 
 createInfoBox ()
 
 makeNewAnswer ()
 
 deleteAnswer ($pos, &$answers, &$deleteAnswers)
 
 getPageCommand ()
 
 setUniqueName (&$question, $db, $myuserid, $rootTag=NO)
 

Data Fields

 $BR
 
 $command
 

Constructor & Destructor Documentation

__construct ( )

Member Function Documentation

createHeadline (   $text)

create a blue headline

createInfoBox ( )

creates the infobox

createSelections (   $polTemplates,
  $skalaTemplates,
  $normalTemplates,
  $freeTemplates,
  $myuserid 
)

Creates the two (?) template selection lists

Parameters
createSubHeadline (   $text)

create a fat-printed sub headline with some space

createTemplateForm ( $question,
  $onthefly = "" 
)

Creates the form for the template

Parameters
createTemplateFormFree ( $question)

Creates the form for the Polskala templates

Parameters
deleteAnswer (   $pos,
$answers,
$deleteAnswers 
)

deletes the answer at position 'pos' from the array 'answers' and modifies the array 'deleteAnswers' respectively

public

Parameters
array&$answersthe answerarray
array&$deleteAnswersthe array containing the deleteCheckbox-bool-value for each answer
int$posthe position of the answer to be deleted
getPageCommand ( )

checks which button was pressed

public

Returns
string the command "add_answers", "delete_answers", etc.
makeNewAnswer ( )

creates a new answer

private

Returns
array the created answer as an array with keys 'answer_id' => new md5 id, 'text' => "", 'counter' => 0, 'correct' => NO
setUniqueName ( $question,
  $db,
  $myuserid,
  $rootTag = NO 
)

Checks if a template with the same name already exists and modifies the text of the template if necessary.

Parameters
object$templateThe template
object$dbThe EvaluationQuestionDB
string$myuseridMy userid
boolean$rootTagIf yes, add the root tag if necessary private

Field Documentation

$BR
$command

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