Refactor GradersController#global_actions

This includes 3 minor refactoring:

1. Fixing the indentation of `case .. when` statements. The idiomatic way is to indent `when` at the same level as `case`.
2. Fixing some of the line wraps no longer needed after the indentation fix.
3. Make some of the code reuse existing saved variables.

To review code without the indentation change:
https://github.com/MarkUsProject/Markus/pull/1688/files?w=1
(This ignores all whitespace changes)

Tested:
- rspec
- rake test:functionals