SEBSERV-461 fixed
This commit is contained in:
parent
dd9a0381cb
commit
4cc1eca23e
10 changed files with 26 additions and 13 deletions
|
@ -188,7 +188,7 @@ public class ConfigTemplateAttributeForm implements TemplateComposer {
|
|||
new View(-1L, ViewContext.TEMPLATE_VIEW_NAME, 10, 0, templateId),
|
||||
viewName -> null,
|
||||
attributeMapping,
|
||||
1, false, null);
|
||||
1, false, true, null);
|
||||
|
||||
final InputFieldBuilder inputFieldBuilder = this.examConfigurationService.getInputFieldBuilder(
|
||||
attribute.getConfigAttribute(),
|
||||
|
|
|
@ -173,6 +173,7 @@ public class SEBSettingsForm implements TemplateComposer {
|
|||
attributes,
|
||||
30,
|
||||
readonly,
|
||||
false,
|
||||
publishedMessagePanelViewCallback);
|
||||
viewContexts.add(viewContext);
|
||||
|
||||
|
|
|
@ -79,6 +79,7 @@ public interface ExamConfigurationService {
|
|||
* @param attributeMapping The attribute mapping if the properties page
|
||||
* @param rows Number of rows supported for the view.
|
||||
* @param readonly Indicates if the view shall be composed in read-only mode.
|
||||
* @param isTemplate indicates if the view context is related to a configuration template or not
|
||||
* @return ViewContext instance. */
|
||||
ViewContext createViewContext(
|
||||
PageContext pageContext,
|
||||
|
@ -88,7 +89,8 @@ public interface ExamConfigurationService {
|
|||
AttributeMapping attributeMapping,
|
||||
int rows,
|
||||
boolean readonly,
|
||||
Runnable valueChageCallback);
|
||||
boolean isTemplate,
|
||||
Runnable valueChangeCallback);
|
||||
|
||||
Composite createViewGrid(
|
||||
Composite parent,
|
||||
|
|
|
@ -44,7 +44,7 @@ public abstract class AbstractTableFieldBuilder implements InputFieldBuilder {
|
|||
|
||||
private static final Logger log = LoggerFactory.getLogger(AbstractTableFieldBuilder.class);
|
||||
|
||||
private static final int ROW_HEIGHT = 20;
|
||||
private static final int ROW_HEIGHT = 30;
|
||||
private static final int NAV_HEIGHT = 40;
|
||||
private static final int TABLE_WIDTH_SPACE = 50;
|
||||
|
||||
|
@ -65,7 +65,11 @@ public abstract class AbstractTableFieldBuilder implements InputFieldBuilder {
|
|||
this.inputFieldBuilderSupplier = inputFieldBuilderSupplier;
|
||||
}
|
||||
|
||||
protected Table createTable(final Composite parent, final TableContext tableContext) {
|
||||
protected Table createTable(
|
||||
final Composite parent,
|
||||
final TableContext tableContext,
|
||||
final boolean isTemplate) {
|
||||
|
||||
final Table table = new Table(parent, SWT.NONE | SWT.V_SCROLL);
|
||||
table.setLayout(new GridLayout());
|
||||
final GridData gridData = new GridData(
|
||||
|
@ -74,7 +78,7 @@ public abstract class AbstractTableFieldBuilder implements InputFieldBuilder {
|
|||
tableContext.orientation.width(),
|
||||
tableContext.orientation.height());
|
||||
|
||||
gridData.heightHint = tableContext.orientation.height() * ROW_HEIGHT + NAV_HEIGHT;
|
||||
gridData.heightHint = (isTemplate ? 15 : tableContext.orientation.height()) * ROW_HEIGHT + NAV_HEIGHT;
|
||||
table.setLayoutData(gridData);
|
||||
table.setHeaderVisible(true);
|
||||
table.addListener(SWT.Resize, event -> adaptColumnWidth(table, tableContext));
|
||||
|
|
|
@ -78,7 +78,7 @@ public class CompositeTableFieldBuilder extends AbstractTableFieldBuilder {
|
|||
|
||||
final I18nSupport i18nSupport = viewContext.getI18nSupport();
|
||||
final TableContext tableContext = createTableContext(attribute, viewContext);
|
||||
final Table table = createTable(parent, tableContext);
|
||||
final Table table = createTable(parent, tableContext, viewContext.isTemplate);
|
||||
|
||||
final String resources = attribute.getResources();
|
||||
final String[] columnsAndRows = StringUtils.split(
|
||||
|
|
|
@ -184,7 +184,8 @@ public class ExamConfigurationServiceImpl implements ExamConfigurationService {
|
|||
final AttributeMapping attributeMapping,
|
||||
final int rows,
|
||||
final boolean readonly,
|
||||
final Runnable valueChageCallback) {
|
||||
final boolean isTemplate,
|
||||
final Runnable valueChangeCallback) {
|
||||
|
||||
return new ViewContext(
|
||||
configuration,
|
||||
|
@ -197,9 +198,10 @@ public class ExamConfigurationServiceImpl implements ExamConfigurationService {
|
|||
this.restService,
|
||||
this.jsonMapper,
|
||||
this.valueChangeRules,
|
||||
valueChageCallback),
|
||||
valueChangeCallback),
|
||||
this.widgetFactory.getI18nSupport(),
|
||||
readonly);
|
||||
readonly,
|
||||
isTemplate);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -76,7 +76,7 @@ public class TableFieldBuilder extends AbstractTableFieldBuilder {
|
|||
final ViewContext viewContext) {
|
||||
|
||||
final TableContext tableContext = createTableContext(attribute, viewContext);
|
||||
final Table table = createTable(parent, tableContext);
|
||||
final Table table = createTable(parent, tableContext, viewContext.isTemplate);
|
||||
|
||||
for (final ConfigurationAttribute columnAttribute : tableContext.getColumnAttributes()) {
|
||||
final TableColumn column = this.widgetFactory.tableColumnLocalized(
|
||||
|
|
|
@ -48,6 +48,7 @@ public final class ViewContext {
|
|||
final ValueChangeListener valueChangeListener;
|
||||
final I18nSupport i18nSupport;
|
||||
final boolean readonly;
|
||||
final boolean isTemplate;
|
||||
|
||||
ViewContext(
|
||||
final Configuration configuration,
|
||||
|
@ -57,7 +58,8 @@ public final class ViewContext {
|
|||
final AttributeMapping attributeContext,
|
||||
final ValueChangeListener valueChangeListener,
|
||||
final I18nSupport i18nSupport,
|
||||
final boolean readonly) {
|
||||
final boolean readonly,
|
||||
final boolean isTemplate) {
|
||||
|
||||
Objects.requireNonNull(configuration);
|
||||
Objects.requireNonNull(view);
|
||||
|
@ -74,6 +76,7 @@ public final class ViewContext {
|
|||
this.valueChangeListener = valueChangeListener;
|
||||
this.i18nSupport = i18nSupport;
|
||||
this.readonly = readonly;
|
||||
this.isTemplate = isTemplate;
|
||||
}
|
||||
|
||||
public boolean isReadonly() {
|
||||
|
|
|
@ -132,7 +132,7 @@ public class InlineTableConverter implements AttributeValueConverter {
|
|||
value.configurationId,
|
||||
configurationAttribute.id,
|
||||
0,
|
||||
val[1]);
|
||||
val.length > 1 ? val[1] : null);
|
||||
|
||||
if (xml) {
|
||||
attributeValueConverter.convertToXML(
|
||||
|
|
|
@ -813,7 +813,8 @@ sebserver.exam.delete.report.list.empty=No dependencies will be deleted.
|
|||
sebserver.exam.proctoring.actions.open=Proctoring Settings
|
||||
sebserver.exam.proctoring.form.title=Exam Proctoring Settings
|
||||
sebserver.exam.proctoring.form.info.title=Remote Proctoring
|
||||
sebserver.exam.proctoring.form.sebserver.exam.proctoring.form.enabled=Proctoring enabled
|
||||
sebserver.exam.proctoring.form.info=This allows to integrate a supported external proctoring service.<br/>To integrate Jitsi Meet, JWT based authentication must be enabled.<br/>To integrate Zoom a Zoom higher-plan account is needed and also JWT based authentication.
|
||||
sebserver.exam.proctoring.form.enabled=Proctoring enabled
|
||||
sebserver.exam.proctoring.form.enabled.tooltip=Indicates whether the exam proctoring feature is enabled for this exam or not.
|
||||
sebserver.exam.proctoring.form.type=Type
|
||||
sebserver.exam.proctoring.form.type.tooltip=The type and server type of the external proctoring service.
|
||||
|
|
Loading…
Reference in a new issue