Community

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
AitorCuesta
New Member

How to unenroll or remove Test Student in a course

Jump to solution

Testing Student View functionality I realised that the fake user which is created when you get into that functionality is never removed from the enrollment list. Is there a way to do that?

This is what I've seen. I have a course with an Instructor and a Learner enrolled. When I ask for the enrollment list this is what I get:

{
    "id": "https://54.154.247.11/api/lti/courses/5/names_and_roles",
    "context": {
        "id": "5bb7e26c3331f190b9f69372c554ff6a8f13dd98",
        "label": "TestUser",
        "title": "PR-1532-CanvasMay-TestOrg-TestUser"
    },
    "members": [
        {
            "status": "Active",
            "name": "Aitor Cuesta Instructor",
            "picture": "https://54.154.247.11/images/messages/avatar-50.png",
            "given_name": "Aitor Cuesta",
            "family_name": "Instructor",
            "email": "aitor.cuesta+canvas-instructor@betterexaminations.com",
            "user_id": "3239c4e4-4427-46dd-be24-aa8c9f7f4cc5",
            "lti11_legacy_user_id": "9abc8eec37495243b29f65b117fe199901d8a353",
            "roles": [
                "http://purl.imsglobal.org/vocab/lis/v2/membership#Instructor"
            ]
        },
        {
            "status": "Active",
            "name": "Aitor Cuesta Student",
            "picture": "https://54.154.247.11/images/messages/avatar-50.png",
            "given_name": "Aitor Cuesta",
            "family_name": "Student",
            "email": "aitor.cuesta+canvas-student@betterexaminations.com",
            "user_id": "ca742292-cc3d-4ccd-894a-c7ac0175cdf1",
            "lti11_legacy_user_id": "9491f48302495173ee15bb31ef21321b192a3372",
            "roles": [
                "http://purl.imsglobal.org/vocab/lis/v2/membership#Learner"
            ]
        }
    ]
}

As you see this is working as expected.

Now my Instructor goes into the Student View mode. I ask for the enrollment list at this point and this is what I get:

{
    "id": "https://54.154.247.11/api/lti/courses/5/names_and_roles",
    "context": {
        "id": "5bb7e26c3331f190b9f69372c554ff6a8f13dd98",
        "label": "TestUser",
        "title": "PR-1532-CanvasMay-TestOrg-TestUser"
    },
    "members": [
        {
            "status": "Active",
            "name": "Aitor Cuesta Instructor",
            "picture": "https://54.154.247.11/images/messages/avatar-50.png",
            "given_name": "Aitor Cuesta",
            "family_name": "Instructor",
            "email": "aitor.cuesta+canvas-instructor@betterexaminations.com",
            "user_id": "3239c4e4-4427-46dd-be24-aa8c9f7f4cc5",
            "lti11_legacy_user_id": "9abc8eec37495243b29f65b117fe199901d8a353",
            "roles": [
                "http://purl.imsglobal.org/vocab/lis/v2/membership#Instructor"
            ]
        },
        {
            "status": "Active",
            "name": "Aitor Cuesta Student",
            "picture": "https://54.154.247.11/images/messages/avatar-50.png",
            "given_name": "Aitor Cuesta",
            "family_name": "Student",
            "email": "aitor.cuesta+canvas-student@betterexaminations.com",
            "user_id": "ca742292-cc3d-4ccd-894a-c7ac0175cdf1",
            "lti11_legacy_user_id": "9491f48302495173ee15bb31ef21321b192a3372",
            "roles": [
                "http://purl.imsglobal.org/vocab/lis/v2/membership#Learner"
            ]
        },
        {
            "status": "Active",
            "name": "Test Student",
            "picture": "https://54.154.247.11/images/messages/avatar-50.png",
            "given_name": "Test",
            "family_name": "Student",
            "user_id": "675c9783-c58e-4d7c-90f5-7826e797cf88",
            "lti11_legacy_user_id": "a3777fbd814fb647e7b5f6aec562c612d279f006",
            "roles": [
                "http://purl.imsglobal.org/vocab/lis/v2/membership#Learner"
            ]
        }
    ]
}

 

A Test Student fake user is created and added to the enrollment list. This is fine for me.

Now I leave the Student View mode and ask again for the enrollment list:

