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

Cannot rename content bank item to "0"

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Minor
    • 3.9.5, 3.10.2
    • 3.9.4, 3.10.1, 3.11, 4.0
    • Content bank
    • MOODLE_310_STABLE, MOODLE_311_STABLE, MOODLE_39_STABLE, MOODLE_400_STABLE
    • MOODLE_310_STABLE, MOODLE_39_STABLE
    • MDL-70941-master
    • Hide
      1. Follow the same instructions than MDL-70910 and then from the"Actions menu" press "Rename".
      2. Try to rename to: "0" (just the number zero without any quotes)
      3. You should see the message "The content has been renamed." and see that the name has been changed to "0"
      Show
      Follow the same instructions than MDL-70910 and then from the"Actions menu" press "Rename". Try to rename to: "0" (just the number zero without any quotes) You should see the message "The content has been renamed." and see that the name has been changed to "0"

    Description

      Create a content bank item with a name such as "Cool bananas", view it and from the "Actions menu" press "Rename"

      Try to rename to: "0" (just the number zero without any quotes)

      You receive the error message "Empty name is not allowed" and the item is not renamed

      It fails because this empty check doesn't work for strings (PHP considers the string "0" to be empty) - similar change in core_contenbank\content\set_name() probably required too

      davidmatamoros and I found while he was looking at MDL-70910

      Attachments

        Issue Links

          Activity

            People

              davidcarrillo David Carrillo
              pholden Paul Holden
              Amaia Anabitarte Amaia Anabitarte
              Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
              Anna Carissa Sadia Anna Carissa Sadia
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - 0 minutes
                  0m
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 hour, 35 minutes
                  1h 35m

                  Clockify

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