Moodle

Grader report student and grade cells don't line up in Safari

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.9.5, 2.0
  • Fix Version/s: 1.9.6
  • Component/s: Gradebook
  • Labels:
    None
  • Affected Branches:
    MOODLE_19_STABLE, MOODLE_20_STABLE
  • Fixed Branches:
    MOODLE_19_STABLE

Activity

Hide
Neil Streeter added a comment -

Here is how I managed to get the cells to line up in the following browsers (all tested by me)...

Firefox 3 Win32/Linux/Mac
IE 7 Win32
IE8 Win32 in Standard Mode
IE8 Win32 in Compatability mode...
Opera 9.6 (I think - latest opera anyhow)
Safari on Mac 10.3 (not 100% positive on OS version right now)
Chrome Win32...

I fought and fought with this on IE 7 / 8 Standard / IE 8 Comparability mode... and here is what I found to resolve this issue...

The cells above the names that are blank need to have 'something' in them for IE (and perhaps safari) to render borders margins and padding correctly...

The BIG change I implemented was as follows:

Index: grade/report/grader/lib.php
===================================================================
— grade/report/grader/lib.php (revision 247)
+++ grade/report/grader/lib.php (working copy)
@@ -975,7 +975,7 @@
for ($i = 0; $i < $levels; $i++) { $studentshtml .= ' <tr class="heading name_row"> - <td '.$colspan.' class="fixedcolumn cell c0 topleft"> </td> + <td '.$colspan.' class="fixedcolumn cell c0 topleft"> </td> </tr> '; }

#########################
I also noticed that the divs and tables for the left and right scrollers needed some css work because one had a 20 px margin and another had 20 px of padding. They should be made consistent. Though in theory this shouldn't matter.

#########################
I also noticed and fixed the following issue where the css was setting 25px height and that is not exactly the same as '4em' (though it is close)... This change also helped.

Index: grade/report/grader/styles.php
===================================================================
— grade/report/grader/styles.php (revision 247)
+++ grade/report/grader/styles.php (working copy)
@@ -139,12 +139,14 @@
border-width:0 1px;
}

+/* we don't want 25px height - at all
.grade-report-grader table#user-grades th.category,
.grade-report-grader table#user-grades th.item,
.grade-report-grader table#user-grades th.categoryitem,
.grade-report-grader table#user-grades th.courseitem { height: 25px; }
+*/

.grade-report-grader td,.grade-report-grader th {
border-color:#CECECE;

I also made some pretty significant changes to the css in my theme to be sure to set padding margins and borders consistently between left and right scroll div, table, tbody, tr, th, and td tags. I think this just needs a bit of touch up.

Once set I then adjusted the font size a bit bigger and everything holds together very well.

Some other tweaks are listed here along with my talking to myself about it
http://moodle.org/mod/forum/discuss.php?d=123894

Please don't hesitate to contact me for more info on this I'd be happy to do what I can.

Cheers,
Neil

Show
Neil Streeter added a comment - Here is how I managed to get the cells to line up in the following browsers (all tested by me)... Firefox 3 Win32/Linux/Mac IE 7 Win32 IE8 Win32 in Standard Mode IE8 Win32 in Compatability mode... Opera 9.6 (I think - latest opera anyhow) Safari on Mac 10.3 (not 100% positive on OS version right now) Chrome Win32... I fought and fought with this on IE 7 / 8 Standard / IE 8 Comparability mode... and here is what I found to resolve this issue... The cells above the names that are blank need to have 'something' in them for IE (and perhaps safari) to render borders margins and padding correctly... The BIG change I implemented was as follows: Index: grade/report/grader/lib.php =================================================================== — grade/report/grader/lib.php (revision 247) +++ grade/report/grader/lib.php (working copy) @@ -975,7 +975,7 @@ for ($i = 0; $i < $levels; $i++) { $studentshtml .= ' <tr class="heading name_row"> - <td '.$colspan.' class="fixedcolumn cell c0 topleft"> </td> + <td '.$colspan.' class="fixedcolumn cell c0 topleft"> </td> </tr> '; } ######################### I also noticed that the divs and tables for the left and right scrollers needed some css work because one had a 20 px margin and another had 20 px of padding. They should be made consistent. Though in theory this shouldn't matter. ######################### I also noticed and fixed the following issue where the css was setting 25px height and that is not exactly the same as '4em' (though it is close)... This change also helped. Index: grade/report/grader/styles.php =================================================================== — grade/report/grader/styles.php (revision 247) +++ grade/report/grader/styles.php (working copy) @@ -139,12 +139,14 @@ border-width:0 1px; } +/* we don't want 25px height - at all .grade-report-grader table#user-grades th.category, .grade-report-grader table#user-grades th.item, .grade-report-grader table#user-grades th.categoryitem, .grade-report-grader table#user-grades th.courseitem { height: 25px; } +*/ .grade-report-grader td,.grade-report-grader th { border-color:#CECECE; I also made some pretty significant changes to the css in my theme to be sure to set padding margins and borders consistently between left and right scroll div, table, tbody, tr, th, and td tags. I think this just needs a bit of touch up. Once set I then adjusted the font size a bit bigger and everything holds together very well. Some other tweaks are listed here along with my talking to myself about it http://moodle.org/mod/forum/discuss.php?d=123894 Please don't hesitate to contact me for more info on this I'd be happy to do what I can. Cheers, Neil
Hide
Neil Streeter added a comment -

Darn - thought I would get away with the svn diff 'inline' - nope!

Take care,
Neil

Show
Neil Streeter added a comment - Darn - thought I would get away with the svn diff 'inline' - nope! Take care, Neil
Hide
Martin Dougiamas added a comment -

Sam, can you please check these patches and test them out, then check them in?

Show
Martin Dougiamas added a comment - Sam, can you please check these patches and test them out, then check them in?
Hide
Sam Hemelryk added a comment -

Hi Neil, thanks for the patch, have run the tests myself and you patch fixed the positioning bug.
Have applied the full patch to 19_STABLE and the CSS patch to HEAD (as the  ) was already in there.
Most appreciated thank you all fixed

Show
Sam Hemelryk added a comment - Hi Neil, thanks for the patch, have run the tests myself and you patch fixed the positioning bug. Have applied the full patch to 19_STABLE and the CSS patch to HEAD (as the  ) was already in there. Most appreciated thank you all fixed
Hide
Andrew Davis added a comment -

There is still a variety of display problems in the grader report. I'm working on these in other issues like MDL-21088. This fix seems to be a step in the right direction so I'm calling this one closed.

Show
Andrew Davis added a comment - There is still a variety of display problems in the grader report. I'm working on these in other issues like MDL-21088. This fix seems to be a step in the right direction so I'm calling this one closed.

People

Vote (1)
Watch (3)

Dates

  • Created:
    Updated:
    Resolved: