Skip to content
Snippets Groups Projects
Commit 399bef1c authored by srosse's avatar srosse
Browse files

Merge remote-tracking branch 'origin/OpenOLAT_14.2'

parents 1861d1fd dae92084
No related branches found
No related tags found
No related merge requests found
......@@ -105,6 +105,7 @@ public class DailyLectureBlockOverviewController extends FormBasicController {
private final Formatter formatter;
private final boolean isAdministrativeUser;
private final boolean authorizedAbsenceEnabled;
private final boolean dailyRecordingEnabled;
private final Identity profiledIdentity;
private final LecturesSecurityCallback secCallback;
private final RollCallSecurityCallback rollCallSecCallback;
......@@ -134,6 +135,7 @@ public class DailyLectureBlockOverviewController extends FormBasicController {
Roles roles = ureq.getUserSession().getRoles();
isAdministrativeUser = securityModule.isUserAllowedAdminProps(roles);
authorizedAbsenceEnabled = lectureModule.isAuthorizedAbsenceEnabled();
dailyRecordingEnabled = lectureModule.getDailyRollCall() == DailyRollCall.daily;
initForm(ureq);
loadModel();
......@@ -187,7 +189,7 @@ public class DailyLectureBlockOverviewController extends FormBasicController {
toolsCol.setSortable(false);
columnsModel.addFlexiColumnModel(toolsCol);
tableModel = new DailyLectureBlockTableModel(columnsModel, getLocale());
tableModel = new DailyLectureBlockTableModel(columnsModel, getLocale(), dailyRecordingEnabled);
tableEl = uifactory.addTableElement(getWindowControl(), "table", tableModel, 20, false, getTranslator(), formLayout);
FlexiTableSortOptions sortOptions = new FlexiTableSortOptions();
sortOptions.setDefaultOrderBy(new SortKey(BlockCols.times.name(), true));
......
......@@ -46,10 +46,12 @@ public class DailyLectureBlockTableModel extends DefaultFlexiTreeTableDataModel<
implements SortableFlexiTableDataModel<DailyLectureBlockRow> {
private final Locale locale;
private final boolean dailyRecordingEnabled;
public DailyLectureBlockTableModel(FlexiTableColumnModel columnModel, Locale locale) {
public DailyLectureBlockTableModel(FlexiTableColumnModel columnModel, Locale locale, boolean dailyRecordingEnabled) {
super(columnModel);
this.locale = locale;
this.dailyRecordingEnabled = dailyRecordingEnabled;
}
@Override
......@@ -114,7 +116,7 @@ implements SortableFlexiTableDataModel<DailyLectureBlockRow> {
switch(BlockCols.values()[col]) {
case times: return row.getLectureBlock();
case tools: return row.getTools();
case details: return Boolean.TRUE;
case details: return Boolean.valueOf(dailyRecordingEnabled);
default: return null;
}
}
......@@ -130,20 +132,22 @@ implements SortableFlexiTableDataModel<DailyLectureBlockRow> {
case numOfAbsences: return row.getNumOfAbsences();
case warnings:
case alerts: return row.getLectureBlockBlockStatistics();
case details: {
Date end = row.getLectureBlock().getEndDate();
Date start = row.getLectureBlock().getStartDate();
Date now = new Date();
return end.before(new Date()) || (row.isIamTeacher() && start.compareTo(now) <= 0);
}
case details: return allowDetails(row);
case tools: return row.getTools();
default: return "ERROR";
}
}
private boolean allowDetails(DailyLectureBlockRow row) {
Date end = row.getLectureBlock().getEndDate();
Date start = row.getLectureBlock().getStartDate();
Date now = new Date();
return end.before(new Date()) || (row.isIamTeacher() && start.compareTo(now) <= 0);
}
@Override
public DefaultFlexiTableDataModel<DailyLectureBlockRow> createCopyWithEmptyList() {
return new DailyLectureBlockTableModel(getTableColumnModel(), locale);
return new DailyLectureBlockTableModel(getTableColumnModel(), locale, dailyRecordingEnabled);
}
public enum BlockCols implements FlexiSortableColumnDef {
......
......@@ -97,7 +97,13 @@
## // try a second time to prevent destroying after a reload
setTimeout(function() {
if(jQuery('#$r.getId("o_vid")').length == 0) {
player.remove();
try {
player.setMuted(true);
player.pause();
player.remove();
} catch(e) {
if(window.console) console.log(e);
}
}
}, 500);
}
......
......@@ -12,17 +12,88 @@
visibility: visible;
}
.tooltip.top {
margin-top: -3px;
padding: 5px 0;
}
.tooltip.right {
margin-top: 3px;
padding: 0 5px;
}
.tooltip.bottom {
margin-top: 3px;
padding: 5px 0 0 0;
}
.tooltip.left {
margin-top: -3px;
padding: 0 5px;
}
.tooltip.top .tooltip-arrow {
bottom: 0;
left: 50%;
margin-left: -5px;
border-width: 5px 5px 0;
border-top-color: #aaa;
}
.tooltip.top-left .tooltip-arrow {
bottom: 0;
right: 5px;
margin-bottom: -5px;
border-width: 5px 5px 0;
border-top-color: #aaa;
}
.tooltip.top-right .tooltip-arrow {
bottom: 0;
left: 5px;
margin-bottom: -5px;
border-width: 5px 5px 0;
border-top-color: #aaa;
}
.tooltip.right .tooltip-arrow {
top: 50%;
left: 0;
margin-top: -5px;
border-width: 5px 5px 5px 0;
border-right-color: #aaa;
}
.tooltip.left .tooltip-arrow {
top: 50%;
right: 0;
margin-top: -5px;
border-width: 5px 0 5px 5px;
border-left-color: #aaa;
}
.tooltip.bottom .tooltip-arrow {
top: 0;
left: 50%;
margin-left: -5px;
border-width: 0 5px 5px;
border-bottom-color: #aaa;
top: 0;
left: 50%;
margin-left: -5px;
border-width: 0 5px 5px;
border-bottom-color: #aaa;
}
.tooltip.bottom-left .tooltip-arrow {
top: 0;
right: 5px;
margin-top: -5px;
border-width: 0 5px 5px;
border-bottom-color: #aaa;
}
.tooltip.bottom-right .tooltip-arrow {
top: 0;
left: 5px;
margin-top: -5px;
border-width: 0 5px 5px;
border-bottom-color: #aaa;
}
.tooltip-inner {
......
......@@ -190,7 +190,7 @@ function o_tm_addExtToolTip(glossaryMainTerm, highlightString, occurrence){
//bootstrap tooltip
html: true,
container:'body',
placement: 'bottom',
placement: 'auto bottom',
title: function() {
var elem = jQuery(this);
jQuery.ajax(glossUrl).always(function(data, textStatus, jqXHR) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment