echo '<tr valign=top><td class=rowone colspan=2><div id=div_testmanager_settings_groups style="display:' . (isset($_COOKIE['div_testmanager_settings_groups']) && $_COOKIE['div_testmanager_settings_groups'] == 'Y' ? 'block' : 'none') . '"><table class=rowtable2 cellpadding=5 cellspacing=1 border=0 width="100%">'; writeTR2Fixed($lngstr['page_edittests_assignedto'], '<p>' . $i_groups_text . '<p>' . getCheckbox('test_forall', $i_rSet1->fields['test_forall'], $lngstr['page_edittests_assignto_everybody'])); $i_tests_items = array(0 => $lngstr['label_none']); $i_rSet3 = $g_db->Execute("SELECT " . $srv_settings['table_prefix'] . "tests.testid, " . $srv_settings['table_prefix'] . "tests.test_name FROM " . $srv_settings['table_prefix'] . "tests ORDER BY testid"); if (!$i_rSet3) { showDBError(__FILE__, 3); } else { while (!$i_rSet3->EOF) { $i_tests_items[$i_rSet3->fields['testid']] = $i_rSet3->fields['test_name']; $i_rSet3->MoveNext(); } $i_rSet3->Close(); } echo '</table></div></td></tr>'; echo '<tr valign=top><td class=rowhdr2 colspan=2><a class=rowhdr2 href="javascript:void(0)" onclick="javascript:toggleSection(\'div_testmanager_settings_advanced\')">' . $lngstr['page_testmanager']['settings']['section_advanced'] . '</td></tr>'; echo '<tr valign=top><td class=rowone colspan=2><div id=div_testmanager_settings_advanced style="display:' . (!isset($_COOKIE['div_testmanager_settings_advanced']) || $_COOKIE['div_testmanager_settings_advanced'] == 'Y' ? 'block' : 'none') . '"><table class=rowtable2 cellpadding=5 cellspacing=1 border=0 width="100%">'; writeTR2Fixed($lngstr['page_testmanager']['content_protection'], getSelectElement('test_contentprotection', $i_rSet1->fields['test_contentprotection'], $lngstr['page_testmanager']['content_protection_list'])); writeTR2Fixed($lngstr['page-testmanager']['prevtest'], getSelectElement('test_prevtestid', $i_rSet1->fields['test_prevtestid'], $i_tests_items)); writeTR2Fixed($lngstr['page-testmanager']['nexttest'], getSelectElement('test_nexttestid', $i_rSet1->fields['test_nexttestid'], $i_tests_items)); writeTR2Fixed($lngstr['page_testmanager']['other_options'], getCheckbox('test_other_repeatuntilcorrect', $i_rSet1->fields['test_other_repeatuntilcorrect'], $lngstr['page_testmanager']['repeat_until_answered_correctly'])); echo '</table></div></td></tr>'; echo '<tr valign=top><td class=rowhdr2 colspan=2><a class=rowhdr2 href="javascript:void(0)" onclick="javascript:toggleSection(\'div_testmanager_settings_notes\')">' . $lngstr['page_testmanager']['settings']['section_notes'] . '</td></tr>'; echo '<tr valign=top><td class=rowone colspan=2><div id=div_testmanager_settings_notes style="display:' . (isset($_COOKIE['div_testmanager_settings_notes']) && $_COOKIE['div_testmanager_settings_notes'] == 'Y' ? 'block' : 'none') . '"><table class=rowtable2 cellpadding=5 cellspacing=1 border=0 width="100%">'; writeTR2Fixed($lngstr['page_edittests_testnotes'], getTextArea('test_notes', $i_rSet1->fields['test_notes'])); echo '</table></div></td></tr>'; echo '</table>'; echo '<p class=center><input class=btn type=submit name=bsubmit value=" ' . $lngstr['button_update'] . ' "> <input class=btn type=submit name=bsubmit2 value=" ' . $lngstr['button_update_and_edit_questions'] . ' "> <input class=btn type=submit name=bcancel value=" ' . $lngstr['button_cancel'] . ' "></form>'; } $i_rSet1->Close(); } displayTemplate('_footer');
$i_userfield9_items = array(); $i_items = explode(',', getConfigItem(CONFIG_reg_values_userfield9)); foreach ($i_items as $val) { $i_userfield9_items[$val] = $val; } } if (getConfigItem(CONFIG_reg_userfield9) > CONFIG_CONST_donotshow) { writeTR2Fixed(getConfigItem(CONFIG_reg_caption_userfield9) . ':', getConfigItem(CONFIG_reg_type_userfield9) == CONFIG_CONST_type_singlelinetext ? getInputElement('user_ufield9', @$arrUserData['user_ufield9']) : (getConfigItem(CONFIG_reg_type_userfield9) == CONFIG_CONST_type_multilinetext ? getTextArea('user_ufield9', @$arrUserData['user_ufield9']) : getSelectElement('user_ufield9', @$arrUserData['user_ufield9'], $i_userfield9_items))); } if (isset($lngstr['custom']['user_userfield10_items'])) { $i_userfield10_items = $lngstr['custom']['user_userfield10_items']; } else { $i_userfield10_items = array(); $i_items = explode(',', getConfigItem(CONFIG_reg_values_userfield10)); foreach ($i_items as $val) { $i_userfield10_items[$val] = $val; } } if (getConfigItem(CONFIG_reg_userfield10) > CONFIG_CONST_donotshow) { writeTR2Fixed(getConfigItem(CONFIG_reg_caption_userfield10) . ':', getConfigItem(CONFIG_reg_type_userfield10) == CONFIG_CONST_type_singlelinetext ? getInputElement('user_ufield10', @$arrUserData['user_ufield10']) : (getConfigItem(CONFIG_reg_type_userfield10) == CONFIG_CONST_type_multilinetext ? getTextArea('user_ufield10', @$arrUserData['user_ufield10']) : getSelectElement('user_ufield10', @$arrUserData['user_ufield10'], $i_userfield10_items))); } echo '</table></div></td></tr>'; if ($G_SESSION['access_users'] != 1 && $G_SESSION['access_users'] != 3) { echo '<tr valign=top><td class=rowhdr2 colspan=2><a class=rowhdr2 href="javascript:void(0)" onclick="javascript:toggleSection(\'div_users_notes\')">' . $lngstr['page_users']['section_notes'] . '</td></tr>'; echo '<tr valign=top><td class=rowone colspan=2><div id=div_users_notes style="display:' . (isset($_COOKIE['div_users_notes']) && $_COOKIE['div_users_notes'] == 'Y' ? 'block' : 'none') . '"><table class=rowtable2 cellpadding=5 cellspacing=1 border=0 width="100%">'; writeTR2Fixed($lngstr['page_users']['notes'], getTextArea('user_notes', @$arrUserData['user_notes'])); echo '</table></div></td></tr>'; } echo '</table>'; echo '<p class=center><input class=btn type=submit name=bsubmit value=" ' . $lngstr['button_update'] . ' "> <input class=btn type=submit name=bcancel value=" ' . $lngstr['button_cancel'] . ' "></form>'; displayTemplate('_footer');
$f_gscaleid = (int) readGetVar('gscaleid'); $f_gscale_gradeid = (int) readGetVar('gscale_gradeid'); $g_vars['page']['selected_section'] = 'testmanager'; $g_vars['page']['selected_tab'] = 'grades-7'; $g_vars['page']['menu_2_items'] = getMenu2Items($g_vars['page']['selected_section']); writePanel2($g_vars['page']['menu_2_items']); echo '<h2>' . $lngstr['page_header_grade_settings'] . '</h2>'; writeErrorsWarningsBar(); $i_rSet1 = $g_db->Execute("SELECT * FROM " . $srv_settings['table_prefix'] . "gscales_grades WHERE gscaleid=" . $f_gscaleid . " AND gscale_gradeid=" . $f_gscale_gradeid); if (!$i_rSet1) { showDBError(__FILE__, 1); } else { if (!$i_rSet1->EOF) { echo '<p><form method=post action="grades.php?action=edits&gscaleid=' . $f_gscaleid . '&gscale_gradeid=' . $f_gscale_gradeid . '">'; echo '<table class=rowtable2 cellpadding=5 cellspacing=1 border=0 width="100%">'; $i_rowno = 0; writeTR2Fixed($lngstr['page_grade_gscaleid'], $i_rSet1->fields['gscale_gradeid']); writeTR2Fixed($lngstr['page_grade_gradename'], getInputElement('grade_name', $i_rSet1->fields['grade_name'])); writeTR2Fixed($lngstr['page_grade_gradefrom'], getInputElement('grade_from', $i_rSet1->fields['grade_from'])); writeTR2Fixed($lngstr['page_grade_gradeto'], getInputElement('grade_to', $i_rSet1->fields['grade_to'])); writeTR2Fixed($lngstr['page_grade_gradedescription'], getTextArea('grade_description', $i_rSet1->fields['grade_description'])); echo '<tr valign=top><td class=rowhdr2 colspan=2><a class=rowhdr2 href="javascript:void(0)" onclick="javascript:toggleSection(\'div_grades_advanced\')">' . $lngstr['page_grade']['section_advanced'] . '</td></tr>'; echo '<tr valign=top><td class=rowone colspan=2><div id=div_grades_advanced style="display:' . (!isset($_COOKIE['div_grades_advanced']) || $_COOKIE['div_grades_advanced'] == 'Y' ? 'block' : 'none') . '"><table class=rowtable2 cellpadding=5 cellspacing=1 border=0 width="100%">'; writeTR2Fixed($lngstr['page_grade']['feedback'], getTextEditor($G_SESSION['config_editortype'], 'grade_feedback', $i_rSet1->fields['grade_feedback'])); echo '</table></div></td></tr>'; echo '</table>'; echo '<p class=center><input class=btn type=submit name=bsubmit value=" ' . $lngstr['button_update'] . ' "> <input class=btn type=submit name=bcancel value=" ' . $lngstr['button_cancel'] . ' "></form>'; } $i_rSet1->Close(); } displayTemplate('_footer');