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

Keep track of number of attempts, so we can know if student has used their 'herkansing' or not. (to figure out... is each change to an entry simply a new attempt, or should teacher manually have to adjust the attempts). #25

Open
luttje opened this issue Dec 22, 2023 · 4 comments
Labels

Comments

@luttje
Copy link
Member

luttje commented Dec 22, 2023

No description provided.

@luttje
Copy link
Member Author

luttje commented Dec 22, 2023

There is currently a way to keep track of attempts in the database in student_scores:

// Was this a retake? If not, attempt = 1
$table->unsignedInteger('attempt')->default(1);

However the current implementation always overwrites the default attempt (1) in StudentScore:

public static function updateFeedbackForStudents(array $updatedScores)
{
    StudentScore::upsert(
        $updatedScores,
        ['student_id', 'module_version_id', 'feedbackmoment_id', 'attempt'],
        ['score', 'feedback', 'teacher_id']
    );
}

To implement attempts I believe the following needs to be taken into account:

  1. Interface design: how does a teacher indicate that the result they're editting is an edit, or new attempt
  2. Interface design: how are previous attempts visible to the teacher (and editable) and visible to the student
  3. The attempt must be changed in the StudyPointMatrix->students property. updatedStudents will then automatically update or insert it in the database
  4. We should double-check if StudentController->getStudentScoresForBlok does in fact get/count the last attempt (or highest?) for each student

@luttje luttje added the enhancement New feature or request label Dec 22, 2023
@bartjroos bartjroos added prio2 and removed enhancement New feature or request labels Dec 22, 2023
@bartjroos
Copy link
Contributor

Interface design; maybe like a 'stack'... You click a box which has multiple attempts behind it, and it will fold out like a 'stack' of old attempts was behind it?

How to indicate if you want a new attempt.. maybe like it's always a new attempt, but you can hold down a key, or set a global switch to enter edit mode?

@luttje
Copy link
Member Author

luttje commented Dec 22, 2023

Nice idea to use a stack, seems intuitive to me.

Another idea for an interface that's less preferable, but easier to implement:

  1. User edits the number
  2. As the focus is lost they get a modal with these options:
    • Edit attempt #last
    • Add new attempt

The same modal could be used to visualize the stack of attempts if the user wants to see them. Perhaps on mouse over a small stack button could appear for opening that view.

@bartjroos I can probably work out a prototype for this rather quickly now that I'm familiar with the project. I'll whip something up today

@curio-team curio-team locked and limited conversation to collaborators Jan 15, 2024
@bartjroos
Copy link
Contributor

(conversation continues in PR #31 )

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants