Skip to content
This repository has been archived by the owner on Jul 10, 2022. It is now read-only.

Associated Lectures/Sections #58

Open
pilleye opened this issue Mar 11, 2019 · 2 comments
Open

Associated Lectures/Sections #58

pilleye opened this issue Mar 11, 2019 · 2 comments

Comments

@pilleye
Copy link
Contributor

pilleye 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?

@pilleye
Copy link
Contributor Author

pilleye 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
Copy link
Member

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants