Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reliability flags for Spanish apps #605

Merged
merged 8 commits into from
May 29, 2024
Merged
Show file tree
Hide file tree
Changes from 5 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
12 changes: 8 additions & 4 deletions src/components/reports/TableScoreTag.vue
Original file line number Diff line number Diff line change
Expand Up @@ -111,11 +111,15 @@ function getFlags(colData, taskId) {

// If there are flags and the assessment is not reliable, return the flags
if (flags && !colData.scores[taskId].reliable) {
const reliabilityFlags = Object.keys(flags).map((flag) => {
return flagMessages[flag] || _lowerCase(flag);
});
if (!taskId.includes('pa')) {
const reliabilityFlags = Object.keys(flags).map((flag) => {
return flagMessages[flag] || _lowerCase(flag);
});
return 'Engagement Flags: ' + reliabilityFlags.join('\n') + '\n\n';
} else {
return 'Unreliable \n\n';
}
// Join the returned flags with a newline character, then add two newlines for spacing
Emily-ejag marked this conversation as resolved.
Show resolved Hide resolved
return 'Engagement Flags: ' + reliabilityFlags.join('\n') + '\n\n';
} else {
return '';
}
Expand Down
20 changes: 15 additions & 5 deletions src/pages/ScoreReport.vue
Original file line number Diff line number Diff line change
Expand Up @@ -538,6 +538,8 @@ function returnColorByReliability(assessment, rawScore, support_level, tag_color
return '#c0d9bd';
} else if (rawOnlyTasks.includes(assessment.taskId) && rawScore) {
return 'white';
} else {
return '#d3d3d3';
}
}
return tag_color;
Expand Down Expand Up @@ -705,7 +707,6 @@ const computeAssignmentAndRunData = computed(() => {
currRowScores[taskId].percentCorrect = percentCorrect;
currRowScores[taskId].numAttempted = numAttempted;
currRowScores[taskId].numCorrect = numCorrect;
currRowScores[taskId].tagColor = supportLevelColors.Assessed;
Emily-ejag marked this conversation as resolved.
Show resolved Hide resolved
scoreFilterTags += ' Assessed ';
}

Expand Down Expand Up @@ -871,8 +872,12 @@ const exportSelected = (selectedRows) => {
if (score.reliable !== undefined && !score.reliable && score.engagementFlags !== undefined) {
const engagementFlags = Object.keys(score.engagementFlags);
if (engagementFlags.length > 0) {
const engagementFlagString = 'Unreliable: ' + engagementFlags.map((key) => _lowerCase(key)).join(', ');
tableRow[`${taskDisplayNames[taskId]?.name ?? taskId} - Reliability`] = engagementFlagString;
if (!taskId.includes('pa')) {
const engagementFlagString = 'Unreliable: ' + engagementFlags.map((key) => _lowerCase(key)).join(', ');
tableRow[`${taskDisplayNames[taskId]?.name ?? taskId} - Reliability`] = engagementFlagString;
} else {
tableRow[`${taskDisplayNames[taskId]?.name ?? taskId} - Reliability`] = 'Unreliable';
}
} else {
tableRow[`${taskDisplayNames[taskId]?.name ?? taskId} - Reliability`] = 'Assessment Incomplete';
}
Expand Down Expand Up @@ -916,11 +921,16 @@ const exportAll = async () => {
tableRow[`${taskDisplayNames[taskId]?.name ?? taskId} - Raw`] = score.rawScore;
tableRow[`${taskDisplayNames[taskId]?.name ?? taskId} - Support Level`] = score.supportLevel;
}

if (score.reliable !== undefined && !score.reliable && score.engagementFlags !== undefined) {
const engagementFlags = Object.keys(score.engagementFlags);
if (engagementFlags.length > 0) {
const engagementFlagString = 'Unreliable: ' + engagementFlags.map((key) => _lowerCase(key)).join(', ');
tableRow[`${taskDisplayNames[taskId]?.name ?? taskId} - Reliability`] = engagementFlagString;
if (!taskId.includes('pa')) {
const engagementFlagString = 'Unreliable: ' + engagementFlags.map((key) => _lowerCase(key)).join(', ');
tableRow[`${taskDisplayNames[taskId]?.name ?? taskId} - Reliability`] = engagementFlagString;
} else {
tableRow[`${taskDisplayNames[taskId]?.name ?? taskId} - Reliability`] = 'Unreliable';
}
} else {
tableRow[`${taskDisplayNames[taskId]?.name ?? taskId} - Reliability`] = 'Assessment Incomplete';
}
Expand Down
Loading