Handle the indexerror exception on create_order

LMS-2646
It was moved because if the current_mode is not available means that course doesn't have the verified certificate than this line would raise an exception. so that why I moved the check of current_mode above it.