public static String copyStringAttachment(String stringWithAttachment) { AssessmentService assessmentService = new AssessmentService(); if(AgentFacade.getCurrentSiteId()!=null){ return assessmentService.copyContentHostingAttachments(stringWithAttachment, AgentFacade.getCurrentSiteId()); } return stringWithAttachment; } }
/** * Creates an ExtendedTimeService object using the userId in the agentFacade as the current user * @param publishedAssessment a published assessment object */ public ExtendedTimeDeliveryService(PublishedAssessmentFacade publishedAssessment) { this(publishedAssessment, AgentFacade.getAgentString()); }
/** * Gets to whom you can publish. * @return map of key value pairs: * e.g. "Authenticated Users"->"AUTHENTICATED_USERS" */ public HashMap getTargets() { HashMap map = new HashMap(); map.put("Anonymous Users", "ANONYMOUS_USERS"); map.put(AgentFacade.getCurrentSiteName(), AgentFacade.getCurrentSiteId()); //map.put("Selected Groups", "SELECTED_GROUPS"); map.put(AssessmentAccessControlIfc.RELEASE_TO_SELECTED_GROUPS, AssessmentAccessControlIfc.RELEASE_TO_SELECTED_GROUPS); return map; } }
/** * Get the current site name. * @return the site name. */ public static String getCurrentSiteName() { AgentFacade facade = new AgentFacade(); boolean accessViaUrl = facade.isAccessViaUrl(); return helper.getCurrentSiteName(accessViaUrl); }
/** * Get the anonymous user id. * @return the anonymous user id. */ public static String getAnonymousId() { AgentFacade facade = new AgentFacade(); String agentString = facade.getAgentInstanceString(); return helper.getAnonymousId(agentString); }
saveOrUpdateAssessmentGrading(ag); EventTrackingService.post(EventTrackingService.newEvent(SamigoConstants.EVENT_ASSESSMENT_TOTAL_SCORE_UPDATE, "siteId=" + AgentFacade.getCurrentSiteId() + ", gradedBy=" + AgentFacade.getAgentString() + ", assessmentGradingId=" + ag.getAssessmentGradingId() + ", totalAutoScore=" + ag.getTotalAutoScore() +
AgentFacade agent = null; for (AssessmentData a : list) { agent = new AgentFacade(a.getLastModifiedBy()); lastModifiedBy = agent.getDisplayName(); int questionSize = 0; if (questionSizeMap.get(a.getAssessmentBaseId()) != null) {
} else { if (siteId == null || siteId.length() == 0) { control.setReleaseTo(AgentFacade.getCurrentSiteName()); } else { control.setReleaseTo(AgentFacade.getSiteName(siteId));
/** * Get the current user's Eid. * Static convenience method. * @return the eid. */ public static String getEid() { AgentFacade facade =new AgentFacade(); return facade.eid; }
releasedTo = AgentFacade.getCurrentSiteName(); if (AgentFacade.getCurrentSiteName() != null) { releasedTo = AgentFacade.getCurrentSiteName();
public String getOwnerDisplayName() { String ownerIdString = this.getOwnerId(); String ownerDisplayName= AgentFacade.getDisplayName(ownerIdString); return ownerDisplayName; }
public String getOwnerSite(){ PublishedAssessmentService service = new PublishedAssessmentService(); String ownerSiteId = service.getPublishedAssessmentOwner(this.publishedAssessmentId); log.debug("**** ownerSiteId="+ownerSiteId); this.ownerSiteName = AgentFacade.getSiteName(ownerSiteId); return this.ownerSiteName; }
/** * Create anonymous user and return the anonymous user id. * @return the anonymous user id. */ public String createAnonymous(AgentFacade agent){ String anonymousId = "anonymous_"; try { anonymousId += (new java.util.Date()).getTime(); agent.setAgentInstanceString(anonymousId); } catch (Exception ex) { log.warn("createAnonymous : " + ex.getMessage()); // leave... ...mostly for unit testing } return anonymousId; }
saveOrUpdateAssessmentGrading(ag); EventTrackingService.post(EventTrackingService.newEvent(SamigoConstants.EVENT_ASSESSMENT_TOTAL_SCORE_UPDATE, "siteId=" + AgentFacade.getCurrentSiteId() + ", gradedBy=" + AgentFacade.getAgentString() + ", assessmentGradingId=" + ag.getAssessmentGradingId() + ", totalAutoScore=" + ag.getTotalAutoScore() +
agent = new AgentFacade(a.getLastModifiedBy()); lastModifiedBy = agent.getDisplayName(); int questionSize = 0; if (questionSizeMap.get(a.getAssessmentBaseId()) != null) {
} else { if (siteId == null || siteId.length() == 0) { control.setReleaseTo(AgentFacade.getCurrentSiteName()); } else { control.setReleaseTo(AgentFacade.getSiteName(siteId));
/** * Get the current site id. * @return the site id. */ public static String getCurrentSiteId() { AgentFacade facade = new AgentFacade(); boolean accessViaUrl = facade.isAccessViaUrl(); return helper.getCurrentSiteId(accessViaUrl); }
/** * Get the agent string. * Static convenience method. * @return the agent string. */ public static String getAgentString() { AgentFacade facade =new AgentFacade(); return facade.agentString; }
/** * Get the anonymous user id. * @return the anonymous user id. */ public static String getAnonymousId() { AgentFacade facade = new AgentFacade(); String agentString = facade.getAgentInstanceString(); return helper.getAnonymousId(agentString); }
releasedTo = AgentFacade.getCurrentSiteName(); if (AgentFacade.getCurrentSiteName() != null) { releasedTo = AgentFacade.getCurrentSiteName();