fixed minor bugs, sorting chapters and docu

This commit is contained in:
anhefti 2020-04-29 11:02:38 +02:00
parent 274c7238f8
commit d1830f74b0
6 changed files with 34 additions and 14 deletions

View file

@ -26,7 +26,7 @@ filter use the clear symbol right to the lens symbol. See :ref:`gui-label` for m
.. image:: images/exam_config/list.png
:align: center
:target: https://raw.githubusercontent.com/SafeExamBrowser/seb-server/master/docs/exam_config/list.png
:target: https://raw.githubusercontent.com/SafeExamBrowser/seb-server/master/docs/images/exam_config/list.png
To view details of a specific exam configuration either double-click on a list entry or select a list entry and use the "View Exam Configuration"
action from the right action pane. In the detail view all general settings are shown and also a list of exams that uses this exam configuration.
@ -46,7 +46,7 @@ is assigned to an exam the status changes automatically to "In Use" and the SEB
.. image:: images/exam_config/view.png
:align: center
:target: https://raw.githubusercontent.com/SafeExamBrowser/seb-server/master/docs/exam_config/view.png
:target: https://raw.githubusercontent.com/SafeExamBrowser/seb-server/master/docs/images/exam_config/view.png
An exam configuration has a general settings part (like other domain objects has within SEB Server) that defines the name, description and status
of the exam configuration that are used to maintain the exam configurations SEB Server internally. And a exam configuration has, separated from
@ -64,7 +64,7 @@ while also publish them to exams that uses this exam configuration.
.. image:: images/exam_config/settings.png
:align: center
:target: https://raw.githubusercontent.com/SafeExamBrowser/seb-server/master/docs/exam_config/settings.png
:target: https://raw.githubusercontent.com/SafeExamBrowser/seb-server/master/docs/images/exam_config/settings.png
.. note::
Changes in SEB settings must be published to be available on exports, exams or other uses. Before publishing they are not
@ -93,7 +93,7 @@ of the exam configuration. The key will be presented by a pop-up dialog where it
.. image:: images/exam_config/settings.png
:align: center
:target: https://raw.githubusercontent.com/SafeExamBrowser/seb-server/master/docs/exam_config/config_key.png
:target: https://raw.githubusercontent.com/SafeExamBrowser/seb-server/master/docs/images/exam_config/config_key.png
Use Cases
@ -225,8 +225,6 @@ SEB Setting Differences
In the current version (1.0) of SEB Server, there are some differences to some SEB settings and also some SEB settings that are currently not
available on the SEB Server.
**SEB settings currently not supported by the SEB Server**
- Start URL: Since SEB Server has already been contacted by a SEB client when downloading the exam configuration this is not used by the exam configuration on SEB Server. But this can be used as fallback URL in the Client Configuration.

View file

@ -8,12 +8,16 @@ an exam from the one of the available courses from a LMS that has been setup to
If you don't have already set up a LMS binding within SEB Server and your institution, you have to do this first.
More information about setting up a LMS binding can be found in the chapter :ref:`lms-setup-label`
You can find the list of available courses provided form all LMS that are bound within your instituion by going to the "Exam Administration"
You will find the list of available courses provided form all LMS that are bound within your institution by going to the "Exam Administration"
section on the left hand side and choosing "LMS Exam Lookup". The SEB Server will present you the list of all available courses and you
are able to filter and sort the list as usual to find to right course for import.
.. image:: images/exam/lmsExamLookup.png
:align: center
:target: https://raw.githubusercontent.com/SafeExamBrowser/seb-server/master/docs/exam/lmsExamLookup.png
:target: https://raw.githubusercontent.com/SafeExamBrowser/seb-server/master/docs/images/exam/lmsExamLookup.png
You can view more details of a course by double-click on the specific list entry or by selecting the list entry and click the "Show LMS Exam Details"
action form the action pain on the right hand side. The application will open a pop-up with available detail information of the course.
To import a specific course as an exam find the specific course on the list by using the filter and select the list entry. Use the "Import As Exam"

Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 KiB

After

Width:  |  Height:  |  Size: 49 KiB

View file

@ -8,22 +8,31 @@
package ch.ethz.seb.sebserver.gbl.model.exam;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import org.apache.commons.lang3.ObjectUtils;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import ch.ethz.seb.sebserver.gbl.util.Utils;
@JsonIgnoreProperties(ignoreUnknown = true)
public final class Chapters {
public static final String ATTR_CHAPTERS = "chapters";
public final Collection<Chapter> chapters;
public final List<Chapter> chapters;
@JsonCreator
public Chapters(@JsonProperty(ATTR_CHAPTERS) final Collection<Chapter> chapters) {
this.chapters = chapters;
final List<Chapter> c = (chapters != null) ? new ArrayList<>(chapters) : new ArrayList<>();
Collections.sort(c);
this.chapters = Utils.immutableListOf(c);
}
public Collection<Chapter> getChapters() {
@ -40,7 +49,7 @@ public final class Chapters {
}
@JsonIgnoreProperties(ignoreUnknown = true)
public static final class Chapter {
public static final class Chapter implements Comparable<Chapter> {
public static final String ATTR_NAME = "name";
public static final String ATTR_ID = "id";
@ -76,6 +85,14 @@ public final class Chapters {
return builder.toString();
}
@Override
public int compareTo(final Chapter o) {
if (o == null) {
return -1;
}
return ObjectUtils.compare(this.name, o.name);
}
}
}

View file

@ -332,7 +332,7 @@ public class QuizLookupList implements TemplateComposer {
() -> FormBuilder.text(
QuizData.QUIZ_ATTR_INSTITUTION_ID,
QUIZ_DETAILS_INSTITUTION_TEXT_KEY,
institutionNameFunction.apply(quizData.getModelId())))
institutionNameFunction.apply(String.valueOf(quizData.institutionId))))
.addField(FormBuilder.singleSelection(
QuizData.QUIZ_ATTR_LMS_SETUP_ID,
QUIZ_DETAILS_LMS_TEXT_KEY,

View file

@ -212,8 +212,9 @@ final class MockupLmsAPITemplate implements LmsAPITemplate {
final String _externalStartURI =
this.webserviceInfo.getHttpScheme() +
"://" + externalAddressAlias + "/api/";
if (log.isDebugEnabled()) {
log.debug("Use external address for course access: {}", _externalStartURI);
if (log.isTraceEnabled()) {
log.trace("Use external address for course access: {}", _externalStartURI);
}
return new QuizData(