use of org.olat.ims.qti21.ui.statistics.QTI21StatisticsSecurityCallback in project OpenOLAT by OpenOLAT.
the class IQTESTCourseNode method createStatisticNodeResult.
@Override
public StatisticResourceResult createStatisticNodeResult(UserRequest ureq, WindowControl wControl, UserCourseEnvironment userCourseEnv, StatisticResourceOption options, QTIType... types) {
if (!isQTITypeAllowed(types))
return null;
Long courseId = userCourseEnv.getCourseEnvironment().getCourseResourceableId();
OLATResourceable courseOres = OresHelper.createOLATResourceableInstance("CourseModule", courseId);
RepositoryEntry qtiTestEntry = getReferencedRepositoryEntry();
if (ImsQTI21Resource.TYPE_NAME.equals(qtiTestEntry.getOlatResource().getResourceableTypeName())) {
RepositoryEntry courseEntry = userCourseEnv.getCourseEnvironment().getCourseGroupManager().getCourseEntry();
QTI21StatisticSearchParams searchParams = new QTI21StatisticSearchParams(qtiTestEntry, courseEntry, getIdent());
boolean admin = userCourseEnv.isAdmin();
if (options.getParticipantsGroups() != null) {
searchParams.setLimitToGroups(options.getParticipantsGroups());
}
QTI21StatisticsSecurityCallback secCallback = new QTI21StatisticsSecurityCallback(admin, admin && isGuestAllowedForQTI21(qtiTestEntry));
return new QTI21StatisticResourceResult(qtiTestEntry, courseEntry, this, searchParams, secCallback);
}
QTIStatisticSearchParams searchParams = new QTIStatisticSearchParams(courseOres.getResourceableId(), getIdent());
searchParams.setLimitToGroups(options.getParticipantsGroups());
return new QTIStatisticResourceResult(courseOres, this, qtiTestEntry, searchParams);
}
use of org.olat.ims.qti21.ui.statistics.QTI21StatisticsSecurityCallback in project OpenOLAT by OpenOLAT.
the class IQSURVCourseNode method createStatisticNodeResult.
@Override
public StatisticResourceResult createStatisticNodeResult(UserRequest ureq, WindowControl wControl, UserCourseEnvironment userCourseEnv, StatisticResourceOption options, QTIType... types) {
if (!isQTITypeAllowed(types))
return null;
Long courseId = userCourseEnv.getCourseEnvironment().getCourseResourceableId();
OLATResourceable courseOres = OresHelper.createOLATResourceableInstance("CourseModule", courseId);
RepositoryEntry qtiSurveyEntry = getReferencedRepositoryEntry();
if (ImsQTI21Resource.TYPE_NAME.equals(qtiSurveyEntry.getOlatResource().getResourceableTypeName())) {
RepositoryEntry courseEntry = userCourseEnv.getCourseEnvironment().getCourseGroupManager().getCourseEntry();
QTI21StatisticSearchParams searchParams = new QTI21StatisticSearchParams(qtiSurveyEntry, courseEntry, getIdent());
searchParams.setLimitToGroups(options.getParticipantsGroups());
QTI21DeliveryOptions deliveryOptions = CoreSpringFactory.getImpl(QTI21Service.class).getDeliveryOptions(qtiSurveyEntry);
boolean admin = userCourseEnv.isAdmin();
QTI21StatisticsSecurityCallback secCallback = new QTI21StatisticsSecurityCallback(admin, admin && deliveryOptions.isAllowAnonym());
return new QTI21StatisticResourceResult(qtiSurveyEntry, courseEntry, this, searchParams, secCallback);
}
QTIStatisticSearchParams searchParams = new QTIStatisticSearchParams(courseOres.getResourceableId(), getIdent());
searchParams.setLimitToGroups(options.getParticipantsGroups());
return new QTIStatisticResourceResult(courseOres, this, qtiSurveyEntry, searchParams);
}
use of org.olat.ims.qti21.ui.statistics.QTI21StatisticsSecurityCallback in project openolat by klemens.
the class IQSURVCourseNode method createStatisticNodeResult.
@Override
public StatisticResourceResult createStatisticNodeResult(UserRequest ureq, WindowControl wControl, UserCourseEnvironment userCourseEnv, StatisticResourceOption options, QTIType... types) {
if (!isQTITypeAllowed(types))
return null;
Long courseId = userCourseEnv.getCourseEnvironment().getCourseResourceableId();
OLATResourceable courseOres = OresHelper.createOLATResourceableInstance("CourseModule", courseId);
RepositoryEntry qtiSurveyEntry = getReferencedRepositoryEntry();
if (ImsQTI21Resource.TYPE_NAME.equals(qtiSurveyEntry.getOlatResource().getResourceableTypeName())) {
RepositoryEntry courseEntry = userCourseEnv.getCourseEnvironment().getCourseGroupManager().getCourseEntry();
QTI21StatisticSearchParams searchParams = new QTI21StatisticSearchParams(qtiSurveyEntry, courseEntry, getIdent());
searchParams.setLimitToGroups(options.getParticipantsGroups());
QTI21DeliveryOptions deliveryOptions = CoreSpringFactory.getImpl(QTI21Service.class).getDeliveryOptions(qtiSurveyEntry);
boolean admin = userCourseEnv.isAdmin();
QTI21StatisticsSecurityCallback secCallback = new QTI21StatisticsSecurityCallback(admin, admin && deliveryOptions.isAllowAnonym());
return new QTI21StatisticResourceResult(qtiSurveyEntry, courseEntry, this, searchParams, secCallback);
}
QTIStatisticSearchParams searchParams = new QTIStatisticSearchParams(courseOres.getResourceableId(), getIdent());
searchParams.setLimitToGroups(options.getParticipantsGroups());
return new QTIStatisticResourceResult(courseOres, this, qtiSurveyEntry, searchParams);
}
use of org.olat.ims.qti21.ui.statistics.QTI21StatisticsSecurityCallback in project openolat by klemens.
the class IQTESTCourseNode method createStatisticNodeResult.
@Override
public StatisticResourceResult createStatisticNodeResult(UserRequest ureq, WindowControl wControl, UserCourseEnvironment userCourseEnv, StatisticResourceOption options, QTIType... types) {
if (!isQTITypeAllowed(types))
return null;
Long courseId = userCourseEnv.getCourseEnvironment().getCourseResourceableId();
OLATResourceable courseOres = OresHelper.createOLATResourceableInstance("CourseModule", courseId);
RepositoryEntry qtiTestEntry = getReferencedRepositoryEntry();
if (ImsQTI21Resource.TYPE_NAME.equals(qtiTestEntry.getOlatResource().getResourceableTypeName())) {
RepositoryEntry courseEntry = userCourseEnv.getCourseEnvironment().getCourseGroupManager().getCourseEntry();
QTI21StatisticSearchParams searchParams = new QTI21StatisticSearchParams(qtiTestEntry, courseEntry, getIdent());
boolean admin = userCourseEnv.isAdmin();
if (options.getParticipantsGroups() != null) {
searchParams.setLimitToGroups(options.getParticipantsGroups());
}
QTI21StatisticsSecurityCallback secCallback = new QTI21StatisticsSecurityCallback(admin, admin && isGuestAllowedForQTI21(qtiTestEntry));
return new QTI21StatisticResourceResult(qtiTestEntry, courseEntry, this, searchParams, secCallback);
}
QTIStatisticSearchParams searchParams = new QTIStatisticSearchParams(courseOres.getResourceableId(), getIdent());
searchParams.setLimitToGroups(options.getParticipantsGroups());
return new QTIStatisticResourceResult(courseOres, this, qtiTestEntry, searchParams);
}
Aggregations