From 2054b4c0815aa508623165d7fc0b810bafc16cc0 Mon Sep 17 00:00:00 2001 From: Jan-Hendrik Willms <tleilax+studip@gmail.com> Date: Mon, 11 Jul 2022 09:41:58 +0000 Subject: [PATCH] fix 'Access to undefined property' errors, fixes #1295 Closes #1295 Merge request studip/studip!791 --- lib/activities/CoursewareContext.php | 3 + .../ParticipantRestrictedAdmission.class.php | 2 + lib/calendar/CalendarColumn.class.php | 6 +- lib/calendar/CalendarImport.class.php | 2 +- lib/calendar/CalendarParser.class.php | 4 +- lib/calendar/CalendarView.class.php | 14 +- lib/calendar/CalendarWeekView.class.php | 7 +- lib/calendar/lib/ErrorHandler.class.php | 4 +- lib/classes/ContentBar.php | 2 +- lib/classes/ContentGroupMenu.php | 2 + lib/classes/DataFieldEntry.class.php | 1 + lib/classes/DataFieldSelectboxEntry.class.php | 2 + lib/classes/DatabaseObject.class.php | 3 + lib/classes/MultiPersonSearch.class.php | 12 -- lib/classes/MvvQuickSearch.php | 14 +- lib/classes/QuickSearch.class.php | 7 +- lib/classes/SemBrowse.class.php | 2 + lib/classes/StudipRangeTree.class.php | 9 +- .../StudipSemRangeTreeViewSimple.class.php | 6 +- lib/classes/StudipSemSearch.class.php | 16 +- lib/classes/StudipSemTree.class.php | 1 + lib/classes/StudipSemTreeSearch.class.php | 12 +- lib/classes/StudipSemTreeViewAdmin.class.php | 6 + lib/classes/StudipSemTreeViewSimple.class.php | 2 + lib/classes/TreeView.class.php | 2 + lib/classes/UserLookup.class.php | 1 - lib/classes/admission/CourseSet.class.php | 5 + .../auth_plugins/StudipAuthAbstract.class.php | 27 +++- .../auth_plugins/StudipAuthCAS.class.php | 3 - .../auth_plugins/StudipAuthIP.class.php | 7 +- lib/classes/calendar/SingleCalendar.php | 4 +- lib/classes/helpbar/Helpbar.php | 1 + .../searchmodules/BASELibrarySearch.class.php | 2 +- .../K10PlusZentralLibrarySearch.class.php | 2 +- .../searchmodules/SRULibrarySearch.class.php | 2 +- lib/classes/restapi/ConsumerPermissions.php | 2 +- lib/classes/restapi/RouteMap.php | 5 + lib/classes/restapi/RouterHalt.php | 2 + lib/classes/restapi/UriTemplate.php | 3 + .../searchtypes/ResourceSearch.class.php | 25 +--- lib/classes/searchtypes/RoomSearch.class.php | 17 +-- lib/elearning/ConnectedCMS.class.php | 7 +- lib/elearning/Ilias3ConnectedCMS.class.php | 11 +- .../Ilias3ConnectedPermissions.class.php | 4 +- lib/elearning/Ilias3ObjectXMLParser.class.php | 141 +++++++++--------- lib/elearning/Ilias3Soap.class.php | 3 +- .../Ilias4ConnectedPermissions.class.php | 2 - lib/elearning/Ilias4ConnectedUser.class.php | 16 +- lib/elearning/Ilias4Soap.class.php | 4 +- lib/elearning/PmWikiConnectedCMS.class.php | 14 +- lib/elearning/PmWikiContentModule.class.php | 4 + .../clients/soap_webservice_client.php | 8 +- .../clients/xml_rpc_webservice_client.php | 5 +- lib/evaluation/classes/Evaluation.class.php | 5 +- .../EvaluationExportManagerCSV.class.php | 2 +- .../classes/EvaluationQuestion.class.php | 19 ++- .../classes/EvaluationTree.class.php | 18 ++- .../classes/EvaluationTreeEditView.class.php | 13 ++ .../evaluation_admin_template.lib.php | 5 +- .../ExternElementLinkIntern.class.php | 1 - .../ExternElementLinkInternSimple.class.php | 1 - .../ExternElementLinkInternTemplate.class.php | 1 - .../ExternElementTemplateGeneric.class.php | 2 +- lib/extern/lib/ExternElement.class.php | 1 + lib/extern/lib/ExternElementMain.class.php | 45 +++--- ...ternModuleTemplateLecturedetails.class.php | 1 + .../ExternModuleTemplateLectures.class.php | 2 + .../ExternModuleTemplateSemBrowse.class.php | 19 +-- .../views/ExternRangeLectureTree.class.php | 30 ++-- .../modules/views/ExternSemBrowse.class.php | 1 + .../views/ExternSemBrowseTable.class.php | 3 +- lib/ilias_interface/ConnectedIlias.class.php | 7 +- lib/ilias_interface/IliasModule.class.php | 6 +- lib/ilias_interface/IliasSoap.class.php | 2 +- lib/ilias_interface/IliasUser.class.php | 19 +-- lib/messaging.inc.php | 1 + lib/phplib/Seminar_Auth.class.php | 2 + lib/raumzeit/Issue.class.php | 15 +- lib/raumzeit/MetaDate.class.php | 1 + lib/raumzeit/SingleDate.class.php | 1 - lib/soap/StudipSoapClient.class.php | 1 + lib/webservices/api/studip_user.php | 1 + 82 files changed, 359 insertions(+), 334 deletions(-) diff --git a/lib/activities/CoursewareContext.php b/lib/activities/CoursewareContext.php index 7c83144ad7a..6bee0196ecb 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 3c88cb34fde..1556db39117 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 5e1b9099aa6..cbaffec052c 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 605d747bfe6..803a58dd3f2 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 07e556f2bf1..dac15701961 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 0b8f9053f1a..e3bfd058327 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 e9455eaec33..e0d0a6bb77b 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 710bdd14950..390b5d521c0 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 b610476f261..043fe1830bb 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 dfc0cef6894..7f3ba5c9a2f 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 96aa4e0b732..c934e51eb75 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 3ff6bc75413..8ac1a3c2937 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 22e8df2ad6f..2258adb4eb6 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 65cad48783e..a5b2c1e63a4 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 2f55646bebc..b0e79c03b99 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 56bcc77432f..e0e57d306a1 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 6e32f775ae7..a6a672a6028 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 2dea8a07f1f..291d4430661 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 0a78eb2a2fe..41744bd5ed2 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 4aef5969cb1..e12c443140e 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 ecdc39377dc..33377975490 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 dc3f7c7e73a..e79a34fa29e 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 f10f18070e2..8644fef216c 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 e2150472b3a..a78e2178977 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 cc7491f4cbc..2223cc1d8bb 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 3ee1cd098f6..cef2b4aa5a7 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 e79f4c08c94..054c9506479 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 a21d1513aa0..f18ecd441ab 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 620f12e19ce..d87aada3529 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 9c1a1775f61..e0d6afa3215 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 da2987f246c..a3a1eaeaeb2 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 e01ad56746a..4725a782b7d 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 10f8861cb85..e0408e72952 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 bb44e8e96fa..9660cb4fcb1 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 46b73337670..b94869afc77 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 f8de967d912..f0e0f03a085 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 18c8f5dafef..62e3278a0b1 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 2ff094e8cbb..98c46b44a04 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 f2e70d3322b..e83dd2c1eb0 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 e9030371355..24038a84b4e 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 9b191447f79..002712e3c31 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 0aac5261f4f..e29d3c2fb4d 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 69f1e529f53..de8db3fb714 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 17319d7298e..dcb661574f9 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 2dc76b492cb..172ca2ae5ae 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 98627ded2d9..6a43b9bb611 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 b44e7a29778..af70ba75d7f 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 0d480d4700f..be8b88c43f5 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 d6d25278489..7afd7380a29 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 5c123beb4ac..3cd728e6471 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 061dbd38b5e..06533dda93f 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 9573f131f94..9c392a8aaa1 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 6060a0e5e46..19568f6cb74 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 2fd240c739c..cd674074bfb 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 8e70a1b0c12..4baa3f8677e 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 1ee2f9d515f..c3c1da3839d 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 9a03a35e0ca..f2225c62cd3 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 ea2e67cae9a..bec740e5030 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 504a828b174..596307dcc49 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 ef3a3c8aace..b7144b91769 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 d4765075f58..9ee07183463 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 3c12585c310..fff3663a251 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 48f8ed96017..bdd8a3315d7 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 5fa513b7249..5f2f9262751 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 f86ff592442..781325c3e4d 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 5dd105ba7c1..bef48b1218d 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 74d2b9b3c17..46c470e9a84 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 16dd02dabee..da4d0226ce3 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 ca550f79011..d8337fc4c53 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 d0e14e0ae3d..bbebdbd2577 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 2acc9718660..3659100ae7c 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 f49487bdcff..ca01700e6ac 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 53a8f780f10..f9bf958bd0e 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 b8977bf0e85..5066d28a4d4 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 996bb85ff5f..6ee980ab671 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 57fa31424b4..d0fe68e5091 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 41477483f5c..6b3a5bebe27 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 51b6cc0bfb8..939aaeecc43 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 e4d36611df0..c13bb34d45b 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 c713cc4582a..b6b8f0273e3 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 fbcc3e1d769..01b13928fa1 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 0b19a5d2fcd..58708249d54 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 -- GitLab