Moodle
  1. Moodle
  2. MDL-13815

Add a new course - Summary text should be optional

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor 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

          Activity

          Hide
          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
          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
          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
          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
          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
          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
          Jérôme Mouneyrac added a comment - - edited

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

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

          reviewed, thanks

          Show
          Petr Skoda added a comment - reviewed, thanks

            People

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

              Dates

              • Created:
                Updated:
                Resolved: