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

Separate vertical scroll bars for the submitted file and the grader feedback in the inspect submission view #1111

Closed
markkuriekkinen opened this issue Dec 15, 2022 · 2 comments · Fixed by #1286
Assignees
Labels
area: e-exam Important for electronic exams area: end-of-course Tasks that are done at the end-of-course (e.g. retriecing grades out) area: UX teacher User experience and usability for teachers effort: hours Estimated to take less than one day, from the creation of a new branch to the merging experience: beginner required knowledge estimate requester: CS The issue is raised internally by a CS teacher requires: priority Currently using this label to flag issues that need EDIT decision ASAP (even if there was priority) type: feature New feature or change to a feature

Comments

@markkuriekkinen
Copy link
Collaborator

The inspect submission view shows submitted files on the left and the grader feedback on the right. When the contents are long, it would be useful to scroll both sides independently vertically, that is to say, you could scroll down the submitted file without scrolling/moving the grader feedback part.

This is useful in manual assessment, e.g., in the Y1 course exam.

@markkuriekkinen markkuriekkinen added type: feature New feature or change to a feature area: UX teacher User experience and usability for teachers area: e-exam Important for electronic exams effort: hours Estimated to take less than one day, from the creation of a new branch to the merging experience: beginner required knowledge estimate requester: CS The issue is raised internally by a CS teacher area: end-of-course Tasks that are done at the end-of-course (e.g. retriecing grades out) requires: priority Currently using this label to flag issues that need EDIT decision ASAP (even if there was priority) labels Dec 15, 2022
@markkuriekkinen
Copy link
Collaborator Author

markkuriekkinen commented Mar 9, 2023

This was partially implemented already in A+ v1.11, #877. However, the separate scrolling is only enabled when the grader feedback consists of only one <pre> element with plain text contents. If the feedback includes more HTML formatting, then the button for enabling separate scrolling is not added to the page.

