Matching Canvas assignments with external apps

kreut
Community Explorer

Hi,

I have an app where users cans create assignments and I'd like to pass the grades back to Canvas using LTI 1.3. I'm at the point that I can get my app to talk with Canvas and launch my app as an external tool. My thought was that there would be a unique deep link identifier id that I could then use to link up to my app's assignment ids.  For example,  an instructor would launch the app, choose which assignment from my site they want linked and I could then save the relationship in my database.  

Later on, I was hoping the instructor could pass back the scores to Canvas by a "Release scores" button and my app would then iterate over each of the assignment scores, and pass back to the appropriate resource using something like:

 

 $score = LTI\LTI_Grade::new()
            ->set_score_given($score_given)
            ->set_score_maximum(100)
            ->set_timestamp(date(\DateTime::ISO8601))
            ->set_activity_progress('Completed')
            ->set_grading_progress('FullyGraded')
            ->set_user_id($launch->get_launch_data()['sub']);

        $score_lineitem = LTI\LTI_Lineitem::new()
            ->set_tag('score')
            ->set_score_maximum(100)
            ->set_label('Score')
            ->set_resource_id($launch->get_launch_data()['https://purl.imsglobal.org/spec/lti/claim/resource_link']['id']);
        $grades->put_grade($score, $score_lineitem);

 where the above code is from here 

My question is whether there is a unique identifier that is passed back with each external launch so that I can use the above concept and match up each of the assignment launches within a course with the assignments that I have in my app.

Thanks so much.

Labels (3)