That function just retrieves the rating for one course, based on the course ID that the user has retrieved by searching for some courses. It is certainly requesting data from Yale's server, but I wouldn't call it scraping. To qualify as scraping (at least as I've done it), you'd have to iterate over all possible IDs and store the records in a database.
For example, consider this basketball scraper: https://github.com/andrewgiessel/basketballcrawler This builds a list of all the current NBA players and then pulls stats on all of them, saving them in a giant JSON file, IIRC. That's scraping.
What Sean Haufler is doing is not massively iterated, and it's linked in time and quantity to human-generated queries. Seems different to me.