Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
OLAT CI-CD Testing Project
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Requirements
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Lars Oliver Dam
OLAT CI-CD Testing Project
Commits
a3419b64
Commit
a3419b64
authored
4 years ago
by
uhensler
Browse files
Options
Downloads
Patches
Plain Diff
OO-5304: Show nothing instead of "null" if no survey responses
parent
25ddb705
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/main/java/org/olat/core/util/StringHelper.java
+4
-0
4 additions, 0 deletions
src/main/java/org/olat/core/util/StringHelper.java
src/main/java/org/olat/modules/forms/ui/RubricBarChartsController.java
+3
-3
3 additions, 3 deletions
.../org/olat/modules/forms/ui/RubricBarChartsController.java
with
7 additions
and
3 deletions
src/main/java/org/olat/core/util/StringHelper.java
+
4
−
0
View file @
a3419b64
...
@@ -295,6 +295,10 @@ public class StringHelper {
...
@@ -295,6 +295,10 @@ public class StringHelper {
return
s
!=
null
?
s:
""
;
return
s
!=
null
?
s:
""
;
}
}
public
static
String
toStringOrBlank
(
Long
value
)
{
return
value
!=
null
?
String
.
valueOf
(
value
):
""
;
}
public
static
int
count
(
String
s
,
char
character
)
{
public
static
int
count
(
String
s
,
char
character
)
{
int
count
=
0
;
int
count
=
0
;
...
...
This diff is collapsed.
Click to expand it.
src/main/java/org/olat/modules/forms/ui/RubricBarChartsController.java
+
3
−
3
View file @
a3419b64
...
@@ -132,15 +132,15 @@ public abstract class RubricBarChartsController extends FormBasicController {
...
@@ -132,15 +132,15 @@ public abstract class RubricBarChartsController extends FormBasicController {
private
List
<
StatisticRow
>
getStatisticRows
(
SliderStatistic
sliderStatistic
)
{
private
List
<
StatisticRow
>
getStatisticRows
(
SliderStatistic
sliderStatistic
)
{
List
<
StatisticRow
>
rows
=
new
ArrayList
<>();
List
<
StatisticRow
>
rows
=
new
ArrayList
<>();
if
(
rubric
.
isNoResponseEnabled
())
{
if
(
rubric
.
isNoResponseEnabled
())
{
rows
.
add
(
new
StatisticRow
(
translate
(
"rubric.report.number.no.responses.title"
),
String
.
valueOf
(
sliderStatistic
.
getNumberOfNoResponses
())));
rows
.
add
(
new
StatisticRow
(
translate
(
"rubric.report.number.no.responses.title"
),
String
Helper
.
toStringOrBlank
(
sliderStatistic
.
getNumberOfNoResponses
())));
}
}
rows
.
add
(
new
StatisticRow
(
translate
(
"rubric.report.number.responses.title"
),
String
.
valueOf
(
sliderStatistic
.
getNumberOfResponses
())));
rows
.
add
(
new
StatisticRow
(
translate
(
"rubric.report.number.responses.title"
),
String
Helper
.
toStringOrBlank
(
sliderStatistic
.
getNumberOfResponses
())));
rows
.
add
(
new
StatisticRow
(
translate
(
"rubric.report.median.title"
),
EvaluationFormFormatter
.
formatDouble
(
sliderStatistic
.
getMedian
())));
rows
.
add
(
new
StatisticRow
(
translate
(
"rubric.report.median.title"
),
EvaluationFormFormatter
.
formatDouble
(
sliderStatistic
.
getMedian
())));
rows
.
add
(
new
StatisticRow
(
translate
(
"rubric.report.variance.title"
),
EvaluationFormFormatter
.
formatDouble
(
sliderStatistic
.
getVariance
())));
rows
.
add
(
new
StatisticRow
(
translate
(
"rubric.report.variance.title"
),
EvaluationFormFormatter
.
formatDouble
(
sliderStatistic
.
getVariance
())));
rows
.
add
(
new
StatisticRow
(
translate
(
"rubric.report.sdtdev.title"
),
EvaluationFormFormatter
.
formatDouble
(
sliderStatistic
.
getStdDev
())));
rows
.
add
(
new
StatisticRow
(
translate
(
"rubric.report.sdtdev.title"
),
EvaluationFormFormatter
.
formatDouble
(
sliderStatistic
.
getStdDev
())));
return
rows
;
return
rows
;
}
}
@Override
@Override
protected
void
formOK
(
UserRequest
ureq
)
{
protected
void
formOK
(
UserRequest
ureq
)
{
//
//
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment