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

Messaging: timestamp should include days and years in main conversations list

    XMLWordPrintable

Details

    • MOODLE_37_STABLE
    • MOODLE_37_STABLE
    • MDL-65114-master
    • Hide
      1. Create a fresh site with some test users
      2. Log in (admin is fine) and, via the messaging drawer, send another user a message
      3. From the conversation pane, click the arrow at the top left of the drawer to go back to the main conversation list.
      4. Verify the datetime next to the conversation is a 24h time format. Something like 14:21 is what we expect.
      5. In that conversation, send a few more messages
      6. Message another user a couple of times too.
      7. Next, check the database and get the ids of the 2 conversations you just created:
        E.g.

        select id from mdl_message_conversations;
        

      8. Pick one of the ids and, using the following statement and replacing X, update all the message created times, setting them back a week:

        update mdl_message_conversations set timecreated = timecreated-604800 where id = X
        

      9. Now, refresh the page and open the messaging pane again.
      10. In the private section, verify (you can also confirm the formats match those in the attached screenshot):
        • The first conversation is displayed with a 24h time format. Something like 14:21 is what we expect in terms of format.
        • The second conversation is displayed with a date format, something like dd/mm/YY, e.g. 31/01/2019
      Show
      Create a fresh site with some test users Log in (admin is fine) and, via the messaging drawer, send another user a message From the conversation pane, click the arrow at the top left of the drawer to go back to the main conversation list. Verify the datetime next to the conversation is a 24h time format. Something like 14:21 is what we expect. In that conversation, send a few more messages Message another user a couple of times too. Next, check the database and get the ids of the 2 conversations you just created: E.g. select id from mdl_message_conversations; Pick one of the ids and, using the following statement and replacing X, update all the message created times, setting them back a week: update mdl_message_conversations set timecreated = timecreated-604800 where id = X Now, refresh the page and open the messaging pane again. In the private section, verify (you can also confirm the formats match those in the attached screenshot): The first conversation is displayed with a 24h time format. Something like 14:21 is what we expect in terms of format. The second conversation is displayed with a date format, something like dd/mm/YY, e.g. 31/01/2019

    Description

      Like "Monday, 11th March 2019".

      Update: Spoke to UX and the outcome was:

      For conversations listed on the main view (Starred, Group, Private), we want to:

      • Display the time in the format "14:18" for conversations having a message posted today.
      • Display the date in the format "29/01/19" for conversations older than today.

      This likely means we can't simply use the strftimetime24 in the template and must preformat the dates before rendering the template

      Attachments

        Activity

          People

            jaked Jake Dallimore
            jaked Jake Dallimore
            Carlos Escobedo Carlos Escobedo
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Gladys Basiana Gladys Basiana
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              20/May/19

              Time Tracking

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