use of org.olat.modules.portfolio.Assignment in project openolat by klemens.
the class AbstractPageListController method doMoveDownAssignment.
private void doMoveDownAssignment(UserRequest ureq, PortfolioElementRow row) {
Assignment assigment = row.getAssignment();
Section section = row.getSection();
section = portfolioService.moveDownAssignment(section, assigment);
loadModel(ureq, null);
}
use of org.olat.modules.portfolio.Assignment in project openolat by klemens.
the class AbstractPageListController method doEditAssignment.
protected void doEditAssignment(UserRequest ureq, PortfolioElementRow row) {
if (editAssignmentCtrl != null)
return;
Assignment assignment = row.getAssignment();
editAssignmentCtrl = new AssignmentEditController(ureq, getWindowControl(), assignment);
listenTo(editAssignmentCtrl);
String title = translate("edit.assignment");
cmc = new CloseableModalController(getWindowControl(), null, editAssignmentCtrl.getInitialComponent(), true, title, true);
listenTo(cmc);
cmc.activate();
}
use of org.olat.modules.portfolio.Assignment in project openolat by klemens.
the class AbstractPageListController method doMoveAssignment.
private void doMoveAssignment(UserRequest ureq, PortfolioElementRow row) {
if (moveAssignmentCtrl != null)
return;
Assignment assignment = row.getAssignment();
moveAssignmentCtrl = new AssignmentMoveController(ureq, getWindowControl(), assignment, row.getSection());
listenTo(moveAssignmentCtrl);
String title = translate("move.assignment");
cmc = new CloseableModalController(getWindowControl(), null, moveAssignmentCtrl.getInitialComponent(), true, title, true);
listenTo(cmc);
cmc.activate();
}
use of org.olat.modules.portfolio.Assignment in project openolat by klemens.
the class AbstractPageListController method doMoveUpAssignment.
private void doMoveUpAssignment(UserRequest ureq, PortfolioElementRow row) {
Assignment assigment = row.getAssignment();
Section section = assigment.getSection();
section = portfolioService.moveUpAssignment(section, assigment);
loadModel(ureq, null);
}
use of org.olat.modules.portfolio.Assignment in project openolat by klemens.
the class PortfolioServiceImpl method startAssignment.
@Override
public Assignment startAssignment(Long assignmentKey, Identity author) {
Assignment reloadedAssignment = assignmentDao.loadAssignmentByKey(assignmentKey);
if (reloadedAssignment.getPage() == null) {
Section section = reloadedAssignment.getSection();
if (reloadedAssignment.getAssignmentType() == AssignmentType.essay || reloadedAssignment.getAssignmentType() == AssignmentType.document) {
Page page = appendNewPage(author, reloadedAssignment.getTitle(), reloadedAssignment.getSummary(), null, null, section);
reloadedAssignment = assignmentDao.startEssayAssignment(reloadedAssignment, page, author);
} else if (reloadedAssignment.getAssignmentType() == AssignmentType.form) {
RepositoryEntry formEntry = reloadedAssignment.getFormEntry();
Page page = appendNewPage(author, reloadedAssignment.getTitle(), reloadedAssignment.getSummary(), null, false, null, section);
reloadedAssignment = assignmentDao.startFormAssignment(reloadedAssignment, page, author);
// create the session for the assignee
evaluationFormSessionDao.createSessionForPortfolio(author, page.getBody(), formEntry);
}
}
dbInstance.commit();
ThreadLocalUserActivityLogger.log(PortfolioLoggingAction.PORTFOLIO_ASSIGNMENT_STARTED, getClass(), LoggingResourceable.wrap(reloadedAssignment.getSection()), LoggingResourceable.wrap(reloadedAssignment));
return reloadedAssignment;
}
Aggregations