tried to make editing a lesson look nicer. Added generalbox class to tables and used tabs for selecting question types

This commit is contained in:
michaelpenne 2005-05-03 23:30:40 +00:00
parent f5c864efff
commit 9638a1f496
5 changed files with 27 additions and 36 deletions

View file

@ -1113,20 +1113,16 @@ function lesson_calculate_ongoing_score($lesson, $userid, $retries, $return=fals
/*******************************************************************/
function lesson_qtype_menu($qtypes, $selected="", $link="", $onclick="") {
// prints the question types for when editing and adding a page
$output = "";
foreach ($qtypes as $value => $label) {
if ($value == $selected) {
$output .= "<b>$label</b>";
$output .= "<input type=\"hidden\" name=\"qtype\" value=\"$value\" /> \n";
} else {
$output .= "<a onClick=\"$onclick\" href=\"$link"."&qtype=$value\">$label</a>";
}
if ($label != end($qtypes)) {
$output .= " | ";
}
$tabs = array();
$tabrows = array();
foreach ($qtypes as $qtype => $qtypename) {
$tabrows[] = new tabobject($qtype, "$link&amp;qtype=$qtype\" onClick=\"$onclick\"", $qtypename);
}
echo $output;
$tabs[] = $tabrows;
print_tabs($tabs, $selected);
echo "<input type=\"hidden\" name=\"qtype\" value=\"$selected\" /> \n";
}
/*******************************************************************/