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

Allow setting course fullname and summary in tool_generator_course_backend

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.9
    • 2.9
    • Course
    • MOODLE_29_STABLE
    • MOODLE_29_STABLE
    • MDL-49224-master
    • Hide

      PHPUnit:
      Run admin/tool/generator/tests/maketestcourse_test.php and verify there are no failures.

      Manual tests

      • Put your Moodle instance into developer mode.
      • Use the GUI to create a test course (Site administration -> Development -> Make test course) of size XS.
        • Fill out the course full name field.
        • Fill out the course summary field with some rich text and an image.
      • Use the CLI to create a test course with some rich text in the summary, e.g.

        php admin/tool/generator/cli/maketestcourse.php --shortname="xs2" --fullname="excess2" --summary="argleblargle<strong>blah</strong>" --size=XS
        

      • Verify that the two courses you've created display their full names and summaries correctly.
      • Use the GUI to create a test course.
        • Leave the full name and summary fields blank.
      • Verify that the test course you've created has the extant values for test courses - a name like "Test course: XS" and a really long summary.
      • Use the GUI to create another test course.
        • Leave the full name blank, but enter a single space as the summary.
      • Verify that the extant summary behaviour has been overridden by your single space.
      Show
      PHPUnit : Run admin/tool/generator/tests/maketestcourse_test.php and verify there are no failures. Manual tests Put your Moodle instance into developer mode. Use the GUI to create a test course (Site administration -> Development -> Make test course) of size XS. Fill out the course full name field. Fill out the course summary field with some rich text and an image. Use the CLI to create a test course with some rich text in the summary, e.g. php admin/tool/generator/cli/maketestcourse.php --shortname="xs2" --fullname="excess2" --summary="argleblargle<strong>blah</strong>" --size=XS Verify that the two courses you've created display their full names and summaries correctly. Use the GUI to create a test course. Leave the full name and summary fields blank. Verify that the test course you've created has the extant values for test courses - a name like "Test course: XS" and a really long summary. Use the GUI to create another test course. Leave the full name blank, but enter a single space as the summary. Verify that the extant summary behaviour has been overridden by your single space.
    • Team Beards Sprint 4
    • Small

    Description

      At present, tool_generator_course_backend does not allow setting of course fullnames or summaries. This is super annoying when trying to set up test courses that resemble real institutional data, and should be an easy fix.

      As far as the simple / naive design - public attributes on the class - this was done to maintain backwards compatibility with extant scripts. Backwards compatibility could also be maintained by instead having it be an additional construct-time parameter, but:

      1. that would break the line length coding style guideline on the constructor definition
      2. when using the new parameter you'd be faced with two naming parameters at opposite sides of the parameter list; ugly.

      I'm not particularly married to an approach here though - happy to defer to any comment.

      Attachments

        Issue Links

          Activity

            People

              jethac Jetha Chan
              jethac Jetha Chan
              David Monllaó David Monllaó
              Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
              Adrian Greeve Adrian Greeve
              Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Laurent David, Sara Arjona (@sarjona)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                11/May/15