<%# Marking state set to complete but there is at least one nil mark %>
document.getElementById('criterion_incomplete_error').innerHTML = '<%= @result.errors[:base] %>';
document.getElementById('criterion_incomplete_error').style.display = '';

document.getElementById('marking_state').value = '<%= Result::MARKING_STATES[:partial] %>';

<%# Marking state set to complete but there is at least one nil mark %>
document.getElementById('criterion_incomplete_error').innerHTML = '<%= @result.errors[:base].to_sentence %>';
document.getElementById('criterion_incomplete_error').style.display = '';

document.getElementById('marking_state').value = '<%= Result::MARKING_STATES[:partial] %>';

Remove quotes/brackets around error message in results view
Remove quotes/brackets around error message in results view
