<?php $this->headLink()->appendStylesheet($this->baseUrl() . '/css/courses/view.css'); ?> <?php $this->headScript()->appendFile($this->baseUrl() . '/javascript/courses/view.js'); ?> <div id="viewRequest"> <h2><?php echo $this->request->getType(); ?></h2> <?php $course = $this->course; if ($this->parentCourse) { $parentCourse = $this->parentCourse; /****************************CHANGE COURSE*************************************/ ?> <div class="current"> <h2>Current</h2> <div class="bulletinEntry"> <?php echo $this->bulletinEntryDiff($parentCourse, $course, $this->request); ?> </div> </div> <div class="proposed"> <h2>Proposed</h2> <div class="bulletinEntry"> <?php echo $this->bulletinEntryDiff($parentCourse, $course, $this->request); ?> </div> </div> <div class="clear"></div> <?php } else if ($this->request->getType() == 'RemoveCourse') { /*****************************REMOVE COURSE************************************/ ?> <div class="removed"> <?php echo $this->bulletinEntry($course, $this->request); ?> </div> <?php } else { /*****************************NEW COURSE***************************************/ echo $this->bulletinEntry($course, $this->request); } /*****************************ACE COURSE***************************************/ if (in_array($this->request->getType(), array('NewCourseWithACE', 'AddACEToCourse', 'AddACEAndChangeCourse', 'RemoveACEFromCourse', 'RemoveACEAndChangeCourse'))) { ?> <div> <h2>Ace Certification</h2> <h3>Outcomes</h3> <?php foreach ($course->getAceOutcomes() as $aceOutcome) { ?> <div> <?php echo $aceOutcome['slo']; ?>: <?php echo $aceOutcome['description']; ?> </div> <ol> <li><?php echo $aceOutcome['justification']; ?></li> <li><?php echo $aceOutcome['studentWork']; ?></li> <li><?php echo $aceOutcome['assesmentPlan']; ?></li> </ol> <?php } ?> <h3>Reinforcements</h3> <dl> <?php foreach ($course->getAceReinforcements() as $aceReinforcement) { ?> <dt><?php echo $aceReinforcement['longName']; ?></dt> <dd><?php echo $aceReinforcement['description']; ?></dd> <?php } ?> </dl> </div> <?php } /*****************************COMMON STUFF*************************************/ ?> <?php if (!in_array($this->request->getType(), array('AddACEToCourse', 'RemoveACEFromCourse'))) { ?> <div id="justification"> <h2>Justification:</h2> <?php echo $this->request->getJustification(); ?> </div> <?php } ?> <?php $syllabus = $this->request->getFile(Requests_RequestModel::FILE_TYPE_SYLLABUS); if ($syllabus) { ?> <div id="syllabus"> <h2>Syllabus:</h2> <?php if ($syllabus['file']) { ?> <a href="<?php echo $this->baseUrl(); ?>/requests/view/get-file/fileId/<?php echo $syllabus['file']; ?>"> <?php } else { ?> <a href="<?php echo $this->baseUrl(); ?>/requests/view/get-file/fileId/session/type/<?php echo Requests_RequestModel::FILE_TYPE_SYLLABUS; ?>"> <?php } ?> <?php echo $syllabus['title']; ?> </a> </div> <?php } ?> <?php $crosslistMemo = $this->request->getFile(Requests_RequestModel::FILE_TYPE_CROSSLIST_MEMO); if ($crosslistMemo) { ?> <div id="crosslistMemo"> <h2>Crosslist Memo</h2> <?php if ($crosslistMemo['file']) { ?> <a href="<?php echo $this->baseUrl(); ?>/requests/view/get-file/fileId/<?php echo $crosslistMemo['file']; ?>"> <?php } else { ?> <a href="<?php echo $this->baseUrl(); ?>/requests/view/get-file/fileId/session/type/<?php echo Requests_RequestModel::FILE_TYPE_CROSSLIST_MEMO; ?>"> <?php } ?> <?php echo $crosslistMemo['title']; ?> </a> </div> <?php } ?> <?php $ISNarrative = $this->request->getFile(Requests_RequestModel::FILE_TYPE_IS_NARRATIVE); if ($ISNarrative) { ?> <div id="isNarrative"> <h2>IS Narrative</h2> <?php if ($ISNarrative['file']) { ?> <a href="<?php echo $this->baseUrl(); ?>/requests/view/get-file/fileId/<?php echo $ISNarrative['file']; ?>"> <?php } else { ?> <a href="<?php echo $this->baseUrl(); ?>/requests/view/get-file/fileId/session/type/<?php echo Requests_RequestModel::FILE_TYPE_IS_NARRATIVE; ?>"> <?php } ?> <?php echo $ISNarrative['title']; ?> </a> </div> <?php } ?> <?php $additionalDocumentation = $this->request->getFile(Requests_RequestModel::FILE_TYPE_OTHER); if ($additionalDocumentation) { ?> <div id="additionalDocumentation"> <h2>Additional Documentation</h2> <?php if ($additionalDocumentation['file']) { ?> <a href="<?php echo $this->baseUrl(); ?>/requests/view/get-file/fileId/<?php echo $additionalDocumentation['file']; ?>"> <?php } else { ?> <a href="<?php echo $this->baseUrl(); ?>/requests/view/get-file/fileId/session/type/<?php echo Requests_RequestModel::FILE_TYPE_OTHER; ?>"> <?php } ?> <?php echo $additionalDocumentation['title']; ?> </a> </div> <?php } ?> <?php if ($this->preview) { ?> <form method="post" action="<?php echo $this->baseUrl(); ?>/courses/edit/submit.post"> <?php if ($this->initialRequest) { ?> <fieldset> <label> Effective no sooner than: <?php echo $this->formSelect( 'effectiveSemester', $this->course->effectiveSemester, array('id' => 'effectiveSemester'), $this->terms ); ?> </label> </fieldset> <?php if ($this->isRequestValid) { ?> <input id="submit_request" type="submit" name="submitType" value="Submit" /> <?php } else { ?> <div id="requestNotReadyMessage"> This request may not be submitted yet, required information is missing. </div> <input id="submit_request" type="submit" name="submitType" value="Return to Edit" /> <?php } ?> <input id="save_request" type="submit" name="submitType" value="Save for Later Submission" /> <input id="cancel_request" type="submit" name="submitType" value="Cancel Request" /> <?php } else { ?> <?php if ($this->isRequestValid) { ?> <input id="submit_request" type="submit" name="submitType" value="Save Changes" /> <?php } else { ?> <div id="requestNotReadyMessage"> This request may not be saved yet, required information is missing. </div> <?php } ?> <input id="submit_request" type="submit" name="submitType" value="Return to Edit" /> <input id="cancel_request" type="submit" name="submitType" value="Abandon Changes" /> <?php } ?> </form> <?php } else { ?> <?php if (!in_array($this->selectedCommentTab, array('commentsTab', 'editorCommentsTab', 'privateCommentsTab'))) { $this->selectedCommentTab = 'commentsTab'; } ?> <div id="comments"> <div class="tabBar"> <a href="#" id="commentsTab"<?php if ($this->selectedCommentTab == 'commentsTab') { ?> class="selected"<?php } ?>>Comments</a> <a href="#" id="editorCommentsTab"<?php if ($this->selectedCommentTab == 'editorCommentsTab') { ?> class="selected"<?php } ?>>Editor Comments</a> <a href="#" id="privateCommentsTab"<?php if ($this->selectedCommentTab == 'privateCommentsTab') { ?> class="selected"<?php } ?>>Private Comments</a> </div> <div class="tabContent<?php if ($this->selectedCommentTab == 'commentsTab') { ?> selected<?php } ?>" id="commentsContent"> <table class="comments"> <tr> <th class="who">Who</th> <th class="when">When</th> <th class="what">What</th> </tr> <?php $row = 0; foreach ($this->comments as $key => $comment) { if ($comment->getVisibility() == 'global') { ?> <tr class="<?php echo ($row++ % 2) ? 'evenRow' : 'oddRow'; ?>"> <td class="who"><?php echo $comment->getUser()->getUsername(); ?></td> <td class="when"><?php echo $comment->getTime(); ?></td> <td class="what"><?php echo $comment->getText(); ?></td> </tr> <?php }} ?> </table> <form method="post" action="<?php echo $this->baseUrl(); ?>/requests/view/add-comment/requestId/<?php echo $this->request->getId(); ?>"> <div> <textarea name="comment"></textarea> </div> <?php echo $this->formHidden('visibility', 'global'); ?> <?php echo $this->formSubmit('submit', 'Add Comment'); ?> </form> </div> <div class="tabContent<?php if ($this->selectedCommentTab == 'editorCommentsTab') { ?> selected<?php } ?>" id="editorCommentsContent"> <table class="comments"> <tr> <th class="who">Who</th> <th class="when">When</th> <th class="what">What</th> </tr> <?php $row = 0; foreach ($this->comments as $key => $comment) { if ($comment->getVisibility() == 'editorial') { ?> <tr class="<?php echo ($row++ % 2) ? 'evenRow' : 'oddRow'; ?>"> <td class="who"><?php echo $comment->getUser()->getUsername(); ?></td> <td class="when"><?php echo $comment->getTime(); ?></td> <td class="what"><?php echo $comment->getText(); ?></td> </tr> <?php }} ?> </table> <form method="post" action="<?php echo $this->baseUrl(); ?>/requests/view/add-comment/requestId/<?php echo $this->request->getId(); ?>"> <div> <textarea name="comment"></textarea> </div> <?php echo $this->formHidden('visibility', 'editorial'); ?> <?php echo $this->formSubmit('submit', 'Add Comment'); ?> </form> </div> <div class="tabContent<?php if ($this->selectedCommentTab == 'privateCommentsTab') { ?> selected<?php } ?>" id="privateCommentsContent"> <table class="comments"> <tr> <th class="who">Who</th> <th class="when">When</th> <th class="what">What</th> </tr> <?php $row = 0; foreach ($this->comments as $key => $comment) { if ($comment->getVisibility() == 'self' && $comment->getUser() == $this->user) { ?> <tr class="<?php echo ($row++ % 2) ? 'evenRow' : 'oddRow'; ?>"> <td class="who"><?php echo $comment->getUser()->getUsername(); ?></td> <td class="when"><?php echo $comment->getTime(); ?></td> <td class="what"><?php echo $comment->getText(); ?></td> </tr> <?php }} ?> </table> <form method="post" action="<?php echo $this->baseUrl(); ?>/requests/view/add-comment/requestId/<?php echo $this->request->getId(); ?>"> <div> <textarea name="comment"></textarea> </div> <?php echo $this->formHidden('visibility', 'self'); ?> <?php echo $this->formSubmit('submit', 'Add Comment'); ?> </form> </div> </div> <?php if ($this->prevRequestId > 0) { ?> <a id="prevRequestLink" href="/Request/View/<?php echo $this->prevRequestId; ?>"><--Prev</a> <?php } ?> <?php if ($this->nextRequestId > 0) { ?> <a id="nextRequestLink" href="/Request/View/<?php echo $this->nextRequestId; ?>">Next--></a> <?php } ?> <?php } ?> <?php if($this->canEdit) { ?> <div id="editLink"> <a href="/Request/Load/<?php echo $this->request->getId(); ?>">-Edit-</a> </div> <?php } ?> <div class="clear"></div> </div>