Skip to content

Replace the student grades page.#2917

Open
somiaj wants to merge 2 commits into
openwebwork:WeBWorK-2.21from
somiaj:new-grades-page
Open

Replace the student grades page.#2917
somiaj wants to merge 2 commits into
openwebwork:WeBWorK-2.21from
somiaj:new-grades-page

Conversation

@somiaj
Copy link
Copy Markdown
Contributor

@somiaj somiaj commented Feb 25, 2026

This replaces the Grades page for students with a new layout designed for students. The old grades table is still available to instructors under "Student Progress". Being a grade page for students, instructors see the same info a student would (no hidden sets or grades are shown for instructors acting as a student). The only difference for an instructor is the student navigation menu is shown to switch which student to act as.

The assignments are split into categories. Open assignments, reduced scoring assignments (if reduced scoring is enabled), and closed assignments. Assignments are ordered using the same byUrgency logic as on the ProblemSets page.

The total grade, if configured to be shown, is shown at the top of the page for all sets that are past the open date.

Each assignment is a list item which shows the total score. For tests the best test version score is shown if the student can see the score. Then a table which includes the total score and status for each problem in the set. For just in time, only top level problems are shown. For tests, only the best test version is shown.

The old Grades page code is moved into StudentProgress.pm where it is still used.

@Alex-Jordan
Copy link
Copy Markdown
Contributor

Thanks @somiaj.

Please let me know if there are any other features you would think would be useful for students on this page.

For me with #2912, this started because I wanted a quick way to be on the Grades page and jump directly to a particular exercise. So can you make it so that from each cell in a table for an assignment, there is a link to that problem?

Based on what I read here, are you no longer reporting the number of attempts used on a problem? (Or the number of incorrect attempts, as it were?) I find that helpful for a student to see in one place where they struggled, even if they eventually have all answers correct.

@somiaj
Copy link
Copy Markdown
Contributor Author

somiaj commented Feb 25, 2026

@Alex-Jordan Thanks for the suggestions, I too thought about adding a link directly to the problem attached to the problem number, then forgot I wanted to do that. I can make each problem number a link, though I'm a bit worried about accessibility here. Having multiple links called "1" that go to different locations isn't something that is considered accessible I thought.

You are correct, I'm not currently showing attempts on this page as I couldn't think of a use case for that information for students. Your use case sounds reasonable though it would add another row to the problem table for each set will end up taking more space. Also should this only be done on assignments, what about tests? I know tests are used in different ways, but to me it won't be as useful there. My experience is students (unless prompted to do so) probably won't be concerned about how many attempts they take, also with scaffold and multi part problems that info seems to not be as useful. I'm just brain storming the benefit of adding another row vs the overall use of it. Maybe let me know what you think about the layout of adding such a row once you get a look at this. Would me adding some screenshots of the current layout help?

@Alex-Jordan
Copy link
Copy Markdown
Contributor

Sure, maybe some screenshots will help discussion.

I think there must be an accessible way to have the link look like "1" but still convey the information that it goes to "set X problem 1". Not off the top of my head, but I'll look into that.

@somiaj
Copy link
Copy Markdown
Contributor Author

somiaj commented Feb 25, 2026

Here is an example of what it currently looks like. For tests, if there were more versions, they would all be listed under the test below the version that is shown.

image

@Alex-Jordan
Copy link
Copy Markdown
Contributor

Alex-Jordan commented Feb 25, 2026 via email

@somiaj
Copy link
Copy Markdown
Contributor Author

somiaj commented Feb 25, 2026

@Alex-Jordan correct, for assignments, I show the problem_id, but for tests I show the problem count.

@Alex-Jordan
Copy link
Copy Markdown
Contributor

Alex-Jordan commented Feb 25, 2026 via email

@somiaj
Copy link
Copy Markdown
Contributor Author

somiaj commented Feb 25, 2026

Here, I deleted some problems from one of my sets to show it in action.

image

@somiaj
Copy link
Copy Markdown
Contributor Author

somiaj commented Feb 25, 2026

