aboutsummaryrefslogtreecommitdiff
path: root/lib/elearning/LonCapaContentModule.class.php
diff options
context:
space:
mode:
authorMarcus Eibrink-Lunzenauer <lunzenauer@elan-ev.de>2024-06-18 13:18:06 +0000
committerMarcus Eibrink-Lunzenauer <lunzenauer@elan-ev.de>2024-06-18 13:18:06 +0000
commit33fd1358507b4a5abb3dcebe78d407d0567717c1 (patch)
tree6bd8f6959da4c3fc1b8907c0bbc28eb9e10d4a5a /lib/elearning/LonCapaContentModule.class.php
parent42d46671c0309bddb71a91bbfdc5f2fa2e44384e (diff)
Deprecate `StudipAutoloader` and use composer's `autoload`
Closes #4282 Merge request studip/studip!3099
Diffstat (limited to 'lib/elearning/LonCapaContentModule.class.php')
-rw-r--r--lib/elearning/LonCapaContentModule.class.php86
1 files changed, 0 insertions, 86 deletions
diff --git a/lib/elearning/LonCapaContentModule.class.php b/lib/elearning/LonCapaContentModule.class.php
deleted file mode 100644
index 0f16cd0..0000000
--- a/lib/elearning/LonCapaContentModule.class.php
+++ /dev/null
@@ -1,86 +0,0 @@
-<?php
-/**
- *
- * This class contains methods to handle LonCapa learning modules
- *
- * @modulegroup elearning_interface_modules
- * @module LonCapaContentModule
- * @package ELearning-Interface
- */
-
-class LonCapaContentModule extends ContentModule
-{
- /**
- * @var LonCapaRequest
- */
- public $lcRequest;
- /**
- * @var string
- */
- public $cmsUrl;
-
- /**
- * LonCapaContentModule constructor.
- * @param string $module_id
- * @param string $module_type
- * @param string $cms_type
- */
- public function __construct($module_id, $module_type, $cms_type)
- {
- $this->lcRequest = new LonCapaRequest();
- $this->cmsUrl = $GLOBALS['ELEARNING_INTERFACE_MODULES'][$cms_type]['ABSOLUTE_PATH_ELEARNINGMODULES'];
-
- parent::__construct($module_id, $module_type, $cms_type);
- }
-
- /**
- *fetch data from LonCapa
- *
- */
- public function readData()
- {
- $url = $this->cmsUrl . '/course/' . urlencode($this->id);
- $response = $this->lcRequest->request($url);
-
- if ($response) {
- $courses = new SimpleXMLElement($response);
- $course = $courses->course[0];
-
- list($author, $dummy) = explode(':', (string)$course->owner);
-
- $this->id = (string)$course->id;
- $this->title = (string)$course->description;
- $this->authors = $author;
- }
-
- }
-
- /**
- * get permission-status
- *
- *
- * @param string $operation operation
- * @return boolean allowed
- */
- public function isAllowed($operation)
- {
- return true;
- }
-
- /**
- * store connection between Stud.IP course and LonCapa course
- *
- * @param string $seminar_id
- * @return bool
- */
- public function setConnection($seminar_id)
- {
- $this->is_connected = true;
- return ObjectConnections::setConnection(
- $seminar_id,
- $this->id,
- $this->module_type,
- $this->cms_type
- );
- }
-}