Skip to content

Commit

Permalink
SAK-31282 - Add ext_sakai_academic_session (sakaiproject#4596)
Browse files Browse the repository at this point in the history
  • Loading branch information
csev authored Jul 12, 2017
1 parent eec7aab commit dfd8623
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,14 @@ public static void addSiteInfo(Properties props, Properties lti2subst, Site site
setProperty(lti2subst,LTI2Vars.COURSESECTION_SOURCEDID,site.getId());
setProperty(lti2subst,LTI2Vars.COURSEOFFERING_SOURCEDID,site.getId());
}

// SAK-31282 - Add the Academic Session (ext_sakai_academic_session) to LTI launches
String termPropertyName = ServerConfigurationService.getString("irubric.termPropertyName", "");
if ( termPropertyName.length() > 0 ) {
String academicSessionId = site.getProperties().getProperty(termPropertyName);
if ((academicSessionId == "") || (academicSessionId == null)) academicSessionId = "OTHER";
setProperty(props,"ext_sakai_academic_session", academicSessionId);
}
}

// Fix up the return Url
Expand All @@ -399,6 +407,7 @@ public static void addSiteInfo(Properties props, Properties lti2subst, Site site
}

setProperty(props, BasicLTIConstants.LAUNCH_PRESENTATION_RETURN_URL, returnUrl);

}

public static void addUserInfo(Properties ltiProps, Properties lti2subst, Map<String, Object> tool)
Expand Down

0 comments on commit dfd8623

Please sign in to comment.