original_string: protected function translateCourseId($oldCourseId)
      {
          $course = ScoolCourse::where('name',Course::findOrFail($oldCourseId)->name)->first();
          if ( $course != null ) {
              return $course->id;
          }
          throw new CourseNotFoundByNameException();
      }
code: protected function translateCourseId($oldCourseId)
      {
          $course = ScoolCourse::where('name',Course::findOrFail($oldCourseId)->name)->first();
          if ( $course != null ) {
              return $course->id;
          }
          throw new CourseNotFoundByNameException();
      }
code_tokens: protected function translateCourseId ( $ oldCourseId ) { $ course = ScoolCourse :: where ( 'name' , Course :: findOrFail ( $ oldCourseId ) -> name ) -> first ( ) ; if ( $ course != null ) { return $ course -> id ; } throw new CourseNotFoundByNameException ( ) ; }
docstring: Translate old ebre-escool course id to scool id.
  
  @param $oldCourseId
  @return mixed
  @throws CourseNotFoundByNameException
docstring_tokens: Translate old ebre - escool course id to scool id .