WeBWorK Main Forum

Is it possible to create two WeBWorK accounts from one D2L account using LTI?

Re: Is it possible to create two WeBWorK accounts from one D2L account using LTI?

by Joseph Lo -
Number of replies: 0

Thanks very much for your reply.

The "Act as" only shows students' versions of the questions. It doesn't show what students actually see. It still shows everything meant to be hidden from students. It will be helpful for instructors who are new to WeBWorK to check what students actually see after creating an assignment.

I think your comment explains why $LTI_modify_user doesn't work when switching to a different user name. I am currently using $LTI_modify_user to restrict the auto-registering to WeBWorK by matching the D2L course name with the WeBWorK course name. With this, anyone accessing WeBWorK from a different course will require the course instructor to manually create their account first. Here's the code I have for now but I don't know if this could create unforeseeable problems.

$LTI_modify_user = sub {
    my $self = shift;
    my $user = shift;
    my $r = $self->{r};
    my $d2lTitle = substr $r->param("context_title"), 0, 9;
    my $wwTitle = substr $courseName, 0, 9;
    if ($d2lTitle ne $wwTitle) {
        $user->{user_id} = "";
    }
};

I totally forgot that I need to restart the server when modifying .pm files. This was exactly what I needed to do when modifying Units.pm. Thanks very much for reminding me.

Creating a second D2L account works. I have one and that works perfectly. But because we need to call IT when we need a second account and whenever we need to add this second account to a course, it could be a burden to have every instructor do the same. I am just looking for easier ways to do this.