|
|
@@ -2,7 +2,7 @@
|
|
|
|
|
|
/**
|
|
|
* 近 7 天老师组卷 + 学情分析套数(exam_analysis_results 按 paper_id 去重,一套卷计 1)。
|
|
|
- * 按老师:学案数量、分析数量、学生数为「本 / 上」并列(本大于上则绿色);保留学案·环比、学情·环比;学生数为组卷∪学情去重。
|
|
|
+ * 按老师:学案/分析/学生数为「本 / 上」并列(仅本侧数字在本大于上时绿色);保留学案·环比、学情·环比。
|
|
|
* 用法:
|
|
|
* php scripts/report_teacher_weekly_stats.php
|
|
|
* php scripts/report_teacher_weekly_stats.php > storage/app/reports/teacher-weekly-stats-$(date +%Y-%m-%d)_$(date +%H%M%S).md
|
|
|
@@ -119,14 +119,13 @@ $compareCellHtml = static function (int $cur, int $prev): string {
|
|
|
return $text;
|
|
|
};
|
|
|
|
|
|
-/** 「本 / 上」并列显示;仅当本 > 上时整体标绿 */
|
|
|
+/** 「本 / 上」并列显示;仅当本 > 上时将本侧数字标绿(上分保持默认色) */
|
|
|
$slashPairGreenHtml = static function (int $cur, int $prev): string {
|
|
|
- $text = $cur.' / '.$prev;
|
|
|
if ($cur > $prev) {
|
|
|
- return '<span style="color:#16a34a;font-weight:600;">'.$text.'</span>';
|
|
|
+ return '<span style="color:#16a34a;font-weight:600;">'.$cur.'</span> / '.$prev;
|
|
|
}
|
|
|
|
|
|
- return $text;
|
|
|
+ return $cur.' / '.$prev;
|
|
|
};
|
|
|
|
|
|
$byTeacher = \Illuminate\Support\Facades\DB::table('papers')
|