Java Code Examples for ims.assessment.vo.AssessmentQuestionRoleVo

The following are top voted examples for showing how to use ims.assessment.vo.AssessmentQuestionRoleVo. These examples are extracted from open source projects. You can vote up the examples you like and your votes will be used in our system to generate more good examples.
Example 1
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private boolean userHasRolesToAnswer(AssessmentQuestionVo question)
{
	if(question == null)
		return false;
	
	if(question.getAssessmentAnswerRole()== null)
		return true;
	
	for(AssessmentQuestionRoleVo questionRole : question.getAssessmentAnswerRole())
	{
		if(questionRole == null)
			continue;
		
		if(questionRole.getAppRoleIsNotNull() && questionRole.getAppRole().getID_AppRole().equals(engine.getLoggedInRole().getId()))
  				return true;
	}
	
	return false;
}
 
Example 2
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private boolean userHasRolesToAnswer(Assessment_QuestionVo question)
{
	if(question == null)
		return false;
	
	if(question.getAssessmentAnswerRole()== null)
		return true;
	
	for(AssessmentQuestionRoleVo questionRole : question.getAssessmentAnswerRole())
	{
		if(questionRole == null)
			continue;
		
		if(questionRole.getAppRoleIsNotNull() && questionRole.getAppRole().getID_AppRole().equals(engine.getLoggedInRole().getId()))
  				return true;
	}
	
	return false;
}
 
Example 3
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private boolean userHasRolesToAnswer(AssessmentQuestionVo question)
{
	if(question == null)
		return false;
	
	if(question.getAssessmentAnswerRole()== null)
		return true;
	
	for(AssessmentQuestionRoleVo questionRole : question.getAssessmentAnswerRole())
	{
		if(questionRole == null)
			continue;
		
		if(questionRole.getAppRoleIsNotNull() && questionRole.getAppRole().getID_AppRole().equals(engine.getLoggedInRole().getId()))
  				return true;
	}
	
	return false;
}
 
Example 4
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private boolean userHasRolesToAnswer(Assessment_QuestionVo question)
{
	if(question == null)
		return false;
	
	if(question.getAssessmentAnswerRole()== null)
		return true;
	
	for(AssessmentQuestionRoleVo questionRole : question.getAssessmentAnswerRole())
	{
		if(questionRole == null)
			continue;
		
		if(questionRole.getAppRoleIsNotNull() && questionRole.getAppRole().getID_AppRole().equals(engine.getLoggedInRole().getId()))
  				return true;
	}
	
	return false;
}
 
Example 5
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private boolean userHasRolesToAnswer(AssessmentQuestionVo question)
{
	if(question == null)
		return false;
	
	if(question.getAssessmentAnswerRole()== null)
		return true;
	
	for(AssessmentQuestionRoleVo questionRole : question.getAssessmentAnswerRole())
	{
		if(questionRole == null)
			continue;
		
		if(questionRole.getAppRoleIsNotNull() && questionRole.getAppRole().getID_AppRole().equals(engine.getLoggedInRole().getId()))
  				return true;
	}
	
	return false;
}
 
Example 6
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private boolean userHasRolesToAnswer(Assessment_QuestionVo question)
{
	if(question == null)
		return false;
	
	if(question.getAssessmentAnswerRole()== null)
		return true;
	
	for(AssessmentQuestionRoleVo questionRole : question.getAssessmentAnswerRole())
	{
		if(questionRole == null)
			continue;
		
		if(questionRole.getAppRoleIsNotNull() && questionRole.getAppRole().getID_AppRole().equals(engine.getLoggedInRole().getId()))
  				return true;
	}
	
	return false;
}
 
