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

Programming Question Audit Trail #7595

Open
wants to merge 24 commits into
base: master
Choose a base branch
from

Conversation

syoopie
Copy link
Contributor

@syoopie syoopie commented Oct 15, 2024

Motivation

Old Behavior - When question is updated and regrading is triggered, there was no preservation of the:

  1. Previous question state
  2. Previous test case evaluations

This resulted in a dilemma when randomness in test cases (such as in machine learning) resulted in a student failing test cases that were previously passing

Details

image
  • parentId added to course_assessment_question_programming and course_assessment_answer_programming_auto_gradings
  • All evaluation data is preserved now
  • Old evaluations and there corresponding questions can be accessed via the parentId

@syoopie syoopie force-pushed the yupei/programming-question-audit-trail branch 6 times, most recently from 42b2875 to 1bbfd55 Compare October 21, 2024 09:47
@@ -33,7 +33,7 @@ def all_answers
@question_index = question_index(question_id)
@all_answers = Course::Assessment::Answer.
unscope(:order).
order(:created_at).
order(:submitted_at).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we also want to display submissions in attempting state, what happens to answers with nil for submitted_at?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hm I dont think there is a way to reconcile that. But do you think its ok for us to order by created_at and also send the created_at time but present it to the user as submitted_at (which is what was done previously

Copy link
Contributor

@cysjonathan cysjonathan Oct 30, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's ok, since user has not run the code, it will not be counted as an attempt, so for submissions still being attempted, number of attempts will reflect as 0 on attempts page, (or whatever number depending on how many past attempts they already had existing).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok changed to order by created_at

app/controllers/course/statistics/answers_controller.rb Outdated Show resolved Hide resolved
@@ -22,7 +22,7 @@ def latest_attempt
discussion_topic: { posts: :codaveri_feedback }).first
end

def question_answer_details
def attempts
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

similarly why is this attempts not answers?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Attempt aligns with the vocab used in frontend, since we have never exposed the concept of "answer" to users

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, do leave a comment that an "attempt" is an answer that has been submitted before.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

end

def all_answers
def all_attempts
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar comment, all_answers vs all_attempts

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Attempt aligns with the vocab used in frontend, since we have never exposed the concept of "answer" to users

@syoopie syoopie force-pushed the yupei/programming-question-audit-trail branch 2 times, most recently from 2f05498 to 2d65d34 Compare October 24, 2024 09:49
add parentId for:
- programming auto grading
- programming question
- include an option to add elipses beside the title to better indicate that accordion can be opened
- make new of new accordion ellipses feature
- add card to attempts dialog & all attempts page to display information and hold buttons
- removed unused translations from AllAttempts.tsx
- user info added for all attempts page to properly display name in the new card
- links for going to submission page and attempts page shifted to be inside the card
- QuestionDetails -> Question
- AllAnswerDetails -> Answer

- previous naming was verbose and communicated the wrong idea of what information the type has
- free up naming for use in details components
- submitted_at is more indicative of the actual data
- changed naming for files and added specific typing for latest answer
- fix bug where if a question is added after submission, the page crashes
- name change from answers -> attempts
- change limit from a constant backend value to a constant FE value, add function for limiting dynamically
- updated types for processed vs non processed data
- removed unnecessary data from jbuilders
- added parsing / processing of programming question data and linked to display
- lines removed is data that is no longer being rendered
- use update column instead of update to prevent validation error when duplicating question with deprecated programming language
- also add redicrect edit url to return when updating question, so that id can be used to revalidate question
@syoopie syoopie force-pushed the yupei/programming-question-audit-trail branch from 2d65d34 to 32b673b Compare October 30, 2024 05:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants