Browse Source

教师端上课记录,底部统计

lizhen_gitee 6 months ago
parent
commit
8c9298430d

+ 3 - 2
application/api/controller/coach/Lesson.php

@@ -331,10 +331,11 @@ class Lesson extends Apic
             $total_hours = bcadd($total_hours,$slot['hours'],1);
         }
 
+        $buttom = __('共计N节课,M小时',['total'=>count($list),'total_hours'=>$total_hours]);
+
         $result = [
             'list' => $list,
-            'total' => count($list),
-            'total_hours' => $total_hours,
+            'buttom' => $buttom,
         ];
         $this->success(1,$result);
     }

+ 1 - 0
application/api/lang/en/coach/lesson.php

@@ -9,4 +9,5 @@ return [
     '点名失败'                     => 'Roll call failed',
     '点名已完成'                    => 'Roll call completed',
     '你好'                    => 'Hello',
+    '共计N节课,M小时' => 'A total of {:total} classes, {:total_hours} hours',
 ];

+ 5 - 0
application/api/lang/zh-cn/coach/Lesson.php

@@ -0,0 +1,5 @@
+<?php
+
+return [
+    '共计N节课,M小时' => '共计{:total}节课,{:total_hours}小时',
+];