From 0094f7ee7360495be230d3476ed90d0afd331b9c Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Wed, 21 Apr 2021 16:06:29 +0200 Subject: [dozmod] Add checkbox for "allow student download" --- modules-available/dozmod/lang/de/template-tags.json | 2 ++ modules-available/dozmod/lang/en/template-tags.json | 2 ++ modules-available/dozmod/pages/runtimeconfig.inc.php | 6 +++++- modules-available/dozmod/templates/runtimeconfig.html | 8 ++++++++ 4 files changed, 17 insertions(+), 1 deletion(-) diff --git a/modules-available/dozmod/lang/de/template-tags.json b/modules-available/dozmod/lang/de/template-tags.json index 6469d16a..8f8b06e1 100644 --- a/modules-available/dozmod/lang/de/template-tags.json +++ b/modules-available/dozmod/lang/de/template-tags.json @@ -5,6 +5,8 @@ "lang_addShare": "Netzlaufwerk hinzuf\u00fcgen", "lang_allowLoginByDefault": "Login standardm\u00e4\u00dfig erlauben", "lang_allowLoginDescription": "Wenn diese Option aktiviert ist, k\u00f6nnen sich alle Mitarbeiter der Einrichtung \u00fcber die bwLehrpool-Suite anmelden und VMs\/Veranstaltungen verwalten. Wenn Sie diese Option deaktivieren, m\u00fcssen Sie in der Untersektion \"Benutzer und Berechtigungen\" jeden Benutzer nach dem ersten Loginversuch manuell freischalten.", + "lang_allowStudentDownload": "Studenten den Download lizenzfreier VMs erlauben", + "lang_allowStudentDownloadDescription": "Wenn diese Option aktiviert ist, k\u00f6nnen Studenten alle VMs herunterladen, bei denen beim Upload der Haken \"enth\u00e4lt lizenzpflichtige Software\" nicht gesetzt wurde. Es liegt hier in der Verantwortung der VM-Ersteller, diesen Haken nur unter entsprechenden Umst\u00e4nden zu entfernen.", "lang_asteriskRequired": "Felder mit (*) sind erforderlich", "lang_authMethod": "Authentifizierung", "lang_blockCount": "Anzahl Bl\u00f6cke", diff --git a/modules-available/dozmod/lang/en/template-tags.json b/modules-available/dozmod/lang/en/template-tags.json index b4a1d9e8..c052551c 100644 --- a/modules-available/dozmod/lang/en/template-tags.json +++ b/modules-available/dozmod/lang/en/template-tags.json @@ -5,6 +5,8 @@ "lang_addShare": "Add Network Share", "lang_allowLoginByDefault": "Allow all staff members to login and use the bwLehrpool-Suite", "lang_allowLoginDescription": "If this option is enabled, all members of the organization marked as staff or employee are allowed to login to this server and manage VMs\/courses. Otherwise, new users need to be individually allowed access after their first login attempt by visiting the sub page \"users and permissions\" in this web interface.", + "lang_allowStudentDownload": "Allow students to download license-free VMs", + "lang_allowStudentDownloadDescription": "If enabled, students can download all VMs that don't have the \"contains software subject to licensing\" checkbox enabled (to be set when uploading a new VM). The author of a VM is responsible for only removing that checkbox for applicable VMs.", "lang_asteriskRequired": "Fields marked with (*) are required", "lang_authMethod": "Authentication", "lang_blockCount": "Block count", diff --git a/modules-available/dozmod/pages/runtimeconfig.inc.php b/modules-available/dozmod/pages/runtimeconfig.inc.php index ab8500f2..50023414 100644 --- a/modules-available/dozmod/pages/runtimeconfig.inc.php +++ b/modules-available/dozmod/pages/runtimeconfig.inc.php @@ -31,7 +31,8 @@ class SubPage 'maxTransfers' => array('min' => 1, 'max' => 10), ], 'bool' => [ - 'allowLoginByDefault' => array('default' => false) + 'allowLoginByDefault' => array('default' => false), + 'allowStudentDownload' => array('default' => false), ], ]; foreach ($params as $type => $list) { @@ -103,6 +104,9 @@ class SubPage if ($runtimeConf['allowLoginByDefault']) { $runtimeConf['allowLoginByDefault'] = 'checked'; } + if ($runtimeConf['allowStudentDownload']) { + $runtimeConf['allowStudentDownload'] = 'checked'; + } if (isset($runtimeConf['serverSideCopy'])) { $runtimeConf[$runtimeConf['serverSideCopy'] . '_selected'] = 'selected'; } diff --git a/modules-available/dozmod/templates/runtimeconfig.html b/modules-available/dozmod/templates/runtimeconfig.html index 44fb4106..0033d60a 100644 --- a/modules-available/dozmod/templates/runtimeconfig.html +++ b/modules-available/dozmod/templates/runtimeconfig.html @@ -107,6 +107,14 @@

{{lang_allowLoginDescription}}


+
+ + +

{{lang_allowStudentDownloadDescription}}

+
+