use of org.olat.modules.portfolio.PageUserStatus in project openolat by klemens.
the class SharedPageStatusCellRenderer method renderPageRow.
public String renderPageRow(PageRow pageRow) {
if (pageRow == null || pageRow.getPage() == null)
return "";
StringOutput target = new StringOutput(64);
PageStatus pageStatus = pageRow.getPage().getPageStatus();
PageUserStatus userStatus = pageRow.getUserInfosStatus();
render(target, pageStatus, userStatus);
return target.toString();
}
use of org.olat.modules.portfolio.PageUserStatus in project OpenOLAT by OpenOLAT.
the class PageMetadataController method syncUserInfosStatus.
private void syncUserInfosStatus() {
PageStatus status = page.getPageStatus();
PageUserStatus userStatus = pageUserInfos.getStatus();
if ((status == PageStatus.inRevision || status == PageStatus.published) && (userStatus == null || userStatus == PageUserStatus.incoming)) {
pageUserInfos.setStatus(PageUserStatus.inProcess);
} else if ((status == PageStatus.closed || status == PageStatus.deleted) && (userStatus != PageUserStatus.done)) {
pageUserInfos.setStatus(PageUserStatus.done);
}
pageUserInfos.setRecentLaunch(new Date());
pageUserInfos = portfolioService.updatePageUserInfos(pageUserInfos);
}
use of org.olat.modules.portfolio.PageUserStatus in project OpenOLAT by OpenOLAT.
the class SharedPageStatusCellRenderer method renderPageRow.
public String renderPageRow(PageRow pageRow) {
if (pageRow == null || pageRow.getPage() == null)
return "";
StringOutput target = new StringOutput(64);
PageStatus pageStatus = pageRow.getPage().getPageStatus();
PageUserStatus userStatus = pageRow.getUserInfosStatus();
render(target, pageStatus, userStatus);
return target.toString();
}
use of org.olat.modules.portfolio.PageUserStatus in project OpenOLAT by OpenOLAT.
the class SharedPageStatusCellRenderer method renderPortfolioElementRow.
public String renderPortfolioElementRow(PortfolioElementRow elementRow) {
if (elementRow == null || elementRow.getPage() == null)
return "";
StringOutput target = new StringOutput(64);
PageStatus pageStatus = elementRow.getPage().getPageStatus();
PageUserStatus userStatus = elementRow.getUserInfosStatus();
render(target, pageStatus, userStatus);
return target.toString();
}
use of org.olat.modules.portfolio.PageUserStatus in project openolat by klemens.
the class PortfolioServiceImpl method getPageUserInfos.
@Override
public PageUserInformations getPageUserInfos(Page page, Identity identity, PageUserStatus defaultStatus) {
PageUserInformations infos = pageUserInfosDao.getPageUserInfos(page, identity);
if (infos == null) {
PageStatus status = page.getPageStatus();
PageUserStatus userStatus = defaultStatus;
if (status == null || status == PageStatus.draft) {
userStatus = PageUserStatus.incoming;
} else if (status == PageStatus.closed || status == PageStatus.deleted) {
userStatus = PageUserStatus.done;
}
infos = pageUserInfosDao.create(userStatus, page, identity);
}
return infos;
}
Aggregations