Best practice forum (Archived)

Show and Hide Editing Tools in 2.5

 
Daniel Bond
Show and Hide Editing Tools in 2.5
by Daniel Bond - Friday, 15 November 2013, 7:45 AM
Group Most helpful contributor 2023

Love the new feature where the TinyMCE editing tools can be hidden, however when the editing box has been in a Web 2.0 style popup window then it appears multiple "Hide / Show" tabs are spawned. Maybe it's just a theme issue (we are just using the Custom Totara theme for testing purposes currently) but every time a new "popup" is launched which contains a TinyMCE editing panel, a new tab seems to appear.

All of the extra tabs disappear when navigating between pages, but when creating appraisal content it's all AJAX and therefore there's not page navigation action when creating new content/pages/switching between existing stages. As soon as a new stage is created, or you go to a different part of the appraisal (General, Assignments, Messages) then you are navigating to a new page and the tabs disappear.


me
Re: Show and Hide Editing Tools in 2.5
by George Angus - Sunday, 17 November 2013, 7:57 PM
Group Totara

Hi Dan,

Thanks for bringing this to our attention, its a bug and Ive put in a bug report, someone will be in touch shortly.

regards,

George.

 

 

Daniel Bond
Re: Show and Hide Editing Tools in 2.5
by Daniel Bond - Tuesday, 11 February 2014, 3:30 AM
Group Most helpful contributor 2023

Has anything further happened with this, I'm on 2.5.6 currently and the problem still seems to exist. Obviously not a high priority fix, more irritating than actually impairing functionality, but I wanted to make sure it wasn't just me still experiencing it.

Dan

Maurice Moore
Re: Show and Hide Editing Tools in 2.5
by Maurice Moore - Tuesday, 11 February 2014, 1:27 PM
 

We are also still seeing this when editing appraisals. Each time you edit an appraisal item a new tab appears - often preventing the editor to be expanding. The only option is to refresh the page and start again.

Totara 2.5.7

David Curry (Core Developer)
Re: Show and Hide Editing Tools in 2.5
by David Curry (Core Developer) - Thursday, 13 February 2014, 12:52 PM
Group Totara

Hey Guys,

Sorry this is taking so long, the original developer assigned to this got re-assigned to feature development a while back. I don't have the solution yet but I thought I should let you know that I've picked it up and someone is actually looking into it.

"Each time you edit an appraisal item a new tab appears" - Have you noticed this anywhere apart from editing/creating fixed text questions? That is the only place I've managed to replicate the issue.

Cheers,
David

Daniel Bond
Re: Show and Hide Editing Tools in 2.5
by Daniel Bond - Friday, 14 February 2014, 1:38 AM
Group Most helpful contributor 2023

I've only seen it happen in Appraisals, which I suspect is related to the fact that editing appraisal content is all via AJAX where as almost everywhere else seems to involve actual page navigations (which seem to "reset" the tabs).

Thanks for looking at this, nice to be kept up to date with progress, always appreciated.

Dan

Maurice Moore
Re: Show and Hide Editing Tools in 2.5
by Maurice Moore - Wednesday, 26 February 2014, 4:58 PM
 

I've only seen this happen when editing appraisals. It can be very annoying as more often than not I cannot open the editing tools at all and I have to do a browser refresh (which, of course, takes you out of the edit screen). Once refreshed, the show tools tab always works for the first edit. The duplication happens with each new page edit and I have found that the 'latest' button generally works for one or two times. I have got up to 5 show tools tabs and still been able to open the editor. When the functionality fails, only a browser refresh will re-enable the show tools tab.

David Curry (Core Developer)
Re: Show and Hide Editing Tools in 2.5
by David Curry (Core Developer) - Monday, 3 March 2014, 1:12 PM
Group Totara

Hey Guys,

Thought I'd chuck an update on here. We do have a fix for this in review now, but I think it might take a while to get included in a point release. Since we ended up having to put the fix directly in the tinymce code, which is core moodle, and we would like to upstream it to reduce the risk of merge conflicts later on. However while it took a while to hunt down the issue and get a patch in it is a rather small code change, so if you want to make the change as a local customisation now rather than wait for it to be included in a point release it should be relatively easy. I've uploaded the whole diff file of the patchset but these are the changes:

 16          var editors_initialised = this.editors_initialised(), self = this, editor;
 17 +        // If the editor exists don't initialise it.
 18 +        if (tinymce.activeEditor != null) {
 19 +            return;
 20 +        }

There are potentially three files where this change should be made:

  • lib/editor/tinymce/yui/build/moodle-editor_tinymce-collapse/moodle-editor_tinymce-collapse-debug.js
  • lib/editor/tinymce/yui/build/moodle-editor_tinymce-collapse/moodle-editor_tinymce-collapse-min.js
  • lib/editor/tinymce/yui/build/moodle-editor_tinymce-collapse/moodle-editor_tinymce-collapse.js

I am not sure you would need the debug one but it couldn't hurt to apply the change there as well. Also I found the easiest way to change the min file was to change the collapse.js and then run the file through a minify tool (like this one http://jscompress.com/), but you could also just copy it from the patchfile. Let me know if you have any issues with it.

Cheers,
David

Ciaran Irvine (Core Developer)
Re: Show and Hide Editing Tools in 2.5
by Ciaran Irvine (Core Developer) - Monday, 17 March 2014, 9:17 PM
 

A fix for this issue was included in today's (18 March 2014) release of Totara 2.5.10