-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathstudent-home.php
53 lines (46 loc) · 1.77 KB
/
student-home.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<?php
echo('
<nav class="navbar navbar-default">
<div class="container-fluid">
<div class="navbar-header">
<a class="navbar-brand" href="index.php">Flashcards</a>
</div>
</div>
</nav>
');
$visibleSets = $flashcardsDAO->getAllVisibleSetsForSiteSorted($CONTEXT->id);
if (count($visibleSets) == 0) {
echo('<p><em>There are currently no available flashcard sets for this course.</em></p>');
} else {
echo('<div class="row">');
foreach ( $visibleSets as $set ) {
$cards = $flashcardsDAO->getCardsInSet($set["SetID"]);
if (count($cards) > 0) {
$cardsPile = ' cards-pile';
} else {
$cardsPile = '';
}
echo('
<div class="col-sm-4">
<div class="panel panel-default'.$cardsPile.'">
<div class="panel-heading">
<span class="label label-success pull-right student-card-count">'.count($cards).' Cards</span>
<h3>'.$set["CardSetName"].'</h3>
</div>
<div class="panel-body">
<div class="row">
<div class="col-xs-12 text-center">
<a href="PlayCard.php?SetID='.$set["SetID"].'&CardNum=1&CardNum2=0&Flag=A"');if(count($cards) == 0){echo(' class="disabled"');}echo('>
<span class="fa fa-2x fa-th-large"></span>
<br />
<small>Flashcards</small>
</a>
</div>
</div>
</div>
</div>
</div>
');
}
echo('</div>');
}