GoLogo a New Moodle theme needs testing

GoLogo a New Moodle theme needs testing

by Mary Evans -
Number of replies: 19
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

Hi Moodlers, 

Ive made a new theme called GoLogo which is a relatively simple theme with a few settings but has lots of custom block regions.

https://github.com/lazydaisy/gologo

As this is being developed for Moodle 3.1 it requires Moodle Dev ( master) to work.

https://github.com/moodle/moodle.git.

i would be grateful if you could find time to test it.

, and give me some feedback?

Thanks

Mary

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

Re: GoLogo a New Moodle theme needs testing

by Usman Asar -
Picture of Plugin developers Picture of Testers

Mary, the white space on header is more on front page, as compared to any other pages, is it intentional? as nothing has been added into theme settings yet.


After Log-in, on other pages have reduced white area.


In reply to Usman Asar

Re: GoLogo a New Moodle theme needs testing

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

I think I forgot to remove the padding for the Logo, Usman, or rather forgot to add a class for when the logo is not displayed. The padding is 200px which can be changed in the Custom CSS. There is a note about this in the Brand Logo description in the settings' page.

Thanks I'll have a look at that now.

Cheers

Mary

In reply to Mary Evans

Re: GoLogo a New Moodle theme needs testing

by Usman Asar -
Picture of Plugin developers Picture of Testers

No worries Mary, still good time for modifications for 3.1 is still away, even I manage to install it after reading your post as I never looked into availability of 3.1 - though found it to be faster than 3.0

In reply to Mary Evans

Re: GoLogo a New Moodle theme needs testing

by Jizu Sun -

How can I install it?

The documentation page is missing: https://docs.moodle.org/31/en/GoLogo


In reply to Jizu Sun

Re: GoLogo a New Moodle theme needs testing

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

There is a download option in the GitHub page. Just remember to extract the zip folder to your desktop and then rename the extracted theme folder to gologo you can then compress that folder and install via your UI in Moodle (master) 3.1Dev (providing you are using the correct version of Moodle as this theme will not work in any other version.)

The GoLogo wiki page is just a place-holder for the moment, I am still working on it and the theme.

Thanks

Mary

In reply to Mary Evans

Re: GoLogo a New Moodle theme needs testing

by Jizu Sun -
Thanks for your guidance.


I'm using dev 3.1(master) now , and how can I "install via your UI in Moodle"?

I looked into the section " Home / ► Site administration / ► Appearance / ► Themes / ► Theme settings" but there's no place to install a theme via UI.


I installed it just by git cloning it into the theme folder, is it  the right way?


Also, I'm a beginner developer with months of intern experience of front-end dev, I hope I can contribute to your theme git repo, anything I can do to help you?

In reply to Jizu Sun

Re: GoLogo a New Moodle theme needs testing

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

Hi,

Well yes, cloning it is one way and perhaps that is the best way as you can pull in the changes quicker with little disruption to your Moodle site.

However, to add the theme as a ZIP file you need to go to ...

Administration > Site Administration > Plugins > Install plugins 

Here you can upload the ZIP file and then just follow the instructions.

Cheers

Mary

In reply to Mary Evans

Re: GoLogo a New Moodle theme needs testing

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