const preElement = tabElement.children('pre');
if (preElement.length === 1) {

In the code, stickyButton is the button for enabling separate scrolling.
var stickyButton = {
action: function() {
isSticky = !isSticky;
tabElement.toggleClass('sticky', isSticky);
localStorage.setItem('graderFeedbackSticky', isSticky);
},
icon: isSticky ? 'check' : 'unchecked',
text: _('Scroll separately'),
toggle: true,
};
extraButtons.push(stickyButton);

Simple <pre> plain text feedback is used in, e.g., Hello Python assignment in the Aplus manual. However, assignments that use Python grader utils (like the Y1 exam does), output HTML-formatted feedback that uses folded subsections.

https://plus.cs.aalto.fi/aplus-manual/master/programming_exercises/hello_world/#chapter-exercise-1
image

https://plus.cs.aalto.fi/aplus-manual/master/programming_exercises/graderutils/#chapter-exercise-1
image

Note that some of the buttons make more sense for plain text feedback and less for HTML-formatted feedback, but at least the "scroll separately" button is useful in all cases. The highlightCode jQuery plugin includes options that disable some buttons:

.highlightCode({extraButtons: extraButtons});

if (!options || !options.noCopy) {

if (!options || !options.noWrap) {

if (!options || !options.noDownload) {

preElement
  .addClass('hljs language-plaintext')
  .highlightCode({
    extraButtons: extraButtons,
    noCopy: true,
    noWrap: true,
    noDownload: true,
  });

The above code snippet shows how to use the options for highlightCode. However, since highlightCode expects plain text content and adds line numbers around the content, it can not be used as is with HTML-formatted feedback.

EerikSaksi added a commit to EerikSaksi/a-plus that referenced this issue Apr 4, 2023
EerikSaksi added a commit to EerikSaksi/a-plus that referenced this issue Apr 4, 2023
EerikSaksi added a commit to EerikSaksi/a-plus that referenced this issue Apr 4, 2023
EerikSaksi added a commit to EerikSaksi/a-plus that referenced this issue Apr 12, 2023
EerikSaksi added a commit to EerikSaksi/a-plus that referenced this issue May 9, 2023
@PasiSa PasiSa added this to the v1.19 milestone May 9, 2023
EerikSaksi added a commit to EerikSaksi/a-plus that referenced this issue May 9, 2023
EerikSaksi added a commit to EerikSaksi/a-plus that referenced this issue Jun 9, 2023
@EerikSaksi
Copy link
Contributor

I added a commit which makes HTML grader results scrollable, and ensures that if there's multiple submitted files each with their own "Scroll Separately" button that they are synced.

EerikSaksi added a commit to EerikSaksi/a-plus that referenced this issue Jul 5, 2023
EerikSaksi added a commit to EerikSaksi/a-plus that referenced this issue Jul 5, 2023
ihalaij1 added a commit to ihalaij1/a-plus that referenced this issue Oct 18, 2023
The grader feedback already had a 'Scroll separately' button,
and it is now also added for the submitted files.

Fixes apluslms#1111
Closes apluslms#1172
ihalaij1 added a commit to ihalaij1/a-plus that referenced this issue Oct 20, 2023
The grader feedback already had a 'Scroll separately' button,
and it is now also added for the submitted files.

Fixes apluslms#1111
Closes apluslms#1172
ihalaij1 added a commit to ihalaij1/a-plus that referenced this issue Oct 20, 2023
The grader feedback already had a 'Scroll separately' button,
and it is now also added for the submitted files.

Fixes apluslms#1111
Closes apluslms#1172
ihalaij1 added a commit to ihalaij1/a-plus that referenced this issue Oct 20, 2023
The grader feedback already had a 'Scroll separately' button,
and it is now also added for the submitted files.

Fixes apluslms#1111
Closes apluslms#1172
ihalaij1 added a commit to ihalaij1/a-plus that referenced this issue Oct 20, 2023
The grader feedback already had a 'Scroll separately' button,
and it is now also added for the submitted files.

Fixes apluslms#1111
Closes apluslms#1172
ihalaij1 added a commit to ihalaij1/a-plus that referenced this issue Oct 26, 2023
The grader feedback already had a 'Scroll separately' button,
and it is now also added for the submitted files.

Fixes apluslms#1111
Closes apluslms#1172
ihalaij1 added a commit to ihalaij1/a-plus that referenced this issue Oct 26, 2023
The grader feedback already had a 'Scroll separately' button,
and it is now also added for the submitted files.

Fixes apluslms#1111
Closes apluslms#1172
ihalaij1 added a commit to ihalaij1/a-plus that referenced this issue Oct 26, 2023
The grader feedback already had a 'Scroll separately' button,
and it is now also added for the submitted files.

Fixes apluslms#1111
Closes apluslms#1172
ihalaij1 added a commit to ihalaij1/a-plus that referenced this issue Nov 21, 2023
The grader feedback already had a 'Scroll separately' button,
and it is now also added for the submitted files.

Fixes apluslms#1111
Closes apluslms#1172
ihalaij1 added a commit that referenced this issue Nov 21, 2023
The grader feedback already had a 'Scroll separately' button,
and it is now also added for the submitted files.

Fixes #1111
Closes #1172
ashi006 pushed a commit to ashi006/a-plus that referenced this issue Nov 30, 2023
The grader feedback already had a 'Scroll separately' button,
and it is now also added for the submitted files.

Fixes apluslms#1111
Closes apluslms#1172
murhum1 pushed a commit to murhum1/a-plus that referenced this issue Dec 21, 2023
The grader feedback already had a 'Scroll separately' button,
and it is now also added for the submitted files.

Fixes apluslms#1111
Closes apluslms#1172
ihalaij1 added a commit to ihalaij1/a-plus that referenced this issue Dec 22, 2023
The grader feedback already had a 'Scroll separately' button,
and it is now also added for the submitted files.

Fixes apluslms#1111
Closes apluslms#1172
ihalaij1 added a commit to ihalaij1/a-plus that referenced this issue Dec 22, 2023
The grader feedback already had a 'Scroll separately' button,
and it is now also added for the submitted files.

Fixes apluslms#1111
Closes apluslms#1172
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: e-exam Important for electronic exams area: end-of-course Tasks that are done at the end-of-course (e.g. retriecing grades out) area: UX teacher User experience and usability for teachers effort: hours Estimated to take less than one day, from the creation of a new branch to the merging experience: beginner required knowledge estimate requester: CS The issue is raised internally by a CS teacher requires: priority Currently using this label to flag issues that need EDIT decision ASAP (even if there was priority) type: feature New feature or change to a feature
Projects
Status: Done
3 participants