5 public $typ =
"matrixQuestion";
13 if( substr(
$name,0,5) ==
"count" ){
14 $n = explode(
"_",
$name);
15 if( (
sizeof($n) == 2) AND (is_numeric($n[1])) ){
16 if( isset($this->data[
$name]) ){
17 return $this->data[
$name];
22 return "falsche synthax bei data[count]";
31 if( substr(
$name,0,5) ==
"count" ){
32 $n = explode(
"_",
$name);
33 if( (
sizeof($n) == 2) AND (is_numeric($n[1])) ){
38 return "falsche synthax bei data[count]";
50 if( (isset($_SESSION[
"last_option_edit"])) AND ( $_SESSION[
"last_option_edit"] == $this->ID ) ){
51 $edited =
"option_last_edit";
52 unset($_SESSION[
"last_option_edit"] );
55 echo
"<tr class='$edited'>";
56 echo
"<td>{$this->ID}</td>";
57 echo
"<td style='text-align:center'>
58 <input type='text' value='{$this->dispName}' name='question_ID{$this->ID}_name' placeholder='Fragestellung' style='width:90%'/>
61 echo
"<td style='text-align:center'>
62 <input type='text' value='{$this->name}' name='question_ID{$this->ID}_name2' style='width:90%'/>
66 if( $this->is_required ===
true){
67 $sel =
"checked='checked'";
69 echo
"<td style='text-align:center;'>
70 <input type='checkbox' name='question_ID{$this->ID}_required' value='true' $sel>
75 <input type='submit' name='addq_option_ID{$this->ID}' title='Frage Einfügen' value='' style='padding:0px;margin:0px;background-color:transparent;background-image:url( ".APP_ROOT.
"/icons/22/list-add.png );background-repeat:no-repeat;width:26px;height:26px;' />
76 <input type='submit' name='rmq_option_ID{$this->ID}' title='Frage Löschen' value='' tabindex='-1' style='padding:0px;margin:0px;background-color:transparent;background-image:url( ".APP_ROOT.
"/icons/22/edit-delete.png );background-repeat:no-repeat;width:26px;height:26px;' />
77 <input type='submit' name='mvupq_option_ID{$this->ID}' title='Frage nach Oben schieben' tabindex='-1' value='' style='padding:0px;margin:0px;background-color:transparent;background-image:url( ".APP_ROOT.
"/icons/22/go-up.png );background-repeat:no-repeat;width:26px;height:26px;' />
78 <input type='submit' name='mvdwnq_option_ID{$this->ID}' title='Frage nach Unten schieben' tabindex='-1' value='' style='padding:0px;margin:0px;background-color:transparent;background-image:url( ".APP_ROOT.
"/icons/22/go-down.png );background-repeat:no-repeat;width:26px;height:26px' />
86 if( (isset($_POST[
"question_ID{$this->ID}_required"])) AND ($_POST[
"question_ID{$this->ID}_required"] ==
"true") ){
87 $this->is_required =
true;
89 $this->is_required =
false;
93 if( (isset($_POST[
"question_ID{$this->ID}_name"])) AND ($_POST[
"question_ID{$this->ID}_name"] !=
"") ){
94 $dispName = htmlspecialchars($_POST[
"question_ID{$this->ID}_name"] , ENT_QUOTES ,
"UTF-8",
true);
98 return "Name der Option mit ID {$this->ID} enthält mehr als 256 Zeichen!";
101 return "Name der Option mit ID {$this->ID} nicht angegeben!";
105 if( (isset($_POST[
"question_ID{$this->ID}_name2"])) AND ($_POST[
"question_ID{$this->ID}_name2"] !=
"") ){
106 $r = $this->
set_name( $_POST[
"question_ID{$this->ID}_name2"] );