org.sakaiproject.tool.assessment.facade
Class AssessmentGradingFacadeQueries

java.lang.Object
  extended byorg.springframework.dao.support.DaoSupport
      extended byorg.springframework.orm.hibernate.support.HibernateDaoSupport
          extended byorg.sakaiproject.tool.assessment.facade.AssessmentGradingFacadeQueries
All Implemented Interfaces:
AssessmentGradingFacadeQueriesAPI, InitializingBean

public class AssessmentGradingFacadeQueries
extends HibernateDaoSupport
implements AssessmentGradingFacadeQueriesAPI


Field Summary
 
Fields inherited from class org.springframework.dao.support.DaoSupport
logger
 
Constructor Summary
AssessmentGradingFacadeQueries()
           
 
Method Summary
 Long add(AssessmentGradingData a)
          This grades multiple choice and true false questions.
 void deleteAll(Collection c)
           
 List getAllSubmissions(String publishedId)
           
 HashMap getAssessmentGradingByItemGradingId(Long publishedAssessmentId)
           
 List getAssessmentGradingIds(Long publishedItemId)
           
 AssessmentGradingIfc getHighestAssessmentGrading(Long publishedAssessmentId, String agentId)
           
 HashMap getHighestAssessmentGradingByPublishedItem(Long publishedAssessmentId)
           
 List getHighestAssessmentGradingList(Long publishedAssessmentId)
           
 ItemGradingData getItemGradingData(Long assessmentGradingId, Long publishedItemId)
           
 Set getItemGradingSet(Long assessmentGradingId)
           
 HashMap getItemScores(Long publishedId, Long itemId, String which)
           
 AssessmentGradingData getLastAssessmentGradingByAgentId(Long publishedAssessmentId, String agentIdString)
           
 HashMap getLastAssessmentGradingByPublishedItem(Long publishedAssessmentId)
           
 List getLastAssessmentGradingList(Long publishedAssessmentId)
           
 HashMap getLastItemGradingData(Long publishedId, String agentId)
          This returns a hashmap of all the latest item entries, keyed by item id for easy retrieval.
 ItemGradingData getLastItemGradingDataByAgent(Long publishedItemId, String agentId)
           
 AssessmentGradingData getLastSavedAssessmentGradingByAgentId(Long publishedAssessmentId, String agentIdString)
           
 MediaData getMedia(Long mediaId)
           
 ArrayList getMediaArray(ItemGradingData item)
           
 ArrayList getMediaArray(Long itemGradingId)
           
 PublishedAssessmentIfc getPublishedAssessmentByAssessmentGradingId(Long assessmentGradingId)
           
 HashMap getStudentGradingData(String assessmentGradingId)
          This returns a hashmap of all the submitted items, keyed by item id for easy retrieval.
 HashMap getSubmissionSizeOfAllPublishedAssessments()
           
 int getSubmissionSizeOfPublishedAssessment(Long publishedAssessmentId)
           
 HashMap getSubmitData(Long publishedId, String agentId)
           
 List getTotalScores(String publishedId, String which)
           
 AssessmentGradingData load(Long id)
           
 void removeMediaById(Long mediaId)
           
 void saveItemGrading(ItemGradingIfc item)
           
 Long saveMedia(byte[] media, String mimeType)
           
 Long saveMedia(MediaData mediaData)
           
 void saveOrUpdateAll(Collection c)
           
 void saveOrUpdateAssessmentGrading(AssessmentGradingIfc assessment)
           
 
Methods inherited from class org.springframework.orm.hibernate.support.HibernateDaoSupport
checkDaoConfig, closeSessionIfNecessary, convertHibernateAccessException, createHibernateTemplate, getHibernateTemplate, getSession, getSession, getSessionFactory, releaseSession, setHibernateTemplate, setSessionFactory
 
Methods inherited from class org.springframework.dao.support.DaoSupport
afterPropertiesSet, initDao
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AssessmentGradingFacadeQueries

public AssessmentGradingFacadeQueries()
Method Detail

getTotalScores

public List getTotalScores(String publishedId,
                           String which)
Specified by:
getTotalScores in interface AssessmentGradingFacadeQueriesAPI

getAllSubmissions

public List getAllSubmissions(String publishedId)
Specified by:
getAllSubmissions in interface AssessmentGradingFacadeQueriesAPI

getItemScores

public HashMap getItemScores(Long publishedId,
                             Long itemId,
                             String which)
Specified by:
getItemScores in interface AssessmentGradingFacadeQueriesAPI

getLastItemGradingData

public HashMap getLastItemGradingData(Long publishedId,
                                      String agentId)
This returns a hashmap of all the latest item entries, keyed by item id for easy retrieval. return (Long publishedItemId, ArrayList itemGradingData)

Specified by:
getLastItemGradingData in interface AssessmentGradingFacadeQueriesAPI

getStudentGradingData

public HashMap getStudentGradingData(String assessmentGradingId)
This returns a hashmap of all the submitted items, keyed by item id for easy retrieval.

Specified by:
getStudentGradingData in interface AssessmentGradingFacadeQueriesAPI

getSubmitData

public HashMap getSubmitData(Long publishedId,
                             String agentId)
Specified by:
getSubmitData in interface AssessmentGradingFacadeQueriesAPI

add

public Long add(AssessmentGradingData a)
Description copied from interface: AssessmentGradingFacadeQueriesAPI
This grades multiple choice and true false questions. Since multiple choice/multiple select has a separate ItemGradingIfc for each choice, they're graded the same way the single choice are. Choices should be given negative score values if one wants them to lose points for the wrong choice.

