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

Label printed for empty textarea course custom fields

XMLWordPrintable

    • WP Sprint 2024-I1.3 (Clones)

      If there are course custom fields of type "textarea" with option "Required" = "No" and they are left empty, their labels are always shown in category course list and in course/info.php page.
      It could be related to https://tracker.moodle.org/browse/MDL-79365.

      Steps to reproduce:

      1. Log in as admin
      2. Navigate to Courses > Course custom fields in site administration
      3. Add a new category (if none exists)
      4. Add a new Text area field
        • Name: Program
        • Shortname: program
        • Required: No
      5. Add a new Short Text field
        • Name: Level
        • Short name: level
        • Required: No
      6. Create a new course "Test"
        • Fill in required fields
        • Leave the Program textarea field blank
        • Leave the Level short text field blank
        • Save the course

      Navigating to course/index.php page (or in course/index.php?categoryid="id of category the course Test belongs to"):

      •     in "Test" coursebox the label "Level" is not present (correct beahviour)
      •     in "Test" coursebox the label "Program" is present (incorrect beahviour)
           

      Same behaviour in page course/info.php?id="Test course id"

            pholden Paul Holden
            sbozzini Sara Bozzini
            Carlos Escobedo Carlos Escobedo
            David Carrillo David Carrillo
            Kim Jared Lucas Kim Jared Lucas
            Votes:
            3 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved:

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

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