{
    "id": "https://54.154.247.11/api/lti/courses/5/names_and_roles",
    "context": {
        "id": "5bb7e26c3331f190b9f69372c554ff6a8f13dd98",
        "label": "TestUser",
        "title": "PR-1532-CanvasMay-TestOrg-TestUser"
    },
    "members": [
        {
            "status": "Active",
            "name": "Aitor Cuesta Instructor",
            "picture": "https://54.154.247.11/images/messages/avatar-50.png",
            "given_name": "Aitor Cuesta",
            "family_name": "Instructor",
            "email": "aitor.cuesta+canvas-instructor@betterexaminations.com",
            "user_id": "3239c4e4-4427-46dd-be24-aa8c9f7f4cc5",
            "lti11_legacy_user_id": "9abc8eec37495243b29f65b117fe199901d8a353",
            "roles": [
                "http://purl.imsglobal.org/vocab/lis/v2/membership#Instructor"
            ]
        },
        {
            "status": "Active",
            "name": "Aitor Cuesta Student",
            "picture": "https://54.154.247.11/images/messages/avatar-50.png",
            "given_name": "Aitor Cuesta",
            "family_name": "Student",
            "email": "aitor.cuesta+canvas-student@betterexaminations.com",
            "user_id": "ca742292-cc3d-4ccd-894a-c7ac0175cdf1",
            "lti11_legacy_user_id": "9491f48302495173ee15bb31ef21321b192a3372",
            "roles": [
                "http://purl.imsglobal.org/vocab/lis/v2/membership#Learner"
            ]
        },
        {
            "status": "Active",
            "name": "Test Student",
            "picture": "https://54.154.247.11/images/messages/avatar-50.png",
            "given_name": "Test",
            "family_name": "Student",
            "user_id": "675c9783-c58e-4d7c-90f5-7826e797cf88",
            "lti11_legacy_user_id": "a3777fbd814fb647e7b5f6aec562c612d279f006",
            "roles": [
                "http://purl.imsglobal.org/vocab/lis/v2/membership#Learner"
            ]
        }
    ]
}

 

If you realise the fake Test Student is still there, despite my Instructor is no longer in the Student View mode.

What do I do to reset that list to the real one?

Thanks in advance

Labels (4)
0 Kudos
1 Solution

Accepted Solutions
bowmanr
Community Champion

@AitorCuesta 

It depends on how you want to remove the test student.  The instructor of the course does that through sections in the navigation area.  You have to click on each section and remove the student from the section.

if you are trying to do that through API's or whatever as an administrator, then I cannot help in that regard.  However, I would assume that you would be able to do what you want by accessing the section enrollment information and removing the test student from it.

Information regarding the removal process is found in this forum post

It would be nice if the test student did not stay in the grade book unless the instructor purposely wanted to maintain the test student.

 

View solution in original post

3 Replies
matthew_buckett
Community Contributor

I can understand Instructure still returning the "Test Student" in the list of people as it may be that the "Test Student" has some something in your LTI application and you wish to display a name against that action/content.

In our Canvas instance we get an additional role (http://purl.imsglobal.org/vocab/lti/system/person#TestUser) set against any test user and this should allow you to filter them out (this change was only recently developed, https://github.com/instructure/canvas-lms/commit/86768548d8a6d50cff943f6e68f9882b49969ab6)

 

{
    "status" : "Active",
    "name" : "Test student",
    "picture" : "https://canvas.instructure.com/images/messages/avatar-50.png",
    "given_name" : "Test",
    "family_name" : "student",
    "user_id" : "99d4930d-0526-497b-abc9-258288cbd026",
    "lti11_legacy_user_id" : "213798bc6cf4f9539af1560965d3fa21193b3051",
    "roles" : [ "http://purl.imsglobal.org/vocab/lis/v2/membership#Learner", "http://purl.imsglobal.org/vocab/lti/system/person#TestUser" ],
    "message" : [ {
      "https://purl.imsglobal.org/spec/lti/claim/message_type" : "LtiResourceLinkRequest",
      "locale" : "en-GB",
      "https://purl.imsglobal.org/spec/lti/claim/custom" : {
        "canvas_user_id" : 254208,
        "canvas_user_login_id" : "09af35640b7542db64c2566e79ddba3ae01b0fe4",
        "canvas_user_sis_source_id" : null,
        "canvas_user_sis_integration_id" : null,
        "canvas_user_prefer_high_contrast" : "$Canvas.user.prefersHighContrast",
        "com_instructure_brand_config_json_url" : "$com.instructure.brandConfigJSON.url"
      },
      "https://purl.imsglobal.org/spec/lti/claim/lti11_legacy_user_id" : "213798bc6cf4f9539af1560965d3fa21193b3051",
      "https://purl.imsglobal.org/spec/lti/claim/lti1p1" : {
        "user_id" : "213798bc6cf4f9539af1560965d3fa21193b3051"
      }
    } ]
  }

 

AitorCuesta
New Member

I understand the test user to be enrolled while any regular user is in Student View mode.

But if there's no regular user in that mode in the course, it makes no sense to send a fake user there

I've seen this behaviour, or similar, in Blackboard. But there, when the Instructor ends the Student View mode is asked to keep the preview data (the fake student will be enrolled) or to delete it (the fake student is unenrolled). But here I can't find the place to intentionally unenroll this fake user.

bowmanr
Community Champion

@AitorCuesta 

It depends on how you want to remove the test student.  The instructor of the course does that through sections in the navigation area.  You have to click on each section and remove the student from the section.

if you are trying to do that through API's or whatever as an administrator, then I cannot help in that regard.  However, I would assume that you would be able to do what you want by accessing the section enrollment information and removing the test student from it.

Information regarding the removal process is found in this forum post

It would be nice if the test student did not stay in the grade book unless the instructor purposely wanted to maintain the test student.