Essential 2.7.7 Gradebook Alignment

Essential 2.7.7 Gradebook Alignment

by Kees Koopman -
Number of replies: 26

Hi,

I am using Moodle 2.7.2 (Build: 20140908) and theme Essential 2014090303  2.7.7 (Build: 2014090303).

The picture below shows a mis-alignment.

What code can i place in the css-box in the theme that will solve this?

Thanks a lot!

Kees.



Average of ratings: -
In reply to Kees Koopman

Re: Essential 2.7.7 Gradebook Alignment

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

Yes you need to upgrade Moodle to latest version as this was a big Moodle bug and nothing to do with any theme.

I fixed this three weeks ago.

Cheers

Mary

Average of ratings: Useful (1)
In reply to Mary Evans

Re: Essential 2.7.7 Gradebook Alignment

by John Iglar -
Hi Mary,

We've been struggling with this issue as well. Our site is 2.7.2+ (build 20141024) and we are still having the gradebook row problem. (Using Elegance - in the process of updating to try to fix the issue. Turning off static student column stops the problem from appearing.)

On our test site, I've got 2.7.2+ build 20141028. I've updated Elegance (2.7.1.00) and Bootstrap3 (0.1.2) ...and the gradebook looks the same as Kees'. We switch to Clean and the problem goes away.

Any suggestions? This discussion from June seemed to indicate CSS issues with Bootstrap3. Both Elegance and Essential use that.

regards,
John
In reply to John Iglar

Re: Essential 2.7.7 Gradebook Alignment

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

Hi John,

Essential uses Bootstrap 2.3 not 3.  I know things have changed in core for the Gradebook alignment which at the same time David and I (with others) were working in Essential to fix as its CSS has departed totally from core.  Does the issue still happen in 2.7.8 of Essential?

Gareth

In reply to Gareth J Barnard

Re: Essential 2.7.7 Gradebook Alignment

by John Iglar -

Gareth, Essential works OK. Looks like it's Elegance/Bootstrap3 that's the problem...

In reply to John Iglar

Re: Essential 2.7.7 Gradebook Alignment

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers
In reply to Gareth J Barnard

Re: Essential 2.7.7 Gradebook Alignment

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

With respect Gareth I think this was a neive assumption to say all the CSS had departed from Bootstrapbase leaving it with no styles.  The grader is a table that is built using Moodle style CSS selectors.

The only input needed from a themes point of view is for the container where it sits on a pagei, which is the region-main part of the layout, be it Bootstrapbase or Base. These parts of the layout are taken care of by themes, there is no need to style the grader.

My suggestion to anyone reading this is make sure you are using the latest version of Moodle 2.6 and 2.7, and then delete any CSS from a third party theme that relates to the grader. This way at least you can guarantee it will work as it was intended.

In reply to Mary Evans

Re: Essential 2.7.7 Gradebook Alignment

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

I did not say "CSS had departed from Bootstrapbase leaving it with no styles".  And when I get a moment, I will remove any grader related styles from bootstrapbase and see if it still works with the grader.

In reply to Gareth J Barnard

Re: Essential 2.7.7 Gradebook Alignment

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

Bootstrapbase is not a third party theme it is a parent theme that forms the backbone of the themes based on it or on derivatives of it. 

What I am trying to say is that there should be no need for a third party theme to have styles for the grader. And as such that applies to Essential, as its parent theme is Bootstrapbase.

If there is more misalignment then these problems need to be tracked

So if you find any please let me know.

Thanks

Mary.

In reply to Mary Evans

Re: Essential 2.7.7 Gradebook Alignment

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

Will do Mary.

The thing is that Essential is a standalone theme that has detached from Bootstrapbase and has been for quite a few releases - https://github.com/gjb2048/moodle-theme_essential/blob/master/config.php#L35.  All of the LESS was transposed in order to provide greater control and less risk of inadvertent core changes affecting things mid-release.  The downside of this is greater maintenance, however it does facilitate the new RTL mechanism to operate correctly with a reduced CSS footprint because of a massive reduction in dir-rtl styles.

In implementing that mechanism, the quiz was one of the few style sheets I had to exclude completely: https://github.com/gjb2048/moodle-theme_essential/blob/master/config.php#L60 - because of the styles within it and have Essential's own.  But I do understand from Tim that this is being rewritten so may not be forever.

I do know that Bootstrapbase is a core theme.  What I am really suggesting or asking is if it should have any CSS at all related to the grader - I've not looked recently.


I understand that modules need CSS, but at the same time some of them are frustrating when they define colours and selectors that are difficult for a theme to override.  I think a different mechanism is needed for modules to define properties that style them and yet still allow themes to change them without CSS bloat with overridden selectors.  Perhaps some sort of plugin attribute container that has properties that are then used to generate the CSS but have setter methods that themes can call before output takes place. 

In reply to Gareth J Barnard

Re: Essential 2.7.7 Gradebook Alignment

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

OK...

I forgot Essential was a standalone theme, although it does carry the majority of Bootstrapbase css, so I was perhaps lulled into thinking it was a Bootstrapbase theme,

This is how I started off when I built my first Moodle 2.0 theme, until someone pointed out you could exclude various stylesheets which made this sort of theme easy to maintain in Base themes.