A good sort could be useful, though I was partly modeling this off the assignments page where I find grouping by category helps (at least me). I do want to sort by something other than alphabetically, I just haven't gotten around to that yet, and figured some discussion about this is good.

My hope is the grouping helps students quickly identify where they should be working. Though for a class in which everything is open, ordering those by date is a change that will be made.

@somiaj
Copy link
Copy Markdown
Contributor Author

somiaj commented Feb 25, 2026

Really I just wanted to think about the sorting a bit more. Should this be configurable? Having to deal with reduced dates, and non reduced scoring assignments due dates, also what about secondary, etc. sorting for things all due at the same time. Just not something I wanted to work out with my initial layout attempt.

@somiaj
Copy link
Copy Markdown
Contributor Author

somiaj commented Feb 25, 2026

For assignments (not tests), the problem ID is now a direct link to the problem. @Alex-Jordan let me know if you find a way to make this more accessible.

@somiaj somiaj marked this pull request as draft February 25, 2026 04:33
@somiaj
Copy link
Copy Markdown
Contributor Author

somiaj commented Feb 25, 2026

Seems adding an aria-label should do it. I added the label $setName problem $problemID.

I also just found an issue with adding links directly to the problem. If for any reason the set is not accessible to a student, such as LTI restrictions or other restrictions that would prevent the student from accessing the problems, the student gets an error when trying to access the problem via the direct link. This means that care needs to be taken in determining if a link should be shown or not to the individual problems. This isn't an issue for the set anymore.

So saving a student one click to go directly to the problem is going to add a layer of complication.

@somiaj
Copy link
Copy Markdown
Contributor Author

somiaj commented Feb 25, 2026

Okay, I now test for lti, conditional release, and ip restrictions, and only create a link to problems in which the set has none of those restrictions.

@somiaj somiaj force-pushed the new-grades-page branch 4 times, most recently from d4bf011 to 2fe4de9 Compare March 11, 2026 02:15
@somiaj somiaj force-pushed the new-grades-page branch from 2fe4de9 to 87254b6 Compare April 1, 2026 04:08
@somiaj somiaj changed the base branch from develop to WeBWorK-2.21 April 1, 2026 04:09
@drgrice1
Copy link
Copy Markdown
Member

I was just looking at this to see where it stands. Here are the things that I observe at this point.

Did you forget to add a grades.scss file to this? I am seeing a console warning about a grades.css file not being found (it is loaded from templates/ContentGenerator/Grades.html.ep), but see no such file in this pull request. I also don't see anything like your screenshots.

Also, why is there a assets/pg/myNewProblem.pg file in this?

One thing I notice immediately when looking at the result is that there are structural problems.

The total grade shown at the top of the page should not be a list with a single item in it, and that can never have more than one item. That is semantically incorrect. I also don't think it is visually appealing to use a list-group for this.

The grade items need to be reworked. A screen reader goes to the percent grade for the set first before announcing the set. It is semantically out of order.

@somiaj somiaj marked this pull request as ready for review April 28, 2026 20:51
@somiaj somiaj marked this pull request as draft April 28, 2026 20:52
@somiaj somiaj force-pushed the new-grades-page branch 2 times, most recently from 792a8c9 to 1b6ccbe Compare May 3, 2026 07:10
@somiaj
Copy link
Copy Markdown
Contributor Author

somiaj commented May 3, 2026

Fixed the last issues mentioned. I accidentally committed the wrong file, so fixed that and the grades.scss is now included.

I updated the structure to address @drgrice1 comments. The grade total is no longer a list. I also set up some custom flexbox css to make it so the items are listed as 'set name' -> 'grade %' -> 'problem table', but are still positioned in a similar fashion.

I also updated it so only the best test version is shown. And if there is more than one test version, the grade table informs the user that they are seeing Version X of Y total versions.

Probably still a bunch to do. If you notice any problems please submit a PR, as I am limited on time, but will work on this when I can.

@somiaj somiaj force-pushed the new-grades-page branch from 1b6ccbe to f9a7ef4 Compare May 3, 2026 16:24
@somiaj somiaj force-pushed the new-grades-page branch from f9a7ef4 to 6a9d7c3 Compare May 3, 2026 16:33
@somiaj
Copy link
Copy Markdown
Contributor Author

somiaj commented May 3, 2026

I removed all the code/tooltips to decide if an assignment is complete or not to inform students to work on it. There is just too many conditions, such as should students who have resurrect items be told they can use them, what about reduced scoring removal items, and so on. Instead this just now lists the score.

Currently I am using the same byUrgency logic to sort the sets as the ProblemSets page. I don't know if this or just alphabetical is better. I guess it depends on what is being looked for. I'm open for suggestions on how to organize the sets.

At least for me this is getting closer to being ready. Since I decided to not go down the route of trying to indicate sets that students can improve on, I think only suggestions/fixes for any issues found are needed.

@somiaj somiaj marked this pull request as ready for review May 3, 2026 16:34
@somiaj somiaj force-pushed the new-grades-page branch from 6a9d7c3 to 28f4762 Compare May 3, 2026 16:41
@somiaj somiaj force-pushed the new-grades-page branch 5 times, most recently from e195c06 to 0cfc41f Compare May 19, 2026 21:07
@Alex-Jordan
Copy link
Copy Markdown
Contributor

I'm looking at the page now, and just commenting on what I see there. I haven't looked at the code itself. Sorry for the large list, just reporting what I see.

  • Something is wrong with how it displays test versions. In one test, I took it using three versions. My scores are 1/9, 1/9, and 0/9. So zero on the third version. The table has the correct scoring (11%, 1 out of 9, indicates the right scores per problem) but it says "Version 3 of 3 versions taken"). It should be either version 1 or version 2, which is where the scoring data is coming from.
  • It might help with accessibility to put scope="row" on the th elements for the row headers.
  • Not complaining but why not put links to problems when the set is a test version?
  • In the status row, maybe it would be better to leave out all the % signs, but put that in the row header like "Status (%)".
  • I don't like how the set titles are indented, sort of straddling over the tables. Why not have them left-aligned? Or left-aligned with the table?
  • How easy is it to keyboard navigate to a set somewhere in the middle of the list? It might be easier if the set titles were h3.
  • I do use the current grades page to see the number of excess incorrect attempts, and this changes things by not showing that data. I don't need to see "excess incorrect attempts", just showing total number of attempts would serve the same purpose. (Which is to see which exercises a particular student struggled with.) Could you add a row to these tables for that?
  • The current grades page indicates which problems have not been attempted. Could we do that here? Instead of writing a 0 for the status, there could be an indicator for when there are no attempts at all.
  • The 💯 character clashes stylistically with the other percentages. We used that in the current table to save horizontal space, but I think it may be better to use "100%" with this redesign.
  • Once this is merged, I might propose some styling changes. But I don't want to get in the way of this for now.

@somiaj
Copy link
Copy Markdown
Contributor Author

somiaj commented May 20, 2026

Not complaining but why not put links to problems when the set is a test version?

Mostly because this requires a bit of extra work due to problems per page, so the links will be per page vs per problem. Could be done, just didn't think it was worth the extra work.

I don't like how the set titles are indented, sort of straddling over the tables. Why not have them left-aligned? Or left-aligned with the table?

Mostly for space, the setup is something like this

|---|-----------------|
|   |        1        |
| 2 |-----------------|
|   |        3        |
|---|-----------------|

This way the tab order works, but this makes the rows a little more compact. Of course this can be changed, this is just the layout I went with.

How easy is it to keyboard navigate to a set somewhere in the middle of the list? It might be easier if the set titles were h3.

I use the order described above so tab hits the title first, the status second and the problem/version table last.

I do use the current grades page to see the number of excess incorrect attempts, and this changes things by not showing that data. I don't need to see "excess incorrect attempts", just showing total number of attempts would serve the same purpose. (Which is to see which exercises a particular student struggled with.) Could you add a row to these tables for that?

I know this is something you want, and we did talk about this a bit in the meeting. Overall this information can be found if students go to the set, and it just takes up extra space and I don't really think it will be used by most students. Instructors still have access to the old grades page under student progress so they can see that info compactly if needed. So after talking it over in the meeting we kinda just decided it wasn't worth adding another row for this use.