I thought I'd check your theme in a different way, so I've forked it and added TravisCI support (as that's on my GitHub), see:

https://docs.moodle.org/dev/Travis_integration

and

https://moodle.org/mod/forum/discuss.php?d=323384

The results of the checks can be seen here: https://travis-ci.org/gjb2048/gologo/builds/110615053 the first against PHP 5.4 being: https://travis-ci.org/gjb2048/gologo/jobs/110615054.  Ok, the setting in the CSS issue can be ignored, but some of the rest is worth looking at.

Changes: https://github.com/gjb2048/gologo/commit/40bb4b940b1859360bfdc4c9e4e67e62bcb4dbbb

Cheers,

Gareth


In reply to Gareth J Barnard

Re: GoLogo a New Moodle theme needs testing

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

Job #2 against 'master' Moodle branch: https://travis-ci.org/gjb2048/gologo/jobs/110616783

With things like:

31 VIOLATION The class theme_gologo_core_calendar_renderer has an overall complexity of 88 which is very high. The configured complexity threshold is 50.

31 VIOLATION The class theme_gologo_core_calendar_renderer has a coupling between objects value of 15. Consider to reduce the number of dependencies under 13.

62 VIOLATION Avoid unused parameters such as '$day'.

62 VIOLATION Avoid unused parameters such as '$month'.

62 VIOLATION Avoid unused parameters such as '$year'.

62 VIOLATION Avoid unused parameters such as '$view'.

62 VIOLATION Avoid unused parameters such as '$courses'.

221 VIOLATION The method event() has a Cyclomatic Complexity of 14. The configured cyclomatic complexity threshold is 10.

221 VIOLATION The method event() has an NPath complexity of 1024. The configured NPath complexity threshold is 200.

221 VIOLATION The method event has a boolean flag argument $showactions, which is a certain sign of a Single Responsibility Principle violation.

308 VIOLATION The method show_month_detailed() has a Cyclomatic Complexity of 31. The configured cyclomatic complexity threshold is 10.

308 VIOLATION The method show_month_detailed() has an NPath complexity of 8296320. The configured NPath complexity threshold is 200.

308 VIOLATION The method show_month_detailed() has 200 lines of code. Current threshold is set to 100. Avoid really long methods.

557 VIOLATION Avoid unused local variables such as '$USER'.

557 VIOLATION Avoid unused local variables such as '$SESSION'.

===== =========== ===================================================================================================================================================

FILE: theme/gologo/classes/core_renderer.php

FOUND 0 ERRORS AND 6 VIOLATIONS

===== =========== =====================================================================================================================================

27 VIOLATION The class theme_gologo_core_renderer has an overall complexity of 57 which is very high. The configured complexity threshold is 50.

35 VIOLATION Avoid unused local variables such as '$CFG'.

131 VIOLATION The method login_info() has a Cyclomatic Complexity of 26. The configured cyclomatic complexity threshold is 10.

131 VIOLATION The method login_info() has an NPath complexity of 6384. The configured NPath complexity threshold is 200.

251 VIOLATION Avoid unused local variables such as '$CFG'.

299 VIOLATION Avoid unused parameters such as '$action'.

Then clearly "Avoid unused parameters such as '$day'." cannot be dealt with as they are a part of the API, however "Avoid unused local variables such as '$CFG'." can be dealt with.

In reply to Gareth J Barnard

Re: GoLogo a New Moodle theme needs testing

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

Lol...I love it...the only thing I added to that calendar renderer were three class selector so I could have better control over those fake blocks. You can see them something like minicalendar1, minicalendar2. Etc...

That aside I want to be.able to take advantage of the Travic CI but not too sure how it works...what I need to do etc...

I read the docs Andew wrote but did not have time to digest it all...so need to reread it. I think it was the user verification token or whatever I was supposed to generate that put me off...lol 

Any help with that would be great.

Thanks for testing in Travis...very useful.

Cheers

Mary

In reply to Mary Evans

Re: GoLogo a New Moodle theme needs testing

by Richard Oelmann -
Picture of Core developers Picture of Plugin developers Picture of Testers

Theme is looking good Mary smile

There do seem to be rather a lot of things that when you copy core code across (for renderers for example) they come up with a lot of warnings on code checker smile I guess these will gradually be improved in core as code is rewritten for renderers, or templates, or whatever comes next smile

I just started with Travis a couple of weeks ago - its useful, and I've learned a lot over the last couple of weeks, but I do find it distracting too - particularly the last week when HQ changed the code checker, which is now being investigated by Eloy.

R

In reply to Mary Evans

Re: GoLogo a New Moodle theme needs testing

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

Hi Mary,

You don't have to do the token thing.  It will work fine without it.  Just configure the settings like attached - then anybody submitting pull requests to your repo will be checked too.

So, you can signup on travis-ci.org and then choose what repos to check.  Its best to have ' Build only if .travis.yml is present' set.  The one I've used on your theme is here: https://github.com/gjb2048/gologo/blob/master/.travis.yml - that tells Travis what to do.  In this case it is running 'moodle-plugin-ci' which has been created by Mark Nielsen of Moodlerooms: https://github.com/moodlerooms/moodle-plugin-ci.  It is like 'grunt' in terms of being a 'task runner' for other things, such as the code checker.  I hope that's the more information you need smile.

Cheers,

Gareth

Attachment 2016-02-21 13_26_29-Settings - gjb2048_gologo - Travis CI.png
In reply to Gareth J Barnard

Re: GoLogo a New Moodle theme needs testing

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

Hi Gareth, 

Thanks for explaining. I signed up to Travis last week and have selected my Moodle and my GoLogo repos as the ones to be checked.

As well as the token thingy, I was not sure about the Travis.yml file. Now you have explained that, how do I add it? What's more important how do I learn how to write such a file? 

Mary

In reply to Mary Evans

Re: GoLogo a New Moodle theme needs testing

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

Re: GoLogo a New Moodle theme needs testing

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

Even so changing $CFG to new moodle_url in places where this was possible, helped  but it did not get rid of the complexity that is inherent in all the rendered I guess. I cut out the unused part of the calendar renderer and just kept the function that was needed. 

I must admit that it has, for me at least, added a burden to theme development. 

In my darker moments I can not help wondering where all this automated code is leading us to...I suddenly find that I could well have been a Ludite in another life...

Mary

In reply to Jizu Sun

Re: GoLogo a New Moodle theme needs testing

by Richard Oelmann -
Picture of Core developers Picture of Plugin developers Picture of Testers

Requires Moodle3.1 Dev, as Mary said - so for testing only right now as that is currently Alpha code itself, so shouldn't be on a production machine.

Install as with any other theme, either clone directly from the link Mary has given, or download from there and copy into your theme folder (making sure of the correct folder name as github downloads can sometimes have the _master bit added to them etc.). Then visit your site Admin > Notifications page to complete the install.

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

Re: GoLogo a New Moodle theme needs testing

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

I have made a few alterations and this is one of the views I have just taken a screenshot of.

It's the Calendar events page. The blocks have been docked but I did not show the docked region.