Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
3.2.2, 3.3.4, 3.4, 3.5
-
MOODLE_32_STABLE, MOODLE_33_STABLE, MOODLE_34_STABLE, MOODLE_35_STABLE
-
MOODLE_35_STABLE
-
MDL-58711-master -
Hide
- Login as an admin.
- Create a new course with the following settings:
- Group mode: Separate groups
- Force group mode: Yes
- Enrol two users in the course (u1 and u2)
- Create two course groups (g1 and g2). Take note of the group ID numbers.
- Assign one user to one different group (u1 in g1, u2 in g2)
- Enrol one teacher in the course (editing teacher), double check that editing teacher can access all groups.
- Create a new assignment activity, take note of its ID. Note: It's not the same as the id parameter indicated in the mod/assign/view.php URL. It's the id indicated in the mdl_assign table.
- Configure the created assignment so “Require students click submit button“ (Submission settings section) is set to Yes
- Login as u1 and do a submission (but do not click the submit button yet, we are keeping it in draft state)
- Logn as admin, go to Site administration.
- Enable "Mobile services": Site administration ► Mobile app ► Mobile settings
- Create a Token in the mobile app service for the teacher:
- Click on Site administration ► Plugins ► Web services ► Manage tokens
- Login as the teacher.
- Go to the assignment activity's main page.
- Change the value of the "Separate groups" filter to "All participants" and check the "Participants" row in the "Grading summary" table.
- Confirm that the number reflects the total number of participants in the course. (Note that in some cases if you have a teacher enrolled in the course it will be counted, this is another issue not related to this one)
- Confirm that the "gradingsummary->submissiondraftscount" matches the “Draft” row's number in the assignment's grading summary page in the browser.
- Confirm that the "gradingsummary->submissionssubmittedcount" matches the “Submitted” row's number in the assignment's grading summary page in the browser.
- *Confirm *that the "gradingsummary->submissionsneedgradingcount" matches the “Needs grading” row's number in the assignment's grading summary page in the browser.
- Open a terminal and do a CURL REST call simulating a WS client with the user (Replace the ones enclosed in brackets with the appropriate values):
curl '[YOUR_MOODLE_WWWROOT]/webservice/rest/server.php?moodlewsrestformat=json' --data 'assignid=[ASSIGN_ID]&wsfunction=mod_assign_get_submission_status&wstoken=[TEACHERS_WSTOKEN]&groupid=0' | python -m "json.tool"
- Confirm that the "gradingsummary->participantcount" matches the "Participants" row's number in the assignment's grading summary page in the browser.
- Confirm that the "gradingsummary->submissiondraftscount" matches the “Draft” row's number in the assignment's grading summary page in the browser.
- Confirm that the "gradingsummary->submissionssubmittedcount" matches the “Submitted” row's number in the assignment's grading summary page in the browser.
- *Confirm *that the "gradingsummary->submissionsneedgradingcount" matches the “Needs grading” row's number in the assignment's grading summary page in the browser.
- Login again as u1, go to your draft submission and click the “Submit” button so your submission is submitted
- On the browser, change the value of the "Separate groups" filter to "g1" and check the "Participants" row in the "Grading summary" table. Take note of g1's group ID (it is the number indicated in the "group" parameter of the URL).
- Confirm that the number reflects the total number of g1's members (which is 1).
- On the terminal, do another CURL REST call:
curl '[YOUR_MOODLE_WWWROOT]/webservice/rest/server.php?moodlewsrestformat=json' --data 'assignid=[ASSIGN_ID]&wsfunction=mod_assign_get_submission_status&wstoken=[TEACHERS_WSTOKEN]&groupid=[GROUP_1_ID]' | python -m "json.tool"
- Confirm that the "gradingsummary->participantcount" matches the "Participants" row's number in the assignment's grading summary page in the browser.
- Confirm that the "gradingsummary->submissiondraftscount" matches the “Draft” row's number in the assignment's grading summary page in the browser.
- Confirm that the "gradingsummary->submissionssubmittedcount" matches the “Submitted” row's number in the assignment's grading summary page in the browser.
- *Confirm *that the "gradingsummary->submissionsneedgradingcount" matches the “Needs grading” row's number in the assignment's grading summary page in the browser.
- On the browser, change the value of the "Separate groups" filter to "g2" and check the "Participants" row in the "Grading summary" table. Take note of g1's group ID (it is the number indicated in the "group" parameter of the URL).
- Confirm that the number reflects the total number of g2's members (which is 1).
- On the terminal, do another CURL REST call:
curl '[YOUR_MOODLE_WWWROOT]/webservice/rest/server.php?moodlewsrestformat=json' --data 'assignid=[ASSIGN_ID]&wsfunction=mod_assign_get_submission_status&wstoken=[TEACHERS_WSTOKEN]&groupid=[GROUP_2_ID]' | python -m "json.tool"
- Confirm that the "gradingsummary->participantcount" matches the "Participants" row's number in the assignment's grading summary page in the browser.
- Confirm that the "gradingsummary->submissiondraftscount" matches the “Draft” row's number in the assignment's grading summary page in the browser.
- Confirm that the "gradingsummary->submissionssubmittedcount" matches the “Submitted” row's number in the assignment's grading summary page in the browser.
- *Confirm *that the "gradingsummary->submissionsneedgradingcount" matches the “Needs grading” row's number in the assignment's grading summary page in the browser.
- Login as admin again.
- Navigate to "Site administration / Users / Permissions / Define roles"
- Now, edit the "editingteacher" role in the course and disable the "moodle/site:accessallgroups" capability. Save the changes.
- Add the teacher in the group g1.
- On the terminal, repeat the CURL REST call for g1.
- Confirm that you can see the correct number of participants in g1.
- Repeat the CURL REST call for g2.
- Confirm that you will receive a "notingroup" exception (you are trying to retrieve information from a separate group where the teacher is not a member of).
- Repeat the first CURL REST call (groupid=0).
- Confirm that you get the same results as if you called the CURL REST call for g1 and see the the number of participants for g1.
ShowLogin as an admin. Create a new course with the following settings: Group mode: Separate groups Force group mode: Yes Enrol two users in the course (u1 and u2) Create two course groups (g1 and g2). Take note of the group ID numbers. Assign one user to one different group (u1 in g1, u2 in g2) Enrol one teacher in the course (editing teacher), double check that editing teacher can access all groups. Create a new assignment activity, take note of its ID. Note: It's not the same as the id parameter indicated in the mod/assign/view.php URL. It's the id indicated in the mdl_assign table. Configure the created assignment so “Require students click submit button“ (Submission settings section) is set to Yes Login as u1 and do a submission (but do not click the submit button yet, we are keeping it in draft state) Logn as admin, go to Site administration. Enable "Mobile services": Site administration ► Mobile app ► Mobile settings Create a Token in the mobile app service for the teacher: Click on Site administration ► Plugins ► Web services ► Manage tokens Login as the teacher. Go to the assignment activity's main page. Change the value of the " Separate groups " filter to " All participants " and check the "Participants" row in the " Grading summary " table. Confirm that the number reflects the total number of participants in the course. (Note that in some cases if you have a teacher enrolled in the course it will be counted, this is another issue not related to this one) Confirm that the "gradingsummary->submissiondraftscount" matches the “Draft” row's number in the assignment's grading summary page in the browser. Confirm that the "gradingsummary->submissionssubmittedcount" matches the “Submitted” row's number in the assignment's grading summary page in the browser. *Confirm *that the "gradingsummary->submissionsneedgradingcount" matches the “Needs grading” row's number in the assignment's grading summary page in the browser. Open a terminal and do a CURL REST call simulating a WS client with the user (Replace the ones enclosed in brackets with the appropriate values): curl ' [YOUR_MOODLE_WWWROOT] /webservice/rest/server.php?moodlewsrestformat=json' --data 'assignid= [ASSIGN_ID] &wsfunction=mod_assign_get_submission_status&wstoken= [TEACHERS_WSTOKEN] &groupid=0' | python -m "json.tool" Confirm that the " gradingsummary->participantcount " matches the "Participants" row's number in the assignment's grading summary page in the browser. Confirm that the "gradingsummary->submissiondraftscount" matches the “Draft” row's number in the assignment's grading summary page in the browser. Confirm that the "gradingsummary->submissionssubmittedcount" matches the “Submitted” row's number in the assignment's grading summary page in the browser. *Confirm *that the "gradingsummary->submissionsneedgradingcount" matches the “Needs grading” row's number in the assignment's grading summary page in the browser. Login again as u1, go to your draft submission and click the “Submit” button so your submission is submitted On the browser, change the value of the " Separate groups " filter to " g1 " and check the "Participants" row in the " Grading summary " table. Take note of g1's group ID (it is the number indicated in the " group " parameter of the URL). Confirm that the number reflects the total number of g1's members (which is 1). On the terminal, do another CURL REST call: curl ' [YOUR_MOODLE_WWWROOT] /webservice/rest/server.php?moodlewsrestformat=json' --data 'assignid= [ASSIGN_ID] &wsfunction=mod_assign_get_submission_status&wstoken= [TEACHERS_WSTOKEN] &groupid= [GROUP_1_ID] ' | python -m "json.tool" Confirm that the " gradingsummary->participantcount " matches the "Participants" row's number in the assignment's grading summary page in the browser. Confirm that the "gradingsummary->submissiondraftscount" matches the “Draft” row's number in the assignment's grading summary page in the browser. Confirm that the "gradingsummary->submissionssubmittedcount" matches the “Submitted” row's number in the assignment's grading summary page in the browser. *Confirm *that the "gradingsummary->submissionsneedgradingcount" matches the “Needs grading” row's number in the assignment's grading summary page in the browser. On the browser, change the value of the " Separate groups " filter to " g2 " and check the "Participants" row in the " Grading summary " table. Take note of g1's group ID (it is the number indicated in the " group " parameter of the URL). Confirm that the number reflects the total number of g2's members (which is 1). On the terminal, do another CURL REST call: curl ' [YOUR_MOODLE_WWWROOT] /webservice/rest/server.php?moodlewsrestformat=json' --data 'assignid= [ASSIGN_ID] &wsfunction=mod_assign_get_submission_status&wstoken= [TEACHERS_WSTOKEN] &groupid= [GROUP_2_ID] ' | python -m "json.tool" Confirm that the " gradingsummary->participantcount " matches the "Participants" row's number in the assignment's grading summary page in the browser. Confirm that the "gradingsummary->submissiondraftscount" matches the “Draft” row's number in the assignment's grading summary page in the browser. Confirm that the "gradingsummary->submissionssubmittedcount" matches the “Submitted” row's number in the assignment's grading summary page in the browser. *Confirm *that the "gradingsummary->submissionsneedgradingcount" matches the “Needs grading” row's number in the assignment's grading summary page in the browser. Login as admin again. Navigate to " Site administration / Users / Permissions / Define roles " Now, edit the "editingteacher" role in the course and disable the " moodle/site:accessallgroups " capability. Save the changes. Add the teacher in the group g1. On the terminal, repeat the CURL REST call for g1. Confirm that you can see the correct number of participants in g1. Repeat the CURL REST call for g2. Confirm that you will receive a "notingroup" exception (you are trying to retrieve information from a separate group where the teacher is not a member of). Repeat the first CURL REST call (groupid=0). Confirm that you get the same results as if you called the CURL REST call for g1 and see the the number of participants for g1.
Description
Right now, it is returning only the grading summary for the first teacher's group.
Attachments
- screenshot-1.png
- 27 kB
- curl-results.png
- 824 kB
- all-participants.png
- 29 kB
- group-a only.png
- 28 kB
- group-b only.png
- 29 kB
Issue Links
- will help resolve
-
MOBILE-2871 Display grading summary for groups correctly in the app
-
- Closed
-