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

Add a new course - Summary text should be optional

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.8, 1.8.1, 1.8.2, 1.8.3, 1.8.4, 1.9, 2.0
    • Fix Version/s: 1.8.6, 1.9.1
    • Component/s: Course
    • Labels:
      None
    • Affected Branches:
      MOODLE_18_STABLE, MOODLE_19_STABLE, MOODLE_20_STABLE
    • Fixed Branches:
      MOODLE_18_STABLE, MOODLE_19_STABLE

      Description

      When creating a new course on a moodle site, the Summary field is already filled with the default text "Write a concise and interesting paragraph here that explains what this course is about". This is not the correct way to do it. On large moodle sites, where a large number of courses are created semi-automatically by an admin, the exact description of the course is often not available to the admin. This results in the default text being displayed next to the link to the courses in the courses list on the front page of the moodle site. Obviously, this text is meaningless to the students who peruse the list of courses.
      Fix. I suggest a) removing the default language string in the course summary and of course b) removing the "required" rule.
      Patch: in file course/edit_form.php, remove those 2 lines:
      // $mform->setDefault('summary', get_string('defaultcoursesummary'));
      // $mform->addRule('summary', get_string('missingsummary'), 'required', null, 'client');

      Joseph
      PS.- See this discussion on the French course forum: http://moodle.org/mod/forum/discuss.php?d=91474

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            stronk7 Eloy Lafuente (stronk7) added a comment -

            Just a note, from a DB perspective, about that field course->summary, being only really nullable under Moodle 1.9. It is defined as NOT NULL under Moodle 1.8.

            Both releases will accept empty strings (I guess), and the suggested patch (only the patch, not the removal of default string, IMO) should work.

            But perhaps the correct target should be 1.9 exclusively. MD roots!

            Ciao

            Show
            stronk7 Eloy Lafuente (stronk7) added a comment - Just a note, from a DB perspective, about that field course->summary, being only really nullable under Moodle 1.9. It is defined as NOT NULL under Moodle 1.8. Both releases will accept empty strings (I guess), and the suggested patch (only the patch, not the removal of default string, IMO) should work. But perhaps the correct target should be 1.9 exclusively. MD roots! Ciao
            Hide
            dougiamas Martin Dougiamas added a comment -

            Yeah, I agree with this. +1 to make the default string an empty string '' and to allow it to be saved that way.

            Show
            dougiamas Martin Dougiamas added a comment - Yeah, I agree with this. +1 to make the default string an empty string '' and to allow it to be saved that way.
            Hide
            dougiamas Martin Dougiamas added a comment -

            The patch looks OK to me but I've not tested it. Assuming you have then I think it can safely go to 1.9 and 1.8.x.

            Show
            dougiamas Martin Dougiamas added a comment - The patch looks OK to me but I've not tested it. Assuming you have then I think it can safely go to 1.9 and 1.8.x.
            Hide
            jerome Jérôme Mouneyrac added a comment - - edited

            Ok it has been commited into 1.8, 1.9 and trunk.

            Show
            jerome Jérôme Mouneyrac added a comment - - edited Ok it has been commited into 1.8, 1.9 and trunk.
            Hide
            skodak Petr Skoda added a comment -

            reviewed, thanks

            Show
            skodak Petr Skoda added a comment - reviewed, thanks

              People

              • Votes:
                3 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  15/May/08