Essential Theme Glossary Updating

Essential Theme Glossary Updating

Rodney Wolford -
回帖数:19

Hello,

I am using Essential 2.5.3 in Moodle 2.5.1+(build 20130708). When I go as an administrator to edit an exiting definition in a glossary, I do not see any edit Icons next to the terms or definitions (see screen shot, below). To edit I am forced to revert to my previous theme (Rocket). Am I missing something here?

Overall a great theme for my purposes. Look f orward to its ongoing development. Thanks.

Rod

附件 EssentialThemeGlossaryProblem1.png
回复Rodney Wolford

Re: Essential Theme Glossary Updating

Mary Evans -

Hi,

I did see your post earlier, but cannot answer for Julian who knows more about this theme than I do.Julian is based in Australia, so does not get online until after midnight UK time and since you are 5/6hrs behind UK you wont get an answer for a little while yet being weekend.

In the mean time can you verify that the glossary edit icons are visible and work OK when using the 'Clean' theme? If not then this is likely to be a Bootstrapbase problem and not necessarily the Essential theme.

Cheers

Mary

回复Mary Evans

Re: Essential Theme Glossary Updating

Rodney Wolford -

Mary,

Thanks for your response. I wasn't getting antsy about an answer -- only concerned it would disappear as others piled up on the main thread (32 responses already and growing!).

I switched to Clean, and the edit options for each term appeared in Administrator mode. So, I guess that confirms your suspicion. What next? Still as a newbie, less than a year into Moodle, some of the conventions elude me.

Regards,

Rod

回复Rodney Wolford

Re: Essential Theme Glossary Updating

James Cracknell -

Hi Rod

No problems....forum conventions and politics!  Should be put against the wall and shot at times 微笑

However, it does make it clear that if you reply under 2.5.3 release it is what you are using....

You can use the Github and report your issue there - but the great thing with these Moodle forums is often someone else comes up with a resolution.

At the moment I am having problems with FontAwesome and don't think it is best I comment until that problem is solved - but with such a radical theme and such a massive monster as Moodle - there are bound to be teething troubles.

Kind Regards

James

回复James Cracknell

Re: Essential Theme Glossary Updating

Mary Evans -

@Rod,

It looks like there is a setting you need to activate to get the Edit icons to show up. See code below. I think it is something to do with Autohide.

Also I think I may have found a BUG in the essential theme related to the editicons.

@James I think this may also be the cause of your problem too with images.

In essential/lib.php between lines 123 & 139 (or there abouts)  I found this...

function essential_set_editicons($css, $editicons) {
    global $CFG;
    if (!empty($CFG->themedir)) {
        $editiconsurl = $CFG->themedir . '/' . current_theme() . '/style/editicons.css'; //Pull the full path for autohide css
    } else {
        $editiconsurl = $CFG->dirroot . '/theme/' . current_theme() . '/style/editicons.css'; //MDL-36065
    }
    $tag = 'setting:editicons';
    if ($editicons) { //Setting is "YES"
        $rules = file_get_contents($editiconsurl);
        $replacement = $rules;
    } else { //Setting is "NO"
        $replacement = null; //NULL so we don't actually output anything to the stylesheet
    }
    $css = str_replace($tag, $replacement, $css);
    return $css;
}

I am sure there is a better way to write this URL as this way seems to conflict with session themes/course themes and theme/selector etc. by calling files from the 'current' theme. My screen now is peppered with warnings while only just selecting Essential theme in Theme selector, but Moodle is looking for styles/editicons.css in the theme which is still my current theme (a new theme called EcoGreen which I am working on) before I 'confirm' my switch to Essential.

As you can see in the Warnings listed below, Moodle is looking in the current theme folders and of course not finding them as they are actually in Essential which is a 'not yet fully selected' theme.

The warnings I am getting are these...

( ! ) Warning: file_get_contents(C:\wamp\www\moodle25/theme/eco_green/style/editicons.css) [function.file-get-contents]: failed to open stream: No such file or directory in C:\wamp\www\moodle25\theme\essential\lib.php on line 132
Call Stack
#TimeMemoryFunctionLocation
1 0.0020 786256 {main}彩蛋 ..\index.php:0
2 2.4607 72390944 core_renderer->header彩蛋 ..\index.php:68
3 2.5358 72560064 core_renderer->render_page_layout彩蛋 ..\outputrenderers.php:777
4 2.5375 72670376 include( 'C:\wamp\www\moodle25\theme\essential\layout\report.php' ) ..\outputrenderers.php:847
5 2.7913 74965280 core_renderer->standard_head_html彩蛋 ..\report.php:103
6 2.7917 74971312 theme_config->css_urls彩蛋 ..\outputrenderers.php:397
7 2.7918 74971896 theme_config->css_content彩蛋 ..\outputlib.php:719
8 2.8660 74992080 theme_config->css_files_get_contents彩蛋 ..\outputlib.php:844
9 3.0720 76246168 theme_config->css_files_get_contents彩蛋 ..\outputlib.php:865
10 3.0815 76319760 theme_config->css_files_get_contents彩蛋 ..\outputlib.php:865
11 3.0832 76348040 theme_config->post_process彩蛋 ..\outputlib.php:870
12 3.0833 76348248 theme_essential_process_css彩蛋 ..\outputlib.php:1039
13 3.0836 76376528 essential_set_editicons彩蛋 ..\lib.php:289
14 3.0836 76376792 file_get_contents 彩蛋 ..\lib.php:132


( ! ) Warning: file_get_contents(C:\wamp\www\moodle25/theme/eco_green/style/autohide.css) [function.file-get-contents]: failed to open stream: No such file or directory in C:\wamp\www\moodle25\theme\essential\lib.php on line 158
Call Stack
#TimeMemoryFunctionLocation
1 0.0020 786256 {main}彩蛋 ..\index.php:0
2 2.4607 72390944 core_renderer->header彩蛋 ..\index.php:68
3 2.5358 72560064 core_renderer->render_page_layout彩蛋 ..\outputrenderers.php:777
4 2.5375 72670376 include( 'C:\wamp\www\moodle25\theme\essential\layout\report.php' ) ..\outputrenderers.php:847
5 2.7913 74965280 core_renderer->standard_head_html彩蛋 ..\report.php:103
6 2.7917 74971312 theme_config->css_urls彩蛋 ..\outputrenderers.php:397
7 2.7918 74971896 theme_config->css_content彩蛋 ..\outputlib.php:719
8 2.8660 74992080 theme_config->css_files_get_contents彩蛋 ..\outputlib.php:844
9 3.0720 76246168 theme_config->css_files_get_contents彩蛋 ..\outputlib.php:865
10 3.0815 76319760 theme_config->css_files_get_contents彩蛋 ..\outputlib.php:865
11 3.0832 76348040 theme_config->post_process彩蛋 ..\outputlib.php:870
12 3.0833 76348248 theme_essential_process_css彩蛋 ..\outputlib.php:1039
13 3.0843 76376528 essential_set_autohide彩蛋 ..\lib.php:297
14 3.0843 76376784 file_get_contents 彩蛋 ..\lib.php:158


( ! ) Warning: file_get_contents(C:\wamp\www\moodle25/theme/eco_green/style/editicons.css) [function.file-get-contents]: failed to open stream: No such file or directory in C:\wamp\www\moodle25\theme\essential\lib.php on line 132
Call Stack
#TimeMemoryFunctionLocation
1 0.0020 786256 {main}彩蛋 ..\index.php:0
2 2.4607 72390944 core_renderer->header彩蛋 ..\index.php:68
3 2.5358 72560064 core_renderer->render_page_layout彩蛋 ..\outputrenderers.php:777
4 2.5375 72670376 include( 'C:\wamp\www\moodle25\theme\essential\layout\report.php' ) ..\outputrenderers.php:847
5 2.7913 74965280 core_renderer->standard_head_html彩蛋 ..\report.php:103
6 2.7917 74971312 theme_config->css_urls彩蛋 ..\outputrenderers.php:397
7 2.7918 74971896 theme_config->css_content彩蛋 ..\outputlib.php:719
8 2.8660 74992080 theme_config->css_files_get_contents彩蛋 ..\outputlib.php:844
9 3.0855 76357472 theme_config->css_files_get_contents彩蛋 ..\outputlib.php:865
10 3.0855 76358584 theme_config->css_files_get_contents彩蛋 ..\outputlib.php:865
11 3.1087 76391960 theme_config->post_process彩蛋 ..\outputlib.php:870
12 3.1092 76428168 theme_essential_process_css彩蛋 ..\outputlib.php:1039
13 3.1095 76461648 essential_set_editicons彩蛋 ..\lib.php:289
14 3.1096 76461912 file_get_contents 彩蛋 ..\lib.php:132


( ! ) Warning: file_get_contents(C:\wamp\www\moodle25/theme/eco_green/style/autohide.css) [function.file-get-contents]: failed to open stream: No such file or directory in C:\wamp\www\moodle25\theme\essential\lib.php on line 158
Call Stack
#TimeMemoryFunctionLocation
1 0.0020 786256 {main}彩蛋 ..\index.php:0
2 2.4607 72390944 core_renderer->header彩蛋 ..\index.php:68
3 2.5358 72560064 core_renderer->render_page_layout彩蛋 ..\outputrenderers.php:777
4 2.5375 72670376 include( 'C:\wamp\www\moodle25\theme\essential\layout\report.php' ) ..\outputrenderers.php:847
5 2.7913 74965280 core_renderer->standard_head_html彩蛋 ..\report.php:103
6 2.7917 74971312 theme_config->css_urls彩蛋 ..\outputrenderers.php:397
7 2.7918 74971896 theme_config->css_content彩蛋 ..\outputlib.php:719
8 2.8660 74992080 theme_config->css_files_get_contents彩蛋 ..\outputlib.php:844
9 3.0855 76357472 theme_config->css_files_get_contents彩蛋 ..\outputlib.php:865
10 3.0855 76358584 theme_config->css_files_get_contents彩蛋 ..\outputlib.php:865
11 3.1087 76391960 theme_config->post_process彩蛋 ..\outputlib.php:870
12 3.1092 76428168 theme_essential_process_css彩蛋 ..\outputlib.php:1039
13 3.1103 76461648 essential_set_autohide彩蛋 ..\lib.php:297
14 3.1103 76461904 file_get_contents 彩蛋

 