The current grades page indicates which problems have not been attempted. Could we do that here? Instead of writing a 0 for the status, there could be an indicator for when there are no attempts at all.

To me this is more a grades page, no attempts is still a zero. So not something I thought of. Again students get direct links to the problem set if they want more info about why it is a zero, so I'm not convinced it is worth having that info here too. Of course use cases to vary.

The 💯 character clashes stylistically with the other percentages. We used that in the current table to save horizontal space, but I think it may be better to use "100%" with this redesign.

Similar result here, 100% will make everything wider. Though If we remove the % it could work. I kinda like the % (I do know you suggested not having it, but I think it looks better).

Once this is merged, I might propose some styling changes. But I don't want to get in the way of this for now.

You can make a PR to my branch too, though I guess you have lots of ideas of info you would want to see, so that is probably a good idea, so your particular changes can be discussed separately of the initial update.

@Alex-Jordan
Copy link
Copy Markdown
Contributor

Mostly for space, the setup is something like this

|---|-----------------|
|   |        1        |
| 2 |-----------------|
|   |        3        |
|---|-----------------|

This way the tab order works, but this makes the rows a little more compact. Of course this can be changed, this is just the layout I went with.

The "1" and the "3" are not aligned. The "1" starts left of the "3":

Screenshot 2026-05-19 at 6 57 23 PM

If the "1" is not to be all the way to the left, can it start left-aligned with the table?

I use the order described above so tab hits the title first, the status second and the problem/version table last.

That's not what I mean. Suppose there are 20 sets and I want to navigate to the 12th. The tab order you describe asks me to tab through 11*3 things before I reach the 12th set. I'm looking for a way to navigate past the first 11 sets more quickly, and one way (not sure it is the best) would be if the set titles were h3. Keyboard navigators can navigate quickly through hN elements.

I know this is something you want, and we did talk about this a bit in the meeting. Overall this information can be found if students go to the set, and it just takes up extra space and I don't really think it will be used by most students. Instructors still have access to the old grades page under student progress so they can see that info compactly if needed. So after talking it over in the meeting we kinda just decided it wasn't worth adding another row for this use.

I ask my students to use that information. And it sounds like you are saying my students should navigate into each set one at a time to hunt the exercises where they used multiple attempts. But when they are prepping for an exam, I ask them to look at this one page to see the places where they struggled, even when they eventually got everything correct. And I trust that will work more when they don't have to track entering and checking every assignment.

I could be fine without this information on tests. And test tables here already use 4 rows. So adding a 4th row for homework sets would actually make everything have a more uniform look.

To me this is more a grades page, no attempts is still a zero. So not something I thought of. Again students get direct links to the problem set if they want more info about why it is a zero, so I'm not convinced it is worth having that info here too. Of course use cases to vary.

This is the second thing where the new version of this page is losing information that the current version has. Well, I guess it's the same, since if the number of attempts is included in a row, then there would not need to be a separate "unattempted" indicator.

Similar result here, 100% will make everything wider. Though If we remove the % it could work. I kinda like the % (I do know you suggested not having it, but I think it looks better).

I'm referring to the "2" in your diagram. Not the scores in table cells. And changing to use "100%" does not make anything wider. Here I changed one directly using the developer tools:

Screenshot 2026-05-19 at 7 08 25 PM

The scores in the table cells are actually not using the special 💯 character right now, and are using "100%". And so actually those are taking up more horizontal space at the moment.

@somiaj
Copy link
Copy Markdown
Contributor Author

somiaj commented May 20, 2026

I implemented some of those suggestions.

  • Change the titles to h3 and then made them smaller than h3 is normally to help with key board navigation.
  • Added scope="row" to table headers.
  • Added attempts to the homework problems table.
  • Use 100% for the grade instead of UTF-8 character.
  • Attempted to fix the bug where the wrong version number was being displayed.
  • Removed table indent. I still like it better, but don't have strong feelings.

I looked at maybe adding links to test problems, and didn't see an easy way to do this, as the page you are viewing is part of the parameters sent in the link. It is possible just not something I thought is important enough to figure out at the moment.

