|
Works perfectly in Moodle 1.8.3+. Thanks for the fix, Ann.
Nicolas can you review and merge this please?
Looks like this fix works partially on Moodle 1.9.2.+
Problem now is the style changes but this is not reflected in the DOM proposed solution: change <<Moodle Root>>/course/lib.php and make labels have the class dimmed if they are hidden and always wrapped in a div replace lines 1350 - 1356 with then modify css for theme so that div's with dimmed are greyed out e.g. a.dimmed:link, then modify and insert following code round about line 537 of <<Moodle Root>>/lib/ajax/section_classes.js (look for this line this.linkContainer = this.getEl().getElementsByTagName('a')[0] if (YAHOO.util.Dom.hasClass(this.getEl().getElementsByTagName('div')[0], 'dimmed')) {
this.hidden = true;
} This is still an issue in 1.92+ (20080711) and I'd definitely consider it major. Not only does it display the incorrect state of the "eye" but it disallows instructors from making a resource visible once it takes on an invisible state with the eye opened. A patch would be great.
For what it's worth it: for Moodle 1.9.2+ I had to adapt Ann's above patch from 07/Nov/07 since now dimmed text gets enclosed between div tags on no longer between span tags. This is what I did. For me it works so far.
[root@ecampus html]# diff -c moodle/lib/ajax/section_classes.js.dist moodle/lib/ajax/section_classes.js
this.hidden = false; Applied patch to 1.9.3 and HEAD. Works fine.
It works however when I hide the label, the label only becomes grey when I reload the page. Tested on 1.9 with AJAX activated.
I change the priority issue as I confirm that the initial problem has been fixed.
Finally I changed back to Major as the problem still exists on 1.8
Finally backported this fix to 1.8
reopening the label itself is not grayed out after clicking the eye icon
Tested and works.
Resolved. Closing. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
RCS file: /cvsroot/moodle/moodle/lib/ajax/section_classes.js,v
retrieving revision 1.32.2.2
diff -c -r1.32.2.2 section_classes.js
***************
this.id = this.getEl().id.replace(/module-/i, '');
this.hidden = false;
! if (YAHOO.util.Dom.hasClass(this.getEl().getElementsByTagName('a')[0], 'dimmed')) { this.hidden = true; }
this.hiddenStored = null;
— 516,522 ----
this.id = this.getEl().id.replace(/module-/i, '');
this.hidden = false;
! if (YAHOO.util.Dom.hasClass(this.getEl().getElementsByTagName('a')[0], 'dimmed') || YAHOO.util.Dom.hasClass(this.getEl().getElementsByTagName('span')[0], 'dimmed_text')) { this.hidden = true; } }
this.hiddenStored = null;