REST Service for POPCORN - ILIAS
alex
2025-06-20 b9e31706c33cd5ac10fa66a3a88cb54a5327220c
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
<script setup>
 
import {onMounted, reactive, ref} from "vue"
import {useRoute} from "vue-router"
import Pagination from "../components/Pagination.vue"
import {getKurse, routerBase} from "@/lib/api"
 
const route = useRoute()
const kurse = ref([])
const error = ref(null)
 
onMounted(init)
 
/////////////////////////////////////////////////////////////////////////
 
async function init (offset = 0) {
   const data = await getKurse()
   console.log(data)
   kurse.value = data
}
 
function go (offset) {
   console.log("go", offset)
   return init(offset)
}
 
</script>
 
<template>
 
   <div>
 
      <h1>
         ILIAS Kurse
         <small>({{kurse?.length}})</small>
      </h1>
      <p v-if="error">{{ error }}</p>
 
      <div class="kurse">
 
         <table class="w100p" v-if="kurse">
            <thead>
               <tr>
                  <th>usr_id</th>
                  <th>obj_id</th>
                  <th>title</th>
                  <th>description</th>
                  <th>type</th>
               </tr>
            </thead>
            <tbody>
               <tr v-for="kurs in kurse">
                  <td>
                     <RouterLink :to="`${routerBase}/ui/kurs/${kurs.ref_id}`">
                        {{ kurs.ref_id }}
                     </RouterLink>
                  </td>
                  <td>{{ kurs.obj_id }}</td>
                  <td>{{ kurs.title }}</td>
                  <td>{{ kurs.description }}</td>
                  <td>{{ kurs.type }}</td>
               </tr>
            </tbody>
         </table>
      </div>
 
      <!--      <pre>{{ kurse }}</pre>-->
 
   </div>
 
</template>
 
<style scoped>
 
</style>