Skip to content

Commit 7c38510

Browse files
committed
enable import to migrate old cw archives
1 parent 5bcae12 commit 7c38510

45 files changed

Lines changed: 1723 additions & 9 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Courseware.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,14 @@ public function getTabNavigation($cid)
6060
);
6161
$navigation->addSubnavigation('index', clone $navigation);
6262

63+
if ($this->container['current_user']->hasPerm($cid, 'tutor')) {
64+
$importUrl = PluginEngine::getURL($this, compact('cid'), 'import', true);
65+
$navigation->addSubnavigation(
66+
'import',
67+
new Navigation(_cw('Import für alte Courseware-Archive'), $importUrl)
68+
);
69+
}
70+
6371
return array('mooc_courseware' => $navigation);
6472
}
6573

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?xml version="1.0" encoding="UTF-8" ?>
2+
<xsd:schema xmlns="http://moocip.de/schema/block/assort/"
3+
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
4+
targetNamespace="http://moocip.de/schema/block/assort/"
5+
elementFormDefault="qualified"
6+
>
7+
<xsd:attribute name="assortblocks" type="xsd:string" />
8+
<xsd:attribute name="assorttype" type="xsd:string" />
9+
</xsd:schema>
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?xml version="1.0" encoding="UTF-8" ?>
2+
<xsd:schema xmlns="http://moocip.de/schema/block/audio/"
3+
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
4+
targetNamespace="http://moocip.de/schema/block/audio/"
5+
elementFormDefault="qualified"
6+
>
7+
<xsd:attribute name="audio_description" type="xsd:string" />
8+
<xsd:attribute name="audio_source" type="xsd:string" />
9+
<xsd:attribute name="audio_file" type="xsd:string" />
10+
<xsd:attribute name="audio_file_name" type="xsd:string" />
11+
<xsd:attribute name="audio_id" type="xsd:string" />
12+
</xsd:schema>
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="UTF-8" ?>
2+
<xsd:schema xmlns="http://moocip.de/schema/block/audio_gallery/"
3+
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
4+
targetNamespace="http://moocip.de/schema/block/audio_gallery/"
5+
elementFormDefault="qualified"
6+
>
7+
<xsd:attribute name="audio_gallery_content" type="xsd:string" />
8+
</xsd:schema>
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?xml version="1.0" encoding="UTF-8" ?>
2+
<xsd:schema xmlns="http://moocip.de/schema/block/beforeafter/"
3+
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
4+
targetNamespace="http://moocip.de/schema/block/beforeafter/"
5+
elementFormDefault="qualified"
6+
>
7+
<xsd:attribute name="ba_before" type="xsd:string" />
8+
<xsd:attribute name="ba_after" type="xsd:string" />
9+
</xsd:schema>
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="UTF-8" ?>
2+
<xsd:schema xmlns="http://moocip.de/schema/block/canvas/"
3+
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
4+
targetNamespace="http://moocip.de/schema/block/canvas/"
5+
elementFormDefault="qualified"
6+
>
7+
<xsd:attribute name="canvas_content" type="xsd:string" />
8+
</xsd:schema>
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?xml version="1.0" encoding="UTF-8" ?>
2+
<xsd:schema xmlns="http://moocip.de/schema/block/chart/"
3+
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
4+
targetNamespace="http://moocip.de/schema/block/chart/"
5+
elementFormDefault="qualified"
6+
>
7+
<xsd:attribute name="chart_content" type="xsd:string" />
8+
<xsd:attribute name="chart_label" type="xsd:string" />
9+
<xsd:attribute name="chart_type" type="xsd:string" />
10+
</xsd:schema>
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?xml version="1.0" encoding="UTF-8" ?>
2+
<xsd:schema xmlns="http://moocip.de/schema/block/code/"
3+
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
4+
targetNamespace="http://moocip.de/schema/block/code/"
5+
elementFormDefault="qualified"
6+
>
7+
<xsd:attribute name="code_content" type="xsd:string" />
8+
<xsd:attribute name="code_lang" type="xsd:string" />
9+
</xsd:schema>
Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
<?xml version="1.0" encoding="UTF-8" ?>
2+
<xsd:schema xmlns="http://moocip.de/schema/courseware/"
3+
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
4+
targetNamespace="http://moocip.de/schema/courseware/"
5+
elementFormDefault="qualified">
6+
7+
<xsd:element name="courseware">
8+
<xsd:complexType>
9+
<xsd:choice minOccurs="0" maxOccurs="unbounded">
10+
<xsd:element name="chapter" type="chapter" />
11+
<xsd:element name="file" type="file" />
12+
</xsd:choice>
13+
<xsd:attribute name="title" type="xsd:string" use="required" />
14+
<xsd:attribute name="progression" type="xsd:string" />
15+
</xsd:complexType>
16+
</xsd:element>
17+
18+
<xsd:complexType name="chapter">
19+
<xsd:sequence>
20+
<xsd:choice minOccurs="0" maxOccurs="1">
21+
<xsd:element name="asidesection" type="asidesection" />
22+
</xsd:choice>
23+
<xsd:choice minOccurs="0" maxOccurs="unbounded">
24+
<xsd:element name="subchapter" type="subchapter" />
25+
</xsd:choice>
26+
</xsd:sequence>
27+
<xsd:attribute name="title" type="xsd:string" use="required" />
28+
</xsd:complexType>
29+
30+
<xsd:complexType name="subchapter">
31+
<xsd:sequence>
32+
<xsd:choice minOccurs="0" maxOccurs="1">
33+
<xsd:element name="asidesection" type="asidesection" />
34+
</xsd:choice>
35+
<xsd:choice minOccurs="0" maxOccurs="unbounded">
36+
<xsd:element name="section" type="section" />
37+
</xsd:choice>
38+
</xsd:sequence>
39+
<xsd:attribute name="title" type="xsd:string" use="required" />
40+
</xsd:complexType>
41+
42+
<xsd:complexType name="section">
43+
<xsd:choice minOccurs="0" maxOccurs="unbounded">
44+
<xsd:element name="block" type="block" />
45+
</xsd:choice>
46+
<xsd:attribute name="title" type="xsd:string" use="required" />
47+
<xsd:attribute name="icon" type="xsd:string" use="required" />
48+
</xsd:complexType>
49+
50+
<xsd:complexType name="asidesection">
51+
<xsd:choice minOccurs="0" maxOccurs="unbounded">
52+
<xsd:element name="block" type="block" />
53+
</xsd:choice>
54+
<xsd:attribute name="title" type="xsd:string" use="required" />
55+
<xsd:attribute name="icon" type="xsd:string" use="required" />
56+
</xsd:complexType>
57+
58+
<xsd:complexType name="block" mixed="true">
59+
<xsd:choice minOccurs="0" maxOccurs="unbounded">
60+
<xsd:any />
61+
</xsd:choice>
62+
<xsd:attribute name="title" type="xsd:string" use="required" />
63+
<xsd:attribute name="type" type="xsd:string" use="required" />
64+
<xsd:attribute name="sub-type" type="xsd:string" />
65+
<xsd:attribute name="uuid" type="xsd:string" />
66+
<xsd:anyAttribute />
67+
</xsd:complexType>
68+
69+
<xsd:complexType name="file">
70+
<xsd:simpleContent>
71+
<xsd:extension base="xsd:string">
72+
<xsd:attribute name="id" type="xsd:string" use="required" />
73+
<xsd:attribute name="name" type="xsd:string" use="required" />
74+
<xsd:attribute name="filename">
75+
<xsd:simpleType>
76+
<xsd:restriction base="xsd:string">
77+
<xsd:minLength value="1"/>
78+
</xsd:restriction>
79+
</xsd:simpleType>
80+
</xsd:attribute>
81+
<xsd:attribute name="filesize" type="xsd:integer" use="required" />
82+
<xsd:attribute name="url" type="xsd:string" />
83+
</xsd:extension>
84+
</xsd:simpleContent>
85+
</xsd:complexType>
86+
</xsd:schema>
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="UTF-8" ?>
2+
<xsd:schema xmlns="http://moocip.de/schema/block/date/"
3+
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
4+
targetNamespace="http://moocip.de/schema/block/date/"
5+
elementFormDefault="qualified"
6+
>
7+
<xsd:attribute name="date_content" type="xsd:string" />
8+
</xsd:schema>

0 commit comments

Comments
 (0)