diff options
author | Simon Rettberg | 2016-09-01 15:50:05 +0200 |
---|---|---|
committer | Simon Rettberg | 2016-09-01 15:50:05 +0200 |
commit | 9c9439e3892cc9da7a3803c290f766f1f8196e18 (patch) | |
tree | b8fe9c7a38adf4ef4d009899dd30f60dfda3876b /src | |
parent | Pass lecture uuid as SESSION_UUID if applicable (diff) | |
download | vmchooser2-9c9439e3892cc9da7a3803c290f766f1f8196e18.tar.gz vmchooser2-9c9439e3892cc9da7a3803c290f766f1f8196e18.tar.xz vmchooser2-9c9439e3892cc9da7a3803c290f766f1f8196e18.zip |
Support telling server whether we are in exam mode
Diffstat (limited to 'src')
-rw-r--r-- | src/command_line_options.cpp | 4 | ||||
-rw-r--r-- | src/main.cpp | 13 |
2 files changed, 10 insertions, 7 deletions
diff --git a/src/command_line_options.cpp b/src/command_line_options.cpp index bb894ce..9b00080 100644 --- a/src/command_line_options.cpp +++ b/src/command_line_options.cpp @@ -11,6 +11,7 @@ CommandLineOptions::CommandLineOptions(int argc, char * const argv[]) { {"config", required_argument, NULL, 'c'}, {"debug", no_argument, NULL, 'D'}, {"default", required_argument, NULL, 'd'}, + {"exam-mode", no_argument, NULL, 'exms'}, {"fullscreen", no_argument, NULL, 'F'}, {"file", required_argument, NULL, 'f'}, {"help", no_argument, NULL, 'h'}, @@ -51,6 +52,9 @@ CommandLineOptions::CommandLineOptions(int argc, char * const argv[]) { case 'F': options.insert("fullscreen", "fullscreen"); break; + case 'exms': + options.insert("exam-mode", "yo"); + break; case 'f': options.insert("file", optarg); break; diff --git a/src/main.cpp b/src/main.cpp index 1afd052..3cf589f 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -39,6 +39,7 @@ int main(int argc, char *argv[]) { " -c, --config alternative config file\n" " -l, --locations location id(s), space separated\n" " --location-mode how to treat entries for this location (IGNORE, BUMP or EXCLUSIVE)\n" + " --exam-mode enable exam mode\n" " -P, --pool one or more pool names to display (comma separated)\n" " -f, --file direct boot .desktop file\n" " -x, --xpath path of X Session .desktop files\n" @@ -264,7 +265,11 @@ int main(int argc, char *argv[]) { SLOT(addSessionsAfterDownload(QNetworkReply*))); // read xml and add items later - httpxmldownloader.makeRequest(urlBase + "list.php", locationIds); + if (cmdOptions.contains("exam-mode")) { + httpxmldownloader.makeRequest(urlBase + "list.php?exams=exam-mode", locationIds); + } else { + httpxmldownloader.makeRequest(urlBase + "list.php", locationIds); + } /* DOWNLOAD NEWS */ HttpXmlDownloader news_downloader; @@ -297,12 +302,6 @@ int main(int argc, char *argv[]) { w.addItems(xsessions, 0); } - QSettings SLXsettings(OPENSLXCONFIG, QSettings::NativeFormat); - if (SLXsettings.contains("SLX_BENCHMARK_VM")) { - QString vm = SLXsettings.value("SLX_BENCHMARK_VM").toString(); - vm.remove('\''); - w.startSession(vm); - } w.show(); if (autostart_uuid != "") { |