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

Make an option 'Not in group' in group selection control

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • 1.9.3, 2.8.1, 3.0.2, 4.0.4, 4.0.6, 4.1, 4.1.1, 4.1.2, 4.2.4, 4.3.1
    • Groups, Usability
    • MOODLE_19_STABLE, MOODLE_28_STABLE, MOODLE_30_STABLE, MOODLE_400_STABLE, MOODLE_401_STABLE, MOODLE_402_STABLE, MOODLE_403_STABLE
    • MDL-17102-master
    • Moderate
    • Hide

      Behat testcases to cover the feature

      New automated tests have been introduced to test this feature:

      course/tests/behat/view_students_without_group.feature
      mod/assign/tests/behat/view_students_without_group.feature
      mod/choice/tests/behat/view_students_without_group.feature
      mod/data/tests/behat/view_students_without_group.feature
      mod/feedback/tests/behat/view_students_without_group.feature
      mod/forum/tests/behat/view_students_without_group.feature
      mod/lesson/tests/behat/view_students_without_group.feature
      mod/quiz/tests/behat/view_students_without_group.feature
      mod/scorm/tests/behat/view_students_without_group.feature
      mod/survey/tests/behat/view_students_without_group.feature
      mod/wiki/tests/behat/view_students_without_group.feature
      mod/workshop/tests/behat/view_students_without_group.feature

      General course setup for testcases

      To test the changes please setup a course with the following prerequisites:

      1. Create a course with the parameters: name - 'course1', group mode – 'Visible groups'.
      2. Enrol 4 users in 'course1': 'user1', 'user2', 'user3' and 'user4'.
      3. Create 2 groups within the course: 'group1' and 'group2'.
      4. Add 'user1' and 'user2' in 'group1', add 'user3' in 'group2', user4 remains without a group assignment.

      Test the assignment activity

      1. In your course create a new assignment activity. Enable the Submission type "Online text", set Students submit in groups to "no" and Group mode to "visible groups".
      2. Login as user1 and add a submission.
      3. Login as user4 and add a submission.
      4. Login as admin and go to the assignment, in the Grading Summary you should see in the table Participants: 4 and Submitted: 2
      5. Change the Visible groups to group1, in the Grading Summary you should see in the table Participants: 2 and Submitted: 1
      6. Change the Visible groups to "Participants not in a group", in the Grading Summary verify you see in the table Participants: 1 and Submitted: 1
      7. Click on the Button View all submissions and repeat the steps of changing the groups. Apart from the different output depending on the Visible groups set to:
        1. "All participants" verify you see entries for user1 and user4.
        2. "group1" verify you see an entry for user1 only.
        3. "Participants not in a group" verify you see an entry for user4 only.

      Test the choice activity

      1. In you course create a new choice activity having two answer options "Yes" and "No". Set Group mode to "Visible groups", Publish results to "Always show results to students", and Privacy of results to "Publish full results...", set option Show column for unanswered to "No" and _ Include responses from inactive/suspended users_ to "No".
      2. Login as user1 go to the activity and select "Yes".
      3. Login as user4 go to the activity and select "No".
      4. Login as admin and go to the choice activity, "Responses" tab.
      5. Given "Visible groups" is set to "All participants", verify you see the results of both user1 and user4.
      6. Click the button Download in text format and verify you got all users (this includes also the ones that didn't answer yet).
      7. Change Visible groups to "group1" and verify you see user1 only. When clicking Download in text format you should get user1 and user2 only.
      8. Change Visible groups to "Participants not in group" and verify you see user4 only. When clicking Download in text format you should get user4 only.

      Test the quiz activity

      1. In your course create a new quiz activity. Set Group mode to "Visible groups". Add one question (e.g. a true false).
      2. Login as user1 and attempt the quiz and answer the question.
      3. Login as user4 and attempt the quiz and answer the question.
      4. Login as admin and go to the quiz -> Results, given "Visible groups" is set to "All participants" at the bottom of the page you should see a table with the attempts of both the students.
      5. Change the Visible groups to group1, in the table of the results verify you see user1 only.
      6. Change the Visible groups to "Participants not in a group", in the table of the results verify you see user4 only.
      7. Change the tertiary navigation to "Responses" and repeat the steps of selecting the groups and verify that you see the appropriate users only.
      8. Change the tertiary navigation to "Statistics" and repeat the steps of selecting the groups and verify that you see the appropriate users only.
      9. Change the tertiary navigation to "Manual grading" and verify you get a message nothing to display no matter which group you select.

      Test the chat activity

      1. In your course create a new chat activity. Set Group mode to "Visible groups".
      2. Now at the same time in different browsers or private tabs login as admin, user1 and user4.
      3. As admin enter the chat with Visible groups "All participants" and enter a message "Hi from Admin".
      4. As user1 enter the chat with Visible groups "group1" and enter a message "Hi from user1".
      5. As user4 enter the chat with Visible groups "Participants not in a group" and enter a message "Hi from user4".
      6. Verify the admin sees all three messages and all three users in the list.
      7. Verify the user1 and user4 see the admin message and each his own message as well as themselves and the admin in the user list.
      8. As user4 leave the chat, change the Visible groups to "group1" and enter the chat again.
      9. The admin and the user1 each send a message to the chat. Both see the messages that they and the other has send.
      10. Verify the user4 also sees the new messages from admin and user1 however he cannot send messages because he is not member of the group.

      Test the wiki activity

      1. In your course create a new wiki activity. Set Group mode to "Visible groups" and First page name to "Wiki".
      2. As the admin user change the selection to "Edit" to be able to add content to the index page, enter "this is for all users" and save your changes.
      3. Change Visible group to "group1", save the page and enable "Edit" again to edit the index page for group1, enter "this is for group 1" and save your changes.
      4. Change Visible group to "group2", save the page and enable "Edit" again to edit the index page for group2, enter "this is for group 2" and save your changes.
      5. Change Visible group to "Participants not in a group" and you should see the page content "this is for all users".
      6. Log out and log in as user1, got to the wiki and you should see the page content for group1. Edit the page and save your changes.
      7. Change the Visible group to "group2", and verify you see the content for group2. When trying to edit the page verify you get an error that you are not allowed to change the page content.
      8. Log out and log in as user4, go to the wiki and verify you see the page content for group1. When trying to edit the page verify you get an error that you are not allowed to change the page content.
      9. Change the Visible group to "group2", verify you see the content for group2. When trying to edit the page verify you get an error that you are not allowed to change the page content.

      Test the database activity

      1. In your course create a new database activity. Set Group mode to "Visible groups".
      2. Got to tab "Fields" and create a new "Short text" field with name "f1" and Field description "Field 1".
      3. Go to the tab "Templates" and save the content that you see there in the fields without making changes.
      4. Go to the tab "Database" and at the bottom of the page click the button "Add entry".
      5. Set Visible groups to "All participants" and enter a value "all" for the f1 field, click "Save and add another".
      6. Set Visible groups to "group1" and enter a value "g1" for the f1 field, click "Save and add another".
      7. Set Visible groups to "group2" and enter a value "g2" for the f1 field, click "Save and add another".
      8. Set Visible groups to "Participants not in a group" and enter a value "other" for the f1 field, click "Save".
      9. Back on the Database tab, change the selection from "single view" to "List view" and set Visible groups to "All participants.
      10. Verify you should see all four entries for f1 with values "all", "g1", "g2", and "other".
      11. Change Visible groups to "group1" and verify you see the values "all", "g1", and "other".
      12. Change Visible groups to "group2" and verify you see the values "all", "g2", and "other".
      13. Change Visible groups to "Participants not in a group" and verify you see the values "all" and "other".

      Test the forum activity

      1. In your course create a new forum activity. Set Group mode to "Visible groups" and click "Save and display".
      2. Click the button "Add discussion topic", check Visible groups is set to "All participants", set Subject to "For all" and Message to "This is for all users", click "Post to forum".
      3. Change Visible groups to "group1" then click the button "Add discussion topic", set Subject to "For group1" and Message to "This is for g1 users", click "Post to forum".
      4. Change Visible groups to "group2" then click the button "Add discussion topic", set Subject to "For group2" and Message to "This is for g2 users", click "Post to forum".
      5. Change Visible groups to "Participants not in a group" then click the button "Add discussion topic", set Subject to "For others" and Message to "This is for other users", click "Post to forum".
      6. When Visible groups: "All participants" is selected, verify the discussion board should show a list of all posts.
      7. Change the Visible groups to "group1" and verify you see all posts except the one "For group2".
      8. Change the Visible groups to "group2" and verify you see all posts except the one "For group1".
      9. Change the Visible groups to "Participants not in a group" and verify you see the posts "For all" and "For others" only.

      Test the feedback activity

      1. In your course create a new feedback activity. Set Group mode to "visible groups" and click "Save and display".
      2. Select "Add question" and select "Short text answer". Enter the question data and save it.
      3. Login as user1 and enter your submission for the Feedback.
      4. Login as user4 and enter your submission for the Feedback.
      5. Login as admin, go to the Feedback Module. You should see Submitted answers: 2, Questions: 1.
      6. Change the Visible groups to "Group 1" and you should see Submitted answers: 1, Questions: 1.
      7. Change the Visible groups to "Participants not in a group" and you should see Submitted answers: 1, Questions: 1.
      8. Go to the tab "Responses" change the Visible groups selector to "All participants" and you should see both entries for user1 and user4.
      9. Change Visible groups selector to "Group 1" and you should see the entry for user1 only.
      10. Change Visible groups selector to "Participants not in a group" and you should see the entry for user4 only.

      Test the lesson activity

      1. In your course create a new lesson activity. Set Group mode to "visible groups" and click "Save and display".
      2. Click the link "Add a question page", choose "Short answer" and click "Add a question page", in the form set the Page title to "q1", the Page content to "Is the moon larger than the earth?", the first answer set Answer to "No", and second set Answer to "Yes" and click on Save page.
      3. Login as user1, go to the lesson and answer the question with "No".
      4. Login as user4, go to the lesson and answer the question with "Yes".
      5. Login as admin, go to the lesson Module and click the tab "Reports":
        1. when Visible groups is set to "All participans" you should see entries for user1 and user4.
        2. when Visible groups is set to "group1" you should see the entry for user1 only.
        3. when Visible groups is set to "Participants not in a group" you should see the entry for user4 only.

      Test the scorm activity

      1. In your course create a new scorm activity. Set Group mode to "visible groups", use the RuntimeMinimumCalls_SCORM12.zip file from the moodle source code dir (https://github.com/moodle/moodle/blob/master/mod/scorm/tests/packages/RuntimeMinimumCalls_SCORM12.zip)
      2. Login as user1, go to the scorm activity and click some sections.
      3. Login as user4, go to the scorm activity and click some sections.
      4. Login as admin, go to the scorm activity and click the tab "Reports"
      5. You should see all users, however for user1 and user4 you should only see the column Attempts, Started on", and *Last accessed on filled with values.
      6. Select Visible groups to "group1" and only the user1 and user2 should appear in the list.
      7. In the Download selector, select "Download in text format" only the user user1 and user2 should be included.
      8. Select Visible groups to "Participants not in a group" and only the user4 and admin should appear in the list.
      9. In the Download selector, select "Download in text format" only the user user4 and admin should be included.

      Test the survey activity

      1. In your course create a new survey activity of type "critical incidents". Set Group mode to "visible groups" and click "Save and display".
      2. Login as user1, go to the survey activity, answer the questions and click "Submit"
      3. Login as user4, go to the survey activity, answer the questions and click "Submit"
      4. Login as admin, go to the survey and click on the tab "Response reports"
      5. Select Visible groups to "All participants" and you should see the answers of user1 and user4.
      6. Change the top selection from "Questions" to "Participants" and check that in the list both users appear.
      7. Select Visible groups to "group1" and you should see user1 only.
      8. Select Visible groups to "Participants not in a group" and you should see user4 only.
      9. Click on "Download results" and change Visible groups to "Participants not in a group" and click "Download in text format". The file should contain the data of user4 only.

      Test the workshop activity

      1. In your course create a new workshop activity. Set Group mode to "visible groups", click on "Save and display" and switch to "Submission phase"
      2. Login as user1 go to the workshop and add a submission.
      3. Login as user4 go to the workshop and add a submission.
      4. Login as admin go to the workshop to the tab "Submission allocation"
      5. Select Visible groups to "All participants" and you should see the submissions of user1 and user4.
      6. Select Visible groups to "group1" and you should see user1 only.
      7. Select Visible groups to "Participants not in a group" and you should see user4 only.

      Test the Gradebook

      1. In your Course go to the gradebook.
      2. Select Visible groups to "All participants" and you should see a table with all students (user1 - user4).
      3. Select Visible groups to "group1" and you should see a table with user1 and user2.
      4. Select Visible groups to "Participants not in a group" and you should see a table with user4 only.
      Show
      Behat testcases to cover the feature New automated tests have been introduced to test this feature: course/tests/behat/view_students_without_group.feature mod/assign/tests/behat/view_students_without_group.feature mod/choice/tests/behat/view_students_without_group.feature mod/data/tests/behat/view_students_without_group.feature mod/feedback/tests/behat/view_students_without_group.feature mod/forum/tests/behat/view_students_without_group.feature mod/lesson/tests/behat/view_students_without_group.feature mod/quiz/tests/behat/view_students_without_group.feature mod/scorm/tests/behat/view_students_without_group.feature mod/survey/tests/behat/view_students_without_group.feature mod/wiki/tests/behat/view_students_without_group.feature mod/workshop/tests/behat/view_students_without_group.feature General course setup for testcases To test the changes please setup a course with the following prerequisites: Create a course with the parameters: name - 'course1', group mode – 'Visible groups'. Enrol 4 users in 'course1': 'user1', 'user2', 'user3' and 'user4'. Create 2 groups within the course: 'group1' and 'group2'. Add 'user1' and 'user2' in 'group1', add 'user3' in 'group2', user4 remains without a group assignment. Test the assignment activity In your course create a new assignment activity. Enable the Submission type "Online text", set Students submit in groups to "no" and Group mode to "visible groups". Login as user1 and add a submission. Login as user4 and add a submission. Login as admin and go to the assignment, in the Grading Summary you should see in the table Participants: 4 and Submitted: 2 Change the Visible groups to group1, in the Grading Summary you should see in the table Participants: 2 and Submitted: 1 Change the Visible groups to "Participants not in a group", in the Grading Summary verify you see in the table Participants: 1 and Submitted: 1 Click on the Button View all submissions and repeat the steps of changing the groups. Apart from the different output depending on the Visible groups set to: "All participants" verify you see entries for user1 and user4. "group1" verify you see an entry for user1 only. "Participants not in a group" verify you see an entry for user4 only. Test the choice activity In you course create a new choice activity having two answer options "Yes" and "No". Set Group mode to "Visible groups", Publish results to "Always show results to students", and Privacy of results to "Publish full results...", set option Show column for unanswered to "No" and _ Include responses from inactive/suspended users_ to "No". Login as user1 go to the activity and select "Yes". Login as user4 go to the activity and select "No". Login as admin and go to the choice activity, "Responses" tab. Given "Visible groups" is set to "All participants", verify you see the results of both user1 and user4. Click the button Download in text format and verify you got all users (this includes also the ones that didn't answer yet). Change Visible groups to "group1" and verify you see user1 only. When clicking Download in text format you should get user1 and user2 only. Change Visible groups to "Participants not in group" and verify you see user4 only. When clicking Download in text format you should get user4 only. Test the quiz activity In your course create a new quiz activity. Set Group mode to "Visible groups". Add one question (e.g. a true false). Login as user1 and attempt the quiz and answer the question. Login as user4 and attempt the quiz and answer the question. Login as admin and go to the quiz -> Results, given "Visible groups" is set to "All participants" at the bottom of the page you should see a table with the attempts of both the students. Change the Visible groups to group1, in the table of the results verify you see user1 only. Change the Visible groups to "Participants not in a group", in the table of the results verify you see user4 only. Change the tertiary navigation to "Responses" and repeat the steps of selecting the groups and verify that you see the appropriate users only. Change the tertiary navigation to "Statistics" and repeat the steps of selecting the groups and verify that you see the appropriate users only. Change the tertiary navigation to "Manual grading" and verify you get a message nothing to display no matter which group you select. Test the chat activity In your course create a new chat activity. Set Group mode to "Visible groups". Now at the same time in different browsers or private tabs login as admin, user1 and user4. As admin enter the chat with Visible groups "All participants" and enter a message "Hi from Admin". As user1 enter the chat with Visible groups "group1" and enter a message "Hi from user1". As user4 enter the chat with Visible groups "Participants not in a group" and enter a message "Hi from user4". Verify the admin sees all three messages and all three users in the list. Verify the user1 and user4 see the admin message and each his own message as well as themselves and the admin in the user list. As user4 leave the chat, change the Visible groups to "group1" and enter the chat again. The admin and the user1 each send a message to the chat. Both see the messages that they and the other has send. Verify the user4 also sees the new messages from admin and user1 however he cannot send messages because he is not member of the group. Test the wiki activity In your course create a new wiki activity. Set Group mode to "Visible groups" and First page name to "Wiki". As the admin user change the selection to "Edit" to be able to add content to the index page, enter "this is for all users" and save your changes. Change Visible group to "group1", save the page and enable "Edit" again to edit the index page for group1, enter "this is for group 1" and save your changes. Change Visible group to "group2", save the page and enable "Edit" again to edit the index page for group2, enter "this is for group 2" and save your changes. Change Visible group to "Participants not in a group" and you should see the page content "this is for all users". Log out and log in as user1, got to the wiki and you should see the page content for group1. Edit the page and save your changes. Change the Visible group to "group2", and verify you see the content for group2. When trying to edit the page verify you get an error that you are not allowed to change the page content. Log out and log in as user4, go to the wiki and verify you see the page content for group1. When trying to edit the page verify you get an error that you are not allowed to change the page content. Change the Visible group to "group2", verify you see the content for group2. When trying to edit the page verify you get an error that you are not allowed to change the page content. Test the database activity In your course create a new database activity. Set Group mode to "Visible groups". Got to tab "Fields" and create a new "Short text" field with name "f1" and Field description "Field 1". Go to the tab "Templates" and save the content that you see there in the fields without making changes. Go to the tab "Database" and at the bottom of the page click the button "Add entry". Set Visible groups to "All participants" and enter a value "all" for the f1 field, click "Save and add another". Set Visible groups to "group1" and enter a value "g1" for the f1 field, click "Save and add another". Set Visible groups to "group2" and enter a value "g2" for the f1 field, click "Save and add another". Set Visible groups to "Participants not in a group" and enter a value "other" for the f1 field, click "Save". Back on the Database tab, change the selection from "single view" to "List view" and set Visible groups to "All participants. Verify you should see all four entries for f1 with values "all", "g1", "g2", and "other". Change Visible groups to "group1" and verify you see the values "all", "g1", and "other". Change Visible groups to "group2" and verify you see the values "all", "g2", and "other". Change Visible groups to "Participants not in a group" and verify you see the values "all" and "other". Test the forum activity In your course create a new forum activity. Set Group mode to "Visible groups" and click "Save and display". Click the button "Add discussion topic", check Visible groups is set to "All participants", set Subject to "For all" and Message to "This is for all users", click "Post to forum". Change Visible groups to "group1" then click the button "Add discussion topic", set Subject to "For group1" and Message to "This is for g1 users", click "Post to forum". Change Visible groups to "group2" then click the button "Add discussion topic", set Subject to "For group2" and Message to "This is for g2 users", click "Post to forum". Change Visible groups to "Participants not in a group" then click the button "Add discussion topic", set Subject to "For others" and Message to "This is for other users", click "Post to forum". When Visible groups : "All participants" is selected, verify the discussion board should show a list of all posts. Change the Visible groups to "group1" and verify you see all posts except the one "For group2". Change the Visible groups to "group2" and verify you see all posts except the one "For group1". Change the Visible groups to "Participants not in a group" and verify you see the posts "For all" and "For others" only. Test the feedback activity In your course create a new feedback activity. Set Group mode to "visible groups" and click "Save and display". Select "Add question" and select "Short text answer". Enter the question data and save it. Login as user1 and enter your submission for the Feedback. Login as user4 and enter your submission for the Feedback. Login as admin, go to the Feedback Module. You should see Submitted answers: 2, Questions: 1. Change the Visible groups to "Group 1" and you should see Submitted answers: 1, Questions: 1. Change the Visible groups to "Participants not in a group" and you should see Submitted answers: 1, Questions: 1. Go to the tab "Responses" change the Visible groups selector to "All participants" and you should see both entries for user1 and user4. Change Visible groups selector to "Group 1" and you should see the entry for user1 only. Change Visible groups selector to "Participants not in a group" and you should see the entry for user4 only. Test the lesson activity In your course create a new lesson activity. Set Group mode to "visible groups" and click "Save and display". Click the link "Add a question page", choose "Short answer" and click "Add a question page", in the form set the Page title to "q1", the Page content to "Is the moon larger than the earth?", the first answer set Answer to "No", and second set Answer to "Yes" and click on Save page. Login as user1, go to the lesson and answer the question with "No". Login as user4, go to the lesson and answer the question with "Yes". Login as admin, go to the lesson Module and click the tab "Reports": when Visible groups is set to "All participans" you should see entries for user1 and user4. when Visible groups is set to "group1" you should see the entry for user1 only. when Visible groups is set to "Participants not in a group" you should see the entry for user4 only. Test the scorm activity In your course create a new scorm activity. Set Group mode to "visible groups", use the RuntimeMinimumCalls_SCORM12.zip file from the moodle source code dir ( https://github.com/moodle/moodle/blob/master/mod/scorm/tests/packages/RuntimeMinimumCalls_SCORM12.zip ) Login as user1, go to the scorm activity and click some sections. Login as user4, go to the scorm activity and click some sections. Login as admin, go to the scorm activity and click the tab "Reports" You should see all users, however for user1 and user4 you should only see the column Attempts , Started on", and *Last accessed on filled with values. Select Visible groups to "group1" and only the user1 and user2 should appear in the list. In the Download selector, select "Download in text format" only the user user1 and user2 should be included. Select Visible groups to "Participants not in a group" and only the user4 and admin should appear in the list. In the Download selector, select "Download in text format" only the user user4 and admin should be included. Test the survey activity In your course create a new survey activity of type "critical incidents". Set Group mode to "visible groups" and click "Save and display". Login as user1, go to the survey activity, answer the questions and click "Submit" Login as user4, go to the survey activity, answer the questions and click "Submit" Login as admin, go to the survey and click on the tab "Response reports" Select Visible groups to "All participants" and you should see the answers of user1 and user4. Change the top selection from "Questions" to "Participants" and check that in the list both users appear. Select Visible groups to "group1" and you should see user1 only. Select Visible groups to "Participants not in a group" and you should see user4 only. Click on "Download results" and change Visible groups to "Participants not in a group" and click "Download in text format". The file should contain the data of user4 only. Test the workshop activity In your course create a new workshop activity. Set Group mode to "visible groups", click on "Save and display" and switch to "Submission phase" Login as user1 go to the workshop and add a submission. Login as user4 go to the workshop and add a submission. Login as admin go to the workshop to the tab "Submission allocation" Select Visible groups to "All participants" and you should see the submissions of user1 and user4. Select Visible groups to "group1" and you should see user1 only. Select Visible groups to "Participants not in a group" and you should see user4 only. Test the Gradebook In your Course go to the gradebook. Select Visible groups to "All participants" and you should see a table with all students (user1 - user4). Select Visible groups to "group1" and you should see a table with user1 and user2. Select Visible groups to "Participants not in a group" and you should see a table with user4 only.

      The current group selection control in group mode allows seeing all, or specific groups. In courses with many users, it is very hard to track users that don't belong to a group (by mistake or intentionally), as you can see they and their activity only in 'All' mode, where the list might be very big. Adding the option 'Participants not in a group' in the group filter for each activity will eliminate this issue:

            strobotta Stephan Robotta
            oa_sychev Oleg Sychev
            Luca Bösch Luca Bösch
            Sara Arjona (@sarjona) Sara Arjona (@sarjona)
            Votes:
            8 Vote for this issue
            Watchers:
            27 Start watching this issue

              Created:
              Updated:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 hours
                2h

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.