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

Label printed for empty textarea course custom fields

XMLWordPrintable

    • MOODLE_401_STABLE, MOODLE_403_STABLE
    • MOODLE_402_STABLE, MOODLE_403_STABLE
    • MDL-80865-403
    • Hide
      1. Log in as admin
      2. Navigate to Courses > Course custom fields in site administration
      3. Create two new Text area custom fields
        • Field 1
        • Field 2
      4. Create a new course
        • Field 1: Hello
        • Field 2: <leave empty>
      5. Navigate to <WWWROOT>/course/index.php
      6. Confirm Field 1: heading shows for new course
      7. Confirm Field 2: heading does not show for new course
      Show
      Log in as admin Navigate to Courses > Course custom fields in site administration Create two new Text area custom fields Field 1 Field 2 Create a new course Field 1: Hello Field 2: <leave empty> Navigate to <WWWROOT>/course/index.php Confirm Field 1: heading shows for new course Confirm Field 2: heading does not show for new course
    • 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.