cornellGrading 2.16.1__tar.gz → 2.16.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (23) hide show
  1. {cornellGrading-2.16.1/cornellGrading.egg-info → cornellGrading-2.16.2}/PKG-INFO +1 -1
  2. {cornellGrading-2.16.1 → cornellGrading-2.16.2}/cornellGrading/__init__.py +1 -1
  3. {cornellGrading-2.16.1 → cornellGrading-2.16.2}/cornellGrading/cornellGrading.py +6 -5
  4. {cornellGrading-2.16.1 → cornellGrading-2.16.2}/cornellGrading/cornellQualtrics.py +21 -5
  5. {cornellGrading-2.16.1 → cornellGrading-2.16.2/cornellGrading.egg-info}/PKG-INFO +1 -1
  6. {cornellGrading-2.16.1 → cornellGrading-2.16.2}/LICENSE +0 -0
  7. {cornellGrading-2.16.1 → cornellGrading-2.16.2}/MANIFEST.in +0 -0
  8. {cornellGrading-2.16.1 → cornellGrading-2.16.2}/README.md +0 -0
  9. {cornellGrading-2.16.1 → cornellGrading-2.16.2}/cornellGrading/cornellInterface.py +0 -0
  10. {cornellGrading-2.16.1 → cornellGrading-2.16.2}/cornellGrading/dueDatesFromCSV.py +0 -0
  11. {cornellGrading-2.16.1 → cornellGrading-2.16.2}/cornellGrading/pandocHTMLParser.py +0 -0
  12. {cornellGrading-2.16.1 → cornellGrading-2.16.2}/cornellGrading/upload_MC_questions.py +0 -0
  13. {cornellGrading-2.16.1 → cornellGrading-2.16.2}/cornellGrading.egg-info/SOURCES.txt +0 -0
  14. {cornellGrading-2.16.1 → cornellGrading-2.16.2}/cornellGrading.egg-info/dependency_links.txt +0 -0
  15. {cornellGrading-2.16.1 → cornellGrading-2.16.2}/cornellGrading.egg-info/entry_points.txt +0 -0
  16. {cornellGrading-2.16.1 → cornellGrading-2.16.2}/cornellGrading.egg-info/requires.txt +0 -0
  17. {cornellGrading-2.16.1 → cornellGrading-2.16.2}/cornellGrading.egg-info/top_level.txt +0 -0
  18. {cornellGrading-2.16.1 → cornellGrading-2.16.2}/pyproject.toml +0 -0
  19. {cornellGrading-2.16.1 → cornellGrading-2.16.2}/scripts/canvastex.py +0 -0
  20. {cornellGrading-2.16.1 → cornellGrading-2.16.2}/scripts/matlabgrader.py +0 -0
  21. {cornellGrading-2.16.1 → cornellGrading-2.16.2}/scripts/setupSelfGrading.py +0 -0
  22. {cornellGrading-2.16.1 → cornellGrading-2.16.2}/setup.cfg +0 -0
  23. {cornellGrading-2.16.1 → cornellGrading-2.16.2}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: cornellGrading
3
- Version: 2.16.1
3
+ Version: 2.16.2
4
4
  Summary: Routines for interacting with Cornell installations of Canvas and Qualtrics
5
5
  Home-page: https://github.com/dsavransky/grading
6
6
  Author: Dmitry Savransky
@@ -1,4 +1,4 @@
1
1
  name = "cornellGrading"
2
- __version__ = "2.16.1"
2
+ __version__ = "2.16.2"
3
3
  from .cornellGrading import cornellGrading
4
4
  from .cornellQualtrics import cornellQualtrics
@@ -795,7 +795,7 @@ class cornellGrading:
795
795
 
796
796
  listids = []
797
797
  listemails = []
798
- for el in tmp.json()["result"]["elements"]:
798
+ for el in tmp:
799
799
  listids.append(el["id"])
800
800
  listemails.append(el["email"])
801
801
 
@@ -1157,7 +1157,7 @@ class cornellGrading:
1157
1157
  # won't work if we don't have pandoc
1158
1158
  assert shutil.which("pandoc"), (
1159
1159
  "Cannot locate pandoc. Please visit https://pandoc.org/installing.html"
1160
- "for intallation instructions."
1160
+ "for installation instructions."
1161
1161
  )
1162
1162
 
1163
1163
  # going to assume that the pdf file is located in the working dir with the tex
@@ -1308,7 +1308,8 @@ class cornellGrading:
1308
1308
  imtag = re.search(
1309
1309
  # r'<p>(<img class="equation_image"(.*?)(?={})([\s\S]*?)(?=/></p>)/>)</p>'.format(
1310
1310
  # r'(<img class="equation_image"(.*?)(?={})([\s\S]*?)(?=/>)/>)'.format(
1311
- r'(<img class="equation_image" src="https://canvas.cornell.edu/equation_images/([\w%]*?)(?={})([\s\S]*?)(?=/>)/>)'.format(
1311
+ # r'(<img class="equation_image" src="https://canvas.cornell.edu/equation_images/([\w%]*?)(?={})([\s\S]*?)(?=/>)/>)'.format(
1312
+ r'(<img class="equation_image" src="https://canvas.cornell.edu/equation_images/([\w%.-]*?)(?={})([\s\S]*?)(?=/>)/>)'.format(
1312
1313
  enclabel
1313
1314
  ),
1314
1315
  out,
@@ -1497,7 +1498,7 @@ class cornellGrading:
1497
1498
  """
1498
1499
 
1499
1500
  # create survey and distribution
1500
- surveyname = "%s HW%d Self-Grade" % (self.coursename, assignmentNum)
1501
+ surveyname = "%s HW%d Self-Assessment" % (self.coursename, assignmentNum)
1501
1502
  surveyId = self.genPrivateHWSurvey(
1502
1503
  surveyname, nprobs, ecprobs=ecprobs, scoreOptions=scoreOptions
1503
1504
  )
@@ -1511,7 +1512,7 @@ class cornellGrading:
1511
1512
  distnetids = np.array([d["email"].split("@")[0] for d in dist])
1512
1513
 
1513
1514
  # grab the original assignment and all the submissions
1514
- hwname = "HW%d" % assignmentNum
1515
+ hwname = "Written HW%d" % assignmentNum
1515
1516
  hw = self.getAssignment(hwname)
1516
1517
  subs = hw.get_submissions()
1517
1518
 
@@ -290,8 +290,8 @@ class cornellQualtrics:
290
290
  getMailingListId
291
291
 
292
292
  Returns:
293
- requests.models.Response:
294
- response object with all mailing list contacts
293
+ list:
294
+ list of dicts encoding all mailing list contacts
295
295
 
296
296
  Notes:
297
297
 
@@ -310,7 +310,15 @@ class cornellQualtrics:
310
310
  response.status_code == 200
311
311
  ), "Could not get contacts for list {}.".format(mailingListId)
312
312
 
313
- return response
313
+ out = response.json()["result"]["elements"]
314
+
315
+ while response.json()["result"]["nextPage"] is not None:
316
+ response = requests.get(
317
+ response.json()["result"]["nextPage"], headers=self.headers_tokenOnly
318
+ )
319
+ out += response.json()["result"]["elements"]
320
+
321
+ return out
314
322
 
315
323
  def dumpContacts(self, mailingListId):
316
324
  """Repackage all contacts in a mailing list into a pandas DataFrame
@@ -329,7 +337,7 @@ class cornellQualtrics:
329
337
 
330
338
  """
331
339
 
332
- contacts = self.getListContacts(mailingListId).json()["result"]["elements"]
340
+ contacts = self.getListContacts(mailingListId)
333
341
 
334
342
  fn = []
335
343
  ln = []
@@ -461,7 +469,15 @@ class cornellQualtrics:
461
469
  )
462
470
  response2 = requests.get(baseUrl2, headers=self.headers_tokenOnly)
463
471
 
464
- return response2.json()["result"]["elements"]
472
+ out = response2.json()["result"]["elements"]
473
+
474
+ while response2.json()["result"]["nextPage"] is not None:
475
+ response2 = requests.get(
476
+ response2.json()["result"]["nextPage"], headers=self.headers_tokenOnly
477
+ )
478
+ out += response2.json()["result"]["elements"]
479
+
480
+ return out
465
481
 
466
482
  def getDistributionLinks(self, distributionId, surveyId):
467
483
  """Retrieve distribution info
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: cornellGrading
3
- Version: 2.16.1
3
+ Version: 2.16.2
4
4
  Summary: Routines for interacting with Cornell installations of Canvas and Qualtrics
5
5
  Home-page: https://github.com/dsavransky/grading
6
6
  Author: Dmitry Savransky
File without changes