Skip to content
Snippets Groups Projects
Commit 0aac23b3 authored by Roger W Feese's avatar Roger W Feese
Browse files

Check for problem finding currentGeneration of a course and display an error message.

parent cd2e9928
No related branches found
No related tags found
1 merge request!22Projects Task 53
...@@ -58,6 +58,7 @@ $uniqueId = ++$this->layout()->uniqueId; ...@@ -58,6 +58,7 @@ $uniqueId = ++$this->layout()->uniqueId;
<?php <?php
} else if ($course['course']) { } else if ($course['course']) {
$planCourse = $this->planCourses[$course['course']]; $planCourse = $this->planCourses[$course['course']];
if ($planCourse) {
?> ?>
<tr class="change-<?php echo $course['change']; ?>"> <tr class="change-<?php echo $course['change']; ?>">
<td> <td>
...@@ -68,7 +69,16 @@ $uniqueId = ++$this->layout()->uniqueId; ...@@ -68,7 +69,16 @@ $uniqueId = ++$this->layout()->uniqueId;
<td><?php echo $course['hours'] ? $course['hours'] . ' cr' : substr($planCourse->getCreditsText(), 1, strpos($planCourse->getCreditsText(), 'cr') + 1); ?></td> <td><?php echo $course['hours'] ? $course['hours'] . ' cr' : substr($planCourse->getCreditsText(), 1, strpos($planCourse->getCreditsText(), 'cr') + 1); ?></td>
<td><?php echo $planCourse->getTitle(); ?></td> <td><?php echo $planCourse->getTitle(); ?></td>
</tr> </tr>
<?php }} ?> <?php }
else {
?>
<tr class="change-<?php echo $course['change']; ?>">
<td>
Error loading current course information.
</td>
<td></td>
</tr>
<?php }}} ?>
</tbody> </tbody>
</table> </table>
</div> </div>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment