org.sakaiproject.tool.assessment.shared.impl.assessment
Class PublishedAssessmentServiceImpl

java.lang.Object
  extended by org.sakaiproject.tool.assessment.shared.impl.assessment.PublishedAssessmentServiceImpl
All Implemented Interfaces:
PublishedAssessmentServiceAPI

public class PublishedAssessmentServiceImpl
extends Object
implements PublishedAssessmentServiceAPI

PublishedAssessmentServiceImpl implements a shared interface to get/set published assessment information.

Author:
Ed Smiley

Constructor Summary
PublishedAssessmentServiceImpl()
           
 
Method Summary
 List getAllActivePublishedAssessments(int pageSize, int pageNumber, String orderBy)
          Get list of all active published assessments.
 List getAllActivePublishedAssessments(String orderBy)
          Get list of all active published assessments.
 Map getAllAssessmentsReleasedToAuthenticatedUsers()
          Get list of all active published assessmentsreleased to authenticated users.
 List getAllInActivePublishedAssessments(int pageSize, int pageNumber, String orderBy)
          Get list of all inactive published assessments.
 List getAllInActivePublishedAssessments(String orderBy)
          Get list of all inactive published assessments.
 List getAllPublishedAssessments(int pageSize, int pageNumber, String orderBy, Integer status)
          Get list of all inactive published assessments.
 List getAllPublishedAssessments(String orderBy, Integer status)
          Get list of all inactive published assessments.
 List getBasicInfoOfAllActivePublishedAssessments(String orderBy, boolean ascending)
          Get list of all active published assessments with only basic info populated.
 List getBasicInfoOfAllInActivePublishedAssessments(String orderBy, boolean ascending)
          Get list of all inactive published assessments with only basic info populated.
 List getBasicInfoOfAllPublishedAssessments(String agentId, String orderBy, boolean ascending, String siteId)
          Get list of all active published assessments with basic info populated.
 List getBasicInfoOfLastSubmittedAssessments(String agentId, String orderBy, boolean ascending)
          Get list of all last submitterd published assessments with only basic info populated.
 Map getFeedbackHash()
          Get a map of the feedback
 PublishedAssessmentIfc getPublishedAssessment(String assessmentId)
          Get published assessment.
 Long getPublishedAssessmentId(String assessmentId)
          Get the published id form the assessment id.
 PublishedAssessmentIfc getPublishedAssessmentIdByAlias(String alias)
          Get a published assessment using an alias
 String getPublishedAssessmentOwner(Long publishedAssessmentId)
          Get the owner.
 PublishedAssessmentIfc getSettingsOfPublishedAssessment(String assessmentId)
          Get setttings of published assessment.
 Integer getTotalSubmission(String agentId, String publishedAssessmentId)
          Get the number of total submissions for one assignment.
 Map getTotalSubmissionPerAssessment(String agentId)
          Get the number of total submissions per assignment.
 ItemDataIfc loadPublishedItem(String itemId)
          Load an item that has been published
 ItemTextIfc loadPublishedItemText(String itemTextId)
          Load published assessment item text.
 PublishedAssessmentIfc publishAssessment(AssessmentIfc assessment)
          Publish an assessment.
 PublishedAssessmentIfc publishPreviewAssessment(AssessmentIfc assessment, String protocol)
          Preview a published assessment.
 void removeAssessment(String assessmentId)
          Remove the published assessment.
 void saveAssessment(PublishedAssessmentIfc assessment)
          Save a published assessment.
 void saveOrUpdateMetaData(ItemMetaDataIfc meta)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PublishedAssessmentServiceImpl

public PublishedAssessmentServiceImpl()
Method Detail

getBasicInfoOfAllPublishedAssessments

public List getBasicInfoOfAllPublishedAssessments(String agentId,
                                                  String orderBy,
                                                  boolean ascending,
                                                  String siteId)
Get list of all active published assessments with basic info populated.

Specified by:
getBasicInfoOfAllPublishedAssessments in interface PublishedAssessmentServiceAPI
Parameters:
agentId - the agent takign the assessments
orderBy - sort order field.
Returns:
the list.