Example 7
Project: openmaxims-linux   File: Logic.java   Source Code and License 6 votes vote down vote up
private boolean userHasRolesToAnswer(AssessmentQuestionVo question)
{
	if(question == null)
		return false;
	
	if(question.getAssessmentAnswerRole()== null)
		return true;
	
	for(AssessmentQuestionRoleVo questionRole : question.getAssessmentAnswerRole())
	{
		if(questionRole == null)
			continue;
		
		if(questionRole.getAppRoleIsNotNull() && questionRole.getAppRole().getID_AppRole().equals(engine.getLoggedInRole().getId()))
  				return true;
	}
	
	return false;
}
 
Example 8
Project: openmaxims-linux   File: Logic.java   Source Code and License 6 votes vote down vote up
private boolean userHasRolesToAnswer(Assessment_QuestionVo question)
{
	if(question == null)
		return false;
	
	if(question.getAssessmentAnswerRole()== null)
		return true;
	
	for(AssessmentQuestionRoleVo questionRole : question.getAssessmentAnswerRole())
	{
		if(questionRole == null)
			continue;
		
		if(questionRole.getAppRoleIsNotNull() && questionRole.getAppRole().getID_AppRole().equals(engine.getLoggedInRole().getId()))
  				return true;
	}
	
	return false;
}
 
Example 9
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
@SuppressWarnings("unchecked")
private AssessmentQuestionRoleVoCollection getQuestionRole(AssessmentQuestionVo voAssessmentQuestion)
{
	HashMap map = form.getLocalContext().getAssessmentRoles();
	if (map == null)
		return null;

	AssessmentQuestionRoleVoCollection voColl = new AssessmentQuestionRoleVoCollection();

	AssessmentRoleVoCollection roleVoColl = getRoles();
	for (int i = 0; i < roleVoColl.size(); i++)
	{
		AssessmentRoleVo voAssessRole = roleVoColl.get(i);
		if (voAssessRole.getAnswerAllIsNotNull() && voAssessRole.getAnswerAll().booleanValue() == false)
		{
			AssessmentQuestionVoCollection voAssQColl = (AssessmentQuestionVoCollection) map.get(voAssessRole.getAppRole().getID_AppRole());
			if (voAssQColl != null)
			{
				if (voAssQColl.indexOf(voAssessmentQuestion) >= 0)
				{
					AssessmentQuestionRoleVo voAssessQuestionRole = new AssessmentQuestionRoleVo();
					voAssessQuestionRole.setAppRole(voAssessRole.getAppRole());
					voColl.add(voAssessQuestionRole);
				}
			}
		}
	}

	return voColl;
}
 
Example 10
Project: AvoinApotti   File: StructuredAssessmentsHelper.java   Source Code and License 5 votes vote down vote up
private AssessmentQuestionRoleVoCollection getQuestionRole(AssessmentQuestionVo voAssessmentQuestion, HashMap assessmentRoleMap)
{
	if (assessmentRoleMap == null)
		return null;

	AssessmentQuestionRoleVoCollection voColl = new AssessmentQuestionRoleVoCollection();

	for (int i = 0; roleVoColl != null && i < roleVoColl.size(); i++)
	{
		AssessmentRoleVo voAssessRole = roleVoColl.get(i);
		if (voAssessRole.getAnswerAllIsNotNull() && voAssessRole.getAnswerAll().booleanValue() == false)
		{
			AssessmentQuestionVoCollection voAssQColl = (AssessmentQuestionVoCollection) assessmentRoleMap.get(voAssessRole.getAppRole().getID_AppRole());
			if (voAssQColl != null)
			{
				if (voAssQColl.indexOf(voAssessmentQuestion) >= 0)
				{
					AssessmentQuestionRoleVo voAssessQuestionRole = new AssessmentQuestionRoleVo();
					voAssessQuestionRole.setAppRole(voAssessRole.getAppRole());
					voColl.add(voAssessQuestionRole);
				}
			}
		}
	}

	return voColl;
}
 