Cheers

Mary

回复Mary Evans

Re: Essential Theme Glossary Updating

Gareth J Barnard -
Core developers的头像 Particularly helpful Moodlers的头像 Plugin developers的头像

Hi Mary,

I'm actually working on a pull request (which Julian can choose or not) which eliminates the use of the 'current_theme()' function in favour of using a hard coded 'essential' string in the path.  After all the function names would have to be changed as they contain 'essential' anyway of the theme is renamed.  Plus, the function 'current_theme()' is in 'depreciatedlib.php' in M2.5 and pending complete removal.

Cheers,

Gareth

回复Mary Evans

Re: Essential Theme Glossary Updating

James Cracknell -

Hi Mary

Yep - this only happened when I upgraded.  Wish I kept my old copy - however had an eye operation last week and sometimes reading a screen is a PITA.

回复James Cracknell

Re: Essential Theme Glossary Updating

Mary Evans -

Let me see if I have older copy of Essential.

Take care of yourself...and rest that eye. Moodle can wait!

回复Mary Evans

Re: Essential Theme Glossary Updating

Mary Evans -

I have and it seems to be working OK...at least I think so. Shall I bundle it and email to ya!

However the version that is for download on Julian's github works better on Moodle 2.6 Alpha.

回复James Cracknell

Re: Essential Theme Glossary Updating

Rodney Wolford -

Whew!

Seems like I will just switch to a different theme when I need to edit a glossary selection and wait for the dust to clear. At least now I know it is not something dumb I am doing -- this time.

Regards,

Rod

 

回复Rodney Wolford

Re: Essential Theme Glossary Updating

Mary Evans -

Hi Rod,

You need to disable both the Edit and Autohide settings in your Essential custom settings page found at...

Administration > Site Administration > Appearance > Themes > Essential > General settings

The Edit icons should show up as normal.

Cheers

Mary

回复Mary Evans

Re: Essential Theme Glossary Updating

Rodney Wolford -

Mary,

Believe it or not, that is the way I have it configured, but for different reasons. "Autohide" is disabled because I prefer to see all the edit icons as I work. The Edit Icons V2 I disabled because it is stated as "not compatible with "autohide."

However, in that configuration I am not seeing the Glossary Icons, so I assume disabling those functions is not the final solution to my problem. Something else must be going on.

Regards,

Rod

 

回复Rodney Wolford

Re: Essential Theme Glossary Updating

Mary Evans -

Hi Rod,

The images are not working  on 2.5 because the Awesome Font is not working.  Although they work OK in Moodle 2.6 Alpha.

I need to check the way that Julian added the fonts.

There is a way to get it working...will have a look.

Cheers

Mary

回复Rodney Wolford

Re: Essential Theme Glossary Updating

James Cracknell -

Hi Rodney

I am using the patch that Gareth has made and submitted to Julian for the change and I can tell you there is no problem with Glossary anymore.

I guess it is just a wait for Julian to review and pull the patch.  If you can't wait....you can go to https://github.com/moodleman/moodle-theme_essential and see the Pull request for yourself.  If you download Gareth's full version (with changes) then it will work.

J.

回复James Cracknell

Re: Essential Theme Glossary Updating

Julian Ridden -

Sorry all. I was offline for the weekend (for a change) and of course the forums go mental in my absence.

I have updated Master with Garthe's patch as well as a couple of my own. Please check Master. As soon as I have confirmation of success I will also merge in the 2.5.3 branch.

Thanks for reporting the issue and for those who assisted in the fix while I was away.

Julian

回复Julian Ridden

Re: Essential Theme Glossary Updating

Rodney Wolford -

Well, I may not yet know much about how to solve problems, but it seems at least I have helped to find one.

As I have been working with this theme I have encountered a couple of other issues that as soon as I can clearly express them I will post.

As a still real newbie, I am thankful for the expertise displayed here by Mary, James, Gareth, and, of course Julian.

Thanks so very much. I will download the patch. Can't upgrade beyond 2.5.1+, where I am now, because undergoing review by the powers that be.

Regards,

Rod

回复Rodney Wolford

Re: Essential Theme Glossary Updating

Mary Evans -

Hi Rod,

Thanks...微笑

Regarding upgrading, you cannot upgrade beyond 2.5.1 at the moment since 2.6 has not been released. The only way you can test 2.6 Alpha is on a LocalHost server something like WAMP2 which is what I use, and works OK and easy enough to learn. If I can do it anyone can! LOL

http://www.wampserver.com/en/

Cheers

Mary