As for Bootstrapbase having CSS in less/grade.less, that depends if it only pertains to Bootstrapbase. If the CSS for the same classes are in Base theme too then there is a strong case to say that this CSS should be in Moodle grade/grading/form/rubric/style.css but it isn't, so it is OK where it is. Same for the .gradetreebox which is also in Bootstrapbase/less/grade.less.

When I was saying that a theme does not need any css to style the grader, I was talking of general styling of the table cells and such, not about colours. Styling theme colours is fine, I have no problem with that.

Anyway, Gareth, all this talk about the current grader will be short lived since in 2.8 the grader has changed again, so be warned!

Cheers

Mary

In reply to John Iglar

Re: Essential 2.7.7 Gradebook Alignment

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

Hi John!

This is the css I have been adding to the custom css section to get the gradebook to line up - not sure why but I have had to adjust the padding slightly on different sites but it should get you started.


.path-grade-report-grader .left_scroller #fixed_column th {

height: 5em;

}

.path-grade-report-grader table#fixed_column th {

border: 1px solid #cecece;

vertical-align: middle;

border-right-color: #000;

}

.path-grade-report-grader table tr.heading th.header {

padding: 4px;

}

.path-grade-report-grader .left_scroller {

padding-top: 15px;

}

table#user-grades .quickfeedback {

height:auto;

}


In reply to Emma Richardson

Re: Essential 2.7.7 Gradebook Alignment

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

Probably don't need the second chunk of that - that was just some border styling.

In reply to Emma Richardson

Re: Essential 2.7.7 Gradebook Alignment

by John Iglar -

Sorry, Emma. I think I confused the thread. I'm talking Elegance which is a totally different animal than Essential. (Bootstrap3)

Are you talking Essential CSS? Because when I tested Essential with the updated Moodle, it worked fine.

Mary - you were absolutely right! Upgrade and it solves the problem w/gradebook on Essential.

In reply to John Iglar

Re: Essential 2.7.7 Gradebook Alignment

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

Hi John,

I tested Bas's Bootstrap and it had the same problem (knock on effect to Shoehorn), so applied Mary's MDL-43824 grade.less, tested  and fixes the issue, so raised: https://github.com/bmbrands/theme_bootstrap/pull/347.  I'm not sure if Danny will need to patch locally too for Elegance.

Gareth

Average of ratings: Useful (1)
In reply to Gareth J Barnard

Re: Essential 2.7.7 Gradebook Alignment

by John Iglar -

Thanks, Gareth. That looks very helpful.

We're going to test that out in the morning (we're grunt noobs!) and will report back.

Meanwhile - thanks everyone ...especially for not shouting at me for derailing a thread about Essential and bringing up Elegance stuff!


cheers,

John

In reply to John Iglar

Re: Essential 2.7.7 Gradebook Alignment

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

Technically you should not need any CSS to style the Grader as all the CSS is in the grade/report/grader/style.css

In reply to Mary Evans

Re: Essential 2.7.7 Gradebook Alignment

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

But 'grade/report/grader/style.css' is for 'base' and not 'bootstrapbase'.  So why does: https://github.com/gjb2048/moodle/blob/MOODLE_27_STABLE/theme/bootstrapbase/less/moodle/grade.less exist?

In reply to Gareth J Barnard

Re: Essential 2.7.7 Gradebook Alignment

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

No it isn't only for Base theme it styles it for every theme so technically there is no need to restyle it in a theme unless you need to change colour scheme.

In reply to Gareth J Barnard

Re: Essential 2.7.7 Gradebook Alignment

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

That is for the Rubic which is a different part and nothing to do with the misalignment I fixed which is what this is all about.

In reply to John Iglar

Re: Essential 2.7.7 Gradebook Alignment

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

I am talking Elegance too...that is what my fixes are for

In reply to Emma Richardson

Re: Essential 2.7.7 Gradebook Alignment

by John Iglar -

Oh, my bad. Thank you, Emma.

We tried your fixes on our site and it didn't work. (Don't know what I was doing wrong.)

We're going to try Gareth's fixes to the .less files ...but in the morning. Will report back in around 18 hours!

cheers,

John

In reply to John Iglar

Re: Essential 2.7.7 Gradebook Alignment

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

Sorry they didn't work for you.  I have a huge amount of css changes (including Julian's course tiles which I always loved!) so it could be that it needed something else in there too.  Would take too long to sort through - hopefully Gareth's fixes will get you sorted out!


In reply to John Iglar

Re: Essential 2.7.7 Gradebook Alignment

by John Iglar -
Thank you to Gareth, Emma and Mary for the information. I know I derailed the thread which was about Essential theme alignment issues - sorry!

1) The problem with Essential is solved by upgrading to the latest version of Moodle.

2) Elegance is still exhibiting problems ...I'm not sure if it's CSS or something else. I'm going to start another thread with what I've discovered. A CSS adjustment corrects some of our problems, but then there's also another issue with categories and items.


In reply to John Iglar

Re: Essential 2.7.7 Gradebook Alignment

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

Hi John,

Bas merged my pull request yesterday: https://github.com/bmbrands/theme_bootstrap/pull/347#event-185973445 - so the master branch has been updated.  It does not look like they are excluded: https://github.com/thedannywahl/moodle-theme_elegance/blob/master/config.php#L49-L86 - so a 'Purge all caches' should be fine after updating Bootstrap CSS.

Gareth