001: /**********************************************************************************
002: * $URL: https://source.sakaiproject.org/svn/sam/trunk/component/src/java/org/sakaiproject/tool/assessment/integration/helper/standalone/GradebookServiceHelperImpl.java $
003: * $Id: GradebookServiceHelperImpl.java 9273 2006-05-10 22:34:28Z daisyf@stanford.edu $
004: ***********************************************************************************
005: *
006: * Copyright (c) 2004, 2005, 2006 The Sakai Foundation.
007: *
008: * Licensed under the Educational Community License, Version 1.0 (the"License");
009: * you may not use this file except in compliance with the License.
010: * You may obtain a copy of the License at
011: *
012: * http://www.opensource.org/licenses/ecl1.php
013: *
014: * Unless required by applicable law or agreed to in writing, software
015: * distributed under the License is distributed on an "AS IS" BASIS,
016: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
017: * See the License for the specific language governing permissions and
018: * limitations under the License.
019: *
020: **********************************************************************************/package org.sakaiproject.tool.assessment.integration.helper.standalone;
021:
022: import org.apache.commons.logging.Log;
023: import org.apache.commons.logging.LogFactory;
024:
025: import org.sakaiproject.service.gradebook.shared.GradebookService;
026: import org.sakaiproject.tool.assessment.data.dao.assessment.PublishedAssessmentData;
027: import org.sakaiproject.tool.assessment.data.ifc.grading.AssessmentGradingIfc;
028: import org.sakaiproject.tool.assessment.integration.helper.ifc.GradebookServiceHelper;
029:
030: /**
031: * <p>
032: * Description: This is a stub standalone context implementation helper delegate class for the GradebookService class.<br />
033: * The helper methods are stubs because in standalone there isn't gradebook integration.<br />
034: * "Standalone" means that Samigo (Tests and Quizzes) is running without the context of the Sakai portal and authentication mechanisms, and therefore we use stub methods.
035: * </p>
036: * <p>
037: * Note: To customize behavior you can add your own helper class to the Spring injection via the integrationContext.xml for your context.<br />
038: * The particular integrationContext.xml to be used is selected by the build process.
039: * </p>
040: *
041: * @author Ed Smiley <esmiley@stanford.edu>
042: */
043: public class GradebookServiceHelperImpl implements
044: GradebookServiceHelper {
045: private static Log log = LogFactory
046: .getLog(GradebookServiceHelperImpl.class);
047:
048: public boolean isAssignmentDefined(String assessmentTitle,
049: GradebookService g) {
050: return false;
051: }
052:
053: /**
054: * STUB. NO-OP.
055: *
056: * @param publishedAssessment
057: * the published assessment
058: * @param g
059: * the Gradebook Service
060: * @return false: cannot add to gradebook
061: * @throws java.lang.Exception
062: */
063: public boolean addToGradebook(
064: PublishedAssessmentData publishedAssessment,
065: GradebookService g) {
066: return false;
067: }
068:
069: /**
070: * STUB. NO-OP.
071: *
072: * @param gradebookUId
073: * the gradebook id
074: * @param publishedAssessmentId
075: * the id of the published assessment
076: * @param g
077: * the Gradebook Service
078: * @throws java.lang.Exception
079: */
080: public void removeExternalAssessment(String gradebookUId,
081: String publishedAssessmentId, GradebookService g)
082: throws Exception {
083: }
084:
085: /**
086: * Always returns false, because standalone.
087: *
088: * @param gradebookUId
089: * the gradebook id
090: * @param g
091: * the Gradebook Service
092: * @return false, no gradebook integration
093: */
094: public boolean gradebookExists(String gradebookUId,
095: GradebookService g) {
096: return false;
097: }
098:
099: /**
100: * Always returns false, because standalone.
101: *
102: * @param siteId
103: * the site id
104: * @return false, no gradebook integration
105: */
106: public boolean isGradebookExist(String siteId) {
107: return false;
108: }
109:
110: /**
111: * STUB. NO-OP.
112: *
113: * @param ag
114: * the assessment grading
115: * @param g
116: * the Gradebook Service
117: * @throws java.lang.Exception
118: */
119: public void updateExternalAssessmentScore(AssessmentGradingIfc ag,
120: GradebookService g) throws Exception {
121: }
122:
123: public boolean updateGradebook(
124: PublishedAssessmentData publishedAssessment,
125: GradebookService g) throws Exception {
126: // TODO Auto-generated method stub
127: return false;
128: }
129:
130: }
|