当前位置: 首页>>代码示例>>Java>>正文


Java Assignment.isExternallyMaintained方法代码示例

本文整理汇总了Java中org.sakaiproject.service.gradebook.shared.Assignment.isExternallyMaintained方法的典型用法代码示例。如果您正苦于以下问题:Java Assignment.isExternallyMaintained方法的具体用法?Java Assignment.isExternallyMaintained怎么用?Java Assignment.isExternallyMaintained使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.sakaiproject.service.gradebook.shared.Assignment的用法示例。


在下文中一共展示了Assignment.isExternallyMaintained方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getGradebookAssignmentsForStudent

import org.sakaiproject.service.gradebook.shared.Assignment; //导入方法依赖的package包/类
/**
 * Special operation to get a list of assignments in the gradebook that the specified student has access to. This taked into account
 * externally defined assessments that may have grouping permissions applied.
 *
 * This should only be called if you are wanting to view the assignments that a student would see (ie if you ARE a student, or if you
 * are an instructor using the student review mode)
 *
 * @param studentUuid
 * @return a list of assignments or empty list if none/no gradebook
 */
public List<Assignment> getGradebookAssignmentsForStudent(final String studentUuid) {

	final Gradebook gradebook = getGradebook(getCurrentSiteId());
	final List<Assignment> assignments = getGradebookAssignments();

	// NOTE: cannot do a role check here as it assumes the current user but this could have been called by an instructor (unless we add
	// a new method to handle this)
	// in any case the role check would just be a confirmation that the user passed in was a student.

	// for each assignment we need to check if it is grouped externally and if the user has access to the group
	final Iterator<Assignment> iter = assignments.iterator();
	while (iter.hasNext()) {
		final Assignment a = iter.next();
		if (a.isExternallyMaintained()) {
			if (this.gradebookExternalAssessmentService.isExternalAssignmentGrouped(gradebook.getUid(), a.getExternalId()) &&
					!this.gradebookExternalAssessmentService.isExternalAssignmentVisible(gradebook.getUid(), a.getExternalId(),
							studentUuid)) {
				iter.remove();
			}
		}
	}
	return assignments;
}
 
开发者ID:sakaiproject,项目名称:sakai,代码行数:34,代码来源:GradebookNgBusinessService.java

示例2: GradebookItem

import org.sakaiproject.service.gradebook.shared.Assignment; //导入方法依赖的package包/类
public GradebookItem(Assignment assignment) {
	this.id = assignment.getId();
	this.name = assignment.getName();
	this.points = assignment.getPoints();
	this.dueDate = assignment.getDueDate();
	if(assignment.isExternallyMaintained()) {
		this.externalInfo = new ExternalInfo(assignment);
	}
	this.grades = new ArrayList<>();
	this.categoryId = assignment.getCategoryId();
	this.released = assignment.isReleased();
	this.extraCredit = assignment.isExtraCredit();
}
 
开发者ID:sakaiproject,项目名称:sakai,代码行数:14,代码来源:GradebookItem.java

示例3: setUpGradebookAssignments

import org.sakaiproject.service.gradebook.shared.Assignment; //导入方法依赖的package包/类
public void setUpGradebookAssignments(){
	try {
		assignments = new ArrayList<SelectItem>();
		assignments.add(new SelectItem(DEFAULT_GB_ITEM, getResourceBundleString(SELECT_ASSIGN)));

		//Code to get the gradebook service from ComponentManager

		GradebookService gradebookService = getGradebookService();

		if(getGradebookExist()) {
			List gradeAssignmentsBeforeFilter = gradebookService.getAssignments(toolManager.getCurrentPlacement().getContext());
			for(int i=0; i<gradeAssignmentsBeforeFilter.size(); i++) {
				Assignment thisAssign = (Assignment) gradeAssignmentsBeforeFilter.get(i);
				if(!thisAssign.isExternallyMaintained()) {
					try {
						assignments.add(new SelectItem(Integer.toString(assignments.size()), thisAssign.getName()));
					} catch(Exception e) {
						log.error("DiscussionForumTool - processDfMsgGrd:" + e);
					}
				}
			}
		}
	} catch(SecurityException se) {
		log.debug("SecurityException caught while getting assignments.", se);
	} catch(Exception e1) {
		log.error("DiscussionForumTool&processDfMsgGrad:" + e1);
	}
}
 
开发者ID:sakaiproject,项目名称:sakai,代码行数:29,代码来源:MessageForumStatisticsBean.java


注:本文中的org.sakaiproject.service.gradebook.shared.Assignment.isExternallyMaintained方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。