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.
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
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
Gareth, Essential works OK. Looks like it's Elegance/Bootstrap3 that's the problem...
Might just be a case of patching this: https://github.com/gjb2048/moodle-theme_essential/blob/master/less/essential/gradebook.less into this: https://github.com/bmbrands/theme_bootstrap/blob/master/less/moodle/grade.less after / or updating from this: https://github.com/moodle/moodle/blob/MOODLE_27_STABLE/theme/bootstrapbase/less/moodle/grade.less
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.
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.
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.
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.
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
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;
}
Probably don't need the second chunk of that - that was just some border styling.
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.
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
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
Technically you should not need any CSS to style the Grader as all the CSS is in the grade/report/grader/style.css
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?
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.
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.
Here is what I didand as you can see all the CSS related directly to the grader was removed from grade.less
https://github.com/gjb2048/moodle/commit/6f0bab688891be192fa6961ed3e915420d492cbe
I am talking Elegance too...that is what my fixes are for
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
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!
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
It's a Moodle bug, I upgraded to 2.7.2+ (Build: 20141024) yesterday and now it's sorted.