Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Associated Lectures/Sections #58

Open
adityarpillai opened this Issue Mar 11, 2019 · 2 comments

Comments

Projects
None yet
2 participants
@adityarpillai
Copy link

adityarpillai commented Mar 11, 2019

For classes that have large lectures, the JSON data makes lectures and sections completely independent of one another similar to the following,

"lectures": [
  {
    "instructors": [
      "Kaynar, Zeliha Dilsun",
      "Cervesato, Iliano"
    ],
    "name": "Lec 1",
     "times": [
        {
          "begin": "09:00AM",
          "building": "DH",
          "days": [
            2,
            4
           ],
           "end": "10:20AM",
           "location": "Pittsburgh, Pennsylvania",
           "room": "2315"
      }
    ]
  }, ...
]
...
"sections": 
[
  {
    "instructors": [
      "Kaynar, Zeliha Dilsun",
      "Cervesato, Iliano"
    ],
    "name": "A",
    "times": [
      {
        "begin": "09:30AM",
        "building": "GHC",
        "days": [
            1
        ],
        "end": "10:20AM",
        "location": "Pittsburgh, Pennsylvania",
        "room": "CLSTR"
      },
      {
        "begin": "09:30AM",
        "building": "WEH",
        "days": [
            5
        ],
        "end": "10:20AM",
        "location": "Pittsburgh, Pennsylvania",
        "room": "5310"
      }
    ]
  }, ...
]

However, this isn't really an accurate depiction of the courses since if you choose a lecture, there are only a certain number of sections that you have available to you. Would it be a possibility to include an array field of associated sections in the lectures field, where it contains a string array of the sections that are associated with a given lecture if that is the case?

@adityarpillai

This comment has been minimized.

Copy link
Author

adityarpillai commented Mar 15, 2019

Also, although the raw file doesn't associate which lecture goes with what section, if you do an empty search on SOC, it'll separate the different sections by lectures, depending on which sections are able to go with what lecture.

This appears to be some sort of issue on CMU's part where the raw data gives us less information than through the SOC. Alternatively, as a fix, someone could implement something similar to how the FCE processing works, and just ask the user to download a copy of the webpage of a blank search so that the system can process it.

@justinchuby

This comment has been minimized.

Copy link
Member

justinchuby commented Mar 15, 2019

I think this is achievable using SOC's API that's currently used by course api to retrieve course descriptions. An example usage of the api is https://enr-apps.as.cmu.edu/open/SOC/SOCServlet/courseDetails?COURSE=70122&SEMESTER=S19.

It's used in the get_course_desc function.

def get_course_desc(num, semester, year):
# Generate target URL
params = {
'COURSE': num,
'SEMESTER': semester + year
}
url = DESC_URL + '?' + urllib.parse.urlencode(params)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.