Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -306,12 +306,7 @@ private List<Feedback> getFeedbackType(FeedbackType type) {
feedbackAnswers.add(
new Feedback.Answer(
recipientName, request.getSubmitDate(), questionText,
questionType.equals(textQuestion) ||
questionType.equals(radioQuestion) ?
answer.getAnswer() :
String.valueOf(answer.getSentiment()),
questionType,
questionNumber));
answer.getAnswer(), questionType, questionNumber));
}
}
}
Expand Down
31 changes: 0 additions & 31 deletions web-ui/src/pages/MeritReportPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,6 @@ import { useQueryParameters } from '../helpers/query-parameters';
import markdown from 'markdown-builder';

const MeritReportPage = () => {
const agreeMarks = [
'Strongly Disagree',
'Disagree',
'Neither Agree nor Disagree',
'Agree',
'Strongly Agree'
];
const frequencyMarks = [
'Very Infrequently',
'Infrequently',
'Neither Frequently nor Infrequently',
'Frequently',
'Very Frequently'
];

const { state, dispatch } = useContext(AppContext);

const csrf = selectCsrfToken(state);
Expand Down Expand Up @@ -338,22 +323,6 @@ const MeritReportPage = () => {
};

const getAnswerText = (answer) => {
if (answer.type == "SLIDER" || answer.type == "FREQ") {
const sentiment = parseFloat(answer.answer);
if (!isNaN(sentiment)) {
if (answer.type == "SLIDER") {
const index = sentiment * agreeMarks.length;
if (index >= 0 && index < agreeMarks.length) {
return agreeMarks[index];
}
} else if (answer.type == "FREQ") {
const index = sentiment * frequencyMarks.length;
if (index >= 0 && index < frequencyMarks.length) {
return frequencyMarks[index];
}
}
}
}
return answer.answer;
};

Expand Down