Search in sources :

Example 1 with SelectAssessmentItemEvent

use of org.olat.ims.qti21.ui.assessment.event.SelectAssessmentItemEvent in project OpenOLAT by OpenOLAT.

the class CorrectionIdentityAssessmentItemNavigationController method doSelectByIndex.

private void doSelectByIndex(UserRequest ureq, int index) {
    List<? extends AssessmentItemListEntry> assessmentEntryList = getAssessmentEntryList();
    if (index >= 0 && index < assessmentEntryList.size()) {
        AssessmentItemListEntry nextEntry = assessmentEntryList.get(index);
        fireEvent(ureq, new SelectAssessmentItemEvent(nextEntry));
    }
}
Also used : SelectAssessmentItemEvent(org.olat.ims.qti21.ui.assessment.event.SelectAssessmentItemEvent) AssessmentItemListEntry(org.olat.ims.qti21.ui.assessment.model.AssessmentItemListEntry)

Example 2 with SelectAssessmentItemEvent

use of org.olat.ims.qti21.ui.assessment.event.SelectAssessmentItemEvent in project OpenOLAT by OpenOLAT.

the class CorrectionIdentityAssessmentItemNavigationController method doPrevious.

private void doPrevious(UserRequest ureq) {
    AssessmentItemListEntry currentEntry = getAssessmentItemSession();
    List<? extends AssessmentItemListEntry> assessmentEntryList = getAssessmentEntryList();
    int index = assessmentEntryList.indexOf(currentEntry) - 1;
    if (index >= 0 && index < assessmentEntryList.size()) {
        AssessmentItemListEntry nextEntry = assessmentEntryList.get(index);
        fireEvent(ureq, new SelectAssessmentItemEvent(nextEntry));
    } else {
        previousItemLink.setEnabled(false);
    }
}
Also used : SelectAssessmentItemEvent(org.olat.ims.qti21.ui.assessment.event.SelectAssessmentItemEvent) AssessmentItemListEntry(org.olat.ims.qti21.ui.assessment.model.AssessmentItemListEntry)

Example 3 with SelectAssessmentItemEvent

use of org.olat.ims.qti21.ui.assessment.event.SelectAssessmentItemEvent in project openolat by klemens.

the class CorrectionIdentityAssessmentItemNavigationController method doPrevious.

private void doPrevious(UserRequest ureq) {
    AssessmentItemListEntry currentEntry = getAssessmentItemSession();
    List<? extends AssessmentItemListEntry> assessmentEntryList = getAssessmentEntryList();
    int index = assessmentEntryList.indexOf(currentEntry) - 1;
    if (index >= 0 && index < assessmentEntryList.size()) {
        AssessmentItemListEntry nextEntry = assessmentEntryList.get(index);
        fireEvent(ureq, new SelectAssessmentItemEvent(nextEntry));
    } else {
        previousItemLink.setEnabled(false);
    }
}
Also used : SelectAssessmentItemEvent(org.olat.ims.qti21.ui.assessment.event.SelectAssessmentItemEvent) AssessmentItemListEntry(org.olat.ims.qti21.ui.assessment.model.AssessmentItemListEntry)

Example 4 with SelectAssessmentItemEvent

use of org.olat.ims.qti21.ui.assessment.event.SelectAssessmentItemEvent in project openolat by klemens.

the class CorrectionIdentityAssessmentItemNavigationController method doNext.

private void doNext(UserRequest ureq) {
    AssessmentItemListEntry currentEntry = getAssessmentItemSession();
    List<? extends AssessmentItemListEntry> assessmentEntryList = getAssessmentEntryList();
    int index = assessmentEntryList.indexOf(currentEntry) + 1;
    if (index >= 0 && index < assessmentEntryList.size()) {
        AssessmentItemListEntry nextEntry = assessmentEntryList.get(index);
        fireEvent(ureq, new SelectAssessmentItemEvent(nextEntry));
    } else {
        nextItemLink.setEnabled(false);
    }
}
Also used : SelectAssessmentItemEvent(org.olat.ims.qti21.ui.assessment.event.SelectAssessmentItemEvent) AssessmentItemListEntry(org.olat.ims.qti21.ui.assessment.model.AssessmentItemListEntry)

Example 5 with SelectAssessmentItemEvent

use of org.olat.ims.qti21.ui.assessment.event.SelectAssessmentItemEvent in project OpenOLAT by OpenOLAT.

the class CorrectionIdentityAssessmentItemNavigationController method doNext.

private void doNext(UserRequest ureq) {
    AssessmentItemListEntry currentEntry = getAssessmentItemSession();
    List<? extends AssessmentItemListEntry> assessmentEntryList = getAssessmentEntryList();
    int index = assessmentEntryList.indexOf(currentEntry) + 1;
    if (index >= 0 && index < assessmentEntryList.size()) {
        AssessmentItemListEntry nextEntry = assessmentEntryList.get(index);
        fireEvent(ureq, new SelectAssessmentItemEvent(nextEntry));
    } else {
        nextItemLink.setEnabled(false);
    }
}
Also used : SelectAssessmentItemEvent(org.olat.ims.qti21.ui.assessment.event.SelectAssessmentItemEvent) AssessmentItemListEntry(org.olat.ims.qti21.ui.assessment.model.AssessmentItemListEntry)

Aggregations

SelectAssessmentItemEvent (org.olat.ims.qti21.ui.assessment.event.SelectAssessmentItemEvent)6 AssessmentItemListEntry (org.olat.ims.qti21.ui.assessment.model.AssessmentItemListEntry)6