1

I posted this question on Moodle forum, as well.

I am trying to use LtiLibrary and post grades to all students under LTI item in the gradebook in Moodle.

For now, I can post only grade for a student that click on the LTI like so,

var result = LtiLibrary.Core.Outcomes.v1.OutcomesClient.PostScore(
    Request.Form["lis_outcome_service_url"].ToString(),   
    Request.Form["oauth_consumer_key"].ToString(), 
    ConfigurationManager.AppSettings["SharedSecret"].ToString(), 
    Request.Form["lis_result_sourcedid"].ToString(), 0.40);

The question is how can I post grade for a student with id 22 (for example), my id is 35 and I am trying to replace it, like so...but it does not allow me to post grade . Any ideas? My role is a teacher.

var result = LtiLibrary.Core.Outcomes.v1.OutcomesClient.PostScore(
    Request.Form["lis_outcome_service_url"].ToString(),   
    Request.Form["oauth_consumer_key"].ToString(), 
    ConfigurationManager.AppSettings["SharedSecret"].ToString(), 
    Request.Form["lis_result_sourcedid"].ToString().Replace("\"userid\":\"35\"", "\"userid\":\"22\""), 0.40);
David L
  • 32,885
  • 8
  • 62
  • 93
C P
  • 11
  • 5

0 Answers0