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

adding URL resource without an url leads to error

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical Critical
    • 2.0.6, 2.1.3
    • 2.0.3, 2.1, 2.2
    • Resource
    • MOODLE_20_STABLE, MOODLE_21_STABLE, MOODLE_22_STABLE
    • MOODLE_20_STABLE, MOODLE_21_STABLE
    • MDL-28483-master
    • Easy
    • Hide

      This needs to be tested in all three branches.
      In Stables
      1. Add a URL resource to a page
      2. Make sure URL field is required.
      3. Try entering invalid urls (for example:- hxxp://something) and make sure that generates an error and nothing is saved.
      4. Enter a valid url and Save and return to course
      5. Click on this url resource
      6. Make sure everything works as expected.

      In Master
      1. This patch contains module upgrade code, so make sure the upgrade goes smoothly.
      2. Make sure the field "externalurl" in table "url" is "not-null" after the upgrade.
      3. Repeat 1-6 from above

      Show
      This needs to be tested in all three branches. In Stables 1. Add a URL resource to a page 2. Make sure URL field is required. 3. Try entering invalid urls (for example:- hxxp://something) and make sure that generates an error and nothing is saved. 4. Enter a valid url and Save and return to course 5. Click on this url resource 6. Make sure everything works as expected. In Master 1. This patch contains module upgrade code, so make sure the upgrade goes smoothly. 2. Make sure the field "externalurl" in table "url" is "not-null" after the upgrade. 3. Repeat 1-6 from above

      Try adding URL resource into a course (see Testing instructions).

      In 2.0+ the field "External URL" is not required. If user does not enter the value there and tries to click the link, an error occurs with the text "A required parameter (id) was missing", which is very confusing.

      In 1.9 the field "Location" is required and pre-populated with "http://" by default (which does not result in an error if user forgets to fill it). In this case if user clicks on the link from a course page, nothing happens at all.

      IMHO, the link should be required in 2.0+ (and the description field not) and value "http://" should not pass validation in 1.9. But probably there was a good reason why link is no longer required in 2.0+.

      Another thing I have noticed is that help for "Display" lists more options than there are in the dropdown.

        1. Setting up a URL.png
          Setting up a URL.png
          114 kB
        2. URL error.png
          URL error.png
          95 kB
        3. MDL-28483_git_diff1.jpg
          MDL-28483_git_diff1.jpg
          284 kB
        4. MDL-28483_git_diff2.jpg
          MDL-28483_git_diff2.jpg
          316 kB
        5. MDL-28483_git_diff3.jpg
          MDL-28483_git_diff3.jpg
          391 kB

            ankit_frenz Ankit Agarwal
            marina Marina Glancy
            Sam Hemelryk Sam Hemelryk
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Sam Hemelryk Sam Hemelryk
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.