approvedCourses.xhtml 3.71 KB
Newer Older
1
2
3
<?php if (!$this->requestData) { ?>
<h2>Select a month to report on.</h2>
<ul>
Tim Steiner's avatar
Tim Steiner committed
4
<?php
5
6
7
    $now = new Zend_Date();
    $endYear = $now->get(Zend_Date::YEAR);
    $endMonth = $now->get(Zend_Date::MONTH);
8
    $endDay = $now->get(Zend_Date::DAY);
9
10
    $month = 9;
    $year = 2007;
11
12
    while ($year < $endYear
       || ($year == $endYear && $month < $endMonth)
13
14
       || ($year == $endYear && $month == $endMonth && $month != 1 && $endDay > 15)
       || ($year == $endYear && $month == $endMonth && $month == 1 && $endDay > 25)) {
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
?>
    <li>
        <a href="/Reports/ApprovedCourses/<?php echo $year; ?>/<?php echo $month; ?>">
            <?php echo $month; ?>/<?php echo $year; ?>
        </a>
    </li>

<?php
        $month++;
        if ($month > 12) {
            $month = 1;
            $year++;
        }
    }
?>
</ul>








<?php } else {











Tim Steiner's avatar
Tim Steiner committed
51
52
53
foreach ($this->requestData as $requestDatum) {
    $request = $requestDatum['request'];
    $voteTally = $requestDatum['voteTally'];
54
    $course = $request->getCourseGeneration();
Tim Steiner's avatar
Tim Steiner committed
55
56
57
?>
<div class="request clear">
    <h2>Request Type: <?php echo $request->type->name; ?></h2>
58
    <h2>Effective Semester: <?php echo $course->effectiveSemester; ?></h2>
Tim Steiner's avatar
Tim Steiner committed
59
<?php
60
    if (in_array($request->type->name, array('ChangeCourse', 'AddACEAndChangeCourse', '	RemoveACEAndChangeCourse'))) {
Tim Steiner's avatar
Tim Steiner committed
61
62
63
64
65
        $newCourse = $course;
        $oldCourse = $course->getParentGeneration(true);
?>
    <div class="old">
        <h2>Previous</h2>
66
        <?php echo $this->bulletinEntryDiff($oldCourse, $newCourse, $request); ?>
Tim Steiner's avatar
Tim Steiner committed
67
68
69
70
    </div>

    <div class="new">
        <h2>Current</h2>
71
        <?php echo $this->bulletinEntryDiff($oldCourse, $newCourse, $request); ?>
Tim Steiner's avatar
Tim Steiner committed
72
    </div>
73
74
75
76
<?php
    } else if ($request->type->name == 'RemoveCourse') {
?>
    <div class="removedCourse">
77
        <?php echo $this->bulletinEntry($course->getParentGeneration(true), $request); ?>
78
    </div>
Tim Steiner's avatar
Tim Steiner committed
79
80
81
<?php
    } else {
?>
82
    <?php echo $this->bulletinEntry($course, $request); ?>
Tim Steiner's avatar
Tim Steiner committed
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
<?php
    }
?>
    <div class="justification clear">
        <h2>Justification</h2>
        <?php echo $request->justification; ?>
    </div>


    <?php
    $syllabus = $request->getFileByType(RequestFile::SYLLABUS_TYPE);
    if ($syllabus) {
    ?>
    <div id="syllabus">
        <h2>Syllabus:</h2>
        <a href="/Request/GetFile/<?php echo $syllabus->file; ?>">
99
            <?php echo htmlentities($syllabus->title, null, 'utf8'); ?>
Tim Steiner's avatar
Tim Steiner committed
100
101
102
103
104
105
106
107
108
109
110
111
        </a>
    </div>
    <?php } ?>


    <?php
    $crosslistMemo = $request->getFileByType(RequestFile::CROSSLIST_MEMO_TYPE);
    if ($crosslistMemo) {
    ?>
    <div id="crosslistMemo">
        <h2>Crosslist Memo</h2>
        <a href="/Request/GetFile/<?php echo $crosslistMemo->file; ?>">
112
            <?php echo htmlentities($crosslistMemo->title, null, 'utf8'); ?>
Tim Steiner's avatar
Tim Steiner committed
113
114
115
116
117
118
119
120
121
122
123
124
        </a>
    </div>
    <?php } ?>


    <?php
    $ISNarrative = $request->getFileByType(RequestFile::IS_NARRATIVE_TYPE);
    if ($ISNarrative) {
    ?>
    <div id="isNarrative">
        <h2>IS Narrative</h2>
        <a href="/Request/GetFile/<?php echo $ISNarrative->file; ?>">
125
            <?php echo htmlentities($ISNarrative->title, null, 'utf8'); ?>
Tim Steiner's avatar
Tim Steiner committed
126
127
128
129
130
131
132
133
134
135
136
137
        </a>
    </div>
    <?php } ?>


    <?php
    $additionalDocumentation = $request->getFileByType(RequestFile::OTHER_TYPE);
    if ($additionalDocumentation) {
    ?>
    <div id="additionalDocumentation">
        <h2>Additional Documentation</h2>
        <a href="/Request/GetFile/<?php echo $additionalDocumentation->file; ?>">
138
            <?php echo htmlentities($additionalDocumentation->title, null, 'utf8'); ?>
Tim Steiner's avatar
Tim Steiner committed
139
140
141
142
143
144
145
146
147
148
149
150
151
        </a>
    </div>
    <?php } ?>


    <div>
<?php foreach ($voteTally as $voteName => $voteCount) { ?>
        <?php echo $voteName; ?>: <?php echo $voteCount; ?>
<?php } ?>
    </div>
</div>
<?php
}
152
}