Skip to content

[Bugfix:TAGrading] Progress bar show correct percentage#10272

Merged
bmcutler merged 12 commits into
mainfrom
progress_bar
Apr 27, 2024
Merged

[Bugfix:TAGrading] Progress bar show correct percentage#10272
bmcutler merged 12 commits into
mainfrom
progress_bar

Conversation

@wuj18

@wuj18 wuj18 commented Mar 22, 2024

Copy link
Copy Markdown
Contributor

Please check if the PR fulfills these requirements:

  • Tests for the changes have been added/updated (if possible)
  • Documentation has been updated/added if relevant
  • Screenshots are attached to Github PR if visual/UI changes were made

What is the current behavior?

Fixes #10061
When peer grading components are included in TA grading, the progress bar fails to display the correct completion percentage.

What is the new behavior?

The TA grading status progress bar accurately shows the completion percentage of non-peer components assigned to the grader (instructor, TA, or limited access grader).

Other information?

Test with an assignment that involves peer grading. Verify if the percentage displayed on the progress bar matches the expected percentage.

@codecov

codecov Bot commented Mar 22, 2024

Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 0% with 2 lines in your changes are missing coverage. Please review.

Project coverage is 22.76%. Comparing base (3945343) to head (b1debd0).
Report is 24 commits behind head on main.

❗ Current head b1debd0 differs from pull request most recent head e7175fd. Consider uploading reports for the commit e7175fd to get more accurate results

Additional details and impacted files

Impacted file tree graph

@@              Coverage Diff              @@
##               main   #10272       +/-   ##
=============================================
- Coverage     38.91%   22.76%   -16.16%     
- Complexity        0     8374     +8374     
=============================================
  Files            36      228      +192     
  Lines          3045    29985    +26940     
  Branches         75       75               
=============================================
+ Hits           1185     6825     +5640     
- Misses         1788    23088    +21300     
  Partials         72       72               
Flag Coverage Δ
autograder 21.92% <ø> (ø)
js 27.09% <ø> (ø)
migrator 100.00% <ø> (ø)
php 19.69% <0.00%> (?)
python_submitty_utils 71.65% <ø> (-8.91%) ⬇️
submitty_daemon_jobs 91.01% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

@wuj18 wuj18 changed the title [Bugfix:TAGrading] Progress bar show correct completion percentage for TA grading w/ peer grading [Bugfix:TAGrading] Progress bar show correct percentage Mar 22, 2024

@JWei17 JWei17 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approve, the peer grading gradable display the correct percentage. The progress bar no longer dropped down when ungraded some students homework.

@ryvaru
ryvaru requested review from ryvaru and removed request for ryvaru April 2, 2024 21:46

public function getTotalComponentCount($g_id) {
$this->course_db->query("SELECT count(*) AS cnt FROM gradeable_component WHERE g_id=?", [$g_id]);
$this->course_db->query("SELECT count(*) AS cnt FROM gradeable_component WHERE g_id=? AND gc_is_peer=?", [$g_id, $this->course_db->convertBoolean(false)]);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It looks like this change makes it so that getTotalComponentCount only returns the non-peer components. Wouldn't a better fix be to include peer graded components in the %complete calculation?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Not really, because the progress bar for the TA side should be calculated using the TA-completed components/TA-only components as stated in the expected behavior for the issue. The progress bar for the peer side should be calculated through peer-completed components/peer components, but Nia has another PR that addresses the peer progress bar, so this PR is specifically aimed at resolving the issues with the TA progress bar.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

That makes sense. I still feel that as long as getTotalComponentCount is in the codebase, it should return all components. Can you create a new function (or, if it wouldn't break anything else, rename this one) named getTaComponentCount or similar to make it clear when you only want TA components as opposed all components?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the feedback. I agree that the getTotalComponentCount() should only return all components. I created a new function named getTaComponentCount()

@DarthNyan DarthNyan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I like the renaming that you did I think it makes things clearer, and I may have a bit more for you. Is getGradedComponentsCountByGradingSections is ta-specific? If so I think it should be renamed as such. I also think getGradingProgress should be renamed for clarity if it's specifically ta grading progress.

@DarthNyan DarthNyan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good to me. I think it's a lot more clear now exactly what's going on in the progress bar calculation.

@williamjallen williamjallen left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

A couple brief stylistic comments:

Comment thread site/app/controllers/grading/ElectronicGraderController.php Outdated
Comment thread site/app/libraries/database/DatabaseQueries.php Outdated

@williamjallen williamjallen left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

My requested changes have been made. I'm not very familiar with this part of the codebase, so it would be good for someone else to take a look as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

TA grading w/ Peer grading - incorrect % completed

5 participants