Skip to content Skip to navigation

Importing Courses from ExploreCourses

Do you have courses on ExploreCourses that you’d like to appear on your site? Are you adding these courses by hand every term? If so, check out the Stanford Courses module.  

This module, created by our intrepid developer, John Bickar, at Stanford Web Services, uses RSS feeds to import courses from  https://explorecourses.stanford.edu/ and can display them on your site.  If your website is on the Stanford Sites service, this module is already installed for you. Otherwise you can download it from the Stanford Drupal Features server at: http://drupalfeatures.stanford.edu/project/stanford-courses.

Once installed on your site, you can find documentation for the Stanford Courses module on your site at: admin/help/stanford_courses.

How it works:

To use the Stanford Course Importer you’ll need to create a Stanford Course Importer node and give it a feed URL that specifies the search criteria for the courses to import from Explore Courses. The importer retrieves course information, and for each course, creates and populates a course node with the course information.

Creating the Stanford Course Importer and importing courses

Before starting, be sure to have the following information ready:

  • Title of your course importer

  • Feed URL from explorecourses.stanford.edu

  • Optionally, a description of your importer


Get the feed URL:

  1. Navigate to http://explorecourses.stanford.edu/

  2. Enter the search criteria which will list the courses you wish to import

  3. Your search will result in a long URL like this being displayed in the address bar of your browser:
    https://explorecourses.stanford.edu/search?view=catalog&page=0&q=FINANCE&filter-catalognumber-FINANCE=on&filter-coursestatus-Active=on

  4. Copy that URL from your browser's address bar for use as your feed URL


Create the course importer:

  1. From the Admin Menu, Navigate to: Content > Add content > Stanford Course Importer (node/add/stanford-course-importer)

  2. Paste the feed URL from your search at explorecourses.stanford.edu

  3. Optionally, enter your description of your importer in body text area

  4. Scroll to the bottom of the page and select “Save”

Upon first saving the course importer, the importer will immediately import the items from the feed.  Be prepared, this may take some time.


Verify the import

To verify that the importer imported the course you were expecting, first verify that the number of nodes created corresponds with what you expect. This number should display when the import finishes.

To check that the courses imported are the ones you expect:

  1. Select “Content” from the Admin Menu to bring up the content page

  2. Under “Type” filter select “Stanford Course.”  

  3. Click on “Apply”

  4. If necessary, sort by date by clicking on the “Updated” column header

  5. Check that the most recent courses reflect the information that you expected

Updating the importer

Did you forget to add a tag to the courses you imported?  Maybe you imported the wrong feed?  Not to worry. Here’s how to update or change the importer and the items you’ve imported.

  1. Find the Stanford Course Importer node you originally used to import the items.

    1. Select “Content” from the Admin Menu

    2. On the content page, under “Type” select “Stanford Course Importer”

    3. Click on “Apply”

    4. Scroll through the list until you find the importer to update

    5. Select the importer by clicking on the title

  2. Delete all the courses imported using this importer

    1. On the importer node, select the “Delete Items” tab

    2. Click on “Delete” to confirm

  3. Make your changes

    1. On the importer node, Select “Edit”

    2. Make your changes to the importer

    3. Scroll to the bottom of the page and click on “Save” to save your changes

  4. After saving, import the courses with the new criteria

    1. Select “Import”

    2. Click on “Import” to confirm

Tagging Courses in ExploreCourses

Courses in ExploreCourses may be grouped using tags. When creating the feed URL for courses to import, you can use these tags to identify which courses to import. Instructions for tagging courses in ExploreCourses are at:

http://studentaffairs.stanford.edu/registrar/staff/course-tagging

That's all, folks

Good luck! If you use the Stanford Courses module on your website, let us know how it works for you in the comments below. Feedback and questions are always welcome.

Categories: