Moodle
  1. Moodle
  2. MDL-20587

Chat report doesn't show sessions with just one user

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.9.7, 2.1
    • Fix Version/s: 1.9.8, 2.0
    • Component/s: Chat
    • Labels:
      None
    • Difficulty:
      Easy
    • Affected Branches:
      MOODLE_19_STABLE, MOODLE_21_STABLE
    • Fixed Branches:
      MOODLE_19_STABLE, MOODLE_20_STABLE
    • Rank:
      31910

      Description

      I was debugging a problem reported by an user of moodle.ufsc.br where he cannot see the past sessions of a chat and found that moodle/mod/chat/report.php does a test to just prints sessions with more than one user. It is done in line 166:

      if ($sessionend - $sessionstart > 60 and count($sessionusers) > 1) {

      I think it is not a very good approach, mainly because no messages is showed to user.

      1. 20587_patchv1.diff
        4 kB
        Daniel Neis
      2. mdl-20587_headv1.patch
        4 kB
        Dongsheng Cai

        Activity

        Hide
        Anthony Borrow added a comment -

        Daniel - I looked at the annotation of that file and it looks like that particular test condition was written my Martin. I am not overly familiar with the chat module; however, it sounds like you are advocating that the 1 be changed to a 0 so that as long as there was a user - even if no one else responded that it would list. I am a fan of an expression that is somewhat related:

        There are two reasons why I like to talk to myself. The first is that I like to talk to someone with good sense. The second is that I like to hear someone with good sense talk.

        I am not sure if you are happy with the one minute duration check. Could you say more about what you think the best approach would be and perhaps a practical example of why it would be an improvement? Peace - Anthony

        Show
        Anthony Borrow added a comment - Daniel - I looked at the annotation of that file and it looks like that particular test condition was written my Martin. I am not overly familiar with the chat module; however, it sounds like you are advocating that the 1 be changed to a 0 so that as long as there was a user - even if no one else responded that it would list. I am a fan of an expression that is somewhat related: There are two reasons why I like to talk to myself. The first is that I like to talk to someone with good sense. The second is that I like to hear someone with good sense talk. I am not sure if you are happy with the one minute duration check. Could you say more about what you think the best approach would be and perhaps a practical example of why it would be an improvement? Peace - Anthony
        Hide
        Dongsheng Cai added a comment -

        Add Martin here for discuss, we need a decision between chat session and full chat log

        Show
        Dongsheng Cai added a comment - Add Martin here for discuss, we need a decision between chat session and full chat log
        Hide
        Martin Dougiamas added a comment -

        Yeah it's a deliberate thing designed to reduce the amount of rubbish in the logs and make it easier to see/find what is important (chats).

        Without this you'll see the page cluttered with lots of people logging in saying "hello? is anyone there?".

        Ideally there would be some sort of ajax checkbox at the top of the logs page that helps to show you just what you want to see.

        I would push this to 2.1 as part of the big revamp of activity modules.

        Show
        Martin Dougiamas added a comment - Yeah it's a deliberate thing designed to reduce the amount of rubbish in the logs and make it easier to see/find what is important (chats). Without this you'll see the page cluttered with lots of people logging in saying "hello? is anyone there?". Ideally there would be some sort of ajax checkbox at the top of the logs page that helps to show you just what you want to see. I would push this to 2.1 as part of the big revamp of activity modules.
        Hide
        Daniel Neis added a comment -

        Hello,

        can't we just add a message saying no sessions with more than one user was found until 2.1? I think i can do a patch, maybe even with a link to show all sessions.

        Show
        Daniel Neis added a comment - Hello, can't we just add a message saying no sessions with more than one user was found until 2.1? I think i can do a patch, maybe even with a link to show all sessions.
        Hide
        Martin Dougiamas added a comment -

        Yeah OK, that sounds like a good idea.

        Show
        Martin Dougiamas added a comment - Yeah OK, that sounds like a good idea.
        Hide
        Daniel Neis added a comment -

        Hello,

        i have attached a patch that adds a link to allow user to list all sessions even if they have just one user and/or has a duration < 60 seconds.

        I called this sessions with more than one user and duration > 60 seconds "complete sessions". Don't know if it is the best term to use. This patch also adds the strings to lang/en_utf8/chat.php .

        Show
        Daniel Neis added a comment - Hello, i have attached a patch that adds a link to allow user to list all sessions even if they have just one user and/or has a duration < 60 seconds. I called this sessions with more than one user and duration > 60 seconds "complete sessions". Don't know if it is the best term to use. This patch also adds the strings to lang/en_utf8/chat.php .
        Hide
        Dongsheng Cai added a comment -

        Hi, Daniel, thanks for your patch, based on your changes, I created a patch for moodle 2.0

        Show
        Dongsheng Cai added a comment - Hi, Daniel, thanks for your patch, based on your changes, I created a patch for moodle 2.0
        Hide
        Daniel Neis added a comment -

        Hello,

        i am happy my patch assisted you to create one to moodle 2.0 =o)
        Also, would this patch be merge in 1.9.8 ?

        Thanks,
        Daniel

        Show
        Daniel Neis added a comment - Hello, i am happy my patch assisted you to create one to moodle 2.0 =o) Also, would this patch be merge in 1.9.8 ? Thanks, Daniel
        Hide
        Dongsheng Cai added a comment -

        Yes, I merged your patch to 1.9 and head today, thanks a lot for your contribution

        Show
        Dongsheng Cai added a comment - Yes, I merged your patch to 1.9 and head today, thanks a lot for your contribution
        Hide
        Daniel Neis added a comment -

        Thanks, Dongsheng!
        I am happy to help!
        If you need some help in any other issue, just tell me.
        =o)

        Show
        Daniel Neis added a comment - Thanks, Dongsheng! I am happy to help! If you need some help in any other issue, just tell me. =o)
        Hide
        Andrew Davis added a comment -

        Nice work Closing.

        Show
        Andrew Davis added a comment - Nice work Closing.

          People

          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: