Skip to content
Snippets Groups Projects
Commit fc015d56 authored by Tim Steiner's avatar Tim Steiner
Browse files

Make the text areas for current outcomes and reinforcements read only (but...

Make the text areas for current outcomes and reinforcements read only (but still removable) when editting a change ace request.
parent 8ab1d662
No related branches found
No related tags found
No related merge requests found
......@@ -809,6 +809,7 @@ if (in_array($this->request->getType(), array('NewCourseWithACE', 'AddACEToCours
<?php foreach(Courses_CourseModel::getAceOutcomeDataWithSloKey() as $sloKey => $outcome) { ?>
<?php $outcomeData = $this->course->getAceOutcomeByShortName($outcome['shortName']); ?>
<?php if ($this->parentCourse) { $parentOutcomeData = $this->parentCourse->getAceOutcomeByShortName($outcome['shortName']); } ?>
<li>
<?php if ($sloKey == 'SLO1') { ?>
<div class="sloCategoryDescription">
......@@ -851,7 +852,14 @@ if (in_array($this->request->getType(), array('NewCourseWithACE', 'AddACEToCours
How is the learning objective embedded in the course?
</label>
<br />
<?php if ($this->request->getType() == 'ChangeACE' && is_array($parentOutcomeData)) { ?>
<div class="aceLocked">
<?php echo $parentOutcomeData['justification']; ?>
<?php echo $this->formHidden('ace[outcomes][' . $outcome['shortName'] . '][justification]', $parentOutcomeData['justification']); ?>
</div>
<?php } else { ?>
<textarea id="mceEditor<?php echo ++$mceEditorCount; ?>" class="mceEditor" name="ace[outcomes][<?php echo $outcome['shortName']; ?>][justification]"><?php echo $outcomeData['justification']; ?></textarea>
<?php } ?>
<br />
<label class="required">
......@@ -860,7 +868,14 @@ if (in_array($this->request->getType(), array('NewCourseWithACE', 'AddACEToCours
and skills specified by the outcome.
</label>
<br />
<?php if ($this->request->getType() == 'ChangeACE' && is_array($parentOutcomeData)) { ?>
<div class="aceLocked">
<?php echo $parentOutcomeData['studentWork']; ?>
<?php echo $this->formHidden('ace[outcomes][' . $outcome['shortName'] . '][studentWork]', $parentOutcomeData['studentWork']); ?>
</div>
<?php } else { ?>
<textarea id="mceEditor<?php echo ++$mceEditorCount; ?>" class="mceEditor" name="ace[outcomes][<?php echo $outcome['shortName']; ?>][studentWork]"><?php echo $outcomeData['studentWork']; ?></textarea>
<?php } ?>
<br />
<label class="required">
......@@ -873,7 +888,14 @@ if (in_array($this->request->getType(), array('NewCourseWithACE', 'AddACEToCours
this ACE outcome.
</label>
<br />
<?php if ($this->request->getType() == 'ChangeACE' && is_array($parentOutcomeData)) { ?>
<div class="aceLocked">
<?php echo $parentOutcomeData['assesmentPlan']; ?>
<?php echo $this->formHidden('ace[outcomes][' . $outcome['shortName'] . '][assesmentPlan]', $parentOutcomeData['assesmentPlan']); ?>
</div>
<?php } else { ?>
<textarea id="mceEditor<?php echo ++$mceEditorCount; ?>" class="mceEditor" name="ace[outcomes][<?php echo $outcome['shortName']; ?>][assesmentPlan]"><?php echo $outcomeData['assesmentPlan']; ?></textarea>
<?php } ?>
</span>
</li>
......@@ -906,6 +928,7 @@ if (in_array($this->request->getType(), array('NewCourseWithACE', 'AddACEToCours
<ul id="aceReinforcementList">
<?php foreach (Courses_CourseModel::getAceReinforcementNames() as $shortName => $longName) { ?>
<?php $reinforcementData = $this->course->getAceReinforcementByShortName($shortName); ?>
<?php if ($this->parentCourse) { $parentReinforcementData = $this->parentCourse->getAceReinforcementByShortName($shortName); } ?>
<li>
<label for="ace[reinforcements][<?php echo $shortName; ?>][enabled]">
<?php echo $this->formCheckbox('ace[reinforcements][' . $shortName . '][enabled]', '1', array('checked' => is_array($reinforcementData))); ?>
......@@ -914,7 +937,14 @@ if (in_array($this->request->getType(), array('NewCourseWithACE', 'AddACEToCours
<span <?php if (!$reinforcementData) { ?>style="display: none;"<?php } ?>>
<br /><br />
<label class="required">Describe briefly how this skill will be reinforced.</label><br />
<?php if ($this->request->getType() == 'ChangeACE' && is_array($parentReinforcementData)) { ?>
<div class="aceLocked">
<?php echo $parentReinforcementData['description']; ?>
<?php echo $this->formHidden('ace[reinforcements][' . $shortName . '][description]', $parentReinforcementData['description']); ?>
</div>
<?php } else { ?>
<textarea id="mceEditor<?php echo ++$mceEditorCount; ?>" class="mceEditor" name="ace[reinforcements][<?php echo $shortName; ?>][description]"><?php echo $reinforcementData['description']; ?></textarea>
<?php } ?>
</span>
</li>
<?php } ?>
......
......@@ -168,6 +168,11 @@ ul#aceOutcomeList li div {
ul#aceReinforcementList li {
list-style-type: none;
}
ul#aceOutcomeList li div.aceLocked,
ul#aceReinforcementList li div.aceLocked {
margin-left: 0;
text-indent: 0;
}
#allowedFileTypes {
font-size: 90%;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment