From 21cfe68a2ac2304d9c034b9d247a61e9861af666 Mon Sep 17 00:00:00 2001
From: alex <alex@alexloehr.net>
Date: Fri, 28 Nov 2025 15:23:17 +0000
Subject: [PATCH] GS-2333

---
 vue/src/pages/KursDetailLp.vue |   87 +++++++++++++++++++++++++++++++++++++------
 1 files changed, 74 insertions(+), 13 deletions(-)

diff --git a/vue/src/pages/KursDetailLp.vue b/vue/src/pages/KursDetailLp.vue
index f903327..4208125 100644
--- a/vue/src/pages/KursDetailLp.vue
+++ b/vue/src/pages/KursDetailLp.vue
@@ -22,8 +22,9 @@
 const kursId = route.params.kursId
 document.title = `Kurs LP ${kursId} | globus-ilias-rest`
 
-const kurs = ref(null)
-const kursLp = ref(null)
+const kurs = ref([])
+const kursLp = ref([])
+const kursLpRaw = ref([])
 const error = ref(null)
 
 onMounted(init)
@@ -40,7 +41,10 @@
   const dataKursLp = await getKursLp(kursId)
   console.log({dataKursLp})
   kursLp.value = dataKursLp
-  // kursLp.value = [...dataKursLp,...dataKursLp,...dataKursLp]
+
+  const dataKursLpRaw = await getKursLp(kursId, true)
+  console.log({dataKursLpRaw})
+  kursLpRaw.value = dataKursLpRaw
 }
 
 </script>
@@ -48,6 +52,16 @@
 <template>
 
   <div>
+
+    <p id="status-info">
+      <strong>Status</strong>
+      <span>0 = noch nicht bearbeitet</span>
+      <span>1 = in Bearbeitung</span>
+      <span>2 = bestanden</span>
+      <span>3 = nicht bestanden</span>
+    </p>
+
+
     <h1>
       Kurs LP
       <small>
@@ -67,27 +81,22 @@
 
       <!--      <pre>{{ kursLp }}</pre>-->
 
+      <h2>Combined <small>{{kursLp?.length || 0}}</small></h2>
+      <p>Kombinierter Lernfortschritt aus allen Unterobjekten die zum LF beitragen.</p>
       <table class="w100p">
         <thead>
         <tr>
-<!--          <th>ref_id</th>-->
-<!--          <th>obj_id</th>-->
-          <!--          <th>title</th>-->
           <th>usr_id</th>
           <th>login</th>
           <th>firstname</th>
           <th>lastname</th>
-          <th>passed</th>
+<!--          <th>passed</th>-->
           <th>status</th>
           <th>status_changed</th>
-          <th>status_overwrite</th>
         </tr>
         </thead>
         <tbody>
         <tr v-for="item in kursLp">
-<!--          <td>{{ item.ref_id }}</td>-->
-<!--          <td>{{ item.obj_id }}</td>-->
-          <!--          <td>{{item.title}}</td>-->
           <td>
             <RouterLink :to="`${routerBase}/ui/user/${item.usr_id}`">
               {{ item.usr_id }}
@@ -96,10 +105,48 @@
           <td>{{ item.login }}</td>
           <td>{{ item.firstname }}</td>
           <td>{{ item.lastname }}</td>
-          <td>{{ item.passed }}</td>
           <td>{{ item.status }}</td>
           <td>{{ dayjs(item.status_changed).format("DD.MM.YYYY HH:mm:ss") }}</td>
-          <td>{{ item.status_overwrite }}</td>
+        </tr>
+        </tbody>
+      </table>
+
+      <br>
+
+      <h2>Raw <small>{{kursLpRaw?.length || 0}}</small></h2>
+      <p>Lernfortschritt nicht kombiniert.</p>
+      <table class="w100p">
+        <thead>
+        <tr>
+          <th>usr_id</th>
+          <th>login</th>
+          <th>firstname</th>
+          <th>lastname</th>
+<!--          <th>passed</th>-->
+          <th>item_id</th>
+          <th>status</th>
+          <th>status_changed</th>
+        </tr>
+        </thead>
+        <tbody>
+        <tr v-for="item in kursLpRaw">
+          <td>
+            <RouterLink :to="`${routerBase}/ui/user/${item.usr_id}`">
+              {{ item.usr_id }}
+            </RouterLink>
+          </td>
+          <td>{{ item.login }}</td>
+          <td>{{ item.firstname }}</td>
+          <td>{{ item.lastname }}</td>
+          <td>
+            <a :href="`${iliasBase}/goto.php?target=${item.type}_${item.item_id}`" target="_blank">
+              {{ item.item_id }}
+              <LinkExtern />
+            </a>
+<!--            {{ item.item_id }}-->
+          </td>
+          <td>{{ item.status }}</td>
+          <td>{{ dayjs(item.status_changed).format("DD.MM.YYYY HH:mm:ss") }}</td>
         </tr>
         </tbody>
       </table>
@@ -147,4 +194,18 @@
       flex-direction row
       gap .33em
 
+#status-info
+  //position absolute;
+  //right 0
+  //top 0
+  font-size 85%
+  float right
+  display flex
+  flex-direction column
+  gap .33em
+  padding .33em .6em
+  background-color #eeeeee;
+
+
+
 </style>

--
Gitblit v1.8.0