Zamenhof / api

Public repo for issues and wiki.
0 stars 0 forks source link

Two xAPI statements send one after another #35

Open nftl-sebastian opened 5 years ago

nftl-sebastian commented 5 years ago

Learner nmk (ext id: e59afac4-838e-4e41-beef-76504c8d8964)

Has attended to a lesson and after finishing that lesson there was two xAPI statement send to us.

Attendance statement first with proper grade:

{"actor":{"name":"539","member":[{"name":"nmk","account":{"name":"e59afac4-838e-4e41-beef-76504c8d8964","homePage":"http://nftlearning.com/learners/e59afac4-838e-4e41-beef-76504c8d8964"},"objectType":"Agent"}],"objectType":"Group"},"verb":{"id":"http://adlnet.gov/expapi/verbs/attended","display":{"en-US":"attended"}},"object":{"id":"https://zoom.us/j/857846258","definition":{"name":{"en-GB":"Module 2: Discuss ideas","en-US":"Module 2: Discuss ideas"},"description":{"en-GB":"lesson name","en-US":"lesson name"},"type":"http://adlnet.gov/expapi/activities/meeting","extensions":{"http://nftlearning.com/identifiers/zamenhofId":"8970"}},"objectType":"Activity"},"context":{"instructor":{"name":"Yasmeen Coaxum","account":{"name":"386","homePage":"https://zamenhof.net/teacher/386"},"objectType":"Agent"},"extensions":{"http://nftlearning.com/absentLearners":[]},"contextActivities":{"grouping":[{"id":"https://zamenhof.net/course/833","definition":{"type":"http://nftlearning.com/zamenhofactivities/course","name":{"en":"Course 3"},"description":{"en":"course name"}}}],"parent":[{"id":"https://zamenhof.net/module/752","definition":{"type":"http://nftlearning.com/zamenhofactivities/module","name":{"en":"Module 2: Discuss ideas"},"description":{"en":"module name"}}}]}},"timestamp":"2018-12-05T12:28:52+00:00"}

Attendance statement second with absence:

{"actor":{"name":"539","member":[],"objectType":"Group"},"verb":{"id":"http://adlnet.gov/expapi/verbs/attended","display":{"en-US":"attended"}},"object":{"id":"https://zoom.us/j/857846258","definition":{"name":{"en-GB":"Module 2: Discuss ideas","en-US":"Module 2: Discuss ideas"},"description":{"en-GB":"lesson name","en-US":"lesson name"},"type":"http://adlnet.gov/expapi/activities/meeting","extensions":{"http://nftlearning.com/identifiers/zamenhofId":"8970"}},"objectType":"Activity"},"context":{"instructor":{"name":"Yasmeen Coaxum","account":{"name":"386","homePage":"https://zamenhof.net/teacher/386"},"objectType":"Agent"},"extensions":{"http://nftlearning.com/absentLearners":["e59afac4-838e-4e41-beef-76504c8d8964"]},"contextActivities":{"grouping":[{"id":"https://zamenhof.net/course/833","definition":{"type":"http://nftlearning.com/zamenhofactivities/course","name":{"en":"Course 3"},"description":{"en":"course name"}}}],"parent":[{"id":"https://zamenhof.net/module/752","definition":{"type":"http://nftlearning.com/zamenhofactivities/module","name":{"en":"Module 2: Discuss ideas"},"description":{"en":"module name"}}}]}},"timestamp":"2018-12-05T12:29:01+00:00"}

As this should happen. So we have the following questions:

  1. Why two statements was send
  2. How can this be future prevented.
indrajitlahiri commented 5 years ago

Typically no reason found where from this can occur, we have seen that both the request were sent in less than 10 seconds of interval. To protect this possible issue, we have added

  1. A validation in the attendance form to force the teacher to select the radio.
  2. Disabled the submit button soon after the valid post. We hope that this would not make this error happen further.

Note : We had a version 2 for the zoom call box in teacher panel where we had integrated attendance and grade both to avoid operation confusions. We are waiting for Excedo approval for the same to implement that in live location. Please let us know what you think about that.

nftl-sebastian commented 5 years ago

Can we receive some sort of documentation/link to it, for this fix so we can involve our QA for this process?