From e31ec7ca8106c1efc96c7caf7d44d1c95dc9a2d3 Mon Sep 17 00:00:00 2001 From: morungos Date: Wed, 17 Apr 2013 21:33:44 -0400 Subject: [PATCH] Added guards to prevent accessing arrays when there isn't any data. Resolves #52 --- grails-app/views/report/assignments.gsp | 8 +++++++- grails-app/views/report/course.gsp | 15 +++++++++++---- grails-app/views/report/students.gsp | 9 ++++++++- grails-app/views/report/tutors.gsp | 9 ++++++++- 4 files changed, 34 insertions(+), 7 deletions(-) diff --git a/grails-app/views/report/assignments.gsp b/grails-app/views/report/assignments.gsp index a155218..d4fad35 100644 --- a/grails-app/views/report/assignments.gsp +++ b/grails-app/views/report/assignments.gsp @@ -12,13 +12,17 @@

-

${band}: ${bandLabels[band]}

+ + + +

${band}: ${bandLabels[band]}

+ @@ -37,6 +41,8 @@
+ +
diff --git a/grails-app/views/report/course.gsp b/grails-app/views/report/course.gsp index c63011d..0cf76f4 100644 --- a/grails-app/views/report/course.gsp +++ b/grails-app/views/report/course.gsp @@ -17,14 +17,17 @@ course ${entityName}.

-

- The following chart shows the expected versus actual comment counts for this course. -

- + + + +

+ The following chart shows the expected versus actual comment counts for this course. +

+ @@ -43,10 +46,14 @@
+

See detailed information

+ +
+ diff --git a/grails-app/views/report/students.gsp b/grails-app/views/report/students.gsp index dde2bee..a71b3a0 100644 --- a/grails-app/views/report/students.gsp +++ b/grails-app/views/report/students.gsp @@ -12,13 +12,18 @@

-

${band}: ${bandLabels[band]}

+ + + + +

${band}: ${bandLabels[band]}

+ @@ -37,6 +42,8 @@
+ +
diff --git a/grails-app/views/report/tutors.gsp b/grails-app/views/report/tutors.gsp index 74a4d1b..e218f6c 100644 --- a/grails-app/views/report/tutors.gsp +++ b/grails-app/views/report/tutors.gsp @@ -12,13 +12,18 @@

-

${band}: ${bandLabels[band]}

+ + + + +

${band}: ${bandLabels[band]}

+ @@ -37,6 +42,8 @@
+ +