Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-20628

"topic 1", "topic 2" etc. is next to useless - allow them to be changed to a custom title for the topic or allow them to be switched off

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: 2.0
    • Component/s: Course
    • Labels:
      None

      Description

      I've always thought that topic numbers where less than useful. We find that most customers hate them and ask for them to be removed (unprompted). Shock horror - in Moodle 2.0 they become even more prominent in the navigation block. IMHO, non-mutually exclusive options:

      • Make 'topic n' editable so it can have a proper title. Perhaps editing the header for the topic can have an additional "short name' that becomes the topic name in navigation?
      • Allow them to be switched off altogether.

      Same applies to the "Topic outline" text at the top of a course. Major source of complaint.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

              Hide
              stronk7 Eloy Lafuente (stronk7) added a comment -

              Assigning to Martin for his consideration.

              +1 here too to allow both editing each topic (section) name and to switch on/off numbers for all the course. Or, alternatively, introduce one new course format, like the topics one but allowing to "name" them: namedtopics or so.

              Just an idea... ciao

              Show
              stronk7 Eloy Lafuente (stronk7) added a comment - Assigning to Martin for his consideration. +1 here too to allow both editing each topic (section) name and to switch on/off numbers for all the course. Or, alternatively, introduce one new course format, like the topics one but allowing to "name" them: namedtopics or so. Just an idea... ciao
              Hide
              dsturrock David Sturrock added a comment -

              If using truncation of topic summary text for navigation headings then would be best to use a line break instead of or at least as well as a character limit. Existing course menu blocks have problems with straight character truncation if teacher uses summary for a heading AND then adds additional text. This is simpler than adding an extra field for topic names as suggested above.

              Show
              dsturrock David Sturrock added a comment - If using truncation of topic summary text for navigation headings then would be best to use a line break instead of or at least as well as a character limit. Existing course menu blocks have problems with straight character truncation if teacher uses summary for a heading AND then adds additional text. This is simpler than adding an extra field for topic names as suggested above.
              Hide
              mhughes2k Michael Hughes added a comment -

              A small patch to enable "custom" topic names in the navigation bar, and changes to course files to allow setting of custom name on Edit Topic page.

              Show
              mhughes2k Michael Hughes added a comment - A small patch to enable "custom" topic names in the navigation bar, and changes to course files to allow setting of custom name on Edit Topic page.
              Hide
              dougiamas Martin Dougiamas added a comment -

              Something for your list, Sam.

              Show
              dougiamas Martin Dougiamas added a comment - Something for your list, Sam.
              Hide
              samhemelryk Sam Hemelryk added a comment -

              Have just commit a patch for this that allows you to name a section and have that section name displayed instead of the default (topic x / week dates). It is of course reflected in the navigation as well.
              At the same time I touched up the navigation generated for the weeks format, presuming you havn't set a name it will now use the week dates in the navigation rather than week x.

              Thanks Michael for the initial patch

              Cheers
              Sam

              Show
              samhemelryk Sam Hemelryk added a comment - Have just commit a patch for this that allows you to name a section and have that section name displayed instead of the default (topic x / week dates). It is of course reflected in the navigation as well. At the same time I touched up the navigation generated for the weeks format, presuming you havn't set a name it will now use the week dates in the navigation rather than week x. Thanks Michael for the initial patch Cheers Sam
              Hide
              stronk7 Eloy Lafuente (stronk7) added a comment -

              Side comment:

              new DB field -> something to do in backup

              in this case:

              look for backup_section_structure_step() (/backup/moodle/backup_stepslib.php)

              Ciao

              Show
              stronk7 Eloy Lafuente (stronk7) added a comment - Side comment: new DB field -> something to do in backup in this case: look for backup_section_structure_step() (/backup/moodle/backup_stepslib.php) Ciao
              Hide
              samhemelryk Sam Hemelryk added a comment -

              Awesome thanks Eloy, will look at that now

              Show
              samhemelryk Sam Hemelryk added a comment - Awesome thanks Eloy, will look at that now
              Hide
              samhemelryk Sam Hemelryk added a comment - - edited

              Eloy, I was just looking at the class you mentioned, I gather I just need to add 'name' to the third argument array.
              I noticed however that in that array it has `number` which is not a field? I would guess the following patch would be the solution to both, but I'll wait to hear from you before I commit encase I am missing something:

              Index: moodle/backup/moodle2/backup_stepslib.php
              --- moodle/backup/moodle2/backup_stepslib.php Base (1.1)
              +++ moodle/backup/moodle2/backup_stepslib.php Locally Modified (Based On 1.1)
              @@ -160,7 +160,7 @@
                       // Define each element separated
               
                       $section = new backup_nested_element('section', array('id'), array(
              -            'number', 'summary', 'sequence', 'visible'));
              +            'section', 'name', 'summary', 'sequence', 'visible'));
               
                       // Define sources

              Show
              samhemelryk Sam Hemelryk added a comment - - edited Eloy, I was just looking at the class you mentioned, I gather I just need to add 'name' to the third argument array. I noticed however that in that array it has `number` which is not a field? I would guess the following patch would be the solution to both, but I'll wait to hear from you before I commit encase I am missing something: Index: moodle/backup/moodle2/backup_stepslib.php --- moodle/backup/moodle2/backup_stepslib.php Base (1.1) +++ moodle/backup/moodle2/backup_stepslib.php Locally Modified (Based On 1.1) @@ -160,7 +160,7 @@ // Define each element separated $section = new backup_nested_element('section', array('id'), array( - 'number', 'summary', 'sequence', 'visible')); + 'section', 'name', 'summary', 'sequence', 'visible')); // Define sources
              Hide
              howardsmiller Howard Miller added a comment -

              Thanks for all the effort on this. It doesn't seem much, but it will make a big difference to a lot of users.

              Show
              howardsmiller Howard Miller added a comment - Thanks for all the effort on this. It doesn't seem much, but it will make a big difference to a lot of users.
              Hide
              marycooch Mary Cooch added a comment -

              Agree with Howard - "little" things like this often mean a lot more than some of the Big Things.

              Show
              marycooch Mary Cooch added a comment - Agree with Howard - "little" things like this often mean a lot more than some of the Big Things.
              Hide
              drex Mark Drechsler added a comment -

              +1 for Mary and Howard's comments - a little change which will most definitely help!

              Show
              drex Mark Drechsler added a comment - +1 for Mary and Howard's comments - a little change which will most definitely help!
              Hide
              stronk7 Eloy Lafuente (stronk7) added a comment -

              Sam, well spotted, it was mission one alias! It's only of the few places in the whole backup where we name differently the DB field and the XML tag. I've already committed it including your change.

              --- backup_stepslib.php	21 Apr 2010 09:19:31 -0000	1.1
              +++ backup_stepslib.php	23 Apr 2010 12:30:54 -0000
              @@ -160,12 +160,15 @@
                       // Define each element separated
               
                       $section = new backup_nested_element('section', array('id'), array(
              -            'number', 'summary', 'sequence', 'visible'));
              +            'number', 'name', 'summary', 'sequence', 'visible'));
               
                       // Define sources
               
                       $section->set_source_table('course_sections', array('id' => backup::VAR_SECTIONID));
               
              +        // Aliases
              +        $section->set_source_alias('section', 'number');
              +
                       // Set annotations
                       $section->annotate_files(array('course_section'), 'id');

              Show
              stronk7 Eloy Lafuente (stronk7) added a comment - Sam, well spotted, it was mission one alias! It's only of the few places in the whole backup where we name differently the DB field and the XML tag. I've already committed it including your change. --- backup_stepslib.php 21 Apr 2010 09:19:31 -0000 1.1 +++ backup_stepslib.php 23 Apr 2010 12:30:54 -0000 @@ -160,12 +160,15 @@ // Define each element separated $section = new backup_nested_element('section', array('id'), array( - 'number', 'summary', 'sequence', 'visible')); + 'number', 'name', 'summary', 'sequence', 'visible')); // Define sources $section->set_source_table('course_sections', array('id' => backup::VAR_SECTIONID)); + // Aliases + $section->set_source_alias('section', 'number'); + // Set annotations $section->annotate_files(array('course_section'), 'id');
              Hide
              stronk7 Eloy Lafuente (stronk7) added a comment -

              Uhm.. one more comment... aren't we missing the corresponding "summaryformat" field in that table?

              Show
              stronk7 Eloy Lafuente (stronk7) added a comment - Uhm.. one more comment... aren't we missing the corresponding "summaryformat" field in that table?
              Hide
              samhemelryk Sam Hemelryk added a comment -

              Awesome thanks for commit Eloy

              The summaryformat field was something that caught my eye as well, I checked out the code and in the creation of the editor it specifies 'changeformat'=>false as an option.
              I imagine when I converted it to the new editor I left out the summaryformat field because it is a constant, however should it be there? Let me know what you think and I'll check with Petr as well.

              Cheers
              Sam

              Show
              samhemelryk Sam Hemelryk added a comment - Awesome thanks for commit Eloy The summaryformat field was something that caught my eye as well, I checked out the code and in the creation of the editor it specifies 'changeformat'=>false as an option. I imagine when I converted it to the new editor I left out the summaryformat field because it is a constant, however should it be there? Let me know what you think and I'll check with Petr as well. Cheers Sam
              Hide
              stronk7 Eloy Lafuente (stronk7) added a comment -

              I think it should exist, exactly the same that any other "text field". Unless someone else has one good reason for that (I cannot imagine).

              So my +1 for adding it (just awaiting one more +1). TIA and ciao

              Show
              stronk7 Eloy Lafuente (stronk7) added a comment - I think it should exist, exactly the same that any other "text field". Unless someone else has one good reason for that (I cannot imagine). So my +1 for adding it (just awaiting one more +1). TIA and ciao
              Hide
              dougiamas Martin Dougiamas added a comment -

              +1 for a summaryformat there

              Show
              dougiamas Martin Dougiamas added a comment - +1 for a summaryformat there
              Hide
              samhemelryk Sam Hemelryk added a comment -

              Have created MDL-22262 for the creation of a summaryformat column

              Show
              samhemelryk Sam Hemelryk added a comment - Have created MDL-22262 for the creation of a summaryformat column
              Hide
              gb2048 Gareth J Barnard added a comment -

              Dear Sam,

              I noticed that in /course/format/topics/format.php the 'if' condition reads:

                  if (!is_null($thissection->name)) {
                      echo $OUTPUT->heading(format_string($thissection->name, true, array('context' => $context)), 3, 'sectionname');
                  }

              and yet in /course/format/weeks/format.php

                      if (!empty($thissection->name)) {
                          echo $OUTPUT->heading(format_string($thissection->name, true, array('context' => $context)), 3, 'sectionname');
                      }

              In Moodle 2.2.1 build 20120213. Which this issue implemented. Should 'is_null' be used in both instances?

              Cheers,

              Gareth

              Show
              gb2048 Gareth J Barnard added a comment - Dear Sam, I noticed that in /course/format/topics/format.php the 'if' condition reads: if (!is_null($thissection->name)) { echo $OUTPUT->heading(format_string($thissection->name, true, array('context' => $context)), 3, 'sectionname'); } and yet in /course/format/weeks/format.php if (!empty($thissection->name)) { echo $OUTPUT->heading(format_string($thissection->name, true, array('context' => $context)), 3, 'sectionname'); } In Moodle 2.2.1 build 20120213. Which this issue implemented. Should 'is_null' be used in both instances? Cheers, Gareth

                People

                • Votes:
                  35 Vote for this issue
                  Watchers:
                  10 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    24/Nov/10