public String getIconUrl() { String url = ServerConfigurationService.getServerUrl() + "/library/image/silk/page_edit.png"; return url; }
public String getActivityDetailUrl() { //String url = assignment.getUrl(); String url = ServerConfigurationService.getServerUrl() + "/direct/assignment/" + assignment.getId() + "/doView_assignment"; return url; }
public static String getOurServerUrl() { String ourUrl = ServerConfigurationService.getString("sakai.lti.serverUrl"); if (ourUrl == null || ourUrl.equals("")) ourUrl = ServerConfigurationService.getString("serverUrl"); if (ourUrl == null || ourUrl.equals("")) ourUrl = ServerConfigurationService.getServerUrl(); if (ourUrl == null || ourUrl.equals("")) ourUrl = "http://127.0.0.1:8080"; if ( ourUrl.endsWith("/") && ourUrl.length() > 2 ) ourUrl = ourUrl.substring(0,ourUrl.length()-1); return ourUrl; }
public static String getOurServerUrl() { String ourUrl = ServerConfigurationService.getString("sakai.lti.serverUrl"); if (ourUrl == null || ourUrl.equals("")) { ourUrl = ServerConfigurationService.getString("serverUrl"); } if (ourUrl == null || ourUrl.equals("")) { ourUrl = ServerConfigurationService.getServerUrl(); } if (ourUrl == null || ourUrl.equals("")) { ourUrl = "http://127.0.0.1:8080"; } if (ourUrl.endsWith("/") && ourUrl.length() > 2) { ourUrl = ourUrl.substring(0, ourUrl.length() - 1); } return ourUrl; }
public String getItemDetailUrl() { String subRef = submission.getReference().replaceAll("/", "_"); String url = ServerConfigurationService.getServerUrl() + "/direct/assignment/" + submission.getAssignmentId() + "/doView_grade/" + subRef; return url; }
public String getItemDetailPrivateUrl(){ String subRef = submission.getReference().replaceAll("/", "_"); String url = ServerConfigurationService.getServerUrl() + "/direct/assignment/" + submission.getAssignmentId() + "/doView_grade_private/" + subRef; return url; }
int beginIndex = textToParse.indexOf(startSrc); if (beginIndex > 0) { String sakaiSiteResourcePath = ServerConfigurationService.getServerUrl() + siteContentPath;
protected String getValue(String fileType, String mapType, ContentTypeImageService service, String pathPrefix) { if (mapType.equals(JsfContentTypeMapTag.MAP_TYPE_IMAGE)) { String imgPath = service.getContentTypeImage(fileType); String url = ServerConfigurationService.getServerUrl(); return url + pathPrefix + imgPath; } else if (mapType.equals(JsfContentTypeMapTag.MAP_TYPE_NAME)) { return service.getContentTypeDisplayName(fileType); } else if (mapType.equals(JsfContentTypeMapTag.MAP_TYPE_EXTENSION)) { return service.getContentTypeExtension(fileType); } else { return null; } }
protected String getValue(String fileType, String mapType, ContentTypeImageService service, String pathPrefix) { if (mapType.equals(JsfContentTypeMapTag.MAP_TYPE_IMAGE)) { String imgPath = service.getContentTypeImage(fileType); String url = ServerConfigurationService.getServerUrl(); return url + pathPrefix + imgPath; } else if (mapType.equals(JsfContentTypeMapTag.MAP_TYPE_NAME)) { return service.getContentTypeDisplayName(fileType); } else if (mapType.equals(JsfContentTypeMapTag.MAP_TYPE_EXTENSION)) { return service.getContentTypeExtension(fileType); } else { return null; } }
protected String getValue(String fileType, String mapType, ContentTypeImageService service, String pathPrefix) { if (mapType.equals(JsfContentTypeMapTag.MAP_TYPE_IMAGE)) { String imgPath = service.getContentTypeImage(fileType); String url = ServerConfigurationService.getServerUrl(); return url + pathPrefix + imgPath; } else if (mapType.equals(JsfContentTypeMapTag.MAP_TYPE_NAME)) { return service.getContentTypeDisplayName(fileType); } else if (mapType.equals(JsfContentTypeMapTag.MAP_TYPE_EXTENSION)) { return service.getContentTypeExtension(fileType); } else { return null; } }
String filename = attachmentInfo[1]; ContentResource contentResource = attachmentHelper.createContentResource(fullFilePath, filename, attachmentInfo[2]); sectionAttachment = assessmentService.createSectionAttachment(section, contentResource.getId(), filename, ServerConfigurationService.getServerUrl()); sectionAttachment.setSection(section.getData()); set.add(sectionAttachment);
public Source resolve(String string, String string1) throws TransformerException { try { if (string.startsWith("/access")) { string = ServerConfigurationService.getServerUrl() + string; } else if (string.startsWith("/")) { ContentResource resource = getContentHostingService().getResource(string); return new StreamSource(resource.streamContent(), "jar:file:sakai-metaobj-api-dev.jar!" + "/org/sakaiproject/metaobj/shared/control/"); } return new StreamSource(string); } catch (PermissionException e) { throw new TransformerException(e); } catch (IdUnusedException e) { throw new TransformerException(e); } catch (TypeException e) { throw new TransformerException(e); } catch (ServerOverloadException e) { throw new TransformerException(e); } }
public Set copyItemAttachmentSet(ItemData newItem, Set itemAttachmentSet) { HashSet h = new HashSet(); Iterator o = itemAttachmentSet.iterator(); while (o.hasNext()) { ItemAttachment itemAttachment = (ItemAttachment) o.next(); try { // create a copy of the resource AssessmentService service = new AssessmentService(); ContentResource cr_copy = service.createCopyOfContentResource( itemAttachment.getResourceId(), itemAttachment .getFilename()); // get relative path String url = getRelativePath(cr_copy.getUrl(), ServerConfigurationService.getServerUrl()); ItemAttachment newItemAttachment = new ItemAttachment(null, newItem, cr_copy.getId(), itemAttachment.getFilename(), itemAttachment.getMimeType(), itemAttachment.getFileSize(), itemAttachment.getDescription(), url, itemAttachment.getIsLink(), itemAttachment.getStatus(), AgentFacade.getAgentString(), new Date(), AgentFacade.getAgentString(), new Date()); h.add(newItemAttachment); } catch (Exception e) { log.warn(e.getMessage()); } } return h; }
String filename = attachmentInfo[1]; ContentResource contentResource = attachmentHelper.createContentResource(fullFilePath, filename, attachmentInfo[2]); itemAttachment = assessmentService.createItemAttachment(item, contentResource.getId(), filename, ServerConfigurationService.getServerUrl()); itemAttachment.setItem(item.getData()); set.add(itemAttachment);
String filename = attachmentInfo[1]; ContentResource contentResource = attachmentHelper.createContentResource(fullFilePath, filename, attachmentInfo[2]); itemAttachment = assessmentService.createItemAttachment(item, contentResource.getId(), filename, ServerConfigurationService.getServerUrl()); itemAttachment.setItem(item.getData()); set.add(itemAttachment);
public Set copyItemAttachmentSet(ItemData newItem, Set itemAttachmentSet) { HashSet h = new HashSet(); Iterator o = itemAttachmentSet.iterator(); while (o.hasNext()) { ItemAttachment itemAttachment = (ItemAttachment) o.next(); try { // create a copy of the resource AssessmentService service = new AssessmentService(); ContentResource cr_copy = service.createCopyOfContentResource( itemAttachment.getResourceId(), itemAttachment .getFilename()); // get relative path String url = getRelativePath(cr_copy.getUrl(), ServerConfigurationService.getServerUrl()); ItemAttachment newItemAttachment = new ItemAttachment(null, newItem, cr_copy.getId(), itemAttachment.getFilename(), itemAttachment.getMimeType(), itemAttachment.getFileSize(), itemAttachment.getDescription(), url, itemAttachment.getIsLink(), itemAttachment.getStatus(), AgentFacade.getAgentString(), new Date(), AgentFacade.getAgentString(), new Date()); h.add(newItemAttachment); } catch (Exception e) { log.warn(e.getMessage()); } } return h; } }
String filename = attachmentInfo[1]; ContentResource contentResource = attachmentHelper.createContentResource(fullFilePath, filename, attachmentInfo[2]); assessmentAttachment = assessmentService.createAssessmentAttachment(assessment, contentResource.getId(), filename, ServerConfigurationService.getServerUrl()); assessmentAttachment.setAssessment((AssessmentIfc)assessment.getData()); set.add(assessmentAttachment);
String filename = attachmentInfo[1]; ContentResource contentResource = attachmentHelper.createContentResource(fullFilePath, filename, attachmentInfo[2]); assessmentAttachment = assessmentService.createAssessmentAttachment(assessment, contentResource.getId(), filename, ServerConfigurationService.getServerUrl()); assessmentAttachment.setAssessment((AssessmentIfc)assessment.getData()); set.add(assessmentAttachment);
assessmentData.setSectionSet(getSectionSetForAssessment(assessmentData)); AssessmentData newAssessmentData = prepareAssessment(assessmentData, ServerConfigurationService.getServerUrl(), AgentFacade.getCurrentSiteId()); updateTitleForCopy(newAssessmentData, apepndCopyTitle); getHibernateTemplate().saveOrUpdate(newAssessmentData);
assessmentData.setSectionSet(getSectionSetForAssessment(assessmentData)); RubricsService rubricsService = (RubricsService) SpringBeanLocator.getInstance().getBean("org.sakaiproject.rubrics.logic.RubricsService"); AssessmentData newAssessmentData = prepareAssessment(assessmentData, ServerConfigurationService.getServerUrl(), AgentFacade.getCurrentSiteId()); updateTitleForCopy(newAssessmentData, appendCopyTitle); getHibernateTemplate().saveOrUpdate(newAssessmentData);