Skip to content

Student code view should remember the last cursor/scroll position #60

@allevato

Description

@allevato

I read this in the Pythy SIGCSE paper:

Every time a student returns to a code page they have written, it appears the same way they last left it.

Let's make this even better by having Pythy store the user's current cursor position (line and column) in AssignmentRepository and ScratchpadRepository every time it auto-saves the content. Then, when the code page is reloaded, CodeMirror should automatically jump back to that position.

We could do this for AssignmentReferenceRepository too for instructors. The only black sheep is ExampleRepository, since those are viewable by multiple users, and you'd need another relationship to store each individual user's positions. The slight inconsistency is probably worth avoiding the extra work.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions