Skip to content

Commit

Permalink
Add the Custom LTI Substitution Variable Context.timezone (sakaiproje…
Browse files Browse the repository at this point in the history
  • Loading branch information
zhuoY121 authored Mar 6, 2023
1 parent 53e598a commit 6bb9271
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -532,6 +532,9 @@ public static void addSiteInfo(Properties props, Properties lti13subst, Site sit
String context_id_history = site.getProperties().getProperty(LTICustomVars.CONTEXT_ID_HISTORY);
setProperty(lti13subst, LTICustomVars.CONTEXT_ID_HISTORY, context_id_history);

TimeZone context_timezone = TimeZone.getDefault ();
setProperty(lti13subst, LTICustomVars.CONTEXT_TIMEZONE, context_timezone.getID());

setProperty(props, BasicLTIConstants.CONTEXT_LABEL, site.getTitle());
setProperty(lti13subst, LTICustomVars.COURSESECTION_LABEL, site.getTitle());
setProperty(lti13subst, LTICustomVars.CONTEXT_LABEL, site.getTitle());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,13 @@ public class LTICustomVars {
*/
public static final String CONTEXT_ID_HISTORY = "Context.id.history";

/**
* CONTEXT_TIMEZONE
*
* The timezone of the context. (JVM timezone)
*/
public static final String CONTEXT_TIMEZONE = "Context.timezone";

/**
* RESOURCELINK_ID
*
Expand Down Expand Up @@ -1096,7 +1103,7 @@ public class LTICustomVars {
PERSON_WEBADDRESS,
CONTEXT_ID, CONTEXT_ORG, CONTEXT_TYPE, CONTEXT_TYPE_DEFAULT,
CONTEXT_LABEL, CONTEXT_TITLE, CONTEXT_SOURCEDID,
CONTEXT_ID_HISTORY,
CONTEXT_ID_HISTORY, CONTEXT_TIMEZONE,
RESOURCELINK_ID, RESOURCELINK_TITLE,
RESOURCELINK_DESCRIPTION, RESOURCELINK_ID_HISTORY,
COURSETEMPLATE_SOURCEDID, COURSETEMPLATE_LABEL, COURSETEMPLATE_TITLE,
Expand Down

0 comments on commit 6bb9271

Please sign in to comment.