Skip to content

Conversation

@mehalshah
Copy link
Contributor

Add functionality to now pull a review from the pool when there is one available for the user.

Since TeacherCon script is not ready for peer review, I made a scaled down copy that has peer review enabled.

How to test locally

  1. Pull this
  2. rake seed:scripts
  3. Have two teachers
  4. Go to /plc/user_course_enrollments/new and enroll both of them in All The Plc Things course
  5. With user Employee Engagement basics: Create code.org/company-profiles/* landing page #1, go to /s/alltheplcthings
  6. Complete one of the peer reviewable sections
  7. With user store sprite.value again, use it properly in setSpriteSize #2, go to s/alltheplcthings
  8. You should see 'Review a new submission' - clicking it will assign the review to user store sprite.value again, use it properly in setSpriteSize #2

module Plc::CoursesHelper
def options_for_user_enrollment_courses
Plc::Course.all.pluck(:name, :id).sort
Plc::Course.where.not(name: 'All Of The PLC Things').pluck(:name, :id).sort
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I didn't want All Of The Things showing up in the dropdown for new enrollments because I didn't want anyone accidentally enrolling in it.

Peer reviewable levels should be submittable by teachers enrolled in plc courses
@mehalshah
Copy link
Contributor Author

Have to fix one test as well

@mehalshah mehalshah force-pushed the pull_review_functionality branch 2 times, most recently from a105563 to c46a42d Compare July 13, 2016 22:35
@mehalshah mehalshah force-pushed the pull_review_functionality branch from c46a42d to 6ccd15c Compare July 13, 2016 22:40
result: ActivityConstants::UNSUBMITTED_RESULT,
icon: '',
locked: false
}
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm a bit unclear what this is doing. It adds a new not_started entry to the returned list if the # of existing reviews < # required for the script and a review exists that can be reviewed? Is PeerReview.get_review_for_user called here to see if one is available? But this doesn't persist anything. It just shows the "Review a new submission" option?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Summarize returns a list of summarized peer reviews for the purpose of rendering level progress dots. This is used on the client side to generate those dots, the same way they are generated for levels.

This part generates a line item that will show up as an empty progress dot that will redirect the user to the pull review path.

So you're right, it doesn't persist anything.

@aoby
Copy link
Contributor

aoby commented Jul 13, 2016

few small questions, otherwise LGTM (presuming green test run of course)

@mehalshah mehalshah merged commit e8b732d into staging Jul 14, 2016
@mehalshah mehalshah deleted the pull_review_functionality branch August 9, 2016 18:30
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