Select Git revision
edit_course.xhtml
-
Tim Steiner authoredTim Steiner authored
edit_course.xhtml 23.37 KiB
<h1>Navigation</h1>
<div>
<b>Alphabetical: </b>
<a href="/courseadmin/index<?php echo $this->prevCourseLink; ?>">Previous</a>
<a href="/courseadmin/index<?php echo $this->nextCourseLink; ?>">Next</a>
</div>
<?php if ($this->parentGeneration || $this->childGenerations->count() > 0) { ?>
<div>
<b>Generational:</b>
<?php if ($this->parentGeneration) { ?>
<a href="/CourseAdmin/index/<?php echo $this->parentGeneration->getPrimaryKey();?>">Parent</a>
<?php } ?>
<?php if ($this->childGenerations->count() > 0) { ?>
Children:
<?php $i = 0; foreach ($this->childGenerations as $childGeneration) { $i++; ?>
<a href="/CourseAdmin/index/<?php echo $childGeneration->getPrimaryKey();?>"><?php echo $i; ?></a>
<?php } ?>
<?php } ?>
</div>
<?php } ?>
<form action="/courseadmin/updatecourse/<?php echo implode('/', $this->uriParams); ?>" method="post">
<input type="hidden" name="courseId" value="<?php echo $this->course->getPrimaryKey(); ?>" />
<div class="main_section">
<h2>Main Details</h2>
<fieldset class="three_column" id="courseId">
<div class="column">
<label for="subject" class="field">Subject:</label>
<input type="text"
id="subject"
name="subject"
value="<?php echo htmlentities($this->course->subject, ENT_COMPAT, 'UTF-8'); ?>" />
</div>
<div class="column">
<label for="courseNumber" class="field">Course Number:</label>
<input type="text"
id="courseNumber"
name="courseNumber"
value="<?php echo htmlentities($this->course->courseNumber, ENT_COMPAT, 'UTF-8'); ?>" />
</div>
<div class="column">
<label for="courseLetter" class="field">Course Letter:</label>
<input type="text"
id="courseLetter"
name="courseLetter"
value="<?php echo htmlentities($this->course->courseLetter, ENT_COMPAT, 'UTF-8'); ?>" />
</div>
<div class="clear"></div>
</fieldset>
<fieldset class="four_column">
<div class="legend">Grading:</div>
<div class="column">
<input type="radio"
class="radio"
id="gradingType_unrestricted"
name="gradingType"
value="unrestricted"
<?php if($this->course->gradingType == 'unrestricted') { ?>
checked="checked"
<?php } ?>
/>
<label for="gradingType_unrestricted">Unrestricted</label>
</div>
<div class="column">
<input type="radio"
class="radio"
id="gradingType_letter_grade_only"
name="gradingType"
value="letter grade only"
<?php if($this->course->gradingType == 'letter grade only') { ?>
checked="checked"
<?php } ?>
/>
<label for="gradingType_letter_grade_only">Letter Grade Only</label>
</div>
<div class="column">
<input type="radio"
class="radio"
id="gradingType_pass_no_pass_only"
name="gradingType"
value="pass/no pass only"
<?php if($this->course->gradingType == 'pass/no pass only') { ?>
checked="checked"
<?php } ?>
/>
<label for="gradingType_pass_no_pass_only">Pass / No Pass Only</label>
</div>
<div class="clear"></div>
</fieldset>
<fieldset class="four_column">
<div class="legend">Delivery Method(s):</div>
<div class="column">
<input type="checkbox"
id="deliveryMethods_classroom"
name="deliveryMethods[]"
value="Classroom"
<?php if(in_array('Classroom', $this->course->deliveryMethods)) { ?>
checked="checked"
<?php } ?>
/>
<label for="deliveryMethods_classroom">Classroom</label>
</div>
<div class="column">
<input type="checkbox"
id="deliveryMethods_web"
name="deliveryMethods[]"
value="Web"
<?php if(in_array('Web', $this->course->deliveryMethods)) { ?>
checked="checked"
<?php } ?>
/>
<label for="deliveryMethods_web">Web</label>
</div>
<div class="column">
<input type="checkbox"
id="deliveryMethods_correspondence"
name="deliveryMethods[]"
value="Correspondence"
<?php if(in_array('Correspondence', $this->course->deliveryMethods)) { ?>
checked="checked"
<?php } ?>
/>
<label for="deliveryMethods_correspondence">Correspondence</label>
</div>
<div class="clear"></div>
</fieldset>
<fieldset>
<label for="title" class="field">Course Title:</label>
<input type="text" id="title" name="title" value="<?php echo htmlentities($this->course->title, ENT_COMPAT, 'UTF-8'); ?>" />
<div class="clear"></div>
</fieldset>
<fieldset class="three_column">
<div class="column">
<label>
Integrated Studies
<input type="hidden" name="integratedStudies" value="no" />
<input type="checkbox"
name="integratedStudies"
value="yes"
<?php if($this->course->integratedStudies == 'yes') { ?>
checked="checked"
<?php } ?>
/>
</label>
</div>
<div class="column">
<label>
Essential Studies<br />
<table>
<tr>
<th> </th>
<th>A</th>
<th>B</th>
<th>C</th>
<th>D</th>
<th>E</th>
<th>F</th>
<th>G</th>
<th>H</th>
</tr>
<?php foreach ($this->essentialStudiesAreas as $college => $areas) { ?>
<tr>
<th><?php echo $college; ?></th>
<?php foreach ($areas as $areaName => $areaValue) { ?>
<td><?php echo $this->formCheckbox(
'essentialStudies[' . $college . '][' . $areaName . ']',
($areaValue ? 'yes' : 'no'),
null,
array('yes', 'no')
); ?></td>
<?php } ?>
</tr>
<?php } ?>
</table>
</label>
</div>
<div class="clear"></div>
</fieldset>
</div>
<div class="main_section">
<h2>Crosslistings</h2>
<fieldset class="three_column">
<table class="multirow">
<?php $hasTieIn = false;
foreach($this->course->crosslistings as $key => $crosslist) {
if($crosslist->type == 'grad tie-in') { $hasTieIn = true; }
if($crosslist->type != 'home listing') { ?>
<tr <?php if($crosslist->type == 'grad tie-in') { ?>class="grad_tie_in_row"<?php } ?>>
<th> Subject: </th>
<td> <input type="text"
name="crosslistings[<?php echo $key; ?>][subject]"
value="<?php echo $crosslist->subject; ?>"
<?php if($crosslist->type == 'grad tie-in') { ?>readonly=""<?php } ?>/> </td>
<th> Course Number: </th>
<td> <input type="text"
name="crosslistings[<?php echo $key; ?>][courseNumber]"
value="<?php echo $crosslist->courseNumber; ?>"
<?php if($crosslist->type == 'grad tie-in') { ?>readonly=""<?php } ?> /> </td>
<th> Course Letter: </th>
<td> <input type="text"
name="crosslistings[<?php echo $key; ?>][courseLetter]"
value="<?php echo $crosslist->courseLetter; ?>"
<?php if($crosslist->type == 'grad tie-in') { ?>readonly=""<?php } ?> /> </td>
<td class="hidden">
<input type="hidden"
name="crosslistings[<?php echo $key; ?>][type]"
value="<?php echo $crosslist->type; ?>" />
</td>
<td> <input type="checkbox"
id="crosslistings_<?php echo $key; ?>_delete"
name="crosslistings[<?php echo $key; ?>][delete]"
value="yes" />
<label for="crosslistings_<?php echo $key; ?>_delete" class="field">Remove</label>
</td>
</tr>
<?php } } ?>
<tr class="hidden_new_record">
<th> Subject: </th>
<td> <input disabled="disabled" type="text" name="crosslistings[__key__][subject]" /> </td>
<th> Course Number: </th>
<td> <input disabled="disabled" type="text" name="crosslistings[__key__][courseNumber]" /> </td>
<th> Course Letter: </th>
<td> <input disabled="disabled" type="text" name="crosslistings[__key__][courseLetter]" /> </td>
<td class="hidden"> <input disabled="disabled" type="hidden" name="crosslistings[__key__][type]" value="crosslisting" /> </td>
<td> <a href="#" class="remove_record_button">Remove</a> </td>
</tr>
<tr>
<td colspan="4">
<a href="#" class="add_record_button">Add Crosslisting</a>
<?php if(!$hasTieIn) { ?>
<a href="#"
class="add_record_button"
id="add_tie_in_button_<?php echo $this->course->subject
. '_' . $this->course->courseNumber
. '_' . $this->course->courseLetter; ?>"
>
Add Graduate Tie-In
</a>
<?php } ?>
</td>
</tr>
</table>
</fieldset>
</div>
<div class="main_section two_column" id="credits_and_terms_section">
<fieldset id="credits" class="column">
<h3>Credit (leave blank if not defined)</h3>
<div>
<label class="field" for="creditsSingleValues">Single Values</label>
<input type="text"
name="credits[1]"
id="creditsSingleValues"
value="<?php echo $this->creditsSingleValues; ?>" />
</div>
<div>
<label class="field">Range</label>
<input type="text"
name="credits[2]"
value="<?php echo $this->creditsRangeMin; ?>" /> -
<input type="text"
name="credits[3]"
value="<?php echo $this->creditsRangeMax; ?>" />
</div>
<div>
<label class="field">Max per Semester</label>
<input type="text"
name="credits[4]"
value="<?php echo $this->creditsMaxPerSemester; ?>" />
</div>
<div>
<label class="field">Max per Degree</label>
<input type="text"
name="credits[5]"
value="<?php echo $this->creditsMaxPerDegree; ?>" />
</div>
</fieldset>
<fieldset class="three_column column">
<h3>Terms Offered<br />(Remove terms never taught)</h3>
<label class="field">
<input type="checkbox"
name="termsOffered[]"
value="Fall"
<?php if(in_array('Fall', $this->course->termsOffered)) { ?>
checked="checked"
<?php } ?>
/>
Fall
</label>
<br />
<label class="field">
<input type="checkbox"
name="termsOffered[]"
value="Spring"
<?php if(in_array('Spring', $this->course->termsOffered)) { ?>
checked="checked"
<?php } ?>
/>
Spring
</label>
<br />
<label class="field">
<input type="checkbox"
name="termsOffered[]"
value="Summer"
<?php if(in_array('Summer', $this->course->termsOffered)) { ?>
checked="checked"
<?php } ?>
/>
Summer
</label>
</fieldset>
<div class="clear"></div>
</div>
<div class="main_section">
<h2>Course Information</h2>
<fieldset class="three_column" id="campuses">
<h3>Campus(es)</h3>
<label class="field">
<input type="checkbox"
name="campuses[]"
value="UNL"
<?php if(in_array('UNL', $this->course->campuses)) { ?>
checked="checked"
<?php } ?>
/>
UNL
</label>
<label class="field">
<input type="checkbox"
name="campuses[]"
value="UNO"
<?php if(in_array('UNO', $this->course->campuses)) { ?>
checked="checked"
<?php } ?>
/>
UNO
</label>
<label class="field">
<input type="checkbox"
name="campuses[]"
value="UNMC"
<?php if(in_array('UNMC', $this->course->campuses)) { ?>
checked="checked"
<?php } ?>
/>
UNMC
</label>
<label class="field">
<input type="checkbox"
name="campuses[]"
value="UNK"
<?php if(in_array('UNK', $this->course->campuses)) { ?>
checked="checked"
<?php } ?>
/>
UNK
</label>
</fieldset>
<fieldset class="two_of_three_column" id="activities">
<h3>Activity</h3>
<table class="multirow">
<?php foreach($this->course->activities as $key => $activity) { ?>
<tr>
<th> Type </th>
<td>
<select name="activities[<?php echo $key; ?>][type]">
<option value="-1">--Select One--</option>
<option value="lec"
<?php if($activity->type == 'lec') { ?>selected="selected"<?php } ?>
>Lecture</option>
<option value="lab"
<?php if($activity->type == 'lab') { ?>selected="selected"<?php } ?>
>Lab</option>
<option value="quz"
<?php if($activity->type == 'quz') { ?>selected="selected"<?php } ?>
>Quiz</option>
<option value="rct"
<?php if($activity->type == 'rct') { ?>selected="selected"<?php } ?>
>Recitation</option>
<option value="stu"
<?php if($activity->type == 'stu') { ?>selected="selected"<?php } ?>
>Studio</option>
<option value="fld"
<?php if($activity->type == 'fld') { ?>selected="selected"<?php } ?>
>Field</option>
<option value="ind"
<?php if($activity->type == 'ind') { ?>selected="selected"<?php } ?>
>Independent Study</option>
<option value="psi"
<?php if($activity->type == 'psi') { ?>selected="selected"<?php } ?>
>P.S.I.</option>
</select>
</td>
<th> Hours per week </th>
<td> <input type="text"
name="activities[<?php echo $key; ?>][hours]"
value="<?php echo $activity->hours; ?>" /> </td>
<td> <input type="checkbox"
name="activities[<?php echo $key; ?>][delete]"
value="yes" /> </td>
</tr>
<?php } ?>
<tr class="hidden_new_record">
<th> Type </th>
<td>
<select disabled="disabled" name="activities[__key__][type]">
<option value="-1">--Select One--</option>
<option value="lec">Lecture</option>
<option value="lab">Lab</option>
<option value="quz">Quiz</option>
<option value="rct">Recitation</option>
<option value="stu">Studio</option>
<option value="fld">Field</option>
<option value="ind">Independent Study</option>
<option value="psi">P.S.I.</option>
</select>
</td>
<th> Hours per week </th>
<td> <input disabled="disabled" type="text" name="activities[__key__][hours]" /> </td>
<td> <a href="#" class="remove_record_button">Remove</a> </td>
</tr>
<tr>
<td colspan="3">
<a href="#" class="add_record_button">Add Activity</a>
</td>
</tr>
</table>
</fieldset>
<fieldset class="three_column">
<h3>DF Removal</h3>
<label class="field">
<input type="radio"
class="radio"
name="dfRemoval"
value="no"
<?php if($this->course->dfRemoval == 'no') { ?>
checked="checked"
<?php } ?>
/>
No
</label>
<label class="field">
<input type="radio"
class="radio"
name="dfRemoval"
value="yes"
<?php if($this->course->dfRemoval == 'yes') { ?>
checked="checked"
<?php } ?>
/>
Yes
</label>
</fieldset>
<h3>Prerequisite</h3>
<fieldset>
<textarea id="prerequisite" name="prerequisite" class="mceEditor"><?php echo htmlentities($this->course->prerequisite, ENT_COMPAT, 'UTF-8'); ?></textarea>
</fieldset>
<h3>Notes</h3>
<fieldset>
<textarea id="notes" name="notes" class="mceEditor"><?php echo htmlentities($this->course->notes, ENT_COMPAT, 'UTF-8'); ?></textarea>
</fieldset>
<h3>Description</h3>
<fieldset>
<textarea id="description" name="description" class="mceEditor"><?php echo htmlentities($this->course->description, ENT_COMPAT, 'UTF-8'); ?></textarea>
</fieldset>
</div>
<div class="main_section">
<h2>Graduate Tie-In</h2>
<fieldset>
<label>
Credits<br />
<input type="text" name="gradTieIn[credits]" value="<?php echo $this->course->gradTieIn->credits; ?>" /><br />
</label>
<label>
Prereq<br />
<textarea name="gradTieIn[prerequisites]" class="mceEditor"><?php echo $this->course->gradTieIn->prerequisites; ?></textarea><br />
</label>
<label>
Notes<br />
<textarea name="gradTieIn[notes]" class="mceEditor"><?php echo $this->course->gradTieIn->notes; ?></textarea>
</label>
</fieldset>
<?php /*
<h2>DF Removals (not implemented)</h2>
<table>
<tr>
<th>Subject</th>
<th>Course Number</th>
<th>Course Letter</th>
<th>Delete</th>
</tr>
<?php foreach($this->course->dfRemovals as $key => $dfRemoval) { ?>
<tr>
<td>
<input type="text" name="crosslistings[<?php echo $dfRemoval->getPrimaryKey(); ?>][subject]" value="<?php echo $crosslisting->subject; ?>" />
</td>
<td>
<input type="text" name="crosslistings[<?php echo $dfRemoval->getPrimaryKey(); ?>][courseNumber]" value="<?php echo $crosslisting->courseNumber; ?>" />
</td>
<td>
<input type="text" name="crosslistings[<?php echo $dfRemoval->getPrimaryKey(); ?>][courseLetter]" value="<?php echo $crosslisting->courseLetter; ?>" />
</td>
<td>
<input type="hidden" name="dfRemovals[<?php echo $dfRemoval->getPrimaryKey(); ?>][delete]" value="no" />
<input type="checkbox" name="dfRemovals[<?php echo $dfRemoval->getPrimaryKey(); ?>][delete]" value="yes" />
</td>
</tr>
<?php } ?>
</table>
*/ ?>
<?php /*
<h2>Prerequisites (not implemented)</h2>
<table>
<tr>
<th>Subject</th>
<th>Course Number</th>
<th>Course Letter</th>
<th>Delete</th>
</tr>
<?php foreach($this->course->prerequisites as $key => $prerequisite) { ?>
<tr>
<td>
<input type="text" name="crosslistings[<?php echo $prerequisite->getPrimaryKey(); ?>][subject]" value="<?php echo $crosslisting->subject; ?>" />
</td>
<td>
<input type="text" name="crosslistings[<?php echo $prerequisite->getPrimaryKey(); ?>][courseNumber]" value="<?php echo $crosslisting->courseNumber; ?>" />
</td>
<td>
<input type="text" name="crosslistings[<?php echo $prerequisite->getPrimaryKey(); ?>][courseLetter]" value="<?php echo $crosslisting->courseLetter; ?>" />
</td>
<td>
<input type="hidden" name="prerequisites[<?php echo $prerequisite->getPrimaryKey(); ?>][delete]" value="no" />
<input type="checkbox" name="prerequisites[<?php echo $prerequisite->getPrimaryKey(); ?>][delete]" value="yes" />
</td>
</tr>
<?php } ?>
</table> */ ?>
<fieldset>
<h3>Record Type</h3>
<label>
Proposed:
<input type="radio"
name="type"
value="proposed"
<?php if($this->course->type == 'proposed') { ?>checked="checked"<? } ?> />
</label>
<label>
Official:
<input type="radio"
name="type"
value="official"
<?php if($this->course->type == 'official') { ?>checked="checked"<? } ?> />
</label>
</fieldset>
</div>
<input type="submit" value="Update Course" />
</form>
<form id="delete_course" method="post" action="/CourseAdmin/DeleteCourse/<?php echo $this->course->getPrimaryKey(); ?>">
<label>
Enable Delete
<input type="checkbox" id="enable_delete" />
</label>
<input id="submit_delete" type="submit" value="Delete Course" disabled="disabled" />
</form>