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

Badge expiry error and missing expired stamp

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide

      Setup badges

      1. Login as admin.
      2. Go to "Site administration | Badges | Add a new badge" and create a badge at site level.
        • Set "Badge expiry" to "Relative date" to 5 seconds after the date of issue.
      3. Add criteria to the badge so it can be manually issued by role.
      4. Enable the badges.
      5. Issue the badge to the admin user.

      Testing scenario

      1. Access to admin user profile page.
      2. Check the "EXPIRED" stamp is displayed over the badge image.
      3. Check the ! icon over the badge image has the following text "This badge expired on XXXXX", where XXXXXX is the proper date when it was expired.
      4. Access to the badge.
      5. Check the "EXPIRED" stamp is displayed over the badge image.
      6. Check the ! icon over the badge image has the following text "This badge expired on XXXXX", where XXXXXX is the proper date when it was expired.
      7. Click over the "Manage badges" in the breadcrumb menu.
      8. Check the "EXPIRED" stamp is displayed over the badge image.
      9. Check the ! icon over the badge image has the following text "This badge expired on XXXXX", where XXXXXX is the proper date when it was expired.
      Show
      Setup badges Login as admin. Go to "Site administration | Badges | Add a new badge" and create a badge at site level. Set "Badge expiry" to "Relative date" to 5 seconds after the date of issue. Add criteria to the badge so it can be manually issued by role. Enable the badges. Issue the badge to the admin user. Testing scenario Access to admin user profile page. Check the "EXPIRED" stamp is displayed over the badge image. Check the ! icon over the badge image has the following text "This badge expired on XXXXX", where XXXXXX is the proper date when it was expired. Access to the badge. Check the "EXPIRED" stamp is displayed over the badge image. Check the ! icon over the badge image has the following text "This badge expired on XXXXX", where XXXXXX is the proper date when it was expired. Click over the "Manage badges" in the breadcrumb menu. Check the "EXPIRED" stamp is displayed over the badge image. Check the ! icon over the badge image has the following text "This badge expired on XXXXX", where XXXXXX is the proper date when it was expired.
    • Affected Branches:
      MOODLE_310_STABLE, MOODLE_311_STABLE, MOODLE_38_STABLE, MOODLE_39_STABLE, MOODLE_400_STABLE
    • Fixed Branches:
      MOODLE_310_STABLE, MOODLE_39_STABLE
    • Pull from Repository:
    • Pull 3.9 Branch:
    • Pull 3.10 Branch:
      MDL-67974-310
    • Pull 3.11 Branch:
      MDL-67974-311
    • Pull Master Branch:
      MDL-67974-master
    • Sprint:
      Moppies Kanban

      Description

      Badge images on the "Issued Badge Information" page (badge.php) are incorrectly stamped with the "EXPIRED" overlay image.  When the user hovers over the image, the following tool-tip appears: "This Badge Expired on Thursday 1 January 1970."   (ref. attached image).

      The unix timestamp values in the table 'course_completions' are correct based on the actual course enrolment, start and completion dates.  I would suggest whatever logic is used to display the EXPIRED overlay stamp is failing to convert the unix timestamp (which is why we are left with a reference to 1970). 

      The very same badge thumbnail appears [correctly] via mybadges.php (Manage Badges) without the 'EXPIRED' overlay image (ref. attached image).

        Attachments

        1. BadgeExpiryError.png
          BadgeExpiryError.png
          150 kB
        2. badgeVSmybadges.jpg
          badgeVSmybadges.jpg
          26 kB
        3. MDL-67974.jpg
          MDL-67974.jpg
          43 kB
        4. MDL-68257_033.png
          MDL-68257_033.png
          73 kB

          Issue Links

            Activity

              People

              Assignee:
              sarjona Sara Arjona (@sarjona)
              Reporter:
              ianv Ian Van Kretschmar
              Peer reviewer:
              Ferran Recio Ferran Recio
              Integrator:
              Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
              Tester:
              Anna Carissa Sadia Anna Carissa Sadia
              Participants:
              Component watchers:
              Yuliya Bozhko, Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Sara Arjona (@sarjona)
              Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                8/Mar/21

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 2 hours, 20 minutes
                  2h 20m