echo '<div class="row">' . K_NEWLINE;
    echo '<span class="label">' . K_NEWLINE;
    echo '<label for="question_explanation">' . $l['w_explanation'] . '</label>' . K_NEWLINE;
    echo '<br />' . K_NEWLINE;
    $showexplanationarea = 'javascript:if(document.getElementById(\'explanationarea\').style.display==\'none\'){document.getElementById(\'explanationarea\').style.display=\'block\';document.getElementById(\'showexplanationarea\').style.display=\'none\';document.getElementById(\'hideexplanationarea\').style.display=\'block\';}';
    echo '<span id="showexplanationarea"><a class="xmlbutton" href="#" onclick="' . $showexplanationarea . '" title="' . $l['w_show'] . '">' . $l['w_show'] . ' &rarr;</a></span>';
    $hideexplanationarea = 'javascript:if(document.getElementById(\'explanationarea\').style.display==\'block\'){document.getElementById(\'explanationarea\').style.display=\'none\';document.getElementById(\'showexplanationarea\').style.display=\'block\';document.getElementById(\'hideexplanationarea\').style.display=\'none\';}';
    echo '<span id="hideexplanationarea" style="display:none;">';
    echo '<a href="#" title="' . $l['h_preview'] . '" class="xmlbutton" onclick="previewWindow=window.open(\'tce_preview_tcecode.php?tcexamcode=\'+encodeURIComponent(document.getElementById(\'form_questioneditor\').question_explanation.value),\'previewWindow\',\'dependent,height=500,width=500,menubar=no,resizable=yes,scrollbars=yes,status=no,toolbar=no\'); return false;">' . $l['w_preview'] . '</a>' . K_NEWLINE;
    echo '<a class="xmlbutton" href="#" onclick="' . $hideexplanationarea . '" title="' . $l['w_hide'] . '">' . $l['w_hide'] . '</a> ';
    echo '</span>';
    echo '</span>' . K_NEWLINE;
    echo '<span id="explanationarea" class="formw" style="display:none;border:1px solid #808080;">' . K_NEWLINE;
    echo '<textarea cols="50" rows="10" name="question_explanation" id="question_explanation" onselect="FJ_update_selection(document.getElementById(\'form_questioneditor\').question_explanation)" title="' . $l['h_explanation'] . '">' . htmlspecialchars($question_explanation, ENT_NOQUOTES, $l['a_meta_charset']) . '</textarea>' . K_NEWLINE;
    echo '<br />' . K_NEWLINE;
    echo tcecodeEditorTagButtons('form_questioneditor', 'question_explanation', 1);
    echo '</span>' . K_NEWLINE;
    echo '</div>' . K_NEWLINE;
}
// question type
echo '<div class="row">' . K_NEWLINE;
echo '<span class="label">&nbsp;</span>' . K_NEWLINE;
echo '<div class="formw">' . K_NEWLINE;
echo '<fieldset class="noborder">' . K_NEWLINE;
echo '<legend title="' . $l['h_question_type'] . '">' . $l['w_type'] . '</legend>' . K_NEWLINE;
echo '<input type="radio" name="question_type" id="single_answer" value="1"';
if ($question_type == 1) {
    echo ' checked="checked"';
}
echo ' title="' . $l['h_enable_single_answer'] . '" />';
echo '<label for="single_answer">' . $l['w_single_answer'] . '</label>' . K_NEWLINE;
Example #2
0
echo '<div class="row"><hr /></div>' . K_NEWLINE;
echo getFormRowTextInput('subject_name', $l['w_name'], $l['h_subject_name'], '', $subject_name, '', 255, false, false, false, '');
echo '<div class="row">' . K_NEWLINE;
echo '<span class="label">' . K_NEWLINE;
echo '<label for="subject_description">' . $l['w_description'] . '</label>' . K_NEWLINE;
echo '<br />' . K_NEWLINE;
echo '<a href="#" title="' . $l['h_preview'] . '" class="xmlbutton" onclick="previewWindow=window.open(\'tce_preview_tcecode.php?tcexamcode=\'+encodeURIComponent(document.getElementById(\'form_subjecteditor\').subject_description.value),\'previewWindow\',\'dependent,height=500,width=500,menubar=no,resizable=yes,scrollbars=yes,status=no,toolbar=no\'); return false;">' . $l['w_preview'] . '</a>' . K_NEWLINE;
echo '</span>' . K_NEWLINE;
echo '<span class="formw" style="border:1px solid #808080;">' . K_NEWLINE;
echo '<textarea cols="50" rows="5" name="subject_description" id="subject_description" onselect="FJ_update_selection(document.getElementById(\'form_subjecteditor\').subject_description)" title="' . $l['h_subject_description'] . '"';
if (K_ENABLE_VIRTUAL_KEYBOARD) {
    echo ' class="keyboardInput"';
}
echo '>' . htmlspecialchars($subject_description, ENT_NOQUOTES, $l['a_meta_charset']) . '</textarea>' . K_NEWLINE;
echo '<br />' . K_NEWLINE;
echo tcecodeEditorTagButtons('form_subjecteditor', 'subject_description');
echo '</span>' . K_NEWLINE;
echo '</div>' . K_NEWLINE;
echo getFormRowCheckBox('subject_enabled', $l['w_enabled'], $l['h_enabled'], '', 1, $subject_enabled, false, '');
echo '<div class="row">' . K_NEWLINE;
// show buttons by case
if (isset($subject_id) and $subject_id > 0) {
    echo '<span style="background-color:#999999;">';
    echo '<input type="checkbox" name="confirmupdate" id="confirmupdate" value="1" title="confirm &rarr; update" />';
    F_submit_button('update', $l['w_update'], $l['h_update']);
    echo '</span>';
    F_submit_button('add', $l['w_add'], $l['h_add']);
    F_submit_button('delete', $l['w_delete'], $l['h_delete']);
} else {
    F_submit_button('add', $l['w_add'], $l['h_add']);
}
    echo '<div class="row">' . K_NEWLINE;
    echo '<span class="label">' . K_NEWLINE;
    echo '<label for="answer_explanation">' . $l['w_explanation'] . '</label>' . K_NEWLINE;
    echo '<br />' . K_NEWLINE;
    $showexplanationarea = 'javascript:if(document.getElementById(\'explanationarea\').style.display==\'none\'){document.getElementById(\'explanationarea\').style.display=\'block\';document.getElementById(\'showexplanationarea\').style.display=\'none\';document.getElementById(\'hideexplanationarea\').style.display=\'block\';}';
    echo '<span id="showexplanationarea"><a class="xmlbutton" href="#" onclick="' . $showexplanationarea . '" title="' . $l['w_show'] . '">' . $l['w_show'] . ' &rarr;</a></span>';
    $hideexplanationarea = 'javascript:if(document.getElementById(\'explanationarea\').style.display==\'block\'){document.getElementById(\'explanationarea\').style.display=\'none\';document.getElementById(\'showexplanationarea\').style.display=\'block\';document.getElementById(\'hideexplanationarea\').style.display=\'none\';}';
    echo '<span id="hideexplanationarea" style="display:none;">';
    echo '<a href="#" title="' . $l['h_preview'] . '" class="xmlbutton" onclick="previewWindow=window.open(\'tce_preview_tcecode.php?tcexamcode=\'+encodeURIComponent(document.getElementById(\'form_answereditor\').answer_explanation.value),\'previewWindow\',\'dependent,height=500,width=500,menubar=no,resizable=yes,scrollbars=yes,status=no,toolbar=no\'); return false;">' . $l['w_preview'] . '</a>' . K_NEWLINE;
    echo '<a class="xmlbutton" href="#" onclick="' . $hideexplanationarea . '" title="' . $l['w_hide'] . '">' . $l['w_hide'] . '</a> ';
    echo '</span>';
    echo '</span>' . K_NEWLINE;
    echo '<span id="explanationarea" class="formw" style="display:none;border:1px solid #808080;">' . K_NEWLINE;
    echo '<textarea cols="50" rows="10" name="answer_explanation" id="answer_explanation" onselect="FJ_update_selection(document.getElementById(\'form_answereditor\').answer_explanation)" title="' . $l['h_explanation'] . '">' . htmlspecialchars($answer_explanation, ENT_NOQUOTES, $l['a_meta_charset']) . '</textarea>' . K_NEWLINE;
    echo '<br />' . K_NEWLINE;
    echo tcecodeEditorTagButtons('form_answereditor', 'answer_explanation', 1);
    echo '</span>' . K_NEWLINE;
    echo '</div>' . K_NEWLINE;
}
echo getFormRowCheckBox('answer_isright', $l['w_right'], $l['h_answer_isright'], '', 1, $answer_isright, false, '');
echo getFormRowCheckBox('answer_enabled', $l['w_enabled'], $l['h_enabled'], '', 1, $answer_enabled, false, '');
echo '<div class="row">' . K_NEWLINE;
echo '<span class="label">' . K_NEWLINE;
echo '<label for="answer_position">' . $l['w_position'] . '</label>' . K_NEWLINE;
echo '</span>' . K_NEWLINE;
echo '<span class="formw">' . K_NEWLINE;
echo '<select name="answer_position" id="answer_position" size="0" title="' . $l['h_position'] . '">' . K_NEWLINE;
if (isset($answer_id) and $answer_id > 0) {
    $max_position = 1 + F_count_rows(K_TABLE_ANSWERS, 'WHERE answer_question_id=' . $answer_question_id . ' AND answer_position>0 AND answer_id<>' . $answer_id . '');
} else {
    $max_position = 0;