You should set @submission.student here if the current user is a student:

```ruby
@submission.student = current_student
```

In the above code, `build` is a synonym for `new`. New takes a hash of attributes. The above should be written as:

```ruby
@submission = @assignment.submissions.new(params[:submission])
@submission.student = current_student if current_user.is_student?
@submission.save
```