getAllActivePublishedAssessments

public List getAllActivePublishedAssessments(String orderBy)
Get list of all active published assessments.

Specified by:
getAllActivePublishedAssessments in interface PublishedAssessmentServiceAPI
Parameters:
orderBy - sort order field.
Returns:
the list.

getAllActivePublishedAssessments

public List getAllActivePublishedAssessments(int pageSize,
                                             int pageNumber,
                                             String orderBy)
Get list of all active published assessments.

Specified by:
getAllActivePublishedAssessments in interface PublishedAssessmentServiceAPI
Parameters:
pageSize - number in a page
pageNumber - number of the page
orderBy - sort order field.
Returns:
the list.

getAllInActivePublishedAssessments

public List getAllInActivePublishedAssessments(String orderBy)
Get list of all inactive published assessments.

Specified by:
getAllInActivePublishedAssessments in interface PublishedAssessmentServiceAPI
Parameters:
orderBy - sort order field.
Returns:
the list.

getAllInActivePublishedAssessments

public List getAllInActivePublishedAssessments(int pageSize,
                                               int pageNumber,
                                               String orderBy)
Get list of all inactive published assessments.

Specified by:
getAllInActivePublishedAssessments in interface PublishedAssessmentServiceAPI
Parameters:
pageSize - number in a page
pageNumber - number of the page
orderBy - sort order field.
Returns:
the list.

getAllPublishedAssessments

public List getAllPublishedAssessments(String orderBy,
                                       Integer status)
Get list of all inactive published assessments.

Specified by:
getAllPublishedAssessments in interface PublishedAssessmentServiceAPI
Parameters:
orderBy - sort order field.
status - the status code
Returns:
the list.

getAllPublishedAssessments

public List getAllPublishedAssessments(int pageSize,
                                       int pageNumber,
                                       String orderBy,
                                       Integer status)
Get list of all inactive published assessments.

Specified by:
getAllPublishedAssessments in interface PublishedAssessmentServiceAPI
Parameters:
pageSize - number in a page
pageNumber - number of the page
orderBy - sort order field.
status - the status
Returns:
the list.

getPublishedAssessment

public PublishedAssessmentIfc getPublishedAssessment(String assessmentId)
Get published assessment.

Specified by:
getPublishedAssessment in interface PublishedAssessmentServiceAPI
Parameters:
assessmentId - the published assessment id string
Returns:
the published assessment.

getPublishedAssessmentId

public Long getPublishedAssessmentId(String assessmentId)
Get the published id form the assessment id.

Specified by:
getPublishedAssessmentId in interface PublishedAssessmentServiceAPI
Parameters:
assessmentId - the assessment id string.
Returns:
the published assessment id.

publishAssessment

public PublishedAssessmentIfc publishAssessment(AssessmentIfc assessment)
Publish an assessment.

Specified by:
publishAssessment in interface PublishedAssessmentServiceAPI
Parameters:
assessment -
Returns:

publishPreviewAssessment

public PublishedAssessmentIfc publishPreviewAssessment(AssessmentIfc assessment,
                                                       String protocol)
Preview a published assessment.

Specified by:
publishPreviewAssessment in interface PublishedAssessmentServiceAPI
Parameters:
assessment - the assessment to preview.
Returns:
the published assessment "view" into the assessment.

saveAssessment

public void saveAssessment(PublishedAssessmentIfc assessment)
Save a published assessment.

Specified by:
saveAssessment in interface PublishedAssessmentServiceAPI
Parameters:
assessment - the published assessment.

removeAssessment

public void removeAssessment(String assessmentId)
Remove the published assessment.

Specified by:
removeAssessment in interface PublishedAssessmentServiceAPI
Parameters:
assessmentId - the published assessment id string.

getBasicInfoOfAllActivePublishedAssessments

public List getBasicInfoOfAllActivePublishedAssessments(String orderBy,
                                                        boolean ascending)
Get list of all active published assessments with only basic info populated.

