Moodle
  1. Moodle
  2. MDL-28023

assignment notifications received via jabber are blank

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0.3
    • Fix Version/s: 2.1
    • Component/s: Assignment (2.2), Messages
    • Labels:
      None
    • Testing Instructions:
      Hide

      as admin check your server has jabber set up. type jabber in the site administration search box to get there.

      As a student complete an assignment (online text is probably the easiest here). Check the students messaging preferences to make sure they will receive assignment notifications via jabber regardless of whether they are online or offline. If the jabber column doesnt display put your jabber id in the jabber id text box and click update profile.

      As a teacher grade the submission.

      Wait "maxeditingtime" minutes. max editing time is a server setting.

      Run cron (/admin/cron.php)

      a meaningful jabber message should arrive.

      Show
      as admin check your server has jabber set up. type jabber in the site administration search box to get there. As a student complete an assignment (online text is probably the easiest here). Check the students messaging preferences to make sure they will receive assignment notifications via jabber regardless of whether they are online or offline. If the jabber column doesnt display put your jabber id in the jabber id text box and click update profile. As a teacher grade the submission. Wait "maxeditingtime" minutes. max editing time is a server setting. Run cron (/admin/cron.php) a meaningful jabber message should arrive.
    • Affected Branches:
      MOODLE_20_STABLE
    • Fixed Branches:
      MOODLE_21_STABLE
    • Pull Master Branch:
      MDL-28023_assignment_jabber
    • Rank:
      17657

      Description

      if you receive an assignment notification via jabber it looks like this

      (16:27:10) andrew@moodle.org: Admin User: 
      (Do not reply to this message)
      

      For comparison a forum post notification looks like this

      (16:15:08) andrew@moodle.org: teacher tom: teacher tom posted in t1: test forum: test dicsussion
      View: http://andrew.moodle.local/integrationmaster/mod/forum/discuss.php?d=1#p3
      

      The notification should include a description and a link.

        Issue Links

          Activity

          Hide
          Andrew Davis added a comment -

          I have a fix for this. I'm having some trouble getting Jabber working correctly on my home computer. I will test this first thing Monday morning at the office, backport it to 2.0 stable then submit it for integration.

          Show
          Andrew Davis added a comment - I have a fix for this. I'm having some trouble getting Jabber working correctly on my home computer. I will test this first thing Monday morning at the office, backport it to 2.0 stable then submit it for integration.
          Hide
          Aparup Banerjee added a comment -


          Andrew: this looks good to me. (i haven't tested it with a jabber setup tho)

          Show
          Aparup Banerjee added a comment - Andrew: this looks good to me. (i haven't tested it with a jabber setup tho)
          Hide
          Aparup Banerjee added a comment -

          i just tested this with my jabber setup and got the following error in cron (repeated a few times):

          Processing module function assignment_cron ...Processing assignment submission 119

          Warning: fclose() expects parameter 1 to be resource, null given in /home/aparup/mcode/m20/mysql/moodle/lib/jabber/XMPP/XMLStream.php on line 403

          Call Stack:
          0.0003 637232 1.

          {main}

          () /home/aparup/mcode/m20/mysql/moodle/admin/cron.php:0
          0.1227 24470672 2. cron_run() /home/aparup/mcode/m20/mysql/moodle/admin/cron.php:79
          0.3096 44281984 3. assignment_cron() /home/aparup/mcode/m20/mysql/moodle/lib/cronlib.php:87
          0.3472 48582056 4. message_send() /home/aparup/mcode/m20/mysql/moodle/mod/assignment/lib.php:2627
          0.3755 49419608 5. message_output_jabber->send_message() /home/aparup/mcode/m20/mysql/moodle/lib/messagelib.php:172
          1.1891 49487232 6. XMPPHP_XMLStream->processUntil() /home/aparup/mcode/m20/mysql/moodle/message/output/jabber/message_output_jabber.php:75
          2.7677 49502848 7. XMPPHP_XMLStream->__process() /home/aparup/mcode/m20/mysql/moodle/lib/jabber/XMPP/XMLStream.php:471
          2.7678 49508696 8. xml_parse() /home/aparup/mcode/m20/mysql/moodle/lib/jabber/XMPP/XMLStream.php:420
          2.7680 49513808 9. XMPPHP_XMLStream->endXML() /home/aparup/mcode/m20/mysql/moodle/lib/jabber/XMPP/XMLStream.php:0
          2.7681 49515344 10. XMPPHP_XMPP->sasl_failure_handler() /home/aparup/mcode/m20/mysql/moodle/lib/jabber/XMPP/XMLStream.php:567
          2.7681 49515344 11. XMPPHP_XMLStream->disconnect() /home/aparup/mcode/m20/mysql/moodle/lib/jabber/XMPP/XMPP.php:308
          2.7683 49515568 12. XMPPHP_XMLStream->processUntil() /home/aparup/mcode/m20/mysql/moodle/lib/jabber/XMPP/XMLStream.php:358
          3.0390 49507784 13. XMPPHP_XMLStream->__process() /home/aparup/mcode/m20/mysql/moodle/lib/jabber/XMPP/XMLStream.php:471
          3.0392 49510800 14. fclose() /home/aparup/mcode/m20/mysql/moodle/lib/jabber/XMPP/XMLStream.php:403

          i still await any jabber msgs to me (the student)

          Show
          Aparup Banerjee added a comment - i just tested this with my jabber setup and got the following error in cron (repeated a few times): Processing module function assignment_cron ...Processing assignment submission 119 Warning: fclose() expects parameter 1 to be resource, null given in /home/aparup/mcode/m20/mysql/moodle/lib/jabber/XMPP/XMLStream.php on line 403 Call Stack: 0.0003 637232 1. {main} () /home/aparup/mcode/m20/mysql/moodle/admin/cron.php:0 0.1227 24470672 2. cron_run() /home/aparup/mcode/m20/mysql/moodle/admin/cron.php:79 0.3096 44281984 3. assignment_cron() /home/aparup/mcode/m20/mysql/moodle/lib/cronlib.php:87 0.3472 48582056 4. message_send() /home/aparup/mcode/m20/mysql/moodle/mod/assignment/lib.php:2627 0.3755 49419608 5. message_output_jabber->send_message() /home/aparup/mcode/m20/mysql/moodle/lib/messagelib.php:172 1.1891 49487232 6. XMPPHP_XMLStream->processUntil() /home/aparup/mcode/m20/mysql/moodle/message/output/jabber/message_output_jabber.php:75 2.7677 49502848 7. XMPPHP_XMLStream->__process() /home/aparup/mcode/m20/mysql/moodle/lib/jabber/XMPP/XMLStream.php:471 2.7678 49508696 8. xml_parse() /home/aparup/mcode/m20/mysql/moodle/lib/jabber/XMPP/XMLStream.php:420 2.7680 49513808 9. XMPPHP_XMLStream->endXML() /home/aparup/mcode/m20/mysql/moodle/lib/jabber/XMPP/XMLStream.php:0 2.7681 49515344 10. XMPPHP_XMPP->sasl_failure_handler() /home/aparup/mcode/m20/mysql/moodle/lib/jabber/XMPP/XMLStream.php:567 2.7681 49515344 11. XMPPHP_XMLStream->disconnect() /home/aparup/mcode/m20/mysql/moodle/lib/jabber/XMPP/XMPP.php:308 2.7683 49515568 12. XMPPHP_XMLStream->processUntil() /home/aparup/mcode/m20/mysql/moodle/lib/jabber/XMPP/XMLStream.php:358 3.0390 49507784 13. XMPPHP_XMLStream->__process() /home/aparup/mcode/m20/mysql/moodle/lib/jabber/XMPP/XMLStream.php:471 3.0392 49510800 14. fclose() /home/aparup/mcode/m20/mysql/moodle/lib/jabber/XMPP/XMLStream.php:403 i still await any jabber msgs to me (the student)
          Hide
          Aparup Banerjee added a comment -

          ok that above was a jabber misconfiguration (wrong jabber host and jabber server)
          (also note jabber userid should contain the full domain ie: aparup@moodle.org )

          so with that said,

          it works for me now!

          (15:58:32) hqtest@messaging.moodle.org/moodle: Admin User: blocks!: Assignments: advanced file upload
          View: http://aparup.moodle.local/m20/mysql/moodle/mod/assignment/view.php?id=133
          (Do not reply to this message)

          Show
          Aparup Banerjee added a comment - ok that above was a jabber misconfiguration (wrong jabber host and jabber server) (also note jabber userid should contain the full domain ie: aparup@moodle.org ) so with that said, it works for me now! (15:58:32) hqtest@messaging.moodle.org/moodle: Admin User: blocks!: Assignments: advanced file upload View: http://aparup.moodle.local/m20/mysql/moodle/mod/assignment/view.php?id=133 (Do not reply to this message)
          Hide
          Sam Hemelryk added a comment -

          Thanks Andrew this has been integrated now.

          Show
          Sam Hemelryk added a comment - Thanks Andrew this has been integrated now.
          Hide
          Eloy Lafuente (stronk7) added a comment - - edited

          I received exactly this:

          [21:59:19] <Eloy Bot> Admin User: TC: Assignments: Upload 1 file assignment
          View: http://127.0.0.1/~stronk7/integration/mod/assignment/view.php?id=664
          (Do not reply to this message)
          

          So considering it passed. BUT really I think we should generate some more "friendly" message, like:

          Message from XXX about activity XXXXX. Your submission has been graded. View: http://xxxx.xxx.xxx for more info
          (do not reply to this messge)

          Just one suggestion, ciao Surely this requires reviewing all the messages (providers) to make them similar.

          Show
          Eloy Lafuente (stronk7) added a comment - - edited I received exactly this: [21:59:19] <Eloy Bot> Admin User: TC: Assignments: Upload 1 file assignment View: http: //127.0.0.1/~stronk7/integration/mod/assignment/view.php?id=664 (Do not reply to this message) So considering it passed. BUT really I think we should generate some more "friendly" message, like: Message from XXX about activity XXXXX. Your submission has been graded. View: http://xxxx.xxx.xxx for more info (do not reply to this messge) Just one suggestion, ciao Surely this requires reviewing all the messages (providers) to make them similar.
          Hide
          Michael de Raadt added a comment -

          I've created MDL-28087 to look at improving the messages in future.

          Show
          Michael de Raadt added a comment - I've created MDL-28087 to look at improving the messages in future.
          Hide
          Eloy Lafuente (stronk7) added a comment -

          Yay, this is now part of the just released Moodle 2.1 ! Thanks for all the hard work!

          Show
          Eloy Lafuente (stronk7) added a comment - Yay, this is now part of the just released Moodle 2.1 ! Thanks for all the hard work!

            People

            • Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: