aboutsummaryrefslogtreecommitdiff
path: root/lib/extern
diff options
context:
space:
mode:
authorJan-Hendrik Willms <tleilax+studip@gmail.com>2022-07-06 08:26:01 +0000
committerDavid Siegfried <david.siegfried@uni-vechta.de>2022-07-06 08:26:01 +0000
commitac094fbcb004c36e88a61f54f9cbd3139c05a3cb (patch)
tree6c99906471c2d8de03e8a3b4b91900ac7966177b /lib/extern
parent3d3bb7e2227aeb01f89569e037f50419e6ed0d66 (diff)
Fix miscellaneous errors, fixes #1276
Closes #1276 Merge request studip/studip!782
Diffstat (limited to 'lib/extern')
-rw-r--r--lib/extern/elements/ExternElementLinkInternSimple.class.php11
-rw-r--r--lib/extern/modules/views/ExternSemLectureTree.class.php14
2 files changed, 12 insertions, 13 deletions
diff --git a/lib/extern/elements/ExternElementLinkInternSimple.class.php b/lib/extern/elements/ExternElementLinkInternSimple.class.php
index 1d3ecc7..d476507 100644
--- a/lib/extern/elements/ExternElementLinkInternSimple.class.php
+++ b/lib/extern/elements/ExternElementLinkInternSimple.class.php
@@ -70,8 +70,6 @@ class ExternElementLinkInternSimple extends ExternElement {
function toStringEdit ($post_vars = "", $faulty_values = "",
$edit_form = "", $anker = "") {
global $EXTERN_MODULE_TYPES;
- $out = "";
- $table = "";
if ($edit_form == "") {
$edit_form = new ExternEditModule($this->config, $post_vars, $faulty_values, $anker);
}
@@ -95,11 +93,12 @@ class ExternElementLinkInternSimple extends ExternElement {
if (is_array($configs) && count($configs)) {
$module_name = $EXTERN_MODULE_TYPES[$this->link_module_type]["module"];
$values = array_keys($configs[$module_name]);
- unset($names);
- foreach ($configs[$module_name] as $config)
+
+ $names = [];
+ foreach ($configs[$module_name] as $config) {
$names[] = $config["name"];
- }
- else {
+ }
+ } else {
$values = [];
$names = [];
}
diff --git a/lib/extern/modules/views/ExternSemLectureTree.class.php b/lib/extern/modules/views/ExternSemLectureTree.class.php
index 6ea8afa..02820e8 100644
--- a/lib/extern/modules/views/ExternSemLectureTree.class.php
+++ b/lib/extern/modules/views/ExternSemLectureTree.class.php
@@ -5,11 +5,11 @@
# Lifter010: TODO
class ExternSemLectureTree extends StudipSemTreeViewSimple {
-
+
var $config;
var $param;
var $root_id;
-
+
function __construct(&$config, $start_item_id = "", $sem_number = FALSE)
{
$this->config = $config;
@@ -21,7 +21,7 @@ class ExternSemLectureTree extends StudipSemTreeViewSimple {
$this->start_item_id = ($start_item_id) ? $start_item_id : $this->root_id;
$this->param = "range_id={$this->config->range_id}&module=Semlecturetree&config_id={$this->config->id}&";
-
+
parent::__construct($this->start_item_id, $sem_number);
}
@@ -63,7 +63,7 @@ class ExternSemLectureTree extends StudipSemTreeViewSimple {
}
echo "</table>\n";
}
-
+
function backLink ($item_id) {
if ($item_id != $this->root_id){
echo "<table width=\"100%\" border=\"0\"";
@@ -82,7 +82,7 @@ class ExternSemLectureTree extends StudipSemTreeViewSimple {
}
}
- function showContent ($item_id) {
+ function showContent ($item_id, $num_all_entries = 0) {
echo "<table" . $this->config->getAttributes("TreeLevelName", "table");
echo ">\n<tr><td" . $this->config->getAttributes("TreeLevelName", "td") . ">";
echo "<font" . $this->config->getAttributes("TreeLevelName", "font") . ">";
@@ -115,10 +115,10 @@ class ExternSemLectureTree extends StudipSemTreeViewSimple {
$ret .= $delimiter;
$ret .= htmlReady($this->tree->tree_data[$this->start_item_id]["name"]);
$ret .= "</font></td></tr></table>\n";
-
+
return $ret;
}
-
+
}
?>