Specified by:
getBasicInfoOfAllActivePublishedAssessments in interface PublishedAssessmentServiceAPI
Parameters:
ascending - true if ascending sort.
orderBy - sort order field.
Returns:
the list.

getBasicInfoOfAllInActivePublishedAssessments

public List getBasicInfoOfAllInActivePublishedAssessments(String orderBy,
                                                          boolean ascending)
Get list of all inactive published assessments with only basic info populated.

Specified by:
getBasicInfoOfAllInActivePublishedAssessments in interface PublishedAssessmentServiceAPI
Parameters:
ascending - true if ascending sort.
orderBy - sort order field.
Returns:
the list.

getSettingsOfPublishedAssessment

public PublishedAssessmentIfc getSettingsOfPublishedAssessment(String assessmentId)
Get setttings of published assessment.

Specified by:
getSettingsOfPublishedAssessment in interface PublishedAssessmentServiceAPI
Parameters:
assessmentId - the published assessment id string
Returns:
the published assessment

loadPublishedItem

public ItemDataIfc loadPublishedItem(String itemId)
Load an item that has been published

Specified by:
loadPublishedItem in interface PublishedAssessmentServiceAPI
Parameters:
itemId -
Returns:

loadPublishedItemText

public ItemTextIfc loadPublishedItemText(String itemTextId)
Load published assessment item text.

Specified by:
loadPublishedItemText in interface PublishedAssessmentServiceAPI
Parameters:
itemTextId - the id string of the itemtext.
Returns:
the item.

getBasicInfoOfLastSubmittedAssessments

public List getBasicInfoOfLastSubmittedAssessments(String agentId,
                                                   String orderBy,
                                                   boolean ascending)
Get list of all last submitterd published assessments with only basic info populated.

Specified by:
getBasicInfoOfLastSubmittedAssessments in interface PublishedAssessmentServiceAPI
Parameters:
agentId - the agent taking the assessments.
ascending - true if ascending sort.
orderBy - sort order field.
Returns:
the list.

getTotalSubmissionPerAssessment

public Map getTotalSubmissionPerAssessment(String agentId)
Get the number of total submissions per assignment.

Specified by:
getTotalSubmissionPerAssessment in interface PublishedAssessmentServiceAPI
Parameters:
agentId - the agent making submissions
Returns:
Map by(Long publishedAssessmentId->Integer totalSubmittedForGrade)

getTotalSubmission

public Integer getTotalSubmission(String agentId,
                                  String publishedAssessmentId)
Get the number of total submissions for one assignment.

Specified by:
getTotalSubmission in interface PublishedAssessmentServiceAPI
Parameters:
agentId - the agent making submissions
publishedAssessmentId - the published assessment id string
Returns:
the total

getPublishedAssessmentIdByAlias

public PublishedAssessmentIfc getPublishedAssessmentIdByAlias(String alias)
Get a published assessment using an alias

Specified by:
getPublishedAssessmentIdByAlias in interface PublishedAssessmentServiceAPI
Parameters:
alias - the alias
Returns:
the published assessment

saveOrUpdateMetaData

public void saveOrUpdateMetaData(ItemMetaDataIfc meta)
Specified by:
saveOrUpdateMetaData in interface PublishedAssessmentServiceAPI
Parameters:
meta -

getFeedbackHash

public Map getFeedbackHash()
Get a map of the feedback

Specified by:
getFeedbackHash in interface PublishedAssessmentServiceAPI
Returns:
the map

getAllAssessmentsReleasedToAuthenticatedUsers

public Map getAllAssessmentsReleasedToAuthenticatedUsers()
Get list of all active published assessmentsreleased to authenticated users.

Specified by:
getAllAssessmentsReleasedToAuthenticatedUsers in interface PublishedAssessmentServiceAPI
Returns:
the list.

getPublishedAssessmentOwner

public String getPublishedAssessmentOwner(Long publishedAssessmentId)
Get the owner.

Specified by:
getPublishedAssessmentOwner in interface PublishedAssessmentServiceAPI
Parameters:
publishedAssessmentId -
Returns:
the owner string.


Copyright © 2005-2012 Sakai Project. All Rights Reserved.