use of org.olat.modules.lecture.model.LectureBlockRow in project OpenOLAT by OpenOLAT.
the class TeacherToolOverviewController method getRows.
@Override
protected List<LectureBlockRow> getRows(LecturesBlockSearchParameters searchParams) {
List<LectureBlock> blocksWithTeachers = lectureService.getLectureBlocks(getIdentity(), searchParams);
List<LectureBlockRow> rows = new ArrayList<>(blocksWithTeachers.size());
for (LectureBlock block : blocksWithTeachers) {
RepositoryEntry entry = block.getEntry();
rows.add(new LectureBlockRow(block, entry.getDisplayname(), entry.getExternalRef(), "", true));
}
return rows;
}
use of org.olat.modules.lecture.model.LectureBlockRow in project OpenOLAT by OpenOLAT.
the class TeacherOverviewController method getRows.
@Override
protected List<LectureBlockRow> getRows(LecturesBlockSearchParameters searchParams) {
Identity filterByTeacher = ((Boolean) allTeachersSwitch.getUserObject()).booleanValue() ? null : getIdentity();
List<LectureBlockWithTeachers> blocksWithTeachers = lectureService.getLectureBlocksWithTeachers(entry, filterByTeacher, searchParams);
// only show the start button if
List<LectureBlockRow> rows = new ArrayList<>(blocksWithTeachers.size());
if (ConfigurationHelper.isRollCallEnabled(entryConfig, lectureModule)) {
for (LectureBlockWithTeachers blockWithTeachers : blocksWithTeachers) {
LectureBlock block = blockWithTeachers.getLectureBlock();
StringBuilder teachers = new StringBuilder(32);
List<Identity> teacherList = blockWithTeachers.getTeachers();
String separator = translate("user.fullname.separator");
for (Identity teacher : blockWithTeachers.getTeachers()) {
if (teachers.length() > 0)
teachers.append(" ").append(separator).append(" ");
teachers.append(userManager.getUserDisplayName(teacher));
}
rows.add(new LectureBlockRow(block, entry.getDisplayname(), entry.getExternalRef(), teachers.toString(), teacherList.contains(getIdentity())));
}
}
return rows;
}
use of org.olat.modules.lecture.model.LectureBlockRow in project openolat by klemens.
the class LectureListRepositoryController method loadModel.
private void loadModel() {
List<LectureBlockWithTeachers> blocks = lectureService.getLectureBlocksWithTeachers(entry);
List<LectureBlockRow> rows = new ArrayList<>(blocks.size());
for (LectureBlockWithTeachers block : blocks) {
LectureBlock b = block.getLectureBlock();
StringBuilder teachers = new StringBuilder();
String separator = translate("user.fullname.separator");
for (Identity teacher : block.getTeachers()) {
if (teachers.length() > 0)
teachers.append(" ").append(separator).append(" ");
teachers.append(userManager.getUserDisplayName(teacher));
}
LectureBlockRow row = new LectureBlockRow(b, entry.getDisplayname(), entry.getExternalRef(), teachers.toString(), false);
rows.add(row);
String linkName = "tools-" + counter++;
FormLink toolsLink = uifactory.addFormLink(linkName, "", null, flc, Link.LINK | Link.NONTRANSLATED);
toolsLink.setIconRightCSS("o_icon o_icon_actions o_icon-lg");
toolsLink.setUserObject(row);
flc.add(linkName, toolsLink);
row.setToolsLink(toolsLink);
}
tableModel.setObjects(rows);
tableEl.reset(true, true, true);
deleteLecturesButton.setVisible(!rows.isEmpty());
}
use of org.olat.modules.lecture.model.LectureBlockRow in project openolat by klemens.
the class TeacherLecturesTableController method loadModel.
protected void loadModel(List<LectureBlockRow> blocks) {
for (LectureBlockRow row : blocks) {
FormLink toolsLink = uifactory.addFormLink("tools_" + (counter++), "tools", "", null, null, Link.NONTRANSLATED);
toolsLink.setIconLeftCSS("o_icon o_icon-lg o_icon_actions");
toolsLink.setUserObject(row);
row.setToolsLink(toolsLink);
}
tableModel.setObjects(blocks);
tableEl.reset(true, true, true);
}
use of org.olat.modules.lecture.model.LectureBlockRow in project openolat by klemens.
the class TeacherOverviewController method getRows.
@Override
protected List<LectureBlockRow> getRows(LecturesBlockSearchParameters searchParams) {
Identity filterByTeacher = ((Boolean) allTeachersSwitch.getUserObject()).booleanValue() ? null : getIdentity();
List<LectureBlockWithTeachers> blocksWithTeachers = lectureService.getLectureBlocksWithTeachers(entry, filterByTeacher, searchParams);
// only show the start button if
List<LectureBlockRow> rows = new ArrayList<>(blocksWithTeachers.size());
if (ConfigurationHelper.isRollCallEnabled(entryConfig, lectureModule)) {
for (LectureBlockWithTeachers blockWithTeachers : blocksWithTeachers) {
LectureBlock block = blockWithTeachers.getLectureBlock();
StringBuilder teachers = new StringBuilder(32);
List<Identity> teacherList = blockWithTeachers.getTeachers();
String separator = translate("user.fullname.separator");
for (Identity teacher : blockWithTeachers.getTeachers()) {
if (teachers.length() > 0)
teachers.append(" ").append(separator).append(" ");
teachers.append(userManager.getUserDisplayName(teacher));
}
rows.add(new LectureBlockRow(block, entry.getDisplayname(), entry.getExternalRef(), teachers.toString(), teacherList.contains(getIdentity())));
}
}
return rows;
}
Aggregations