| | |
| | | |
| | | import {useRoute} from 'vue-router' |
| | | import {onMounted, reactive, ref} from "vue" |
| | | import {getKurs, getKursItems, getKursTn, iliasBase} from "../lib/api.js" |
| | | import {getKurs, getKursItems, getKursTn, iliasBase, routerBase} from "../lib/api.js" |
| | | import LinkExtern from "../components/LinkExtern.vue" |
| | | |
| | | const route = useRoute() |
| | |
| | | const dataKursTn = await getKursTn(kursId) |
| | | console.log(dataKursTn) |
| | | kursTn.value = dataKursTn |
| | | |
| | | } |
| | | |
| | | const aaa = import.meta.env.VITE_TST |
| | | |
| | | </script> |
| | | |
| | |
| | | <h1> |
| | | Kurs |
| | | <small>{{ kurs?.title }}</small> |
| | | <!-- <small>{{ user?.firstname }} {{ user?.lastname }}</small>--> |
| | | </h1> |
| | | <p v-if="error">{{ error }}</p> |
| | | |
| | |
| | | <span>ref_id</span> |
| | | <div> |
| | | <a :href="`${iliasBase}/goto.php?target=${kurs.type}_${kurs.ref_id}`" target="_blank"> |
| | | {{ kurs.ref_id }} <LinkExtern /> |
| | | {{ kurs.ref_id }} |
| | | <LinkExtern /> |
| | | </a> |
| | | </div> |
| | | |
| | |
| | | </h2> |
| | | <table> |
| | | <thead> |
| | | <th>parent_id</th> |
| | | <th>ref_id</th> |
| | | <th>obj_id</th> |
| | | <th>title</th> |
| | | <th>type</th> |
| | | <tr> |
| | | <th>parent_id</th> |
| | | <th>ref_id</th> |
| | | <th>obj_id</th> |
| | | <th>title</th> |
| | | <th>type</th> |
| | | </tr> |
| | | </thead> |
| | | <tbody> |
| | | <!-- TODO verlinken auf Ziel in ILAS | goto.php?target=crs_ID --> |
| | |
| | | <td>{{ item.parent_id }}</td> |
| | | <td> |
| | | <a :href="`${iliasBase}/goto.php?target=${item.type}_${item.ref_id}`" target="_blank"> |
| | | {{ item.ref_id }} <LinkExtern /> |
| | | {{ item.ref_id }} |
| | | <LinkExtern /> |
| | | </a> |
| | | </td> |
| | | <td>{{ item.obj_id }}</td> |
| | |
| | | KursTn |
| | | <small>({{ kursTn?.length }})</small> |
| | | </h2> |
| | | <div :style="{columns: kursTn?.length > 16 ? 3 : 1}"> |
| | | <div :style="{columns: kursTn?.length > 16 ? 2 : 1}"> |
| | | <table> |
| | | <thead> |
| | | <th>usr_id</th> |
| | | <th>login</th> |
| | | <th>firstname</th> |
| | | <th>lastname</th> |
| | | <tr> |
| | | <th>usr_id</th> |
| | | <th>login</th> |
| | | <th>firstname</th> |
| | | <th>lastname</th> |
| | | <th>passed</th> |
| | | <th>status</th> |
| | | </tr> |
| | | </thead> |
| | | <tbody> |
| | | <tr v-for="tn in kursTn"> |
| | | <td> |
| | | <RouterLink :to="`/ui/user/${tn.usr_id}`">{{ tn.usr_id }}</RouterLink> |
| | | <RouterLink :to="`${routerBase}/ui/user/${tn.usr_id}`">{{ tn.usr_id }}</RouterLink> |
| | | </td> |
| | | <td>{{ tn.login }}</td> |
| | | <td>{{ tn.firstname }}</td> |
| | | <td>{{ tn.lastname }}</td> |
| | | <td>{{ tn.passed }}</td> |
| | | <td>{{ tn.status }}</td> |
| | | </tr> |
| | | </tbody> |
| | | </table> |