diff --git a/lib/activities/CoursewareContext.php b/lib/activities/CoursewareContext.php
index 7c83144ad7a9739bbbb02ce49efcdf2d7014daa9..6bee0196ecb7b5b368e0f2d01c5945eaf27e31ca 100755
--- a/lib/activities/CoursewareContext.php
+++ b/lib/activities/CoursewareContext.php
@@ -4,6 +4,9 @@ namespace Studip\Activity;
 
 class CoursewareContext extends Context
 {
+    protected $courseware;
+    protected $context;
+    protected $range_id;
 
     public function __construct($courseware, $observer)
     {
diff --git a/lib/admissionrules/participantrestrictedadmission/ParticipantRestrictedAdmission.class.php b/lib/admissionrules/participantrestrictedadmission/ParticipantRestrictedAdmission.class.php
index 3c88cb34fdeea5261be5e5f4b709e0322025622a..1556db391170cf3406e44e215e955bba2466a6b5 100644
--- a/lib/admissionrules/participantrestrictedadmission/ParticipantRestrictedAdmission.class.php
+++ b/lib/admissionrules/participantrestrictedadmission/ParticipantRestrictedAdmission.class.php
@@ -28,6 +28,8 @@ class ParticipantRestrictedAdmission extends AdmissionRule
 
     public $minimum_timespan_to_distribution_time = 120;
 
+    public $prio_exists = false;
+
 
     // --- OPERATIONS ---
 
diff --git a/lib/calendar/CalendarColumn.class.php b/lib/calendar/CalendarColumn.class.php
index 5e1b9099aa6bc642786103ed3fb0839846586cca..cbaffec052c8cc3c0b0e556de9192772b5b2c949 100644
--- a/lib/calendar/CalendarColumn.class.php
+++ b/lib/calendar/CalendarColumn.class.php
@@ -15,13 +15,15 @@
  * @category    Stud.IP
  */
 
-class CalendarColumn {
+class CalendarColumn
+{
     protected static $number = 0;
     protected $title = "";
     protected $id = "";
     public    $entries = [];
     protected $url = "";
-    protected $grouped    = false;
+    protected $grouped = false;
+    protected $sorted_entries = null;
 
     /**
      * creates instance of type CalendarColumn
diff --git a/lib/calendar/CalendarImport.class.php b/lib/calendar/CalendarImport.class.php
index 605d747bfe69967792d50033d85748a61f0eb456..803a58dd3f29ec7be3b2786941ddf35c9e256116 100644
--- a/lib/calendar/CalendarImport.class.php
+++ b/lib/calendar/CalendarImport.class.php
@@ -25,7 +25,7 @@ class CalendarImport
     private $data;
     private $public_to_private = false;
 
-    public function __construct(&$parser, $data = null)
+    public function __construct(CalendarParser &$parser, $data = null)
     {
         $this->_parser = $parser;
         $this->data = $data;
diff --git a/lib/calendar/CalendarParser.class.php b/lib/calendar/CalendarParser.class.php
index 07e556f2bf161e5e9ceb402caf620c5ec220946f..dac15701961b25f4c9e26b600d572606f0c57c35 100644
--- a/lib/calendar/CalendarParser.class.php
+++ b/lib/calendar/CalendarParser.class.php
@@ -25,6 +25,7 @@ class CalendarParser
     protected $public_to_private = false;
     protected $client_identifier;
     private $time;
+    protected $import_sem = false;
 
     public function __construct()
     {
@@ -91,7 +92,7 @@ class CalendarParser
 
         return false;
     }
-    
+
     private function setProperties($calendar_event, $component)
     {
         $calendar_event->setStart($component['DTSTART']);
@@ -129,4 +130,3 @@ class CalendarParser
         return $this->client_identifier;
     }
 }
-
diff --git a/lib/calendar/CalendarView.class.php b/lib/calendar/CalendarView.class.php
index 0b8f9053f1a34e4c0b74c48e55cb20a5f2809eef..e3bfd0583272e47ccec0cf08630b0617b7fec46c 100644
--- a/lib/calendar/CalendarView.class.php
+++ b/lib/calendar/CalendarView.class.php
@@ -20,7 +20,7 @@
  * Kind of bean class for the calendar view.
  *
  * Example of use:
- * 
+ *
  *  // create a calendar-view and add a column
  *  $plan = new CalendarView();
  *  $plan->addColumn(_('Spalte 1'))
@@ -33,7 +33,7 @@
  *          'content' => 'Die Mathematiker kreiden sich mal wieder was an.'
  *      )
  *  );
- *   
+ *
  *  // display the calendar (containing one column)
  *  print $plan->render();
  *
@@ -53,9 +53,11 @@ class CalendarView
     protected $templates      = [];
     protected $read_only      = false;
 
-    static protected $number_of_instances = 1;
+    protected static $number_of_instances = 1;
     protected $view_id;
 
+    public $sorted_entries = [];
+
 
     /**
      * You need to pass an instance of this class to the template. The constructor
@@ -126,7 +128,7 @@ class CalendarView
     /**
      * adds a new column to this view. All entries created with addEntry will be
      * added to this column.
-     * 
+     *
      * @param string  $title  like "monday" to be displayed on top of the column
      * @param string  $url    to be called when clicked on the title of the column
      * @param string  $id     any kind of id of the column
@@ -142,7 +144,7 @@ class CalendarView
 
 
     /**
-     * adds a new entry to the last current column. The entry needs to be an 
+     * adds a new entry to the last current column. The entry needs to be an
      * associative array with parameters as follows:
      * @param array $entry_array: associative array for an entry in the column like
      * array (
@@ -187,7 +189,7 @@ class CalendarView
      *   column_id: id of the column
      *   hour: integer number from 0 to 23
      * If js_function_object is an empty string, nothing will be done.
-     * 
+     *
      * @param string  $js_function_object  name of js-function or anonymous js-function
      * @return CalendarView
      */
diff --git a/lib/calendar/CalendarWeekView.class.php b/lib/calendar/CalendarWeekView.class.php
index e9455eaec3369359ce138022b2f75a325dbf0b5f..e0d0a6bb77b659a8a5a2feaf4ce3a9fef689ffa0 100644
--- a/lib/calendar/CalendarWeekView.class.php
+++ b/lib/calendar/CalendarWeekView.class.php
@@ -24,9 +24,8 @@
 
 class CalendarWeekView extends CalendarView
 {
-    protected $days       = [1,2,3,4,5];
-    protected static $day_names  = ["Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag","Sonntag"];
-    
+    protected $days = [1,2,3,4,5];
+    protected $context;
 
 
     /**
@@ -64,7 +63,7 @@ class CalendarWeekView extends CalendarView
             $entry_column->groupEntries();
         }
     }
-    
+
     /* * * * * * * * * * * * * * *
      * * *   G E T T E R S   * * *
      * * * * * * * * * * * * * * */
diff --git a/lib/calendar/lib/ErrorHandler.class.php b/lib/calendar/lib/ErrorHandler.class.php
index 710bdd1495033f4f22f48517f888116c5a001cef..390b5d521c019845d70eddc583dbcb11de07e210 100644
--- a/lib/calendar/lib/ErrorHandler.class.php
+++ b/lib/calendar/lib/ErrorHandler.class.php
@@ -34,10 +34,8 @@ class ErrorHandler
 
     public function __construct()
     {
-
         $this->errors = [];
         $this->status = ErrorHandler::ERROR_NORMAL;
-        $this->_is_instantiated = true;
     }
 
     public function getStatus($status = NULL)
@@ -84,7 +82,7 @@ class ErrorHandler
         }
         return $errors;
     }
-    
+
     public function nextError($status)
     {
         if(is_array($this->errors[$status])) {
diff --git a/lib/classes/ContentBar.php b/lib/classes/ContentBar.php
index b610476f2610085f1f36705a34643b6df3d86ea0..043fe1830bb2cc13bcf46f91f915f5f021eccfe4 100644
--- a/lib/classes/ContentBar.php
+++ b/lib/classes/ContentBar.php
@@ -13,7 +13,7 @@ class ContentBar
 {
 
     public $infoText = '';
-    public $iconShape = '';
+    public $icon = '';
     public $toc = null;
     /**
      * ContentBar constructor.
diff --git a/lib/classes/ContentGroupMenu.php b/lib/classes/ContentGroupMenu.php
index dfc0cef6894cd1bbedb0abe6983675027b589d72..7f3ba5c9a2f0fbdf76bf6d06242b603d424b7aa9 100644
--- a/lib/classes/ContentGroupMenu.php
+++ b/lib/classes/ContentGroupMenu.php
@@ -36,6 +36,8 @@ class ContentGroupMenu
     private $label;
     private $aria_label;
 
+    private $attributes = [];
+
 
     /**
      * Private constructur.
diff --git a/lib/classes/DataFieldEntry.class.php b/lib/classes/DataFieldEntry.class.php
index 96aa4e0b732a87d31ca9405ad0e350a43ffa026c..c934e51eb753fcac38e4b65ffea6a951aa5d129c 100644
--- a/lib/classes/DataFieldEntry.class.php
+++ b/lib/classes/DataFieldEntry.class.php
@@ -29,6 +29,7 @@ abstract class DataFieldEntry
     ];
 
     protected $language = '';
+    protected $template = null;
 
     /**
      * Returns all supported datafield types.
diff --git a/lib/classes/DataFieldSelectboxEntry.class.php b/lib/classes/DataFieldSelectboxEntry.class.php
index 3ff6bc75413716ff7c8b6b7c45a4a55b6cfb4e66..8ac1a3c293778b3b9ba99863ab8c30288f4f6c70 100644
--- a/lib/classes/DataFieldSelectboxEntry.class.php
+++ b/lib/classes/DataFieldSelectboxEntry.class.php
@@ -11,6 +11,8 @@
 class DataFieldSelectboxEntry extends DataFieldEntry
 {
     protected $template = 'selectbox.php';
+    protected $type_param;
+    protected $is_assoc_param = false;
 
     /**
      * Constructs this datafield
diff --git a/lib/classes/DatabaseObject.class.php b/lib/classes/DatabaseObject.class.php
index 22e8df2ad6f1ea406858c5f8f754da9b94fe8b95..2258adb4eb6ce15fc3e41e2d8d64899ec46689d2 100644
--- a/lib/classes/DatabaseObject.class.php
+++ b/lib/classes/DatabaseObject.class.php
@@ -47,6 +47,9 @@ define("INSTANCEOF_DATABASEOBJECT", "DatabaseObject");
  */
 class DatabaseObject extends AuthorObject
 {
+    public $authorID;
+    public $objectID;
+    public $rangeID;
 
 # Define constructor and destructor ========================================= #
     /**
diff --git a/lib/classes/MultiPersonSearch.class.php b/lib/classes/MultiPersonSearch.class.php
index 65cad48783ec23b0b8021640e818c49444c53f80..a5b2c1e63a4e6d4ad305fa0c459fb60b2963bdc7 100644
--- a/lib/classes/MultiPersonSearch.class.php
+++ b/lib/classes/MultiPersonSearch.class.php
@@ -403,16 +403,6 @@ class MultiPersonSearch {
         return $this->description;
     }
 
-
-    /**
-     * returns the url of the page where the GUI element is added.
-     *
-     * @return string
-     */
-    public function getPageUrl() {
-        return $this->pageURL;
-    }
-
     /**
      * adds a new quickfilter.
      *
@@ -486,7 +476,6 @@ class MultiPersonSearch {
         $_SESSION['multipersonsearch'][$this->name]['additionalHMTL'] = $this->additionalHMTL;
         $_SESSION['multipersonsearch'][$this->name]['executeURL'] = $this->executeURL;
         $_SESSION['multipersonsearch'][$this->name]['jsFunction'] = $this->jsFunction;
-        $_SESSION['multipersonsearch'][$this->name]['pageURL'] = Request::url();
         $_SESSION['multipersonsearch'][$this->name]['defaultSelectableUsersIDs'] = $this->defaultSelectableUsersIDs;
         $_SESSION['multipersonsearch'][$this->name]['defaultSelectedUsersIDs'] = $this->defaultSelectedUsersIDs;
         $_SESSION['multipersonsearch'][$this->name]['quickfilterIds'] = $this->quickfilterIds;
@@ -505,7 +494,6 @@ class MultiPersonSearch {
         $this->additionalHMTL = $_SESSION['multipersonsearch'][$this->name]['additionalHMTL'];
         $this->executeURL = html_entity_decode($_SESSION['multipersonsearch'][$this->name]['executeURL']);
         $this->jsFunction = $_SESSION['multipersonsearch'][$this->name]['jsFunction'];
-        $this->pageURL = $_SESSION['multipersonsearch'][$this->name]['pageURL'];
         $this->defaultSelectableUsersIDs = $_SESSION['multipersonsearch'][$this->name]['defaultSelectableUsersIDs'];
         $this->defaultSelectedUsersIDs = $_SESSION['multipersonsearch'][$this->name]['defaultSelectedUsersIDs'];
         $this->searchObject = unserialize($_SESSION['multipersonsearch'][$this->name]['searchObject']);
diff --git a/lib/classes/MvvQuickSearch.php b/lib/classes/MvvQuickSearch.php
index 2f55646bebc7583f4087667e78afbb516833a06e..b0e79c03b991b9eeee2d7fa3b8d684e28002ab09 100644
--- a/lib/classes/MvvQuickSearch.php
+++ b/lib/classes/MvvQuickSearch.php
@@ -4,14 +4,14 @@ require_once 'lib/classes/searchtypes/SQLSearch.class.php';
 
 class MvvQuickSearch extends SQLSearch
 {
-    
     private $qs_name;
-    
+    protected $zusatz;
+
     public function __construct($query, $title = '', $avatarLike = '')
     {
         parent::__construct($query, $title, $avatarLike);
     }
-    
+
     public function getResults($input, $contextual_data = [],
             $limit = PHP_INT_MAX, $offset = 0)
     {
@@ -39,18 +39,18 @@ class MvvQuickSearch extends SQLSearch
         }
         return $results;
     }
-    
-    public function getAvatarImageTag($id, $size = Avatar::SMALL, $options = []) 
+
+    public function getAvatarImageTag($id, $size = Avatar::SMALL, $options = [])
     {
         if (!$id) {
             return $this->zusatz;
         }
         return parent::getAvatarImageTag($id, $size = Avatar::SMALL, $options);
     }
-    
+
     public function setQsName($qs_name)
     {
         $this->qs_name = $qs_name;
     }
-    
+
 }
diff --git a/lib/classes/QuickSearch.class.php b/lib/classes/QuickSearch.class.php
index 56bcc77432fd616e9dae29a6b35c4b77b37a8449..e0e57d306a10c8a007f33fbb44272d65ef45175e 100644
--- a/lib/classes/QuickSearch.class.php
+++ b/lib/classes/QuickSearch.class.php
@@ -81,7 +81,6 @@ class QuickSearch
     private $search;            //may be an object or a string
     private $avatarLike;        //like "user_id", "username", "Seminar_id" or stuff
     private $withButton;        //if true, the field will be displayed with a looking-glass-button to click on
-    private $specialBeschriftung;
     private $selectBox = true;
     private $withAttributes = [];
     private $box_width = "233"; //width of the box withButton
@@ -89,6 +88,12 @@ class QuickSearch
     private $autocomplete_disabled = false;
     private $search_button_name;
     private $reset_button_name;
+    private $defaultID = null;
+    private $defaultName = null;
+    private $jsfunction = null;
+    private $inputClass = null;
+    private $inputStyle = null;
+    private $specialQuery = null;
 
     /**
      * Deletes all older requests that have not been used for three hours
diff --git a/lib/classes/SemBrowse.class.php b/lib/classes/SemBrowse.class.php
index 6e32f775ae7c23f21a260563aed27b49942969b8..a6a672a60289be0b9cb94a6bdbbd7c404ee5cb4e 100644
--- a/lib/classes/SemBrowse.class.php
+++ b/lib/classes/SemBrowse.class.php
@@ -22,6 +22,8 @@ class SemBrowse {
     public $group_by_fields = [];
     public $target_url;
     public $target_id;
+    public $classes_show_module;
+    public $classes_show_class;
 
     public function __construct($sem_browse_data_init = [])
     {
diff --git a/lib/classes/StudipRangeTree.class.php b/lib/classes/StudipRangeTree.class.php
index 2dea8a07f1fefb7a363b458a3c4db33a11dc26bd..291d443066192dc03e336b73d5dc4b8e589ad24c 100644
--- a/lib/classes/StudipRangeTree.class.php
+++ b/lib/classes/StudipRangeTree.class.php
@@ -34,13 +34,14 @@
 * @author   André Noack <noack@data-quest.de>
 * @package
 */
-class StudipRangeTree extends TreeAbstract {
-
+class StudipRangeTree extends TreeAbstract
+{
     var $sem_number;
-
     var $sem_status;
-
     var $sem_dates;
+    var $studip_objects = [];
+    var $visible_only;
+    var $entries_init_done = false;
 
     /**
     * constructor
diff --git a/lib/classes/StudipSemRangeTreeViewSimple.class.php b/lib/classes/StudipSemRangeTreeViewSimple.class.php
index 0a78eb2a2fee63a38cc08ee6c45977d48ea2714c..41744bd5ed2bbcf7e5a83f6381a05522fe05be26 100644
--- a/lib/classes/StudipSemRangeTreeViewSimple.class.php
+++ b/lib/classes/StudipSemRangeTreeViewSimple.class.php
@@ -41,6 +41,8 @@ class StudipSemRangeTreeViewSimple {
 
     var $tree;
     var $show_entries;
+    var $start_item_id;
+    var $root_content;
 
     /**
     * constructor
@@ -83,7 +85,7 @@ class StudipSemRangeTreeViewSimple {
                                     formatReady($this->tree->getValue($this->start_item_id, 'name')).
                                     '</div>
                                     <div class="sem_path_text">' .
-                                    
+
                                     formatReady($this->getTooltip($this->start_item_id)) .
                                     '</div>
                                 </div>';
@@ -180,7 +182,7 @@ class StudipSemRangeTreeViewSimple {
     function showContent($item_id){
         echo "\n<div align=\"left\" style=\"margin-top:10px;margin-bottom:10px;font-size:10pt\">";
         if ($item_id != "root"){
-            
+
             if ($num_entries = $this->tree->getNumEntries($item_id)){
                 if ($this->show_entries != "level"){
                     echo "<a " . tooltip(_("alle Einträge auf dieser Ebene anzeigen")) ." href=\"" . URLHelper::getLink($this->getSelf("cmd=show_sem_range_tree&item_id=$item_id")) ."\">";
diff --git a/lib/classes/StudipSemSearch.class.php b/lib/classes/StudipSemSearch.class.php
index 4aef5969cb1bb691588e183cd84417a4cb4e4efa..e12c443140e7d92bcf9dfaf197986bca9937d8ff 100644
--- a/lib/classes/StudipSemSearch.class.php
+++ b/lib/classes/StudipSemSearch.class.php
@@ -36,36 +36,22 @@
 class StudipSemSearch {
 
     var $form;
-
     var $search_result;
-
     var $form_name;
-
-    var $num_sem;
-
     var $sem_tree;
-
     var $range_tree;
-
     var $search_done = false;
-
     var $found_rows = false;
-
     var $search_button_clicked = false;
-
     var $new_search_button_clicked = false;
-
     var $sem_change_button_clicked = false;
-
     var $override_sem = false;
-
     var $attributes_default = ['style' => 'width:100%;'];
-
     var $search_scopes = [];
     var $search_ranges = [];
     var $search_sem_class = 'all';
-
     var $visible_only = false;
+    var $sem_dates;
 
     function __construct($form_name = "search_sem", $auto_search = true, $visible_only = false, $sem_class = 'all'){
 
diff --git a/lib/classes/StudipSemTree.class.php b/lib/classes/StudipSemTree.class.php
index ecdc39377dc081b444db41c3b94eac442ae00cf0..33377975490c86337dd0c2ae335a238851db8615 100644
--- a/lib/classes/StudipSemTree.class.php
+++ b/lib/classes/StudipSemTree.class.php
@@ -19,6 +19,7 @@ class StudipSemTree extends TreeAbstract
     public $sem_number = null;
     public $visible_only = false;
     public $sem_status = [];
+    protected $entries_init_done = false;
 
     /**
     * constructor
diff --git a/lib/classes/StudipSemTreeSearch.class.php b/lib/classes/StudipSemTreeSearch.class.php
index dc3f7c7e73ad1a54d10127276d1bc0082777130f..e79a34fa29efa511a0e902d7c13dbe44a821a12f 100644
--- a/lib/classes/StudipSemTreeSearch.class.php
+++ b/lib/classes/StudipSemTreeSearch.class.php
@@ -36,28 +36,18 @@
 class StudipSemTreeSearch {
 
     var $view;
-
     var $num_search_result = false;
-
     var $num_inserted;
-
     var $num_deleted;
-
     var $form_name;
-
     var $tree;
-
     var $seminar_id;
-
     var $institut_id = [];
-
     var $sem_tree_ranges = [];
-
     var $sem_tree_ids = [];
-
     var $selected = [];
-
     var $search_result = [];
+    var $search_done = false;
 
     function __construct($seminar_id,$form_name = "search_sem_tree", $auto_search = true){
         $this->view = DbView::getView('sem_tree');
diff --git a/lib/classes/StudipSemTreeViewAdmin.class.php b/lib/classes/StudipSemTreeViewAdmin.class.php
index f10f18070e200fc3e09735ce6fd25f11dc6602a0..8644fef216c5fedb1f722013fc49c377294e6e51 100644
--- a/lib/classes/StudipSemTreeViewAdmin.class.php
+++ b/lib/classes/StudipSemTreeViewAdmin.class.php
@@ -42,6 +42,12 @@ use Studip\Button, Studip\LinkButton;
 class StudipSemTreeViewAdmin extends TreeView
 {
     var $admin_ranges = [];
+    var $msg = [];
+    var $marked_item;
+    var $marked_sem;
+    var $mode;
+    var $move_item_id;
+    var $edit_item_id;
 
     /**
     * constructor
diff --git a/lib/classes/StudipSemTreeViewSimple.class.php b/lib/classes/StudipSemTreeViewSimple.class.php
index e2150472b3a649d7547784590ea8a299daf7f300..a78e2178977cd39fd6ccf1e2c4922769968035f0 100644
--- a/lib/classes/StudipSemTreeViewSimple.class.php
+++ b/lib/classes/StudipSemTreeViewSimple.class.php
@@ -39,6 +39,8 @@ class StudipSemTreeViewSimple
 {
     var $tree;
     var $show_entries;
+    var $start_item_id;
+    var $root_content;
 
     /**
     * constructor
diff --git a/lib/classes/TreeView.class.php b/lib/classes/TreeView.class.php
index cc7491f4cbcbdd6f7ee1cd83039a80c7ef81c9fc..2223cc1d8bb286280e72f978097850b822e0deea 100644
--- a/lib/classes/TreeView.class.php
+++ b/lib/classes/TreeView.class.php
@@ -103,6 +103,8 @@ class TreeView {
     * @var  boolean $use_aging
     */
     var $use_aging = false;
+    var $pic_open;
+    var $pic_close;
 
     /**
     * constructor
diff --git a/lib/classes/UserLookup.class.php b/lib/classes/UserLookup.class.php
index 3ee1cd098f6dd2ffa1758cc18fd23e617ea5945e..cef2b4aa5a7bd8f0ef19dbb5c82c2545e0453ef9 100644
--- a/lib/classes/UserLookup.class.php
+++ b/lib/classes/UserLookup.class.php
@@ -192,7 +192,6 @@ class UserLookup
     public function clearFilters()
     {
         $this->filters = [];
-        $this->study_course_filter = [];
         return $this;
     }
 
diff --git a/lib/classes/admission/CourseSet.class.php b/lib/classes/admission/CourseSet.class.php
index e79f4c08c941b635e719c57c1e7b6d0602fa6c8e..054c9506479bc5463dd5424946d1dd2368435af2 100644
--- a/lib/classes/admission/CourseSet.class.php
+++ b/lib/classes/admission/CourseSet.class.php
@@ -70,6 +70,11 @@ class CourseSet
      */
     protected $user_id = false;
 
+    /**
+     * When was the course set changed?
+     */
+    protected $chdate = null;
+
     /*
      * Lists of users who are treated differently on seat distribution
      */
diff --git a/lib/classes/auth_plugins/StudipAuthAbstract.class.php b/lib/classes/auth_plugins/StudipAuthAbstract.class.php
index a21d1513aa08c1cfc15195d50b7bb691a8879d31..f18ecd441ab174df3c5abef042868b227e475445 100644
--- a/lib/classes/auth_plugins/StudipAuthAbstract.class.php
+++ b/lib/classes/auth_plugins/StudipAuthAbstract.class.php
@@ -95,6 +95,8 @@ class StudipAuthAbstract
      */
     private static $plugin_instances;
 
+    private $config_data = [];
+
     /**
      * static method to instantiate and retrieve a reference to an object (singleton)
      *
@@ -474,7 +476,9 @@ class StudipAuthAbstract
      */
     function verifyUsername($username)
     {
-        if ($this->username_case_insensitiv) $username = mb_strtolower($username);
+        if ($this->username_case_insensitiv) {
+            $username = mb_strtolower($username);
+        }
         if ($this->bad_char_regex) {
             return preg_replace($this->bad_char_regex, '', $username);
         } else {
@@ -512,4 +516,25 @@ class StudipAuthAbstract
         $this->error = sprintf(_('Methode %s nicht implementiert!'), get_class($this) . '::isAuthenticated()');
         return false;
     }
+
+    // Store dynamically set dynamically created properties in $config_data
+    public function __isset($offset)
+    {
+        return isset($this->config_data[$offset]);
+    }
+
+    public function __set($offset, $value)
+    {
+        $this->config_data[$offset] = $value;
+    }
+
+    public function __get($offset)
+    {
+        return $this->config_data[$offset] ?? null;
+    }
+
+    public function __unset($offset)
+    {
+        unset($this->config_data[$offset]);
+    }
 }
diff --git a/lib/classes/auth_plugins/StudipAuthCAS.class.php b/lib/classes/auth_plugins/StudipAuthCAS.class.php
index 620f12e19ce211fe2509e13b5d3c170bd20dc5a0..d87aada35294076a48167314743ea8a2638a2ff4 100644
--- a/lib/classes/auth_plugins/StudipAuthCAS.class.php
+++ b/lib/classes/auth_plugins/StudipAuthCAS.class.php
@@ -26,9 +26,6 @@ class StudipAuthCAS extends StudipAuthSSO
 
     /**
      * Constructor
-     *
-     *
-     *
      */
     public function __construct($config = [])
     {
diff --git a/lib/classes/auth_plugins/StudipAuthIP.class.php b/lib/classes/auth_plugins/StudipAuthIP.class.php
index 9c1a1775f61affbe5d39af7e07c4993b53032992..e0d6afa32155e633c1db10be992b155abef93a53 100644
--- a/lib/classes/auth_plugins/StudipAuthIP.class.php
+++ b/lib/classes/auth_plugins/StudipAuthIP.class.php
@@ -8,12 +8,13 @@
  * published by the Free Software Foundation; either version 2 of
  * the License, or (at your option) any later version.
  */
-class StudipAuthIP extends StudipAuthAbstract {
-    
+class StudipAuthIP extends StudipAuthAbstract
+{
     /**
      * {@inheritdoc}
      */
-    function isAuthenticated($username, $password) {
+    function isAuthenticated($username, $password)
+    {
         return $this->allowed_users[$username] && in_array($_SERVER['REMOTE_ADDR'], $this->allowed_users[$username]);
     }
 }
diff --git a/lib/classes/calendar/SingleCalendar.php b/lib/classes/calendar/SingleCalendar.php
index da2987f246ceeca5220847c65036725c0b675c3d..a3a1eaeaeb2f2d6504a11b3461c814a35f50a751 100644
--- a/lib/classes/calendar/SingleCalendar.php
+++ b/lib/classes/calendar/SingleCalendar.php
@@ -47,6 +47,8 @@ class SingleCalendar
      */
     public $end;
 
+    public $ts;
+
     public function __construct($range_id, $start = null, $end = null)
     {
         $this->setRangeObject($range_id);
@@ -1153,7 +1155,7 @@ class SingleCalendar
                     break;
 
                 case 'YEARLY' :
-                    for ($ayear = $this->year - 1; $ayear <= $this->year; $ayear++) {
+                    for ($ayear = $year - 1; $ayear <= $year; $ayear++) {
                         if ($rep['day']) {
                             $lwst = mktime(12, 0, 0, $rep['month'], $rep['day'], $ayear);
                             $hgst = $lwst + $duration * 86400;
diff --git a/lib/classes/helpbar/Helpbar.php b/lib/classes/helpbar/Helpbar.php
index e01ad56746abbc6623c6f66bab1d7bc0264a8718..4725a782b7d524a910236426a6168ca69c38dd5c 100644
--- a/lib/classes/helpbar/Helpbar.php
+++ b/lib/classes/helpbar/Helpbar.php
@@ -12,6 +12,7 @@ class Helpbar extends WidgetContainer
     protected $should_render = true;
     protected $variables = [];
     protected $ignore_db = false;
+    protected $help_admin;
 
     /**
      * Constructs the helpbar
diff --git a/lib/classes/librarysearch/searchmodules/BASELibrarySearch.class.php b/lib/classes/librarysearch/searchmodules/BASELibrarySearch.class.php
index 10f8861cb852ae7e1b146e00b14ee5ac096945a1..e0408e7295267f8e6aa9fd52cbcb4cd078b25f73 100644
--- a/lib/classes/librarysearch/searchmodules/BASELibrarySearch.class.php
+++ b/lib/classes/librarysearch/searchmodules/BASELibrarySearch.class.php
@@ -85,7 +85,7 @@ class BASELibrarySearch extends LibrarySearch
             $query_string .= sprintf('%1$s:(%2$s)', $key, $value);
         }
 
-        $query_parameters = $this->additional_query_parameters;
+        $query_parameters = [];
         $query_parameters['func'] = 'PerformSearch';
         $query_parameters['coll'] = $this->settings['collection']
                                   ? $this->settings['collection']
diff --git a/lib/classes/librarysearch/searchmodules/K10PlusZentralLibrarySearch.class.php b/lib/classes/librarysearch/searchmodules/K10PlusZentralLibrarySearch.class.php
index bb44e8e96fa9c93343dabf4851afce072a588cd5..9660cb4fcb1687bc052ce0f85d4a39b6810b6be8 100644
--- a/lib/classes/librarysearch/searchmodules/K10PlusZentralLibrarySearch.class.php
+++ b/lib/classes/librarysearch/searchmodules/K10PlusZentralLibrarySearch.class.php
@@ -113,7 +113,7 @@ class K10PlusZentralLibrarySearch extends LibrarySearch
             }
         }
 
-        $query_parameters = $this->additional_query_parameters;
+        $query_parameters = [];
         //Special handling for the query parameter:
         $query_parameters['q'] = $query_string;
         if ($order_by = self::ORDER_BY_YEAR) {
diff --git a/lib/classes/librarysearch/searchmodules/SRULibrarySearch.class.php b/lib/classes/librarysearch/searchmodules/SRULibrarySearch.class.php
index 46b73337670cc8f9f69edbed1fb46cce88ea5e16..b94869afc778f92ead171527f9247e95636256be 100644
--- a/lib/classes/librarysearch/searchmodules/SRULibrarySearch.class.php
+++ b/lib/classes/librarysearch/searchmodules/SRULibrarySearch.class.php
@@ -114,7 +114,7 @@ class SRULibrarySearch extends LibrarySearch
             }
         }
 
-        $query_parameters = $this->additional_query_parameters;
+        $query_parameters = [];
         $query_parameters['version'] = '1.1'; //TODO: is version 2.0 supported?
         $query_parameters['operation'] = 'searchRetrieve';
         $query_parameters['recordSchema'] = 'marcxml';
diff --git a/lib/classes/restapi/ConsumerPermissions.php b/lib/classes/restapi/ConsumerPermissions.php
index f8de967d912386730fbc5e4da1feb27fce39bc6f..f0e0f03a0850fe212a0d82bb2f479d4b9321f338 100644
--- a/lib/classes/restapi/ConsumerPermissions.php
+++ b/lib/classes/restapi/ConsumerPermissions.php
@@ -116,7 +116,7 @@ class ConsumerPermissions
 
         unset($this->permissions[$route_id][$method]);
 
-        if (count($this->permission[$route_id]) === 0) {
+        if (count($this->permissions[$route_id]) === 0) {
             unset($this->permissions[$route_id]);
         }
 
diff --git a/lib/classes/restapi/RouteMap.php b/lib/classes/restapi/RouteMap.php
index 18c8f5dafef2f2b287c8f47b297233204b795c1d..62e3278a0b1d5ebb0f7cbe5142112cadda05c603 100644
--- a/lib/classes/restapi/RouteMap.php
+++ b/lib/classes/restapi/RouteMap.php
@@ -162,6 +162,11 @@ use gossi\docblock\Docblock;
  */
 abstract class RouteMap
 {
+    protected $router;
+    protected $route;
+    protected $data = null;
+    protected $response;
+
     /**
      * Internal property which is used by RouteMap::paginated and
      * contains everything about a paginated collection.
diff --git a/lib/classes/restapi/RouterHalt.php b/lib/classes/restapi/RouterHalt.php
index 2ff094e8cbb14ce181754cd158620ea3faa97d22..98c46b44a0439ecf55d64dd90e9a22a053bab97b 100644
--- a/lib/classes/restapi/RouterHalt.php
+++ b/lib/classes/restapi/RouterHalt.php
@@ -9,6 +9,8 @@ namespace RESTAPI;
  */
 class RouterHalt extends \Exception
 {
+    public $response;
+
     public function __construct($response)
     {
         parent::__construct();
diff --git a/lib/classes/restapi/UriTemplate.php b/lib/classes/restapi/UriTemplate.php
index f2e70d3322bc69b1559cd48dfc2f76efb992dc55..e83dd2c1eb04f10678190f2d00276b80738d5be1 100644
--- a/lib/classes/restapi/UriTemplate.php
+++ b/lib/classes/restapi/UriTemplate.php
@@ -10,6 +10,9 @@ namespace RESTAPI;
  */
 class UriTemplate
 {
+    public $uri_template;
+    public $conditions;
+
     public function __construct($uri_template, $conditions = [])
     {
         $this->uri_template = $uri_template;
diff --git a/lib/classes/searchtypes/ResourceSearch.class.php b/lib/classes/searchtypes/ResourceSearch.class.php
index e9030371355114d1d2b454376778781e33fe4b01..24038a84b4e3e9fa673fc6f98d2ae0fe95f64a07 100644
--- a/lib/classes/searchtypes/ResourceSearch.class.php
+++ b/lib/classes/searchtypes/ResourceSearch.class.php
@@ -27,14 +27,14 @@ class ResourceSearch extends SearchType
      * the permission levels specified in this attribute.
      * Defaults to ['user', 'autor', 'tutor', 'admin'].
      */
-    protected $accepted_permission_levels;
+    protected $accepted_permission_levels = ['user', 'autor', 'tutor', 'admin'];
 
     /**
      * bool
      * Whether to use global permissions when searching for resources
      * where a person has permissions on (true) or not. Defaults to true.
      */
-    protected $use_global_permissions;
+    protected $use_global_permissions = true;
 
 
     /**
@@ -42,7 +42,7 @@ class ResourceSearch extends SearchType
      * Additional properties that shall be appended to the name of the resource.
      * The array must be one-dimensional.
      */
-    protected $additional_display_properties;
+    protected $additional_display_properties = [];
 
 
     /**
@@ -53,7 +53,7 @@ class ResourceSearch extends SearchType
      * the string ", ".
      * This attribute defaults to '[%s]'.
      */
-    protected $additional_property_format;
+    protected $additional_property_format = '[%s]';
 
 
     /**
@@ -61,22 +61,7 @@ class ResourceSearch extends SearchType
      * Array of class_names of Resource classes that will be included in the search.
      * An empty array will include all resource classes.
      */
-    protected $searchable_resource_classes;
-
-
-    //Setup and search configuration methods:
-
-
-    public function __construct()
-    {
-        $this->accepted_permission_levels = [
-            'user', 'autor', 'tutor', 'admin'
-        ];
-        $this->use_global_permissions = true;
-        $this->additional_display_properties = [];
-        $this->additional_property_format = '[%s]';
-        $this->searchable_resource_classes = [];
-    }
+    protected $searchable_resource_classes = [];
 
 
     /**
diff --git a/lib/classes/searchtypes/RoomSearch.class.php b/lib/classes/searchtypes/RoomSearch.class.php
index 9b191447f7910d9eb9b9a72a019ba1e9ae0316f8..002712e3c3172f190cfd1f6fa3a5cc323f2f98b4 100644
--- a/lib/classes/searchtypes/RoomSearch.class.php
+++ b/lib/classes/searchtypes/RoomSearch.class.php
@@ -18,23 +18,10 @@
 class RoomSearch extends ResourceSearch
 {
      //Setup and search configuration methods:
-
-
-    public function __construct()
-    {
-        $this->accepted_permission_levels = [
-            'user', 'autor', 'tutor', 'admin'
-        ];
-        $this->use_global_permissions = true;
-        $this->with_seats = 0;
-        $this->additional_display_properties = [];
-        $this->additional_property_format = '[%s]';
-    }
-
+    public $with_seats = 0;
 
     //SearchType interface implementations:
 
-
     public function getTitle()
     {
         return _('Raumsuche');
@@ -202,4 +189,4 @@ class RoomSearch extends ResourceSearch
         }
         return $results;
     }
-}
\ No newline at end of file
+}
diff --git a/lib/elearning/ConnectedCMS.class.php b/lib/elearning/ConnectedCMS.class.php
index 0aac5261f4f3ec2597e5f0d8982c515fa420580b..e29d3c2fb4ded2a0e1e0f354365a2e06a8db9d92 100644
--- a/lib/elearning/ConnectedCMS.class.php
+++ b/lib/elearning/ConnectedCMS.class.php
@@ -52,12 +52,7 @@ class ConnectedCMS
     public function __construct($cms = "")
     {
         $this->cms_type = $cms;
-        if (Config::get()->getValue("ELEARNING_INTERFACE_{$this->cms}_ACTIVE")) {
-            $this->is_active = true;
-        }
-        else {
-            $this->is_active = false;
-        }
+        $this->is_active = (bool) Config::get()->getValue("ELEARNING_INTERFACE_{$cms}_ACTIVE");
         $this->init($cms);
     }
 
diff --git a/lib/elearning/Ilias3ConnectedCMS.class.php b/lib/elearning/Ilias3ConnectedCMS.class.php
index 69f1e529f531dce541569ddfe6319a82bbf5f0b0..de8db3fb714785f0eb7835dfe1a71417aa00b28e 100644
--- a/lib/elearning/Ilias3ConnectedCMS.class.php
+++ b/lib/elearning/Ilias3ConnectedCMS.class.php
@@ -20,7 +20,6 @@ use Studip\Button, Studip\LinkButton;
 class Ilias3ConnectedCMS extends ConnectedCMS
 {
     var $client_id;
-//  var $root_user_id;
     var $root_user_sid;
     var $main_category_node_id;
     var $user_role_template_id;
@@ -28,12 +27,10 @@ class Ilias3ConnectedCMS extends ConnectedCMS
     var $user_style;
     var $crs_roles;
     var $global_roles;
-
-    var $db_class_object;
-    var $db_class_tree;
-    var $db_class_course;
-
     var $soap_client;
+    var $encrypt_passwords;
+    var $is_first_call = true;
+
     /**
     * constructor
     *
@@ -64,8 +61,6 @@ class Ilias3ConnectedCMS extends ConnectedCMS
         $this->crs_roles = $ELEARNING_INTERFACE_MODULES[$cms]["crs_roles"];
         $this->client_id = $ELEARNING_INTERFACE_MODULES[$cms]["soap_data"]["client"];
         $this->global_roles = $ELEARNING_INTERFACE_MODULES[$cms]["global_roles"];
-//      $this->root_user_sid = $this->soap_client->login();
-        $this->is_first_call = true;
     }
 
     /**
diff --git a/lib/elearning/Ilias3ConnectedPermissions.class.php b/lib/elearning/Ilias3ConnectedPermissions.class.php
index 17319d7298e7e1d150bcf93d436aef61f255bbb4..dcb661574f9b69ef0f97f269c880d8b3a2d3f78a 100644
--- a/lib/elearning/Ilias3ConnectedPermissions.class.php
+++ b/lib/elearning/Ilias3ConnectedPermissions.class.php
@@ -39,6 +39,7 @@ class Ilias3ConnectedPermissions extends ConnectedPermissions
 
     var $USER_OPERATIONS;
     var $AUTHOR_OPERATIONS;
+
     /**
     * constructor
     *
@@ -60,7 +61,6 @@ class Ilias3ConnectedPermissions extends ConnectedPermissions
         }
         $this->USER_OPERATIONS = [OPERATION_VISIBLE, OPERATION_READ];
 //      $this->AUTHOR_OPERATIONS = array(OPERATION_VISIBLE, OPERATION_READ, OPERATION_CREATE_LM, OPERATION_CREATE_TEST, OPERATION_CREATE_QUESTIONS, OPERATION_CREATE_FILE);
-        $this->permissions_changed = false;
     }
 
     /**
@@ -141,7 +141,6 @@ class Ilias3ConnectedPermissions extends ConnectedPermissions
                 $connected_cms[$this->cms_type]->soap_client->addMember( $connected_cms[$this->cms_type]->user->getId(), $type, $course_id );
                 if ($GLOBALS["debug"] == true)
                     echo "addMember";
-                $this->permissions_changed = true;
             }
         }
 
@@ -162,7 +161,6 @@ class Ilias3ConnectedPermissions extends ConnectedPermissions
                 if ($GLOBALS["debug"] == true)
                     echo "Role $proper_role added.";
             }
-            $this->permissions_changed = true;
 
         }
         if (!$this->getContentModulePerms($course_id)) {
diff --git a/lib/elearning/Ilias3ObjectXMLParser.class.php b/lib/elearning/Ilias3ObjectXMLParser.class.php
index 2dc76b492cb94332e9a4020667a5f908d45b3dfe..172ca2ae5ae24e4cab1b485436f63bad091e7b08 100644
--- a/lib/elearning/Ilias3ObjectXMLParser.class.php
+++ b/lib/elearning/Ilias3ObjectXMLParser.class.php
@@ -38,16 +38,20 @@
 class Ilias3ObjectXMLParser extends Ilias3SaxParser
 {
     var $object_data = [];
+    var $curr_obj;
+    var $reference_count;
+    var $cdata = '';
 
     /**
-    * Constructor
-    *
-    * @param    object      $a_content_object   must be of type ilObjContentObject
-    *                                           ilObjTest or ilObjQuestionPool
-    * @param    string      $a_xml_file         xml data
-    * @param    string      $a_subdir           subdirectory in import directory
-    * @access   public
-    */
+     * Constructor
+     *
+     * @param object $a_content_object           must be of type ilObjContentObject
+     *                                           ilObjTest or ilObjQuestionPool
+     * @param string $a_xml_file                 xml data
+     * @param string $a_subdir                   subdirectory in import directory
+     *
+     * @access   public
+     */
     function __construct($a_xml_data = '')
     {
         parent::__construct();
@@ -60,33 +64,31 @@ class Ilias3ObjectXMLParser extends Ilias3SaxParser
     }
 
     /**
-    * set event handlers
-    *
-    * @param    resource    reference to the xml parser
-    * @access   private
-    */
+     * set event handlers
+     *
+     * @param resource    reference to the xml parser
+     *
+     * @access   private
+     */
     function setHandlers($a_xml_parser)
     {
-        xml_set_object($a_xml_parser,$this);
-        xml_set_element_handler($a_xml_parser,'handlerBeginTag','handlerEndTag');
-        xml_set_character_data_handler($a_xml_parser,'handlerCharacterData');
+        xml_set_object($a_xml_parser, $this);
+        xml_set_element_handler($a_xml_parser, 'handlerBeginTag', 'handlerEndTag');
+        xml_set_character_data_handler($a_xml_parser, 'handlerCharacterData');
     }
 
 
-
-
     /**
-    * handler for begin of element
-    *
-    * @param    resource    $a_xml_parser       xml parser
-    * @param    string      $a_name             element name
-    * @param    array       $a_attribs          element attributes array
-    */
-    function handlerBeginTag($a_xml_parser,$a_name,$a_attribs)
+     * handler for begin of element
+     *
+     * @param resource $a_xml_parser xml parser
+     * @param string   $a_name       element name
+     * @param array    $a_attribs    element attributes array
+     */
+    function handlerBeginTag($a_xml_parser, $a_name, $a_attribs)
     {
 
-        switch($a_name)
-        {
+        switch ($a_name) {
             case 'Objects':
                 $this->curr_obj = -1;
                 break;
@@ -95,8 +97,8 @@ class Ilias3ObjectXMLParser extends Ilias3SaxParser
                 ++$this->curr_obj;
                 $this->reference_count = -1;
 
-                $this->addProperty__('type',$a_attribs['type']);
-                $this->addProperty__('obj_id',$a_attribs['obj_id']);
+                $this->addProperty__('type', $a_attribs['type']);
+                $this->addProperty__('obj_id', $a_attribs['obj_id']);
                 break;
 
             case 'Title':
@@ -128,17 +130,15 @@ class Ilias3ObjectXMLParser extends Ilias3SaxParser
     }
 
 
-
     /**
-    * handler for end of element
-    *
-    * @param    resource    $a_xml_parser       xml parser
-    * @param    string      $a_name             element name
-    */
-    function handlerEndTag($a_xml_parser,$a_name)
+     * handler for end of element
+     *
+     * @param resource $a_xml_parser xml parser
+     * @param string   $a_name       element name
+     */
+    function handlerEndTag($a_xml_parser, $a_name)
     {
-        switch($a_name)
-        {
+        switch ($a_name) {
             case 'Objects':
                 break;
 
@@ -146,27 +146,27 @@ class Ilias3ObjectXMLParser extends Ilias3SaxParser
                 break;
 
             case 'Title':
-                $this->addProperty__('title',trim($this->cdata));
+                $this->addProperty__('title', trim($this->cdata));
                 break;
 
             case 'Description':
-                $this->addProperty__('description',trim($this->cdata));
+                $this->addProperty__('description', trim($this->cdata));
                 break;
 
             case 'Owner':
-                $this->addProperty__('owner',trim($this->cdata));
+                $this->addProperty__('owner', trim($this->cdata));
                 break;
 
             case 'CreateDate':
-                $this->addProperty__('create_date',trim($this->cdata));
+                $this->addProperty__('create_date', trim($this->cdata));
                 break;
 
             case 'LastUpdate':
-                $this->addProperty__('last_update',trim($this->cdata));
+                $this->addProperty__('last_update', trim($this->cdata));
                 break;
 
             case 'ImportId':
-                $this->addProperty__('import_id',trim($this->cdata));
+                $this->addProperty__('import_id', trim($this->cdata));
                 break;
 
             case 'References':
@@ -184,17 +184,16 @@ class Ilias3ObjectXMLParser extends Ilias3SaxParser
     }
 
     /**
-    * handler for character data
-    *
-    * @param    resource    $a_xml_parser       xml parser
-    * @param    string      $a_data             character data
-    */
-    function handlerCharacterData($a_xml_parser,$a_data)
+     * handler for character data
+     *
+     * @param resource $a_xml_parser xml parser
+     * @param string   $a_data       character data
+     */
+    function handlerCharacterData($a_xml_parser, $a_data)
     {
-        if($a_data != "\n")
-        {
+        if ($a_data != "\n") {
             // Replace multiple tabs with one space
-            $a_data = preg_replace("/\t+/"," ",$a_data);
+            $a_data = preg_replace("/\t+/", " ", $a_data);
 
             $this->cdata .= $a_data;
         }
@@ -203,27 +202,26 @@ class Ilias3ObjectXMLParser extends Ilias3SaxParser
     }
 
     // PRIVATE
-    function addProperty__($a_name,$a_value)
+    function addProperty__($a_name, $a_value)
     {
-            $this->object_data[$this->curr_obj][$a_name] = $a_value;
-    /*/
-        if (is_array($this->object_data[$this->curr_obj][$a_name]))
-            $this->object_data[$this->curr_obj][$a_name][] = $a_value;
-        elseif ($this->object_data[$this->curr_obj][$a_name] != "")
-        {
-            $old_value = $this->object_data[$this->curr_obj][$a_name];
-            $this->object_data[$this->curr_obj][$a_name] = array($old_value);
-            $this->object_data[$this->curr_obj][$a_name][] = $a_value;
-        }
-        else
-            $this->object_data[$this->curr_obj][$a_name] = $a_value;
-        /**/
+        $this->object_data[$this->curr_obj][$a_name] = $a_value;
+        /*/
+            if (is_array($this->object_data[$this->curr_obj][$a_name]))
+                $this->object_data[$this->curr_obj][$a_name][] = $a_value;
+            elseif ($this->object_data[$this->curr_obj][$a_name] != "")
+            {
+                $old_value = $this->object_data[$this->curr_obj][$a_name];
+                $this->object_data[$this->curr_obj][$a_name] = array($old_value);
+                $this->object_data[$this->curr_obj][$a_name][] = $a_value;
+            }
+            else
+                $this->object_data[$this->curr_obj][$a_name] = $a_value;
+            /**/
     }
 
     function addReference__($a_value, $a_accessinfo = "")
     {
-        if($a_value)
-        {
+        if ($a_value) {
             $this->object_data[$this->curr_obj]['references'][$this->reference_count]["ref_id"] = $a_value;
             $this->object_data[$this->curr_obj]['references'][$this->reference_count]["accessInfo"] = $a_accessinfo;
         }
@@ -231,9 +229,8 @@ class Ilias3ObjectXMLParser extends Ilias3SaxParser
 
     function addOperation__($a_value)
     {
-        if($a_value)
+        if ($a_value) {
             $this->object_data[$this->curr_obj]['references'][$this->reference_count]["operations"][] = $a_value;
+        }
     }
-
 }
-?>
\ No newline at end of file
diff --git a/lib/elearning/Ilias3Soap.class.php b/lib/elearning/Ilias3Soap.class.php
index 98627ded2d9d17f93e495e48dbd8992218923466..6a43b9bb611d846a28e0e70665c7f00881efcb9c 100644
--- a/lib/elearning/Ilias3Soap.class.php
+++ b/lib/elearning/Ilias3Soap.class.php
@@ -22,6 +22,7 @@ class Ilias3Soap extends StudipSoapClient
     var $user_sid;
     var $user_type;
     var $soap_cache;
+    var $caching_active = false;
 
     /**
     * constructor
@@ -39,7 +40,6 @@ class Ilias3Soap extends StudipSoapClient
         $this->user_type = "admin";
 
         $this->loadCacheData($cms);
-        $this->caching_active = false;
     }
 
 
@@ -1067,4 +1067,3 @@ class Ilias3Soap extends StudipSoapClient
         return false;
     }
 }
-
diff --git a/lib/elearning/Ilias4ConnectedPermissions.class.php b/lib/elearning/Ilias4ConnectedPermissions.class.php
index b44e7a297788e20be033316223583996f895bc60..af70ba75d7fba70712ae2444baae55d28735eb70 100644
--- a/lib/elearning/Ilias4ConnectedPermissions.class.php
+++ b/lib/elearning/Ilias4ConnectedPermissions.class.php
@@ -98,7 +98,6 @@ class Ilias4ConnectedPermissions extends Ilias3ConnectedPermissions
             if ($type != "") {
                 $connected_cms[$this->cms_type]->soap_client->addMember( $connected_cms[$this->cms_type]->user->getId(), $type, $course_id );
                 if ($GLOBALS["debug"] == true) echo "addMember";
-                $this->permissions_changed = true;
             }
         }
 
@@ -114,7 +113,6 @@ class Ilias4ConnectedPermissions extends Ilias3ConnectedPermissions
                 $connected_cms[$this->cms_type]->soap_client->addUserRoleEntry( $connected_cms[$this->cms_type]->user->getId(), $proper_role);
                 if ($GLOBALS["debug"] == true) echo "Role $proper_role added.";
             }
-            $this->permissions_changed = true;
 
         }
 
diff --git a/lib/elearning/Ilias4ConnectedUser.class.php b/lib/elearning/Ilias4ConnectedUser.class.php
index 0d480d4700f4b8feda075c8fc2222b3e20f11237..be8b88c43f51d9bac153175ea491974cddc51018 100644
--- a/lib/elearning/Ilias4ConnectedUser.class.php
+++ b/lib/elearning/Ilias4ConnectedUser.class.php
@@ -19,6 +19,8 @@ class Ilias4ConnectedUser extends Ilias3ConnectedUser
 {
     var $roles;
     var $user_sid;
+    var $auth_plugin;
+
     /**
      * constructor
      *
@@ -48,11 +50,13 @@ class Ilias4ConnectedUser extends Ilias3ConnectedUser
         if ($this->getLoginData($this->login)) {
             //automatische Zuordnung von bestehenden Ilias Accounts
             //nur wenn ldap Modus benutzt wird und Stud.IP Nutzer passendes ldap plugin hat
-            if ($connected_cms[$this->cms_type]->USER_AUTO_CREATE == true &&
-            $connected_cms[$this->cms_type]->USER_PREFIX == '' &&
-            $this->auth_plugin &&
-            $this->auth_plugin != "standard" &&
-            $this->auth_plugin  == $connected_cms[$this->cms_type]->ldap_enable) {
+            if (
+                $connected_cms[$this->cms_type]->USER_AUTO_CREATE
+                && !$connected_cms[$this->cms_type]->USER_PREFIX
+                && $this->auth_plugin
+                && $this->auth_plugin !== 'standard'
+                && $this->auth_plugin === $connected_cms[$this->cms_type]->ldap_enable
+            ) {
                 if (!$this->external_password) {
                     $this->setPassword(md5(uniqid("4dfmjsnll")));
                 }
@@ -161,4 +165,4 @@ class Ilias4ConnectedUser extends Ilias3ConnectedUser
         }
         return true;
     }
-}
\ No newline at end of file
+}
diff --git a/lib/elearning/Ilias4Soap.class.php b/lib/elearning/Ilias4Soap.class.php
index d6d252784899fcadb97371b6b9e9a506472eb0b4..7afd7380a29df0bb4ddf5721329ace3d05b854f3 100644
--- a/lib/elearning/Ilias4Soap.class.php
+++ b/lib/elearning/Ilias4Soap.class.php
@@ -34,7 +34,7 @@ class Ilias4Soap extends Ilias3Soap
     function __construct($cms)
     {
         parent::__construct($cms);
-        $this->seperator_string = " / ";
+        $this->separator_string = " / ";
     }
 
     /**
@@ -145,7 +145,7 @@ class Ilias4Soap extends Ilias3Soap
         }
 
         if (is_array($path)) {
-            return implode($path, $this->seperator_string);
+            return implode($path, $this->separator_string);
         } else {
             return false;
         }
diff --git a/lib/elearning/PmWikiConnectedCMS.class.php b/lib/elearning/PmWikiConnectedCMS.class.php
index 5c123beb4aceefb80e329c958da6a3b5eb9ab71d..3cd728e64714ab73d855cf87853f823f3c59b59d 100644
--- a/lib/elearning/PmWikiConnectedCMS.class.php
+++ b/lib/elearning/PmWikiConnectedCMS.class.php
@@ -34,6 +34,10 @@ require_once 'clients/webservice_client.php';
 
 class PmWikiConnectedCMS extends ConnectedCMS
 {
+    public $client;
+    public $api_key;
+    public $field_script;
+
     function __construct($cms)
     {
         parent::__construct($cms);
@@ -43,7 +47,7 @@ class PmWikiConnectedCMS extends ConnectedCMS
 
         $this->api_key = $GLOBALS['ELEARNING_INTERFACE_MODULES'][$this->cms_type]['soap_data']['api-key'];
     }
-    
+
     function init($cms)
     {
         parent::init($cms);
@@ -62,20 +66,20 @@ class PmWikiConnectedCMS extends ConnectedCMS
     function searchContentModules($key)
     {
         $fields_found = $this->client->call("search_content_modules", $args = [
-                $GLOBALS['ELEARNING_INTERFACE_MODULES'][$this->cms_type]['soap_data']['api-key'], 
-                $key]); 
+                $GLOBALS['ELEARNING_INTERFACE_MODULES'][$this->cms_type]['soap_data']['api-key'],
+                $key]);
 
         $result = [];
 
         foreach($fields_found as $field)
         {
 
-            $result[$field['field_id']] = [    'ref_id'            => $field['field_id'], 
+            $result[$field['field_id']] = [    'ref_id'            => $field['field_id'],
                                                                                         'type'              => $field['field_type'],
                                                                                         'obj_id'            => $field_id,
                                                                                         'create_date' => $field['create_date'],
                                                                                         'last_update' => $field['change_date'],
-                                                                                        'title'             => $field['field_title'], 
+                                                                                        'title'             => $field['field_title'],
                                                                                         'description' => $field['field_description']];
         }
         return $result;
diff --git a/lib/elearning/PmWikiContentModule.class.php b/lib/elearning/PmWikiContentModule.class.php
index 061dbd38b5ecf79eb5ba6bdc88b81607c33afc2b..06533dda93f730136c5853a5c707a29044b4fdb4 100644
--- a/lib/elearning/PmWikiContentModule.class.php
+++ b/lib/elearning/PmWikiContentModule.class.php
@@ -28,6 +28,10 @@
 
 class PmWikiContentModule extends ContentModule
 {
+    public $link;
+    public $client;
+    public $chdate;
+    public $accepted_users;
 
     /**
     * constructor
diff --git a/lib/elearning/clients/soap_webservice_client.php b/lib/elearning/clients/soap_webservice_client.php
index 9573f131f942ffc25bfb4de95022ea458d8f7a2e..9c392a8aaa12a1349445c32b9b8155a3dc476700 100644
--- a/lib/elearning/clients/soap_webservice_client.php
+++ b/lib/elearning/clients/soap_webservice_client.php
@@ -1,4 +1,4 @@
-<?php 
+<?php
 # Lifter002: TODO
 # Lifter007: TODO
 # Lifter003: TODO
@@ -9,6 +9,8 @@ require_once 'vendor/nusoap/nusoap.php';
 
 class Soap_WebserviceClient extends WebserviceClient
 {
+    private $client;
+
     public function __construct($webservice_url)
     {
         $this->client = new soap_client($webservice_url);
@@ -17,7 +19,7 @@ class Soap_WebserviceClient extends WebserviceClient
 
     public function &call($method_name, &$args)
     {
-        return $this->client->call($method_name, $args);
+        $result = $this->client->call($method_name, $args);
+        return $result;
     }
 }
-
diff --git a/lib/elearning/clients/xml_rpc_webservice_client.php b/lib/elearning/clients/xml_rpc_webservice_client.php
index 6060a0e5e460de4d6aeb5bd88220443d954cb1a8..19568f6cb7421212647d4f1b8072edaaa143f0d2 100644
--- a/lib/elearning/clients/xml_rpc_webservice_client.php
+++ b/lib/elearning/clients/xml_rpc_webservice_client.php
@@ -8,6 +8,8 @@ require_once __DIR__ . '/webservice_client.php';
 
 class XML_RPC_WebserviceClient extends WebserviceClient
 {
+    private $client;
+
     public function __construct($webservice_url)
     {
         $this->client = new xmlrpc_client($webservice_url);
@@ -28,6 +30,7 @@ class XML_RPC_WebserviceClient extends WebserviceClient
         }
 
         $xmlrpc_return = $this->client->send(new xmlrpcmsg($method_name, $xmlrpc_args), 300);
-        return $xmlrpc_return->value();
+        $xmlrpc_result = $xmlrpc_return->value();
+        return $xmlrpc_result;
     }
 }
diff --git a/lib/evaluation/classes/Evaluation.class.php b/lib/evaluation/classes/Evaluation.class.php
index 2fd240c739cbe0594d3ce562c5ffa189f12daa09..cd674074bfb516d727a356ccdc0614ab2bfe7b42 100644
--- a/lib/evaluation/classes/Evaluation.class.php
+++ b/lib/evaluation/classes/Evaluation.class.php
@@ -111,9 +111,9 @@ class Evaluation extends EvaluationObject implements PrivacyObject
     /**
      * Counts the number of connected ranges
      * @access   private
-     * @var      integer $numberRanges
+     * @var      integer $rangeNum
      */
-    var $numberRanges;
+    var $rangeNum;
 
     /**
      * Constructor
@@ -136,7 +136,6 @@ class Evaluation extends EvaluationObject implements PrivacyObject
         $this->anonymous = NO;
         $this->visible = NO;
         $this->shared = NO;
-        $this->isUsed = NO;
         $this->rangeNum = 0;
         $this->db = new EvaluationDB ();
         if ($this->db->isError()) {
diff --git a/lib/evaluation/classes/EvaluationExportManagerCSV.class.php b/lib/evaluation/classes/EvaluationExportManagerCSV.class.php
index 8e70a1b0c12abaca9d663a7bbdb2d699db8e1028..4baa3f8677e5f04a0b239f782f7f12703e38977f 100644
--- a/lib/evaluation/classes/EvaluationExportManagerCSV.class.php
+++ b/lib/evaluation/classes/EvaluationExportManagerCSV.class.php
@@ -79,7 +79,7 @@ define ("EVALEXPORT_EXTENSION", "csv");
  */
 class EvaluationExportManagerCSV extends EvaluationExportManager {
 # Define all required variables ============================================= #
-
+    var $evalquestions_residual = [];
 # ============================================================ end: variables #
 
 
diff --git a/lib/evaluation/classes/EvaluationQuestion.class.php b/lib/evaluation/classes/EvaluationQuestion.class.php
index 1ee2f9d515fbfc0bab1da0b02a7391fc1cfe9bab..c3c1da3839df43aa68bfd577e11578bdf373e3e2 100644
--- a/lib/evaluation/classes/EvaluationQuestion.class.php
+++ b/lib/evaluation/classes/EvaluationQuestion.class.php
@@ -84,6 +84,9 @@ class EvaluationQuestion extends EvaluationObject {
    * @var    string   $isMultiplechoice
    */
   var $isMultiplechoice;
+
+  var $templateID;
+
 # ============================================================ end: variables #
 
 # Define constructor and destructor ========================================= #
@@ -113,7 +116,7 @@ class EvaluationQuestion extends EvaluationObject {
     /* --------------------------------------------------------------------- */
   }
 # =========================================== end: constructor and destructor #
-  
+
 
 # Define public functions =================================================== #
   /**
@@ -124,7 +127,7 @@ class EvaluationQuestion extends EvaluationObject {
   function setType ($type) {
     $this->type = $type;
   }
-  
+
   /**
    * Sets the type of a question
    * @access  public
@@ -133,7 +136,7 @@ class EvaluationQuestion extends EvaluationObject {
   function getType () {
     return  $this->type;
   }
-  
+
 
   /**
    * Sets multiplechoice value of a question
@@ -141,19 +144,19 @@ class EvaluationQuestion extends EvaluationObject {
    * @param   $tinyint  The multiplechoice Value.
    */
   function setMultiplechoice ($multiplechoice) {
-    $this->multiplechoice = $multiplechoice == YES ? YES : NO;
+    $this->isMultiplechoice = $multiplechoice == YES ? YES : NO;
   }
-  
+
   /**
    * Checks for multiplechoice
    * @access   public
    * @return   boolean   YES if it is an multiplechoice question
    */
   function isMultiplechoice () {
-    return $this->multiplechoice == YES ? YES : NO;
+    return $this->isMultiplechoice == YES ? YES : NO;
   }
-  
-  
+
+
   /**
    * Adds a child and sets the value to pos+1
    * @access  public
diff --git a/lib/evaluation/classes/EvaluationTree.class.php b/lib/evaluation/classes/EvaluationTree.class.php
index 9a03a35e0ca2caf9493577dda908c95f8e072bb7..f2225c62cd343dbd3e23bdd95dfd66f88c50f048 100644
--- a/lib/evaluation/classes/EvaluationTree.class.php
+++ b/lib/evaluation/classes/EvaluationTree.class.php
@@ -49,14 +49,14 @@ class EvaluationTree extends TreeAbstract {
   * @var      object Evaluation $eval
   */
   var $eval;
-  
+
  /**
   * Holds the Evaluation ID
   * @access   public
   * @var      string $evalID
   */
   var $evalID;
-  
+
  /**
   * Holds the eval constructor load mode
   * @access   public
@@ -64,6 +64,8 @@ class EvaluationTree extends TreeAbstract {
   */
   var $load_mode;
 
+  var $root_content;
+
 # ============================================================ end: variables #
 
 
@@ -74,13 +76,13 @@ class EvaluationTree extends TreeAbstract {
     * @param    array  the eval's ID (optional - if not given, it must be in $_REQUEST).
     */
   function __construct( $args ) {
-      
-      
+
+
       if (isset($args['evalID']))
         $this->evalID = $args['evalID'];
       else
         $this->evalID = Request::option("evalID");
-      
+
       $this->load_mode = ($args['load_mode'] ? $args['load_mode'] : EVAL_LOAD_NO_CHILDREN);
       if (empty($this->evalID)){
       print _("Fehler in EvaluationTree: Es wurde keine evalID übergeben");
@@ -120,10 +122,10 @@ class EvaluationTree extends TreeAbstract {
       /* <---------------------------------------- */
   }
 
-  
+
   /**
    * initialize the sub-groups.
-   * 
+   *
    * @access  private
    * @param   object EvaluationGroup  the current group to be initialized.
    */
@@ -145,7 +147,7 @@ class EvaluationTree extends TreeAbstract {
             $group->getTitle(), $group->getPosition() );
 
   }
-  
+
   function &getGroupObject($item_id, $renew = false){
       if (is_object($this->tree_data[$item_id]['object'])){
           if ($renew) $this->recursiveInit(new EvaluationGroup($item_id,null,$this->load_mode));
diff --git a/lib/evaluation/classes/EvaluationTreeEditView.class.php b/lib/evaluation/classes/EvaluationTreeEditView.class.php
index ea2e67cae9abbbfad4d90b1cb2407e209b5dbccc..bec740e5030eef9e507d6486dc9a2d0d08fff9f3 100644
--- a/lib/evaluation/classes/EvaluationTreeEditView.class.php
+++ b/lib/evaluation/classes/EvaluationTreeEditView.class.php
@@ -158,6 +158,12 @@ class EvaluationTreeEditView
      */
     var $itemID;
 
+    /**
+     * Holds the currently moved Item-ID
+     * @var string $moveItemID
+     */
+    var $moveItemID;
+
     /**
      * Holds the current evalID
      * @access   private
@@ -172,6 +178,13 @@ class EvaluationTreeEditView
      */
     var $itemInstance;
 
+    /**
+     * Possible messages
+     *
+     * @var array $msg
+     */
+    var $msg = [];
+
     /**
      * constructor
      *
diff --git a/lib/evaluation/evaluation_admin_template.lib.php b/lib/evaluation/evaluation_admin_template.lib.php
index 504a828b174ee9f6345a6fdd0d62fb925cd24c54..596307dcc497bcbd5a8a5c229fd01903d427c548 100644
--- a/lib/evaluation/evaluation_admin_template.lib.php
+++ b/lib/evaluation/evaluation_admin_template.lib.php
@@ -33,10 +33,13 @@
 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 // +--------------------------------------------------------------------------+
 
-use Studip\Button, Studip\LinkButton;
+use Studip\Button;
 
 class EvalTemplateGUI
 {
+    public $BR;
+    public $command;
+
     public function __construct()
     {
         $this->BR = new HTMpty("br");
diff --git a/lib/extern/elements/ExternElementLinkIntern.class.php b/lib/extern/elements/ExternElementLinkIntern.class.php
index ef3a3c8aacef47161b80ee906447dcb61b7f3db0..b7144b9176963ec670247e2659a588aa25e0cb7c 100644
--- a/lib/extern/elements/ExternElementLinkIntern.class.php
+++ b/lib/extern/elements/ExternElementLinkIntern.class.php
@@ -41,7 +41,6 @@ class ExternElementLinkIntern extends ExternElement {
 
     var $attributes = ["font_size", "font_face", "font_color", "font_class", "font_style",
             "a_class", "a_style", "config", "srilink", "externlink"];
-    var $link_module_type;
 
     /**
     * Constructor
diff --git a/lib/extern/elements/ExternElementLinkInternSimple.class.php b/lib/extern/elements/ExternElementLinkInternSimple.class.php
index d4765075f58ea8c9e6fa0937c643f78db20d28a5..9ee07183463435f12f103eb465f15a50a21e65ec 100644
--- a/lib/extern/elements/ExternElementLinkInternSimple.class.php
+++ b/lib/extern/elements/ExternElementLinkInternSimple.class.php
@@ -46,7 +46,6 @@ class ExternElementLinkInternSimple extends ExternElement {
 
     var $attributes = ["font_size", "font_face", "font_color", "font_class", "font_style",
             "a_class", "a_style", "config", "srilink", "externlink"];
-    var $link_module_type;
 
     /**
     * Constructor
diff --git a/lib/extern/elements/ExternElementLinkInternTemplate.class.php b/lib/extern/elements/ExternElementLinkInternTemplate.class.php
index 3c12585c3102751f158d676c95086de60c6386fe..fff3663a2519ac1f23461de0a2793a439d732393 100644
--- a/lib/extern/elements/ExternElementLinkInternTemplate.class.php
+++ b/lib/extern/elements/ExternElementLinkInternTemplate.class.php
@@ -42,7 +42,6 @@ require_once 'ExternElementLinkIntern.class.php';
 class ExternElementLinkInternTemplate extends ExternElementLinkIntern {
 
     var $attributes = ['config', 'srilink', 'externlink'];
-    var $link_module_type;
 
     /**
     * Constructor
diff --git a/lib/extern/elements/ExternElementTemplateGeneric.class.php b/lib/extern/elements/ExternElementTemplateGeneric.class.php
index 48f8ed96017f719e12721ccb0a26175f803166e5..bdd8a3315d7f0c8071f0e68782efc0eab4a971be 100644
--- a/lib/extern/elements/ExternElementTemplateGeneric.class.php
+++ b/lib/extern/elements/ExternElementTemplateGeneric.class.php
@@ -99,7 +99,7 @@ class ExternElementTemplateGeneric extends ExternElement {
         $content_table .= $edit_form->editContentTable($headline, $table);
         $content_table .= $edit_form->editBlankContent();
 
-        $hidden = [$this->getName . '_chdate' => time()];
+        $hidden = [$this->getName() . '_chdate' => time()];
         $submit = $edit_form->editSubmit($this->config->getName(),
                 $this->config->getId(), $this->getName(), $hidden);
         $out = $edit_form->editContent($content_table, $submit);
diff --git a/lib/extern/lib/ExternElement.class.php b/lib/extern/lib/ExternElement.class.php
index 5fa513b7249726f2cc295af3800a3a2bbb2ea235..5f2f9262751f96d25feb516366f33905130ed345 100644
--- a/lib/extern/lib/ExternElement.class.php
+++ b/lib/extern/lib/ExternElement.class.php
@@ -46,6 +46,7 @@ class ExternElement {
     var $real_name;
     var $description;
     var $headlines = [];
+    var $link_module_type;
 
 
     /**
diff --git a/lib/extern/lib/ExternElementMain.class.php b/lib/extern/lib/ExternElementMain.class.php
index f86ff592442617ad3b27edfd844797941592e65b..781325c3e4d24ac65cb2cdc7f3dc46ab969c4b5f 100644
--- a/lib/extern/lib/ExternElementMain.class.php
+++ b/lib/extern/lib/ExternElementMain.class.php
@@ -5,9 +5,9 @@
 # Lifter010: TODO
 /**
 * ExternElementMain.class.php
-* 
-*  
-* 
+*
+*
+*
 *
 * @author       Peter Thienel <pthienel@web.de>, Suchi & Berg GmbH <info@data-quest.de>
 * @access       public
@@ -19,7 +19,7 @@
 // +---------------------------------------------------------------------------+
 // This file is part of Stud.IP
 // ExternElementMain.class.php
-// 
+//
 // Copyright (C) 2003 Peter Thienel <pthienel@web.de>,
 // Suchi & Berg GmbH <info@data-quest.de>
 // +---------------------------------------------------------------------------+
@@ -41,8 +41,9 @@ class ExternElementMain extends ExternElement {
 
     var $attributes = [];
     var $edit_function;
-    
-    
+    var $data_fields;
+    var $field_names;
+
     /**
     *
     */
@@ -51,18 +52,18 @@ class ExternElementMain extends ExternElement {
             $main_class_name = 'ExternElementMain' . ucfirst($module_name);
             require_once "lib/extern/elements/main/$main_class_name.class.php";
             $main_module = new $main_class_name($module_name, $data_fields, $field_names, $config);
-            
+
             return $main_module;
         }
-        
+
         return NULL;
     }
-    
+
     /**
     * Constructor
     *
     */
-    function __construct ($module_name, &$data_fields, &$field_names, &$config) { 
+    function __construct ($module_name, &$data_fields, &$field_names, &$config) {
         $this->real_name = _("Grundeinstellungen");
         $this->description = _("In den Grundeinstellungen können Sie allgemeine Daten des Elements ändern.");
         $this->name = 'Main';
@@ -75,30 +76,30 @@ class ExternElementMain extends ExternElement {
             $this->attributes[] = 'sriurl';
         }
     }
-    
+
     /**
-    * 
+    *
     */
     function getDefaultConfig () {}
-    
+
     /**
-    * 
+    *
     */
     function toStringEdit ($post_vars = "", $faulty_values = "",
             $edit_form = "", $anker = "") {
-        
+
         $out = '';
         $table = '';
         if ($edit_form == '')
             $edit_form = new ExternEdit($this->config, $post_vars, $faulty_values, $anker);
-        
+
         $edit_form->setElementName($this->getName());
         $element_headline = $edit_form->editElementHeadline($this->real_name,
                 $this->config->getName(), $this->config->getId(), TRUE);
-        
+
         if ($faulty_values == '')
             $faulty_values = [];
-        
+
         $edit_function = $this->edit_function;
         $table = $edit_form->$edit_function($this->field_names);
 
@@ -107,10 +108,10 @@ class ExternElementMain extends ExternElement {
                 $this->config->getId(), $this->getName());
         $out = $edit_form->editContent($content_table, $submit);
         $out .= $edit_form->editBlank();
-        
+
         return $element_headline . $out;
     }
-    
+
     function getSRIFormContent (&$edit_form, $include_url = false) {
         $content = '';
         $sri_info = _("Nur bei Benutzung der SRI-Schnittstelle für dieses Modul: Geben Sie hier die vollständige URL der Seite an, in die die Ausgabe des Moduls eingefügt werden soll.");
@@ -133,5 +134,5 @@ class ExternElementMain extends ExternElement {
         }
         return $content;
     }
-        
-}
\ No newline at end of file
+
+}
diff --git a/lib/extern/modules/ExternModuleTemplateLecturedetails.class.php b/lib/extern/modules/ExternModuleTemplateLecturedetails.class.php
index 5dd105ba7c10e8f334c6b590b517a9f30492ade0..bef48b1218dd30ad56d81dc68783c3b0d13982bb 100644
--- a/lib/extern/modules/ExternModuleTemplateLecturedetails.class.php
+++ b/lib/extern/modules/ExternModuleTemplateLecturedetails.class.php
@@ -46,6 +46,7 @@ class ExternModuleTemplateLecturedetails extends ExternModule {
 
     var $markers = [];
     var $args = ['seminar_id'];
+    var $seminar_id;
 
     /**
     *
diff --git a/lib/extern/modules/ExternModuleTemplateLectures.class.php b/lib/extern/modules/ExternModuleTemplateLectures.class.php
index 74d2b9b3c172c64cba9175b2b46d9cccc9754682..46c470e9a84747861e3ddad605496e37e016d992 100644
--- a/lib/extern/modules/ExternModuleTemplateLectures.class.php
+++ b/lib/extern/modules/ExternModuleTemplateLectures.class.php
@@ -187,6 +187,8 @@ class ExternSemBrowseTemplate extends SemBrowse {
 
     var $module;
     var $sem_types_position;
+    var $sem_dates;
+    var $start_sem;
 
     function __construct(&$module, $start_item_id) {
 
diff --git a/lib/extern/modules/ExternModuleTemplateSemBrowse.class.php b/lib/extern/modules/ExternModuleTemplateSemBrowse.class.php
index 16dd02dabee0d239e3d15d61f431f0f15bd8d9d6..da4d0226ce39330274763197cee3c03666a6a38c 100644
--- a/lib/extern/modules/ExternModuleTemplateSemBrowse.class.php
+++ b/lib/extern/modules/ExternModuleTemplateSemBrowse.class.php
@@ -40,15 +40,18 @@ class ExternModuleTemplateSemBrowse extends ExternModule {
     var $markers = [];
     var $args = [];
     var $sem_browse_data = [];
-    var $search_helper;
+    var $search_obj;
     var $sem_tree;
     var $range_tree;
     var $sem_number = [];
+    var $sem_dates;
+    var $sem_types_position = [];
     var $group_by_fields = [];
     //var $current_level_name = ''; //only set if tree is rendered with getContentTree()!
     var $global_markers = [];
     var $approved_params = [];
     var $module_params = [];
+    var $classes_show_class = null;
 
 
     function __construct($range_id, $module_name, $config_id = NULL, $set_config = NULL, $global_id = NULL) {
@@ -1245,20 +1248,6 @@ class ExternModuleTemplateSemBrowse extends ExternModule {
         return in_array($this->sem_browse_data['show_class'], $this->classes_show_class);
     }
 
-    function get_sem_class()
-    {
-        $query = "SELECT `Seminar_id`
-                  FROM `seminare`
-                  WHERE `status` IN (?)
-                    AND visible = 1";
-
-        $sem_ids = DBManager::get()->fetchAll(PDO::FETCH_COLUMN);
-        if (is_array($sem_ids)) {
-            $this->sem_browse_data['search_result'] = array_flip($sem_ids);
-        }
-        $this->show_result = true;
-    }
-
     function printout ($args) {
             if (!$language = $this->config->getValue("Main", "language"))
                     $language = "de_DE";
diff --git a/lib/extern/modules/views/ExternRangeLectureTree.class.php b/lib/extern/modules/views/ExternRangeLectureTree.class.php
index ca550f79011a30a469fc993ef48f0923f3bf890f..d8337fc4c536344fa91337449caa83de66a0bc94 100644
--- a/lib/extern/modules/views/ExternRangeLectureTree.class.php
+++ b/lib/extern/modules/views/ExternRangeLectureTree.class.php
@@ -11,16 +11,16 @@
 *
 * @access   public
 * @author   André Noack <noack@data-quest.de>
-* @package  
+* @package
 */
-class ExternRangeLectureTree {
-
-    
+class ExternRangeLectureTree
+{
     var $tree;
     var $config;
     var $param;
     var $root_id;
-    
+    var $start_item_id;
+
     /**
     * constructor
     *
@@ -44,10 +44,10 @@ class ExternRangeLectureTree {
             $args['sem_status'] =  $sem_status;
         }
         $this->param = "range_id={$this->config->range_id}&module=Rangelecturetree&config_id={$this->config->id}&";
-        
+
         $this->tree = TreeAbstract::GetInstance("StudipRangeTree",$args);
     }
-    
+
     function showSemRangeTree () {
         echo "\n<table" . $this->config->getAttributes("Main", "table") . ">";
         echo "\n<tr><td>". $this->getSemPath() . "</td></tr>\n<tr><td>";
@@ -65,7 +65,7 @@ class ExternRangeLectureTree {
         }
         echo "\n</table>";
     }
-    
+
     function showKids ($item_id) {
         $num_kids = $this->tree->getNumKids($item_id);
         $kids = $this->tree->getKids($item_id);
@@ -86,7 +86,7 @@ class ExternRangeLectureTree {
         }
         echo "</table>\n";
     }
-    
+
     function backLink ($item_id) {
         if ($item_id != $this->root_id){
             echo "<table width=\"100%\" border=\"0\"";
@@ -104,7 +104,7 @@ class ExternRangeLectureTree {
             echo "</td></tr></table>\n";
         }
     }
-    
+
     function showContent ($item_id) {
         echo "<table" . $this->config->getAttributes("RangeTreeLevelName", "table");
         echo ">\n<tr><td" . $this->config->getAttributes("RangeTreeLevelName", "td") . ">";
@@ -132,7 +132,7 @@ class ExternRangeLectureTree {
             echo "</td></tr></table>\n";
         }
     }
-    
+
     function getSemPath () {
         $delimiter = $this->config->getValue("TreePath", "delimiter");
         $attributes_a = $this->config->getAttributes("TreePath", "a");
@@ -154,12 +154,12 @@ class ExternRangeLectureTree {
             $ret .= $delimiter;
         $ret .= htmlReady($this->tree->tree_data[$this->start_item_id]["name"]);
         $ret .= "</font></td></tr></table>\n";
-        
+
         return $ret;
     }
-            
-    
-    
+
+
+
     function getSelf ($param = "", $with_start_item = true) {
         if ($param)
             $url = $_SERVER['PHP_SELF'] . (($with_start_item) ? "?start_item_id=" . $this->start_item_id . "&" : "?") . $param ;
diff --git a/lib/extern/modules/views/ExternSemBrowse.class.php b/lib/extern/modules/views/ExternSemBrowse.class.php
index d0e14e0ae3d47887cbb25bfc888b9f522a0e8341..bbebdbd257794ba0e5071dd91124bc3dd59db88a 100644
--- a/lib/extern/modules/views/ExternSemBrowse.class.php
+++ b/lib/extern/modules/views/ExternSemBrowse.class.php
@@ -45,6 +45,7 @@ class ExternSemBrowse extends SemBrowse {
     var $module;
     var $config;
     var $sem_types_position;
+    var $sem_dates;
 
     function __construct(&$module, $start_item_id) {
 
diff --git a/lib/extern/modules/views/ExternSemBrowseTable.class.php b/lib/extern/modules/views/ExternSemBrowseTable.class.php
index 2acc9718660fc9fd76679fa43ad7009bd9318bf3..3659100ae7cda76099ebae8b3db4b249890a2762 100644
--- a/lib/extern/modules/views/ExternSemBrowseTable.class.php
+++ b/lib/extern/modules/views/ExternSemBrowseTable.class.php
@@ -44,6 +44,7 @@ class ExternSemBrowseTable extends SemBrowse {
 
     var $module;
     var $sem_types_position;
+    var $sem_dates;
 
     function __construct(&$module, $start_item_id) {
 
@@ -181,7 +182,7 @@ class ExternSemBrowseTable extends SemBrowse {
                 $sem_inst_query = " AND seminare.Institut_id='{$this->module->config->range_id}' ";
             }
             if (Request::option('aggregation')) {
-                $i = Institute::find($this->config->range_id);
+                $i = Institute::find($this->module->config->range_id);
                 $children = $i->sub_institutes->pluck('institut_id');
                 $children[] = $i->institut_id;
                 $sem_inst_query = " AND seminare.Institut_id IN ('".(implode("', '", $children))."')";
diff --git a/lib/ilias_interface/ConnectedIlias.class.php b/lib/ilias_interface/ConnectedIlias.class.php
index f49487bdcffa56908bd1a1c0dc917c8a99d3fb49..ca01700e6ac3d608901a2317132b7963e43f03fe 100644
--- a/lib/ilias_interface/ConnectedIlias.class.php
+++ b/lib/ilias_interface/ConnectedIlias.class.php
@@ -47,6 +47,11 @@ class ConnectedIlias
     public $user;
     public $user_modules;
 
+    public $operations;
+    public $user_operations;
+    public $allowed_operations;
+    public $tree_allowed_operations;
+
     /**
     * constructor
     *
@@ -1124,7 +1129,6 @@ class ConnectedIlias
             $member_data["passed"] = self::CRS_PASSED_VALUE;
             if ($type != "") {
                 $this->soap_client->addMember( $this->user->getId(), $type, $ilias_course_id);
-                $this->permissions_changed = true;
             }
         }
 
@@ -1138,7 +1142,6 @@ class ConnectedIlias
             if ($proper_role) {
                 $this->soap_client->addUserRoleEntry( $this->user->getId(), $proper_role);
             }
-            $this->permissions_changed = true;
         }
 
         if (! $this->getUserModuleViewPermission($ilias_course_id)) {
diff --git a/lib/ilias_interface/IliasModule.class.php b/lib/ilias_interface/IliasModule.class.php
index 53a8f780f102f699b551df209bc7c1c213c9f8e8..f9bf958bd0ed32f39631e55d5044de4a3e33d283 100644
--- a/lib/ilias_interface/IliasModule.class.php
+++ b/lib/ilias_interface/IliasModule.class.php
@@ -27,10 +27,13 @@ class IliasModule
     public $change_date;
     public $path;
     public $ilias_index;
-    public $ilias_version;
     public $allowed_operations;
     public $is_offline;
     public $is_connected;
+    public $owner;
+    public $author_studip;
+    public $siblings_count;
+    public $icon_file;
 
     /**
     * constructor
@@ -366,4 +369,3 @@ class IliasModule
         return Icon::create($this->icon_file, 'inactive', [])->asImg();
     }
 }
-?>
diff --git a/lib/ilias_interface/IliasSoap.class.php b/lib/ilias_interface/IliasSoap.class.php
index b8977bf0e85655bcd4a8c1420fdfa9a19af76a43..5066d28a4d4d69957adf42d86b0bd8d5d39bd264 100644
--- a/lib/ilias_interface/IliasSoap.class.php
+++ b/lib/ilias_interface/IliasSoap.class.php
@@ -29,6 +29,7 @@ class IliasSoap extends StudipSoapClient
     private $user_type;
     private $soap_cache;
     private $separator_string;
+    private $caching_active = false;
 
 
     /**
@@ -57,7 +58,6 @@ class IliasSoap extends StudipSoapClient
         $this->user_type = "admin";
 
         $this->loadCacheData();
-        $this->caching_active = false;
     }
 
     /**
diff --git a/lib/ilias_interface/IliasUser.class.php b/lib/ilias_interface/IliasUser.class.php
index 996bb85ff5fb593134851d44f26fa404084040fd..6ee980ab671173b2fd8d7e136df10808cb696432 100755
--- a/lib/ilias_interface/IliasUser.class.php
+++ b/lib/ilias_interface/IliasUser.class.php
@@ -36,10 +36,7 @@ class IliasUser
     public $firstname;
     public $lastname;
     public $institution;
-    public $department;
     public $street;
-    public $city;
-    public $zipcode;
     public $country;
     public $phone_home;
     public $fax;
@@ -47,8 +44,8 @@ class IliasUser
     public $email;
     public $type;
     public $is_connected;
+    public $auth_plugin;
 
-    public $db_class;
     /**
     * constructor
     *
@@ -112,7 +109,7 @@ class IliasUser
     */
     function getStudipUserData()
     {
-        $query = "SELECT username, password, title_front, title_rear, Vorname, 
+        $query = "SELECT username, password, title_front, title_rear, Vorname,
                          Nachname, Email, privatnr, privadr, geschlecht
                   FROM auth_user_md5
                   LEFT JOIN  user_info USING (user_id)
@@ -444,7 +441,7 @@ class IliasUser
     {
         $this->setUserType($user_type);
 
-        $query = "INSERT INTO auth_extern (studip_user_id, external_user_id, external_user_name, 
+        $query = "INSERT INTO auth_extern (studip_user_id, external_user_id, external_user_name,
                                            external_user_password, external_user_category,
                                            external_user_system_type, external_user_type)
                   VALUES (?, ?, ?, ?, ?, ?, ?)
@@ -467,7 +464,7 @@ class IliasUser
         $this->is_connected = true;
         $this->readData();
     }
-    
+
     /**
      * remove connection for user-account
      *
@@ -479,7 +476,7 @@ class IliasUser
         if (!$ignore_usertype && ($this->getUserType() != self::USER_TYPE_ORIGINAL)) {
             return;
         }
-        
+
         $query = "DELETE FROM auth_extern WHERE studip_user_id = ? AND external_user_system_type = ? AND external_user_type = ?";
         $statement = DBManager::get()->prepare($query);
         $statement->execute([
@@ -487,11 +484,11 @@ class IliasUser
                         (string)$this->index,
                         (int)$this->type
         ]);
-        
+
         $this->is_connected = false;
         $this->readData();
     }
-    
+
     /**
     * get connection-status
     *
@@ -513,7 +510,7 @@ class IliasUser
     function getToken()
     {
         $token = md5(uniqid("iliastoken538"));
-        $query = "UPDATE `auth_extern` SET `external_user_token` = ?, `external_user_token_valid_until` = ? 
+        $query = "UPDATE `auth_extern` SET `external_user_token` = ?, `external_user_token_valid_until` = ?
                             WHERE `auth_extern`.`studip_user_id` = ? AND `auth_extern`.`external_user_system_type` = ? AND `auth_extern`.`external_user_type` = ?";
         $statement = DBManager::get()->prepare($query);
         $statement->execute([
diff --git a/lib/messaging.inc.php b/lib/messaging.inc.php
index 57fa31424b4c82d148339bc990696ad485629054..d0fe68e50918e8c6c52cddfde0fa91d9a5e0293d 100644
--- a/lib/messaging.inc.php
+++ b/lib/messaging.inc.php
@@ -27,6 +27,7 @@ require_once 'lib/user_visible.inc.php';
 
 class messaging
 {
+    var $send_as_email = false;
     var $sig_string; //String, der Signaturen vom eigentlichen Text abgrenzt
 
     public static function sendSystemMessage($recipient, $message_title, $message_body)
diff --git a/lib/phplib/Seminar_Auth.class.php b/lib/phplib/Seminar_Auth.class.php
index 41477483f5cf924f55a21a4b133500e95748cd54..6b3a5bebe278d06bb1a6dc09102f0d327f9300b1 100644
--- a/lib/phplib/Seminar_Auth.class.php
+++ b/lib/phplib/Seminar_Auth.class.php
@@ -45,6 +45,8 @@ class Seminar_Auth
      */
     public $auth = []; ## Data array
 
+    public $need_email_activation = false;
+
     /**
      *
      */
diff --git a/lib/raumzeit/Issue.class.php b/lib/raumzeit/Issue.class.php
index 51b6cc0bfb8decee7b30fcd2e5257e4db6d6e5a6..939aaeecc43850e8805c3b79b526806e5fa75d33 100644
--- a/lib/raumzeit/Issue.class.php
+++ b/lib/raumzeit/Issue.class.php
@@ -125,11 +125,6 @@ class Issue {
         return $this->seminar_id;
     }
 
-    function addSingleDate($termin_id) {
-        $this->singleDates[] = $termin_id;
-        return TRUE;
-    }
-
     function readSingleDates() {
         /*if ($termin_data = IssueDB::getTermine($this->issue_id)) {
             foreach ($termin_data as $val) {
@@ -153,7 +148,7 @@ class Issue {
                 $forum_module->setThreadForIssue($this->issue_id, $this->title, $this->description);
             }
         }
-        
+
         IssueDB::storeIssue($this);
         $this->new = false;
     }
@@ -197,7 +192,7 @@ class Issue {
         $this->priority = $data['priority'];
         $this->file = ($data['range_id'] == '') ? FALSE : TRUE;
         if ($this->file) {
-            $this->folder_id = $data['folder_id'];      
+            $this->folder_id = $data['folder_id'];
         }
         $this->new = false;
 
@@ -263,10 +258,10 @@ class Issue {
         return $temp;
     }
 
-  /* * * * * * * * * * * * * * * * * * * * 
-     * * S T A T I C   F U N C T I O N S * * 
+  /* * * * * * * * * * * * * * * * * * * *
+     * * S T A T I C   F U N C T I O N S * *
    * * * * * * * * * * * * * * * * * * * */
-     
+
     function isIssue($issue_id) {
         return IssueDB::isIssue($issue_id);
     }
diff --git a/lib/raumzeit/MetaDate.class.php b/lib/raumzeit/MetaDate.class.php
index e4d36611df0101b2c0c0b243bde69b0d98c486db..c13bb34d45b96d0c5414ea19b74f00abeeaee30d 100644
--- a/lib/raumzeit/MetaDate.class.php
+++ b/lib/raumzeit/MetaDate.class.php
@@ -40,6 +40,7 @@ class MetaDate
     var $seminarStartTime    = 0;
     var $seminarDurationTime = 0;
     var $cycles              = [];
+    var $hasDatesTmp         = [];
 
     /**
      * Constructor
diff --git a/lib/raumzeit/SingleDate.class.php b/lib/raumzeit/SingleDate.class.php
index c713cc4582ac8788bb044257c2affd1aa3fcd088..b6b8f0273e3f662ff90f84f2621a1cbee96b6916 100644
--- a/lib/raumzeit/SingleDate.class.php
+++ b/lib/raumzeit/SingleDate.class.php
@@ -571,7 +571,6 @@ class SingleDate
                     htmlReady($room->name)
                 );
 
-                $this->assign_id = $booking->id;
                 SingleDateDB::storeSingleDate($this);
                 $msg = sprintf(
                     _('Für den Termin %1$s wurde der Raum %2$s gebucht.'),
diff --git a/lib/soap/StudipSoapClient.class.php b/lib/soap/StudipSoapClient.class.php
index fbcc3e1d769b0b3a2e174d7088f549ca424d2d59..01b13928fa1d21e5d8f5446d68e42d3fe1e6adc7 100644
--- a/lib/soap/StudipSoapClient.class.php
+++ b/lib/soap/StudipSoapClient.class.php
@@ -7,6 +7,7 @@ class StudipSoapClient
 {
     var $soap_client;
     var $error;
+    var $faultstring;
 
     function __construct($path)
     {
diff --git a/lib/webservices/api/studip_user.php b/lib/webservices/api/studip_user.php
index 0b19a5d2fcdfe1bd9975c15e57608b05341c558d..58708249d54b44f3bd4de73040e2fc0a1109e6a6 100644
--- a/lib/webservices/api/studip_user.php
+++ b/lib/webservices/api/studip_user.php
@@ -33,6 +33,7 @@ class Studip_User {
     var $fullname;
     var $auth_plugin;
     var $visibility;
+    var $error;
 
 
     // Constructor