Example 11
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
@SuppressWarnings("unchecked")
private AssessmentQuestionRoleVoCollection getQuestionRole(AssessmentQuestionVo voAssessmentQuestion)
{
	HashMap map = form.getLocalContext().getAssessmentRoles();
	if (map == null)
		return null;

	AssessmentQuestionRoleVoCollection voColl = new AssessmentQuestionRoleVoCollection();

	AssessmentRoleVoCollection roleVoColl = getRoles();
	for (int i = 0; i < roleVoColl.size(); i++)
	{
		AssessmentRoleVo voAssessRole = roleVoColl.get(i);
		if (voAssessRole.getAnswerAllIsNotNull() && voAssessRole.getAnswerAll().booleanValue() == false)
		{
			AssessmentQuestionVoCollection voAssQColl = (AssessmentQuestionVoCollection) map.get(voAssessRole.getAppRole().getID_AppRole());
			if (voAssQColl != null)
			{
				if (voAssQColl.indexOf(voAssessmentQuestion) >= 0)
				{
					AssessmentQuestionRoleVo voAssessQuestionRole = new AssessmentQuestionRoleVo();
					voAssessQuestionRole.setAppRole(voAssessRole.getAppRole());
					voColl.add(voAssessQuestionRole);
				}
			}
		}
	}

	return voColl;
}
 
Example 12
Project: openMAXIMS   File: StructuredAssessmentsHelper.java   Source Code and License 5 votes vote down vote up
private AssessmentQuestionRoleVoCollection getQuestionRole(AssessmentQuestionVo voAssessmentQuestion, HashMap assessmentRoleMap)
{
	if (assessmentRoleMap == null)
		return null;

	AssessmentQuestionRoleVoCollection voColl = new AssessmentQuestionRoleVoCollection();

	for (int i = 0; roleVoColl != null && i < roleVoColl.size(); i++)
	{
		AssessmentRoleVo voAssessRole = roleVoColl.get(i);
		if (voAssessRole.getAnswerAllIsNotNull() && voAssessRole.getAnswerAll().booleanValue() == false)
		{
			AssessmentQuestionVoCollection voAssQColl = (AssessmentQuestionVoCollection) assessmentRoleMap.get(voAssessRole.getAppRole().getID_AppRole());
			if (voAssQColl != null)
			{
				if (voAssQColl.indexOf(voAssessmentQuestion) >= 0)
				{
					AssessmentQuestionRoleVo voAssessQuestionRole = new AssessmentQuestionRoleVo();
					voAssessQuestionRole.setAppRole(voAssessRole.getAppRole());
					voColl.add(voAssessQuestionRole);
				}
			}
		}
	}

	return voColl;
}
 
Example 13
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
@SuppressWarnings("unchecked")
private AssessmentQuestionRoleVoCollection getQuestionRole(AssessmentQuestionVo voAssessmentQuestion)
{
	HashMap map = form.getLocalContext().getAssessmentRoles();
	if (map == null)
		return null;

	AssessmentQuestionRoleVoCollection voColl = new AssessmentQuestionRoleVoCollection();

	AssessmentRoleVoCollection roleVoColl = getRoles();
	for (int i = 0; i < roleVoColl.size(); i++)
	{
		AssessmentRoleVo voAssessRole = roleVoColl.get(i);
		if (voAssessRole.getAnswerAllIsNotNull() && voAssessRole.getAnswerAll().booleanValue() == false)
		{
			AssessmentQuestionVoCollection voAssQColl = (AssessmentQuestionVoCollection) map.get(voAssessRole.getAppRole().getID_AppRole());
			if (voAssQColl != null)
			{
				if (voAssQColl.indexOf(voAssessmentQuestion) >= 0)
				{
					AssessmentQuestionRoleVo voAssessQuestionRole = new AssessmentQuestionRoleVo();
					voAssessQuestionRole.setAppRole(voAssessRole.getAppRole());
					voColl.add(voAssessQuestionRole);
				}
			}
		}
	}

	return voColl;
}
 
