| org.sakaiproject.tool.assessment.facade.PublishedAssessmentFacadeQueriesAPI
All known Subclasses: org.sakaiproject.tool.assessment.facade.PublishedAssessmentFacadeQueries,
PublishedAssessmentFacadeQueriesAPI | public interface PublishedAssessmentFacadeQueriesAPI (Code) | | |
Method Summary | |
public void | createAuthorization(PublishedAssessmentData p) | public void | delete(PublishedAssessmentIfc assessment) | public HashMap | getAllAssessmentsReleasedToAuthenticatedUsers() this return a HashMap containing
(Long publishedAssessmentId, PublishedAssessmentFacade publishedAssessment)
Note that the publishedAssessment is a partial object used for display only.
do not use it for persisting. | public ArrayList | getAllPublishedAssessments(String sortString) | public ArrayList | getAllPublishedAssessments(String sortString, Integer status) | public ArrayList | getAllPublishedAssessments(int pageSize, int pageNumber, String sortString, Integer status) | public ArrayList | getAllTakeableAssessments(String orderBy, boolean ascending, Integer status) | public IdImpl | getAssessmentId(String id) | public IdImpl | getAssessmentId(Long id) | public IdImpl | getAssessmentId(long id) | public IdImpl | getAssessmentTemplateId(String id) | public IdImpl | getAssessmentTemplateId(Long id) | public IdImpl | getAssessmentTemplateId(long id) | public ArrayList | getBasicInfoOfAllActivePublishedAssessments(String sortString, String siteAgentId, boolean ascending) | public ArrayList | getBasicInfoOfAllInActivePublishedAssessments(String sortString, String siteAgentId, boolean ascending) | public ArrayList | getBasicInfoOfAllPublishedAssessments(String orderBy, boolean ascending, Integer status, String siteId) | public ArrayList | getBasicInfoOfLastOrHighestSubmittedAssessmentsByScoringOption(String agentId, String siteId) return an array list of the AssessmentGradingFacade that
a user has submitted for grade. | public ArrayList | getBasicInfoOfLastSubmittedAssessments(String agentId, String orderBy, boolean ascending) return an array list of the last AssessmentGradingFacade per assessment that
a user has submitted for grade. | public PublishedAssessmentData | getBasicInfoOfPublishedAssessment(Long publishedId) | public HashMap | getFeedbackHash() | public PublishedItemData | getFirstPublishedItem(Long publishedAssessmentId) | public IdImpl | getId(String id) | public IdImpl | getId(Long id) | public IdImpl | getId(long id) | public Long | getItemType(Long publishedItemId) | public Integer | getNumberOfSubmissions(String publishedAssessmentId, String agentId) | public List | getNumberOfSubmissionsOfAllAssessmentsByAgent(String agentId) | public PublishedAssessmentFacade | getPublishedAssessment(Long assessmentId) | public Long | getPublishedAssessmentId(Long assessmentId) | public PublishedAssessmentFacade | getPublishedAssessmentIdByAlias(String alias) | public PublishedAssessmentFacade | getPublishedAssessmentIdByMetaLabel(String label, String entry) | public String | getPublishedAssessmentOwner(String publishedAssessmentId) | public String | getPublishedAssessmentSiteId(String publishedAssessmentId) | public List | getPublishedItemIds(Long publishedAssessmentId) | public HashSet | getPublishedItemSet(Long publishedAssessmentId, Long sectionId) | public HashSet | getSectionSetForAssessment(PublishedAssessmentIfc assessment) return a set of PublishedSectionData
IMPORTANT:
1. | public HashSet | getSectionSetForAssessment(Long publishedAssessmentId) | public PublishedAssessmentFacade | getSettingsOfPublishedAssessment(Long assessmentId) | public Integer | getTotalSubmission(String agentId, Long publishedAssessmentId) | public HashMap | getTotalSubmissionPerAssessment(String agentId) | public HashMap | getTotalSubmissionPerAssessment(String agentId, String siteId) | public boolean | hasRandomPart(Long publishedAssessmentId) | public boolean | isRandomDrawPart(Long publishedAssessmentId, Long sectionId) | public AssessmentData | loadAssessment(Long assessmentId) | public PublishedAssessmentData | loadPublishedAssessment(Long assessmentId) | public PublishedItemData | loadPublishedItem(Long itemId) | public PublishedItemText | loadPublishedItemText(Long itemTextId) | public PublishedAccessControl | preparePublishedAccessControl(PublishedAssessmentData p, AssessmentAccessControl a) | public Set | preparePublishedAnswerFeedbackSet(PublishedAnswer publishedAnswer, Set answerFeedbackSet) | public Set | preparePublishedAnswerSet(PublishedItemText publishedItemText, Set answerSet) | public PublishedAssessmentData | preparePublishedAssessment(AssessmentData a) | public PublishedEvaluationModel | preparePublishedEvaluationModel(PublishedAssessmentData p, EvaluationModel e) | public PublishedFeedback | preparePublishedFeedback(PublishedAssessmentData p, AssessmentFeedback a) | public Set | preparePublishedItemFeedbackSet(PublishedItemData publishedItem, Set itemFeedbackSet) | public Set | preparePublishedItemMetaDataSet(PublishedItemData publishedItem, Set itemMetaDataSet) | public Set | preparePublishedItemSet(PublishedSectionData publishedSection, Set itemSet, String protocol) | public Set | preparePublishedItemTextSet(PublishedItemData publishedItem, Set itemTextSet) | public Set | preparePublishedMetaDataSet(PublishedAssessmentData p, Set metaDataSet) | public Set | preparePublishedSectionMetaDataSet(PublishedSectionData publishedSection, Set metaDataSet) | public Set | preparePublishedSectionSet(PublishedAssessmentData publishedAssessment, Set sectionSet, String protocol) | public Set | preparePublishedSecuredIPSet(PublishedAssessmentData p, Set ipSet) | public PublishedAssessmentFacade | publishAssessment(AssessmentFacade assessment) | public PublishedAssessmentFacade | publishPreviewAssessment(AssessmentFacade assessment) | public boolean | publishedAssessmentTitleIsUnique(Long assessmentBaseId, String title) | public void | removeAssessment(Long assessmentId) | public void | saveOrUpdate(PublishedAssessmentIfc assessment) | public void | saveOrUpdateMetaData(PublishedMetaData meta) |
getAllAssessmentsReleasedToAuthenticatedUsers | public HashMap getAllAssessmentsReleasedToAuthenticatedUsers()(Code) | | this return a HashMap containing
(Long publishedAssessmentId, PublishedAssessmentFacade publishedAssessment)
Note that the publishedAssessment is a partial object used for display only.
do not use it for persisting. It only contains title, releaseTo, startDate, dueDate
& retractDate
|
getAllPublishedAssessments | public ArrayList getAllPublishedAssessments(String sortString)(Code) | | public ArrayList getAllReviewableAssessments(String orderBy,
boolean ascending) {
ArrayList publishedIds = getAllPublishedAssessmentId();
ArrayList newlist = new ArrayList();
for (int i = 0; i < publishedIds.size(); i++) {
String publishedId = ( (Long) publishedIds.get(i)).toString();
String query = "from AssessmentGradingData a where a.publishedAssessment.publishedAssessmentId=? order by agentId ASC," +
orderBy;
if (ascending) {
query += " asc,";
}
else {
query += " desc,";
}
query += "submittedDate DESC";
List list = getHibernateTemplate().find(query, new Long(publishedId),
Hibernate.LONG);
if (!list.isEmpty()) {
Iterator items = list.iterator();
String agentid = null;
AssessmentGradingData data = (AssessmentGradingData) items.next();
agentid = data.getAgentId();
newlist.add(data);
while (items.hasNext()) {
while (items.hasNext()) {
data = (AssessmentGradingData) items.next();
if (!data.getAgentId().equals(agentid)) {
agentid = data.getAgentId();
newlist.add(data);
break;
}
}
}
}
}
ArrayList assessmentList = new ArrayList();
for (int i = 0; i < newlist.size(); i++) {
AssessmentGradingData a = (AssessmentGradingData) newlist.get(i);
AssessmentGradingFacade f = new AssessmentGradingFacade(a);
assessmentList.add(f);
}
return assessmentList;
}
|
getAllPublishedAssessments | public ArrayList getAllPublishedAssessments(int pageSize, int pageNumber, String sortString, Integer status)(Code) | | |
getAssessmentTemplateId | public IdImpl getAssessmentTemplateId(long id)(Code) | | |
getBasicInfoOfAllActivePublishedAssessments | public ArrayList getBasicInfoOfAllActivePublishedAssessments(String sortString, String siteAgentId, boolean ascending)(Code) | | |
getBasicInfoOfAllInActivePublishedAssessments | public ArrayList getBasicInfoOfAllInActivePublishedAssessments(String sortString, String siteAgentId, boolean ascending)(Code) | | According to Marc inactive means either the dueDate or the retractDate has
passed for 1.5 release (IM on 12/17/04)
Parameters: sortString - |
getBasicInfoOfLastOrHighestSubmittedAssessmentsByScoringOption | public ArrayList getBasicInfoOfLastOrHighestSubmittedAssessmentsByScoringOption(String agentId, String siteId)(Code) | | return an array list of the AssessmentGradingFacade that
a user has submitted for grade. one per published assessment.
If an assessment allows multiple submissions and its grading option
is to send highest, then return only the highest submission. If an assessment allows multiple submissions and its grading option
is to send last, then return only the last submission.
Parameters: agentId - |
getBasicInfoOfLastSubmittedAssessments | public ArrayList getBasicInfoOfLastSubmittedAssessments(String agentId, String orderBy, boolean ascending)(Code) | | return an array list of the last AssessmentGradingFacade per assessment that
a user has submitted for grade.
Parameters: agentId - Parameters: orderBy - Parameters: ascending - |
getNumberOfSubmissions | public Integer getNumberOfSubmissions(String publishedAssessmentId, String agentId)(Code) | | public ArrayList getAllPublishedAssessmentId() {
ArrayList list = getBasicInfoOfAllActivePublishedAssessments("title", true);
ArrayList publishedIds = new ArrayList();
for (int i = 0; i < list.size(); i++) {
PublishedAssessmentFacade f = (PublishedAssessmentFacade) list.get(i);
Long publishedId = f.getPublishedAssessmentId();
publishedIds.add(publishedId);
}
return publishedIds;
}
|
getNumberOfSubmissionsOfAllAssessmentsByAgent | public List getNumberOfSubmissionsOfAllAssessmentsByAgent(String agentId)(Code) | | |
getPublishedAssessmentId | public Long getPublishedAssessmentId(Long assessmentId)(Code) | | |
getPublishedAssessmentOwner | public String getPublishedAssessmentOwner(String publishedAssessmentId)(Code) | | |
getPublishedAssessmentSiteId | public String getPublishedAssessmentSiteId(String publishedAssessmentId)(Code) | | |
getPublishedItemIds | public List getPublishedItemIds(Long publishedAssessmentId)(Code) | | |
getSectionSetForAssessment | public HashSet getSectionSetForAssessment(PublishedAssessmentIfc assessment)(Code) | | return a set of PublishedSectionData
IMPORTANT:
1. we have declared SectionData as lazy loading, so we need to
initialize it using getHibernateTemplate().initialize(java.lang.Object).
Unfortunately, we are using Spring 1.0.2 which does not support this
Hibernate feature. I tried upgrading Spring to 1.1.3. Then it failed
to load all the OR maps correctly. So for now, I am just going to
initialize it myself. I will take a look at it again next year.
- daisyf (12/13/04)
|
getSectionSetForAssessment | public HashSet getSectionSetForAssessment(Long publishedAssessmentId)(Code) | | |
getTotalSubmissionPerAssessment | public HashMap getTotalSubmissionPerAssessment(String agentId)(Code) | | total submitted for grade
returns HashMap (Long publishedAssessmentId, Integer totalSubmittedForGrade);
|
hasRandomPart | public boolean hasRandomPart(Long publishedAssessmentId)(Code) | | |
isRandomDrawPart | public boolean isRandomDrawPart(Long publishedAssessmentId, Long sectionId)(Code) | | |
preparePublishedAnswerFeedbackSet | public Set preparePublishedAnswerFeedbackSet(PublishedAnswer publishedAnswer, Set answerFeedbackSet)(Code) | | |
publishedAssessmentTitleIsUnique | public boolean publishedAssessmentTitleIsUnique(Long assessmentBaseId, String title)(Code) | | |
removeAssessment | public void removeAssessment(Long assessmentId)(Code) | | |
|
|