Submissions.php: show group count.

Bug430-Eden2
Lan Hui 2023-08-25 21:50:14 +08:00
parent 1b8e2bc76d
commit 24af391961
1 changed files with 10 additions and 1 deletions

View File

@ -92,6 +92,15 @@ echo "<div><a href='Courses.php?course=$url'> $header </a></div>";
} }
} }
$resultx5 = mysqli_query($con, "SELECT COUNT(*) as cnt FROM course_groups_table WHERE Course_id=$c_id");
if (mysqli_num_rows($resultx5) == 0) {
$count_group = 0;
} else {
while ($row = mysqli_fetch_assoc($resultx5)) {
$count_group = $row['cnt'];
}
}
?> ?>
<p class="text-muted">Assignment submissions (<?php echo $count_subs; ?>)</p> <p class="text-muted">Assignment submissions (<?php echo $count_subs; ?>)</p>
@ -109,7 +118,7 @@ echo "<div><a href='Courses.php?course=$url'> $header </a></div>";
</li> </li>
<li class="nav-item"> <li class="nav-item">
<a class="nav-link" href="#menu4">Course groups</a> <a class="nav-link" href="#menu4">Course groups <b>(<?php echo $count_group; ?>)</b></a>
</li> </li>
</ul> </ul>
<div class="tab-content"> <div class="tab-content">