Example 14
Project: openMAXIMS   File: StructuredAssessmentsHelper.java   Source Code and License 5 votes vote down vote up
private AssessmentQuestionRoleVoCollection getQuestionRole(AssessmentQuestionVo voAssessmentQuestion, HashMap assessmentRoleMap)
{
	if (assessmentRoleMap == null)
		return null;

	AssessmentQuestionRoleVoCollection voColl = new AssessmentQuestionRoleVoCollection();

	for (int i = 0; roleVoColl != null && i < roleVoColl.size(); i++)
	{
		AssessmentRoleVo voAssessRole = roleVoColl.get(i);
		if (voAssessRole.getAnswerAllIsNotNull() && voAssessRole.getAnswerAll().booleanValue() == false)
		{
			AssessmentQuestionVoCollection voAssQColl = (AssessmentQuestionVoCollection) assessmentRoleMap.get(voAssessRole.getAppRole().getID_AppRole());
			if (voAssQColl != null)
			{
				if (voAssQColl.indexOf(voAssessmentQuestion) >= 0)
				{
					AssessmentQuestionRoleVo voAssessQuestionRole = new AssessmentQuestionRoleVo();
					voAssessQuestionRole.setAppRole(voAssessRole.getAppRole());
					voColl.add(voAssessQuestionRole);
				}
			}
		}
	}

	return voColl;
}
 
Example 15
Project: openmaxims-linux   File: Logic.java   Source Code and License 5 votes vote down vote up
@SuppressWarnings("unchecked")
private AssessmentQuestionRoleVoCollection getQuestionRole(AssessmentQuestionVo voAssessmentQuestion)
{
	HashMap map = form.getLocalContext().getAssessmentRoles();
	if (map == null)
		return null;

	AssessmentQuestionRoleVoCollection voColl = new AssessmentQuestionRoleVoCollection();

	AssessmentRoleVoCollection roleVoColl = getRoles();
	for (int i = 0; i < roleVoColl.size(); i++)
	{
		AssessmentRoleVo voAssessRole = roleVoColl.get(i);
		if (voAssessRole.getAnswerAllIsNotNull() && voAssessRole.getAnswerAll().booleanValue() == false)
		{
			AssessmentQuestionVoCollection voAssQColl = (AssessmentQuestionVoCollection) map.get(voAssessRole.getAppRole().getID_AppRole());
			if (voAssQColl != null)
			{
				if (voAssQColl.indexOf(voAssessmentQuestion) >= 0)
				{
					AssessmentQuestionRoleVo voAssessQuestionRole = new AssessmentQuestionRoleVo();
					voAssessQuestionRole.setAppRole(voAssessRole.getAppRole());
					voColl.add(voAssessQuestionRole);
				}
			}
		}
	}

	return voColl;
}
 
Example 16
Project: openmaxims-linux   File: StructuredAssessmentsHelper.java   Source Code and License 5 votes vote down vote up
private AssessmentQuestionRoleVoCollection getQuestionRole(AssessmentQuestionVo voAssessmentQuestion, HashMap assessmentRoleMap)
{
	if (assessmentRoleMap == null)
		return null;

	AssessmentQuestionRoleVoCollection voColl = new AssessmentQuestionRoleVoCollection();

	for (int i = 0; roleVoColl != null && i < roleVoColl.size(); i++)
	{
		AssessmentRoleVo voAssessRole = roleVoColl.get(i);
		if (voAssessRole.getAnswerAllIsNotNull() && voAssessRole.getAnswerAll().booleanValue() == false)
		{
			AssessmentQuestionVoCollection voAssQColl = (AssessmentQuestionVoCollection) assessmentRoleMap.get(voAssessRole.getAppRole().getID_AppRole());
			if (voAssQColl != null)
			{
				if (voAssQColl.indexOf(voAssessmentQuestion) >= 0)
				{
					AssessmentQuestionRoleVo voAssessQuestionRole = new AssessmentQuestionRoleVo();
					voAssessQuestionRole.setAppRole(voAssessRole.getAppRole());
					voColl.add(voAssessQuestionRole);
				}
			}
		}
	}

	return voColl;
}