@Alex-Jordan
Copy link
Copy Markdown
Contributor

Thanks for those changes. About saving space, I have a few thoughts.

I already mentioned saving horizontal space by moving the "%" signs to the row header. So this:

Screenshot 2026-05-20 at 12 00 56 AM

would become this:

Screenshot 2026-05-20 at 12 01 55 AM

Although it might look better to set a uniform width on those cells:

Screenshot 2026-05-20 at 12 05 30 AM

For saving some vertical space, I am looking at the "Score: 5 out of 8" rows that don't really need to be part of the table. They give information about the set as a whole, not per problem which is what the table is for. They also probably make the table a challenge to navigate with a keyboard. And probably the problem number row should be full of <th scope="col"> tags instead of <td>, so that if a user is in a lower cell, their screen reader can clearly identify something like "row Status, column problem 3" while keeping focus on that cell.

So what do you think about moving the "5 out of 8" to somewhere else? In some respects, it's redundant, since we already see the 63% overall score. Do we need "5 out of 8" at all? Would it make sense in tiny font right under the "63%"? Or just some place that doesn't take up vertical space?

Similarly with tests and the row that has "Version 1 of 3 versions taken". That could be a parenthetical adjacent to the title of the test.

If you don't like these ideas, feel free to reject them. I'm going to mark approval now. (Bad Alex, I haven't scrutinized the actual code...)

@somiaj somiaj force-pushed the new-grades-page branch from 07e9354 to ad53830 Compare May 20, 2026 14:12
@somiaj
Copy link
Copy Markdown
Contributor Author

somiaj commented May 20, 2026

  • Used "Status (%)" for problem table to remove % from each score.
  • Moved the version and score from the table into a small caption.
  • Made the problem numbers table headers with scope="col".
  • Made the min-width of the table header 2rem, so they look more uniform.

@Alex-Jordan What about those changes?

Comment thread templates/HelpFiles/Grades.html.ep
@Alex-Jordan
Copy link
Copy Markdown
Contributor

I opened a PR to @somiaj's branch: somiaj#15

But evidently I need to clean up the scss code formatting. How do I do that again?

@drgrice1
Copy link
Copy Markdown
Member

Run npm run prettier-format from the htdocs directory.

@Alex-Jordan
Copy link
Copy Markdown
Contributor

I think it's good, and my previous approval tag stands. I only skimmed the code changes. But the behavior on the page seems good. I'm not seeing that issue with the test versions anymore, for instance.

@somiaj somiaj force-pushed the new-grades-page branch 2 times, most recently from 9fbc791 to 8444325 Compare May 21, 2026 17:26
somiaj added 2 commits May 21, 2026 11:26
This replaces the Grades page for students with a new layout
designed for students. The old grades table is still available
to instructors under "Student Progress". Being a grade page
for students, instructors see the same info a student would
(no hidden sets or grades are shown for instructors acting as
a student). The only difference for an instructor is the student
navigation menu is shown to switch which student to act as.

The assignments are split into categories. Open assignments,
reduced scoring assignments (if reduced scoring is enabled),
and closed assignments. Assignments are ordered using the
same `byUrgency` logic as the ProblemSets page.

The total grade, if configured to be shown, is shown at the
top of the page for all sets that are past the open date.

Each assignment is a list item which shows the total score.
For tests the best test version score is shown if the student
can see the score. Then a table which includes the total score
and status for each problem in the set. For just in time,
only top level problems are shown. For tests, only the best
test version is shown.

The old Grades page code is moved into StudentProgress.pm
where it is still used.
Suggested by @Alex-Jordan, add the weights to the grade page and
then add buttons to hide/show the weights. The buttons use local
storage to save the state. The default state is to have the
weights and attempts hidden. Since the toggle happens at page load
the change is noticed when the page loads if not using the defaults.

Also put the version and score on a single row to save height
and a little bit of refactoring of adding the problems for each
set to save duplication of code.
@somiaj somiaj force-pushed the new-grades-page branch from 8444325 to ff2ee3a Compare May 21, 2026 17:26
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.

3 participants