cornellGrading 2.20.0__tar.gz → 2.20.1__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 (24) hide show
  1. {cornellgrading-2.20.0/cornellGrading.egg-info → cornellgrading-2.20.1}/PKG-INFO +1 -1
  2. {cornellgrading-2.20.0 → cornellgrading-2.20.1}/cornellGrading/__init__.py +1 -1
  3. {cornellgrading-2.20.0 → cornellgrading-2.20.1}/cornellGrading/cornellGrading.py +30 -3
  4. {cornellgrading-2.20.0 → cornellgrading-2.20.1/cornellGrading.egg-info}/PKG-INFO +1 -1
  5. {cornellgrading-2.20.0 → cornellgrading-2.20.1}/LICENSE +0 -0
  6. {cornellgrading-2.20.0 → cornellgrading-2.20.1}/MANIFEST.in +0 -0
  7. {cornellgrading-2.20.0 → cornellgrading-2.20.1}/README.md +0 -0
  8. {cornellgrading-2.20.0 → cornellgrading-2.20.1}/cornellGrading/cornellInterface.py +0 -0
  9. {cornellgrading-2.20.0 → cornellgrading-2.20.1}/cornellGrading/cornellQualtrics.py +0 -0
  10. {cornellgrading-2.20.0 → cornellgrading-2.20.1}/cornellGrading/dueDatesFromCSV.py +0 -0
  11. {cornellgrading-2.20.0 → cornellgrading-2.20.1}/cornellGrading/pandocHTMLParser.py +0 -0
  12. {cornellgrading-2.20.0 → cornellgrading-2.20.1}/cornellGrading/upload_MC_questions.py +0 -0
  13. {cornellgrading-2.20.0 → cornellgrading-2.20.1}/cornellGrading/utils.py +0 -0
  14. {cornellgrading-2.20.0 → cornellgrading-2.20.1}/cornellGrading.egg-info/SOURCES.txt +0 -0
  15. {cornellgrading-2.20.0 → cornellgrading-2.20.1}/cornellGrading.egg-info/dependency_links.txt +0 -0
  16. {cornellgrading-2.20.0 → cornellgrading-2.20.1}/cornellGrading.egg-info/entry_points.txt +0 -0
  17. {cornellgrading-2.20.0 → cornellgrading-2.20.1}/cornellGrading.egg-info/requires.txt +0 -0
  18. {cornellgrading-2.20.0 → cornellgrading-2.20.1}/cornellGrading.egg-info/top_level.txt +0 -0
  19. {cornellgrading-2.20.0 → cornellgrading-2.20.1}/pyproject.toml +0 -0
  20. {cornellgrading-2.20.0 → cornellgrading-2.20.1}/scripts/canvastex.py +0 -0
  21. {cornellgrading-2.20.0 → cornellgrading-2.20.1}/scripts/matlabgrader.py +0 -0
  22. {cornellgrading-2.20.0 → cornellgrading-2.20.1}/scripts/setupSelfGrading.py +0 -0
  23. {cornellgrading-2.20.0 → cornellgrading-2.20.1}/setup.cfg +0 -0
  24. {cornellgrading-2.20.0 → cornellgrading-2.20.1}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: cornellGrading
3
- Version: 2.20.0
3
+ Version: 2.20.1
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.20.0"
2
+ __version__ = "2.20.1"
3
3
  from .cornellGrading import cornellGrading
4
4
  from .cornellQualtrics import cornellQualtrics
@@ -2022,8 +2022,8 @@ class cornellGrading:
2022
2022
  r = requests.post(full_url, json={"item": item}, headers=headers)
2023
2023
  assert r.status_code == 200
2024
2024
 
2025
- def getHomework(self, assignmentNum, preamble=""):
2026
- """Retrieve assignment based on number and optional preamble
2025
+ def genHomeworkName(self, assignmentNum, preamble=""):
2026
+ """Synthesize assignment name based on number and optional preamble
2027
2027
 
2028
2028
  Args:
2029
2029
  assignmentNum (int):
@@ -2048,6 +2048,31 @@ class cornellGrading:
2048
2048
 
2049
2049
  # generate the name and grab the assignment
2050
2050
  hwname = f"{preamble}HW{assignmentNum}"
2051
+
2052
+ return hwname
2053
+
2054
+ def getHomework(self, assignmentNum, preamble=""):
2055
+ """Retrieve assignment based on number and optional preamble
2056
+
2057
+ Args:
2058
+ assignmentNum (int):
2059
+ Assignment names will be of the form "[preamble] HW#"
2060
+ where # is `assignmentNum`. See also `preamble` input.
2061
+
2062
+ preamble (str):
2063
+ If not "", then assignment name will be "[preamble] HW#". Otherwise,
2064
+ name will be "HW#". Defaults to ""
2065
+
2066
+ Returns:
2067
+ tuple:
2068
+ hwname (str):
2069
+ Full assignment name
2070
+ hw (canvasapi.assignment.Assignment):
2071
+ Assignment object
2072
+ """
2073
+
2074
+ # get the name and grab the assignment
2075
+ hwname = self.genHomeworkName(assignmentNum, preamble=preamble)
2051
2076
  hw = self.getAssignment(hwname)
2052
2077
 
2053
2078
  return hwname, hw
@@ -2263,7 +2288,7 @@ class cornellGrading:
2263
2288
 
2264
2289
  return submittedScoreNoAssignment, submittedAssignmentNoScore
2265
2290
 
2266
- def genNpointNewQuizItem(self, n, item_body=None, title=None):
2291
+ def genNpointNewQuizItem(self, n, item_body=None, title=None, position=0):
2267
2292
  """Generate a New Quiz multiple choice, variable point question with answers
2268
2293
  ranging from 0 to n and each answer worth the equivalent number of points.
2269
2294
 
@@ -2277,6 +2302,8 @@ class cornellGrading:
2277
2302
  title (str, optional):
2278
2303
  Question title. If None (default) this is set to:
2279
2304
  HW Problem Score
2305
+ position (int):
2306
+ Position of question in quiz. Defaults to 0
2280
2307
 
2281
2308
  Returns:
2282
2309
  dict:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: cornellGrading
3
- Version: 2.20.0
3
+ Version: 2.20.1
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