Skip to content

Manual Graduation

Bess Sadler edited this page Apr 2, 2018 · 4 revisions

Most of the time ETD publication will be triggered by a student's graduation, which happens via the graduation_job. However, sometimes you'll need to trigger this manually for some reason. In that case, just pull up the graduation job and do all of the tasks it would normally do in the rails console.

deploy@etd:/opt/laevigata/current$ RAILS_ENV=production bundle exec rails c
irb(main):001:0> GraduationJob.perform_now('j3860692c')

OR

irb(main):001:0> GraduationJob.perform_now('j3860692c', '2018-04-01')

At this point the ETD has a degree_awarded date, it has been published, notifications have been sent, and if it is open access it should be visible on the front page of the application.

If the owner doesn't match

It may be that the work was deposited by someone other than the author of the work. If so, you'll need to make or find the account of the person who should own it, make sure they have a User object, and transfer ownership.

E.g., on the rails console:

user = User.new
user.ppid = GET THE REAL PPID IF POSSIBLE, OTHERWISE USE SOMETHING FAKE
user.display_name = THE NAME OF THE AUTHOR
user.save
work = Etd.find('NOID OF THE WORK')
work.members.first.depositor = user.ppid
work.members.first.save
work.depositor = user.ppid
work.save