aboutsummaryrefslogtreecommitdiff
path: root/app/views/oer/oai/getRecord.php
blob: 72f48d2d2fa9f777be1dd11d23f958e5418319e6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
<?= '<?xml version="1.0" encoding="UTF-8" ?>' ?>
<OAI-PMH xmlns="http://www.openarchives.org/OAI/2.0/" 
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/
  http://www.openarchives.org/OAI/2.0/OAI-PMH.xsd">
  <responseDate><?=htmlReady($currentDate) ?></responseDate>
  <request verb=<?='"'.htmlReady($verb).'"' ?> from=<?= '"'.htmlReady($currentDate).'"' ?> metadataPrefix=<?= '"'.htmlReady($metadataPrefix).'"'?>><?=htmlReady($request_url)?></request>
  <GetRecord>
   <record> 
    <header>
      <identifier><?=htmlReady($targetMaterial->id)?></identifier> 
      <datestamp><?= htmlReady(gmdate(DATE_ATOM, $targetMaterial->mkdate))?></datestamp>
      <? foreach ($tags as $tag) : ?>
      <setSpec><?= htmlReady($tag['name']) ?></setSpec> 
      <? endforeach ?> 
    </header>
    <metadata>
    <lom xmlns="http://ltsc.ieee.org/xsd/LOM"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://ltsc.ieee.org/xsd/LOM
      http://ltsc.ieee.org/xsd/lomv1.0/lom.xsd">
    <general>
      <identifier>
      <? foreach ($tags as $tag) : ?>
      <catalog><?= htmlReady($tag['name']) ?></catalog>
      <? endforeach ?>
        <entry><?=htmlReady($targetMaterial->id)?></entry>
      </identifier>
      <title>
        <string language="de"><?= htmlReady($targetMaterial->name) ?></string>
      </title>
      <language>de</language>
      <description>
              <string language="de"><?= htmlReady($targetMaterial->description) ?></string>
      </description>
      <keyword>
      <? foreach ($tags as $tag) : ?>
      <string language="de"><?= htmlReady($tag['name']) ?></string>
      <? endforeach ?>
      </keyword>
      
    </general>

    <lifeCycle>
      <version>
        <string language="de">1.0</string>
      </version>
      <contribute>
        <role>
          <source>LOMv1.0</source>
          <value>Author</value>
        </role>
        <entity>
          <?= htmlReady($vcard) ?>
        </entity>
        <date>
          <dateTime><?= htmlReady(gmdate(DATE_ATOM, $targetMaterial->chdate)) ?></dateTime>
        </date>
      </contribute>
    </lifeCycle>

    <technical>
      <format><?= htmlReady($targetMaterial->content_type) ?></format>
      <location><?= $controller->url_for("market/download/".$targetMaterial->id) ?></location>
      
    </technical>

    <educational>
      <learningResourceType>
        <source>LREv3.0</source>
        <value><?= htmlReady($targetMaterial->content_type) ?></value>
      </learningResourceType>

      <intendedEndUserRole>
        <source>LREv3.0</source>
        <value>students</value>
      </intendedEndUserRole>
      <context>
        <source>LREv3.0</source>
        <value>highschool education</value>
      </context>
    </educational>

    <rights>
      <copyrightAndOtherRestrictions>
        <source>LOMv1.0</source>
        <value>yes</value>
      </copyrightAndOtherRestrictions>
      <description>
        <string language="xt-lic"><?= htmlReady($targetMaterial->license) ?></string>
      </description>
    </rights>
  </lom>
  </metadata>
  </record>
 </GetRecord>
</OAI-PMH>