gjbarnard / moodle-format_topcoll

Collapsed Topics course format for Moodle.
http://docs.moodle.org/en/Collapsed_Topics_course_format
GNU General Public License v3.0
35 stars 60 forks source link

Display the topic summaries in non-editing mode too #7

Closed OdyX closed 11 years ago

OdyX commented 11 years ago

For an unknown reason, the topic summaries are not displayed in non-editing mode for Moodle 1.9, this pull request fixes that.

gjb2048 commented 11 years ago

Dear Didier,

Thank you for the pull request, but I'm going to reject it. This is because in M1.9, $thissection->summary is used for the toggle text and therefore they are 'displayed in non-editing' mode. The functionality works as intended as M1.9 does not have a $thissection->name attribute in the section class as M2.0+ does. Therefore implementing this patch would mean both the toggle and the opened section displaying the section summary. At the time of creating the code I decided that the summary should both be displayed in both the toggle and the section in editing mode to facilitate the attachment of the editing icon such that the summary could be edited. I suppose that now it would be appropriate for the summary to only be shown in the toggle in both modes and make the editing icon work within the toggle and not be shown twice in editing mode. However, M1.9 has reached end of life and therefore to expend any time on the M1.9 version would be almost pointless.

Kind regards,

Gareth

OdyX commented 11 years ago

For the record: in the Moodle 1.9 instance I was debugging this, when non-editing a course with collapsed topics, the summary didn't show up in the toggle at all. As it doesn't show up in the section display either, it isn't displayed at all, hence this patch. So there's a bug here at least.

But I agree with the handling of that pull request on the argument that Moodle 1.9 is end-of-life: I've pushed the patch to the instance in question and that works for us; I hope it might be useful to others.

gjb2048 commented 11 years ago

Dear Didier,

That's very odd. I've just tested with version 1.9.10.2 of Collapsed Topics for M1.9 (2007101592.04 & 1.9.19+ (Build: 20130125)) and when the section summary is empty, the code displays the word 'Topic' and when not empty, the summary. I even attempted to put a space to fool it. But did not work. So I'm not sure what is going on unless there is a change to your language file. Humm.

Cheers,

Gareth