mirror of
https://github.com/moodle/moodle.git
synced 2025-08-06 01:16:44 +02:00
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:
parent
f5c864efff
commit
9638a1f496
5 changed files with 27 additions and 36 deletions
|
@ -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&qtype=$qtype\" onClick=\"$onclick\"", $qtypename);
|
||||
}
|
||||
echo $output;
|
||||
$tabs[] = $tabrows;
|
||||
print_tabs($tabs, $selected);
|
||||
echo "<input type=\"hidden\" name=\"qtype\" value=\"$selected\" /> \n";
|
||||
|
||||
}
|
||||
|
||||
/*******************************************************************/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue