';
if ($qtype == LESSON_SHORTANSWER) {
$qoptionstr = get_string('casesensitive', 'lesson');
} else {
$qoptionstr = get_string('multianswer', 'lesson');
}
echo "";
helpbutton("questionoption", get_string("questionoption", "lesson"), "lesson");
echo '
';
}
?>
|
";
echo get_string("pagecontents", "lesson").": \n";
print_textarea($usehtmleditor, 25,70, 630, 400, "contents");
if ($usehtmleditor) {
use_html_editor("contents");
}
echo " | \n";
switch ($qtype) {
case LESSON_TRUEFALSE :
for ($i = 0; $i < 2; $i++) {
$iplus1 = $i + 1;
echo "".get_string("answer", "lesson")." $iplus1: \n";
print_textarea(false, 6, 70, 630, 300, "answer[$i]");
echo " |
\n";
echo "".get_string("response", "lesson")." $iplus1: \n";
print_textarea(false, 6, 70, 630, 300, "response[$i]");
echo " |
\n";
echo "".get_string("jump", "lesson")." $iplus1: \n";
if ($i) {
// answers 2, 3, 4... jumpto this page
choose_from_menu($jump, "jumpto[$i]", 0, "");
} else {
// answer 1 jumpto next page
choose_from_menu($jump, "jumpto[$i]", LESSON_NEXTPAGE, "");
}
helpbutton("jumpto", get_string("jump", "lesson"), "lesson");
if($lesson->custom) {
if ($i) {
echo get_string("score", "lesson")." $iplus1: ";
} else {
echo get_string("score", "lesson")." $iplus1: ";
}
}
echo " |
\n";
}
break;
case LESSON_ESSAY :
echo "".get_string("jump", "lesson").": \n";
choose_from_menu($jump, "jumpto[0]", LESSON_NEXTPAGE, "");
helpbutton("jumpto", get_string("jump", "lesson"), "lesson");
if ($lesson->custom) {
echo get_string("score", "lesson").": ";
}
echo " |
\n";
break;
case LESSON_MATCHING :
for ($i = 0; $i < $lesson->maxanswers+2; $i++) {
$icorrected = $i - 1;
if ($i == 0) {
echo "".get_string("correctresponse", "lesson").": \n";
print_textarea(false, 6, 70, 630, 300, "answer[$i]");
echo " |
\n";
} elseif ($i == 1) {
echo "".get_string("wrongresponse", "lesson").": \n";
print_textarea(false, 6, 70, 630, 300, "answer[$i]");
echo " |
\n";
} else {
echo "".get_string("answer", "lesson")." $icorrected: \n";
print_textarea(false, 6, 70, 630, 300, "answer[$i]");
echo " |
\n";
echo "".get_string("matchesanswer", "lesson")." $icorrected: \n";
print_textarea(false, 6, 70, 630, 300, "response[$i]");
echo " |
\n";
}
if ($i == 2) {
echo "".get_string("correctanswerjump", "lesson").": \n";
choose_from_menu($jump, "jumpto[$i]", LESSON_NEXTPAGE, "");
helpbutton("jumpto", get_string("jump", "lesson"), "lesson");
if($lesson->custom) {
echo get_string("correctanswerscore", "lesson").": ";
}
echo " |
\n";
} elseif ($i == 3) {
echo "".get_string("wronganswerjump", "lesson").": \n";
choose_from_menu($jump, "jumpto[$i]", 0, "");
helpbutton("jumpto", get_string("jump", "lesson"), "lesson");
if($lesson->custom) {
echo get_string("wronganswerscore", "lesson").": ";
}
echo " |
\n";
}
}
break;
case LESSON_SHORTANSWER :
case LESSON_NUMERICAL :
case LESSON_MULTICHOICE :
// default code
for ($i = 0; $i < $lesson->maxanswers; $i++) {
$iplus1 = $i + 1;
echo "".get_string("answer", "lesson")." $iplus1: \n";
print_textarea(false, 6, 70, 630, 300, "answer[$i]");
echo " |
\n";
echo "".get_string("response", "lesson")." $iplus1: \n";
print_textarea(false, 6, 70, 630, 300, "response[$i]");
echo " |
\n";
echo "".get_string("jump", "lesson")." $iplus1: \n";
if ($i) {
// answers 2, 3, 4... jumpto this page
choose_from_menu($jump, "jumpto[$i]", 0, "");
} else {
// answer 1 jumpto next page
choose_from_menu($jump, "jumpto[$i]", LESSON_NEXTPAGE, "");
}
helpbutton("jumpto", get_string("jump", "lesson"), "lesson");
if($lesson->custom) {
if ($i) {
echo get_string("score", "lesson")." $iplus1: ";
} else {
echo get_string("score", "lesson")." $iplus1: ";
}
}
echo " |
\n";
}
break;
}
// close table and form
?>