From: mark-nielsen Date: Tue, 2 May 2006 17:05:29 +0000 (+0000) Subject: [BugFix] Bug #5396 - Found that the css float was causing the odd problem. Removed... X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=432c2219f51d410363488bb35d6ab1c07350ac78;p=moodle.git [BugFix] Bug #5396 - Found that the css float was causing the odd problem. Removed extra styles for the button layout and changed the divs around the buttons to spans Also improved some logic in the button processing for branch tables --- diff --git a/mod/lesson/styles.php b/mod/lesson/styles.php index 0a44c50908..7f62f4b1e9 100644 --- a/mod/lesson/styles.php +++ b/mod/lesson/styles.php @@ -145,27 +145,22 @@ /* Next three classes are for branch table buttons when displayed horizontally */ .mod-lesson .prevhorizontal { - display: inline; - float: left; } .mod-lesson .nexthorizontal { - display: inline; - float: right; } .mod-lesson .standardhorizontal { - display: inline; } /* Next three classes are for branch table buttons when displayed vertically */ .mod-lesson .prevvertical { } -.mod-lesson .nextvertical a { +.mod-lesson .nextvertical { } -.mod-lesson .standardvertical a { +.mod-lesson .standardvertical { } /* branchbuttoncontainer wraps around branch table buttons */ diff --git a/mod/lesson/view.php b/mod/lesson/view.php index 68f9a792e0..b7e2755a74 100644 --- a/mod/lesson/view.php +++ b/mod/lesson/view.php @@ -859,15 +859,14 @@ /// seperate out next and previous jumps from the other jumps foreach ($answers as $answer) { if ($answer->jumpto == LESSON_NEXTPAGE) { - $buttons['next'][] = ''. - strip_tags(format_text($answer->answer, FORMAT_MOODLE, $options)).''; + $type = 'next'; } else if ($answer->jumpto == LESSON_PREVIOUSPAGE) { - $buttons['prev'][] = ''. - strip_tags(format_text($answer->answer, FORMAT_MOODLE, $options)).''; + $type = 'prev'; } else { - $buttons['other'][] = ''. - strip_tags(format_text($answer->answer, FORMAT_MOODLE, $options)).''; + $type = 'other'; } + $buttons[$type][] = ''. + strip_tags(format_text($answer->answer, FORMAT_MOODLE, $options)).''; } /// set the order and orientation (order is very important for the divs to work for horizontal!) @@ -889,12 +888,12 @@ $b = 'a'; $c = 'b'; $implode = '

'; - $implode2 = "
\n "; + $implode2 = "

\n "; } $buttonsarranged = array(); - $buttonsarranged[$a] = '
'.implode($implode, $buttons['prev']).'
'; - $buttonsarranged[$b] = '
'.implode($implode, $buttons['next']).'
'; - $buttonsarranged[$c] = '
'.implode($implode, $buttons['other']).'
'; + $buttonsarranged[$a] = ''.implode($implode, $buttons['prev']).''; + $buttonsarranged[$b] = ''.implode($implode, $buttons['next']).''; + $buttonsarranged[$c] = ''.implode($implode, $buttons['other']).''; ksort($buttonsarranged); // sort by key $fullbuttonhtml = "\n
\n " . implode($implode2, $buttonsarranged). "\n
\n";