Specified by:
add in interface AssessmentGradingFacadeQueriesAPI

getSubmissionSizeOfPublishedAssessment

public int getSubmissionSizeOfPublishedAssessment(Long publishedAssessmentId)
Specified by:
getSubmissionSizeOfPublishedAssessment in interface AssessmentGradingFacadeQueriesAPI

getSubmissionSizeOfAllPublishedAssessments

public HashMap getSubmissionSizeOfAllPublishedAssessments()
Specified by:
getSubmissionSizeOfAllPublishedAssessments in interface AssessmentGradingFacadeQueriesAPI

saveMedia

public Long saveMedia(byte[] media,
                      String mimeType)
Specified by:
saveMedia in interface AssessmentGradingFacadeQueriesAPI

saveMedia

public Long saveMedia(MediaData mediaData)
Specified by:
saveMedia in interface AssessmentGradingFacadeQueriesAPI

removeMediaById

public void removeMediaById(Long mediaId)
Specified by:
removeMediaById in interface AssessmentGradingFacadeQueriesAPI

getMedia

public MediaData getMedia(Long mediaId)
Specified by:
getMedia in interface AssessmentGradingFacadeQueriesAPI

getMediaArray

public ArrayList getMediaArray(Long itemGradingId)
Specified by:
getMediaArray in interface AssessmentGradingFacadeQueriesAPI

getMediaArray

public ArrayList getMediaArray(ItemGradingData item)
Specified by:
getMediaArray in interface AssessmentGradingFacadeQueriesAPI

getLastItemGradingDataByAgent

public ItemGradingData getLastItemGradingDataByAgent(Long publishedItemId,
                                                     String agentId)
Specified by:
getLastItemGradingDataByAgent in interface AssessmentGradingFacadeQueriesAPI

getItemGradingData

public ItemGradingData getItemGradingData(Long assessmentGradingId,
                                          Long publishedItemId)
Specified by:
getItemGradingData in interface AssessmentGradingFacadeQueriesAPI

load

public AssessmentGradingData load(Long id)
Specified by:
load in interface AssessmentGradingFacadeQueriesAPI

getLastSavedAssessmentGradingByAgentId

public AssessmentGradingData getLastSavedAssessmentGradingByAgentId(Long publishedAssessmentId,
                                                                    String agentIdString)
Specified by:
getLastSavedAssessmentGradingByAgentId in interface AssessmentGradingFacadeQueriesAPI

getLastAssessmentGradingByAgentId

public AssessmentGradingData getLastAssessmentGradingByAgentId(Long publishedAssessmentId,
                                                               String agentIdString)
Specified by:
getLastAssessmentGradingByAgentId in interface AssessmentGradingFacadeQueriesAPI

saveItemGrading

public void saveItemGrading(ItemGradingIfc item)
Specified by:
saveItemGrading in interface AssessmentGradingFacadeQueriesAPI

saveOrUpdateAssessmentGrading

public void saveOrUpdateAssessmentGrading(AssessmentGradingIfc assessment)
Specified by:
saveOrUpdateAssessmentGrading in interface AssessmentGradingFacadeQueriesAPI

getAssessmentGradingIds

public List getAssessmentGradingIds(Long publishedItemId)
Specified by:
getAssessmentGradingIds in interface AssessmentGradingFacadeQueriesAPI

getHighestAssessmentGrading

public AssessmentGradingIfc getHighestAssessmentGrading(Long publishedAssessmentId,
                                                        String agentId)
Specified by:
getHighestAssessmentGrading in interface AssessmentGradingFacadeQueriesAPI

getLastAssessmentGradingList

public List getLastAssessmentGradingList(Long publishedAssessmentId)
Specified by:
getLastAssessmentGradingList in interface AssessmentGradingFacadeQueriesAPI

getHighestAssessmentGradingList

public List getHighestAssessmentGradingList(Long publishedAssessmentId)
Specified by:
getHighestAssessmentGradingList in interface AssessmentGradingFacadeQueriesAPI

getLastAssessmentGradingByPublishedItem

public HashMap getLastAssessmentGradingByPublishedItem(Long publishedAssessmentId)
Specified by:
getLastAssessmentGradingByPublishedItem in interface AssessmentGradingFacadeQueriesAPI

getHighestAssessmentGradingByPublishedItem

public HashMap getHighestAssessmentGradingByPublishedItem(Long publishedAssessmentId)
Specified by:
getHighestAssessmentGradingByPublishedItem in interface AssessmentGradingFacadeQueriesAPI

getItemGradingSet

public Set getItemGradingSet(Long assessmentGradingId)
Specified by:
getItemGradingSet in interface AssessmentGradingFacadeQueriesAPI

getAssessmentGradingByItemGradingId

public HashMap getAssessmentGradingByItemGradingId(Long publishedAssessmentId)
Specified by:
getAssessmentGradingByItemGradingId in interface AssessmentGradingFacadeQueriesAPI

deleteAll

public void deleteAll(Collection c)
Specified by:
deleteAll in interface AssessmentGradingFacadeQueriesAPI

saveOrUpdateAll

public void saveOrUpdateAll(Collection c)
Specified by:
saveOrUpdateAll in interface AssessmentGradingFacadeQueriesAPI

getPublishedAssessmentByAssessmentGradingId

public PublishedAssessmentIfc getPublishedAssessmentByAssessmentGradingId(Long assessmentGradingId)
Specified by:
getPublishedAssessmentByAssessmentGradingId in interface AssessmentGradingFacadeQueriesAPI