Skip to content

Commit

Permalink
undo part of anonymization
Browse files Browse the repository at this point in the history
  • Loading branch information
laadvo committed Oct 21, 2024
1 parent 8c15ca5 commit 3da3ef6
Showing 1 changed file with 17 additions and 15 deletions.
32 changes: 17 additions & 15 deletions playground/src/helpers/get_data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -497,29 +497,31 @@ export function getAnonymizedConfigFromFileSync(
const config: ExpertEvaluationConfig = JSON.parse(fs.readFileSync(configPath, "utf8"));
delete config["expertIds"];

//TODO rethink anonymization
/*
const renamedFeedback: any = {};
for (const exercise of config.exercises) {
const submissions = exercise.submissions;
for (const exercise of config.exercises) {
const submissions = exercise.submissions;
if (submissions) {
for (const submission of submissions) {
const feedback = submission.feedbacks;
if (submissions) {
for (const submission of submissions) {
const feedback = submission.feedbacks;
if (feedback) {
const renamedFeedback: any = {}; // Temporary object for renamed feedback
if (feedback) {
const renamedFeedback: any = {}; // Temporary object for renamed feedback
// Rename the feedback categories to numbers starting from 0
Object.keys(feedback).forEach((category, index) => {
renamedFeedback[index] = feedback[category]; // Assign numeric keys
});
// Rename the feedback categories to numbers starting from 0
Object.keys(feedback).forEach((category, index) => {
renamedFeedback[index] = feedback[category]; // Assign numeric keys
});
// Replace the original feedback with the renamed feedback
submission.feedbacks = renamedFeedback;
// Replace the original feedback with the renamed feedback
submission.feedbacks = renamedFeedback;
}
}
}
}
}
}*/
return config;
}

Expand Down

0 comments on commit 3da3ef6

Please sign in to comment.