
com.intellifylearning.metrics.ActivityContext Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of intellisense Show documentation
Show all versions of intellisense Show documentation
IntelliSense Sensor API for Java
package com.intellifylearning.metrics;
import com.intellifylearning.metrics.models.Activity;
import com.intellifylearning.models.Props;
public class ActivityContext extends Props {
private String activityId;
/**
* @return the activityId
*/
public String getActivityId() {
return activityId;
}
/**
* @param activityId
* the activityId to set
*/
public void setActivityId(String activityId) {
this.activityId = activityId;
}
public static ActivityContext forActivity(Activity activity) {
ActivityContext context = new ActivityContext();
context.setActivityId(activity.getId());
// context.put("sessionId", event.getSessionid());
// context.put("edAppId", event.getActivity().getProvidingEdApp()
// .getId());
// context.put("edAppName", event.getActivity().getProvidingEdApp()
// .getName());
// context.put("courseId", event.getCourse().getId());
// context.put("courseName", event.getCourse().getName());
// context.put("activityId", event.getActivity().getId());
// context.put("activityName", event.getActivity().getName());
// context.put("activityType", event.getActivity().getType());
// context.put("activityTags", event.getActivity().getTags());
// context.put("activityLO", event.getActivity().getObjectives());
// context.put("activityScore",
// event.getActivity().getAttemptScore());
// context.put("activityMaxScore",
// event.getActivity().getMaxAttemptScore());
return context;
}
public ActivityContext withAttribute(String entity, String value) {
this.put(entity, value);
return this;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy