Skip to content

Commit

Permalink
enable import to migrate old cw archives
Browse files Browse the repository at this point in the history
  • Loading branch information
rlucke committed Jul 18, 2022
1 parent 5bcae12 commit 7c38510
Show file tree
Hide file tree
Showing 45 changed files with 1,723 additions and 9 deletions.
8 changes: 8 additions & 0 deletions Courseware.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,14 @@ public function getTabNavigation($cid)
);
$navigation->addSubnavigation('index', clone $navigation);

if ($this->container['current_user']->hasPerm($cid, 'tutor')) {
$importUrl = PluginEngine::getURL($this, compact('cid'), 'import', true);
$navigation->addSubnavigation(
'import',
new Navigation(_cw('Import für alte Courseware-Archive'), $importUrl)
);
}

return array('mooc_courseware' => $navigation);
}

Expand Down
9 changes: 9 additions & 0 deletions blocks/AssortBlock/schema/assort-1.0.xsd
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8" ?>
<xsd:schema xmlns="http://moocip.de/schema/block/assort/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://moocip.de/schema/block/assort/"
elementFormDefault="qualified"
>
<xsd:attribute name="assortblocks" type="xsd:string" />
<xsd:attribute name="assorttype" type="xsd:string" />
</xsd:schema>
12 changes: 12 additions & 0 deletions blocks/AudioBlock/schema/audio-1.0.xsd
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
<xsd:schema xmlns="http://moocip.de/schema/block/audio/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://moocip.de/schema/block/audio/"
elementFormDefault="qualified"
>
<xsd:attribute name="audio_description" type="xsd:string" />
<xsd:attribute name="audio_source" type="xsd:string" />
<xsd:attribute name="audio_file" type="xsd:string" />
<xsd:attribute name="audio_file_name" type="xsd:string" />
<xsd:attribute name="audio_id" type="xsd:string" />
</xsd:schema>
8 changes: 8 additions & 0 deletions blocks/AudioGalleryBlock/schema/audio_gallery-1.0.xsd
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8" ?>
<xsd:schema xmlns="http://moocip.de/schema/block/audio_gallery/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://moocip.de/schema/block/audio_gallery/"
elementFormDefault="qualified"
>
<xsd:attribute name="audio_gallery_content" type="xsd:string" />
</xsd:schema>
9 changes: 9 additions & 0 deletions blocks/BeforeAfterBlock/schema/beforeafter-1.0.xsd
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8" ?>
<xsd:schema xmlns="http://moocip.de/schema/block/beforeafter/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://moocip.de/schema/block/beforeafter/"
elementFormDefault="qualified"
>
<xsd:attribute name="ba_before" type="xsd:string" />
<xsd:attribute name="ba_after" type="xsd:string" />
</xsd:schema>
8 changes: 8 additions & 0 deletions blocks/CanvasBlock/schema/canvas-1.0.xsd
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8" ?>
<xsd:schema xmlns="http://moocip.de/schema/block/canvas/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://moocip.de/schema/block/canvas/"
elementFormDefault="qualified"
>
<xsd:attribute name="canvas_content" type="xsd:string" />
</xsd:schema>
10 changes: 10 additions & 0 deletions blocks/ChartBlock/schema/chart-1.0.xsd
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<xsd:schema xmlns="http://moocip.de/schema/block/chart/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://moocip.de/schema/block/chart/"
elementFormDefault="qualified"
>
<xsd:attribute name="chart_content" type="xsd:string" />
<xsd:attribute name="chart_label" type="xsd:string" />
<xsd:attribute name="chart_type" type="xsd:string" />
</xsd:schema>
9 changes: 9 additions & 0 deletions blocks/CodeBlock/schema/code-1.0.xsd
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8" ?>
<xsd:schema xmlns="http://moocip.de/schema/block/code/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://moocip.de/schema/block/code/"
elementFormDefault="qualified"
>
<xsd:attribute name="code_content" type="xsd:string" />
<xsd:attribute name="code_lang" type="xsd:string" />
</xsd:schema>
86 changes: 86 additions & 0 deletions blocks/Courseware/schema/courseware-1.0.xsd
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
<?xml version="1.0" encoding="UTF-8" ?>
<xsd:schema xmlns="http://moocip.de/schema/courseware/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://moocip.de/schema/courseware/"
elementFormDefault="qualified">

<xsd:element name="courseware">
<xsd:complexType>
<xsd:choice minOccurs="0" maxOccurs="unbounded">
<xsd:element name="chapter" type="chapter" />
<xsd:element name="file" type="file" />
</xsd:choice>
<xsd:attribute name="title" type="xsd:string" use="required" />
<xsd:attribute name="progression" type="xsd:string" />
</xsd:complexType>
</xsd:element>

<xsd:complexType name="chapter">
<xsd:sequence>
<xsd:choice minOccurs="0" maxOccurs="1">
<xsd:element name="asidesection" type="asidesection" />
</xsd:choice>
<xsd:choice minOccurs="0" maxOccurs="unbounded">
<xsd:element name="subchapter" type="subchapter" />
</xsd:choice>
</xsd:sequence>
<xsd:attribute name="title" type="xsd:string" use="required" />
</xsd:complexType>

<xsd:complexType name="subchapter">
<xsd:sequence>
<xsd:choice minOccurs="0" maxOccurs="1">
<xsd:element name="asidesection" type="asidesection" />
</xsd:choice>
<xsd:choice minOccurs="0" maxOccurs="unbounded">
<xsd:element name="section" type="section" />
</xsd:choice>
</xsd:sequence>
<xsd:attribute name="title" type="xsd:string" use="required" />
</xsd:complexType>

<xsd:complexType name="section">
<xsd:choice minOccurs="0" maxOccurs="unbounded">
<xsd:element name="block" type="block" />
</xsd:choice>
<xsd:attribute name="title" type="xsd:string" use="required" />
<xsd:attribute name="icon" type="xsd:string" use="required" />
</xsd:complexType>

<xsd:complexType name="asidesection">
<xsd:choice minOccurs="0" maxOccurs="unbounded">
<xsd:element name="block" type="block" />
</xsd:choice>
<xsd:attribute name="title" type="xsd:string" use="required" />
<xsd:attribute name="icon" type="xsd:string" use="required" />
</xsd:complexType>

<xsd:complexType name="block" mixed="true">
<xsd:choice minOccurs="0" maxOccurs="unbounded">
<xsd:any />
</xsd:choice>
<xsd:attribute name="title" type="xsd:string" use="required" />
<xsd:attribute name="type" type="xsd:string" use="required" />
<xsd:attribute name="sub-type" type="xsd:string" />
<xsd:attribute name="uuid" type="xsd:string" />
<xsd:anyAttribute />
</xsd:complexType>

<xsd:complexType name="file">
<xsd:simpleContent>
<xsd:extension base="xsd:string">
<xsd:attribute name="id" type="xsd:string" use="required" />
<xsd:attribute name="name" type="xsd:string" use="required" />
<xsd:attribute name="filename">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:minLength value="1"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:attribute>
<xsd:attribute name="filesize" type="xsd:integer" use="required" />
<xsd:attribute name="url" type="xsd:string" />
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
</xsd:schema>
8 changes: 8 additions & 0 deletions blocks/DateBlock/schema/date-1.0.xsd
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8" ?>
<xsd:schema xmlns="http://moocip.de/schema/block/date/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://moocip.de/schema/block/date/"
elementFormDefault="qualified"
>
<xsd:attribute name="date_content" type="xsd:string" />
</xsd:schema>
8 changes: 8 additions & 0 deletions blocks/DialogCardsBlock/schema/dialogcards-1.0.xsd
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8" ?>
<xsd:schema xmlns="http://moocip.de/schema/block/dialogcards/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://moocip.de/schema/block/dialogcards/"
elementFormDefault="qualified"
>
<xsd:attribute name="dialogcards_content" type="xsd:string" />
</xsd:schema>
15 changes: 15 additions & 0 deletions blocks/DownloadBlock/schema/download-1.0.xsd
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8" ?>
<xsd:schema xmlns="http://moocip.de/schema/block/download/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://moocip.de/schema/block/download/"
elementFormDefault="qualified"
>
<xsd:attribute name="file" type="xsd:string" />
<xsd:attribute name="file_id" type="xsd:string" />
<xsd:attribute name="file_name" type="xsd:string" />
<xsd:attribute name="folder_id" type="xsd:string" />
<xsd:attribute name="download_title" type="xsd:string" />
<xsd:attribute name="download_info" type="xsd:string" />
<xsd:attribute name="download_success" type="xsd:string" />
<xsd:attribute name="download_grade" type="xsd:string" />
</xsd:schema>
12 changes: 12 additions & 0 deletions blocks/EmbedBlock/schema/embed-1.0.xsd
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
<xsd:schema xmlns="http://moocip.de/schema/block/embed/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://moocip.de/schema/block/embed/"
elementFormDefault="qualified"
>
<xsd:attribute name="embed_url" type="xsd:string" />
<xsd:attribute name="embed_source" type="xsd:string" />
<xsd:attribute name="embed_time" type="xsd:string" />
<xsd:attribute name="embed_title" type="xsd:string" />
<xsd:attribute name="embed_fullwidth" type="xsd:string" />
</xsd:schema>
8 changes: 8 additions & 0 deletions blocks/FolderBlock/schema/folder-1.0.xsd
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8" ?>
<xsd:schema xmlns="http://moocip.de/schema/block/folder/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://moocip.de/schema/block/folder/"
elementFormDefault="qualified"
>
<xsd:attribute name="folder_content" type="xsd:string" />
</xsd:schema>
8 changes: 8 additions & 0 deletions blocks/ForumBlock/schema/forum-1.0.xsd
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8" ?>
<xsd:schema xmlns="http://moocip.de/schema/block/forum/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://moocip.de/schema/block/forum/"
elementFormDefault="qualified"
>
<xsd:attribute name="areaid" type="xsd:string" />
</xsd:schema>
16 changes: 16 additions & 0 deletions blocks/GalleryBlock/schema/gallery-1.0.xsd
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8" ?>
<xsd:schema xmlns="http://moocip.de/schema/block/gallery/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://moocip.de/schema/block/gallery/"
elementFormDefault="qualified"
>
<xsd:attribute name="gallery_file_ids" type="xsd:string" />
<xsd:attribute name="gallery_file_names" type="xsd:string" />
<xsd:attribute name="gallery_folder_id" type="xsd:string" />
<xsd:attribute name="gallery_folder_name" type="xsd:string" />
<xsd:attribute name="gallery_autoplay" type="xsd:string" />
<xsd:attribute name="gallery_autoplay_timer" type="xsd:string" />
<xsd:attribute name="gallery_hidenav" type="xsd:string" />
<xsd:attribute name="gallery_height" type="xsd:string" />
<xsd:attribute name="gallery_show_names" type="xsd:boolean" />
</xsd:schema>
15 changes: 15 additions & 0 deletions blocks/IFrameBlock/schema/iframe-1.0.xsd
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8" ?>
<xsd:schema xmlns="http://moocip.de/schema/block/iframe/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://moocip.de/schema/block/iframe/"
elementFormDefault="qualified"
>
<xsd:attribute name="url" type="xsd:string" />
<xsd:attribute name="header" type="xsd:string" />
<xsd:attribute name="height" type="xsd:string" />
<xsd:attribute name="width" type="xsd:string" />
<xsd:attribute name="submit_user_id" type="xsd:string" />
<xsd:attribute name="submit_param" type="xsd:string" />
<xsd:attribute name="salt" type="xsd:string" />
<xsd:attribute name="cc_infos" type="xsd:string" />
</xsd:schema>
8 changes: 8 additions & 0 deletions blocks/ImageMapBlock/schema/image_map-1.0.xsd
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8" ?>
<xsd:schema xmlns="http://moocip.de/schema/block/image_map/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://moocip.de/schema/block/image_map/"
elementFormDefault="qualified"
>
<xsd:attribute name="image_map_content" type="xsd:string" />
</xsd:schema>
15 changes: 15 additions & 0 deletions blocks/InteractiveVideoBlock/schema/interactivevideo-1.0.xsd
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8" ?>
<xsd:schema xmlns="http://moocip.de/schema/block/interactivevideo/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://moocip.de/schema/block/interactivevideo/"
elementFormDefault="qualified"
>
<xsd:attribute name="iav_source" type="xsd:string" />
<xsd:attribute name="iav_overlays" type="xsd:string" />
<xsd:attribute name="iav_stops" type="xsd:string" />
<xsd:attribute name="iav_tests" type="xsd:string" />
<xsd:attribute name="assignment_id" type="xsd:string" />
<xsd:attribute name="vips_xml" type="xsd:string" />
<xsd:attribute name="range_inactive" type="xsd:string" />
<xsd:attribute name="tries" type="xsd:string" />
</xsd:schema>
11 changes: 11 additions & 0 deletions blocks/KeyPointBlock/schema/keypoint-1.0.xsd
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8" ?>
<xsd:schema xmlns="http://moocip.de/schema/block/keypoint/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://moocip.de/schema/block/keypoint/"
elementFormDefault="qualified"
>
<xsd:attribute name="keypoint" type="xsd:string" />
<xsd:attribute name="keypoint_content" type="xsd:string" />
<xsd:attribute name="keypoint_color" type="xsd:string" />
<xsd:attribute name="keypoint_icon" type="xsd:string" />
</xsd:schema>
11 changes: 11 additions & 0 deletions blocks/LinkBlock/schema/link-1.0.xsd
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8" ?>
<xsd:schema xmlns="http://moocip.de/schema/block/link/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://moocip.de/schema/block/link/"
elementFormDefault="qualified"
>
<xsd:attribute name="link_type" type="xsd:string" />
<xsd:attribute name="link_target" type="xsd:string" />
<xsd:attribute name="link_title" type="xsd:string" />
<xsd:attribute name="link_show_progress" type="xsd:string" />
</xsd:schema>
8 changes: 8 additions & 0 deletions blocks/OpenCastBlock/schema/opencast-1.0.xsd
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8" ?>
<xsd:schema xmlns="http://moocip.de/schema/block/opencast/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://moocip.de/schema/block/opencast/"
elementFormDefault="qualified"
>
<xsd:attribute name="opencast_content" type="xsd:string" />
</xsd:schema>
12 changes: 12 additions & 0 deletions blocks/PdfBlock/schema/pdf-1.0.xsd
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
<xsd:schema xmlns="http://moocip.de/schema/block/pdf/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://moocip.de/schema/block/pdf/"
elementFormDefault="qualified"
>
<xsd:attribute name="pdf_file" type="xsd:string" />
<xsd:attribute name="pdf_filename" type="xsd:string" />
<xsd:attribute name="pdf_file_id" type="xsd:string" />
<xsd:attribute name="pdf_title" type="xsd:string" />
<xsd:attribute name="pdf_disable_download" type="xsd:string" />
</xsd:schema>
10 changes: 10 additions & 0 deletions blocks/PostBlock/schema/post-1.0.xsd
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<xsd:schema xmlns="http://moocip.de/schema/block/post/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://moocip.de/schema/block/post/"
elementFormDefault="qualified"
>
<xsd:attribute name="post_title" type="xsd:string" />
<xsd:attribute name="thread_id" type="xsd:string" />
<xsd:attribute name="has_to_post" type="xsd:boolean" />
</xsd:schema>
8 changes: 8 additions & 0 deletions blocks/ScrollyBlock/schema/scrolly-1.0.xsd
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8" ?>
<xsd:schema xmlns="http://moocip.de/schema/block/scrolly/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://moocip.de/schema/block/scrolly/"
elementFormDefault="qualified"
>
<xsd:attribute name="scrolly_block_style" type="xsd:string" />
</xsd:schema>
8 changes: 8 additions & 0 deletions blocks/SearchBlock/schema/search-1.0.xsd
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8" ?>
<xsd:schema xmlns="http://moocip.de/schema/block/search/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://moocip.de/schema/block/search/"
elementFormDefault="qualified"
>
<xsd:attribute name="searchtitle" type="xsd:string" />
</xsd:schema>
10 changes: 10 additions & 0 deletions blocks/TestBlock/schema/test-1.0.xsd
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<xsd:schema xmlns="http://moocip.de/schema/block/test/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://moocip.de/schema/block/test/"
elementFormDefault="qualified"
>
<xsd:attribute name="test_id" type="xsd:string" />
<xsd:attribute name="assignment_id" type="xsd:string" />
<xsd:attribute name="xml" type="xsd:string" />
</xsd:schema>
8 changes: 8 additions & 0 deletions blocks/TypewriterBlock/schema/typewriter-1.0.xsd
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8" ?>
<xsd:schema xmlns="http://moocip.de/schema/block/typewriter/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://moocip.de/schema/block/typewriter/"
elementFormDefault="qualified"
>
<xsd:attribute name="typewriter_json" type="xsd:string" />
</xsd:schema>
Loading

0 comments on commit 7c38510

Please sign in to comment.