cornellGrading 2.22.0__tar.gz → 2.24.0__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.22.0/cornellGrading.egg-info → cornellgrading-2.24.0}/PKG-INFO +1 -1
  2. {cornellgrading-2.22.0 → cornellgrading-2.24.0}/cornellGrading/__init__.py +1 -1
  3. {cornellgrading-2.22.0 → cornellgrading-2.24.0}/cornellGrading/cornellQualtrics.py +54 -0
  4. {cornellgrading-2.22.0 → cornellgrading-2.24.0/cornellGrading.egg-info}/PKG-INFO +1 -1
  5. {cornellgrading-2.22.0 → cornellgrading-2.24.0}/LICENSE +0 -0
  6. {cornellgrading-2.22.0 → cornellgrading-2.24.0}/MANIFEST.in +0 -0
  7. {cornellgrading-2.22.0 → cornellgrading-2.24.0}/README.md +0 -0
  8. {cornellgrading-2.22.0 → cornellgrading-2.24.0}/cornellGrading/cornellGrading.py +0 -0
  9. {cornellgrading-2.22.0 → cornellgrading-2.24.0}/cornellGrading/cornellInterface.py +0 -0
  10. {cornellgrading-2.22.0 → cornellgrading-2.24.0}/cornellGrading/dueDatesFromCSV.py +0 -0
  11. {cornellgrading-2.22.0 → cornellgrading-2.24.0}/cornellGrading/pandocHTMLParser.py +0 -0
  12. {cornellgrading-2.22.0 → cornellgrading-2.24.0}/cornellGrading/upload_MC_questions.py +0 -0
  13. {cornellgrading-2.22.0 → cornellgrading-2.24.0}/cornellGrading/utils.py +0 -0
  14. {cornellgrading-2.22.0 → cornellgrading-2.24.0}/cornellGrading.egg-info/SOURCES.txt +0 -0
  15. {cornellgrading-2.22.0 → cornellgrading-2.24.0}/cornellGrading.egg-info/dependency_links.txt +0 -0
  16. {cornellgrading-2.22.0 → cornellgrading-2.24.0}/cornellGrading.egg-info/entry_points.txt +0 -0
  17. {cornellgrading-2.22.0 → cornellgrading-2.24.0}/cornellGrading.egg-info/requires.txt +0 -0
  18. {cornellgrading-2.22.0 → cornellgrading-2.24.0}/cornellGrading.egg-info/top_level.txt +0 -0
  19. {cornellgrading-2.22.0 → cornellgrading-2.24.0}/pyproject.toml +0 -0
  20. {cornellgrading-2.22.0 → cornellgrading-2.24.0}/scripts/canvastex.py +0 -0
  21. {cornellgrading-2.22.0 → cornellgrading-2.24.0}/scripts/matlabgrader.py +0 -0
  22. {cornellgrading-2.22.0 → cornellgrading-2.24.0}/scripts/setupSelfGrading.py +0 -0
  23. {cornellgrading-2.22.0 → cornellgrading-2.24.0}/setup.cfg +0 -0
  24. {cornellgrading-2.22.0 → cornellgrading-2.24.0}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: cornellGrading
3
- Version: 2.22.0
3
+ Version: 2.24.0
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.22.0"
2
+ __version__ = "2.24.0"
3
3
  from .cornellGrading import cornellGrading
4
4
  from .cornellQualtrics import cornellQualtrics
@@ -1159,6 +1159,60 @@ class cornellQualtrics:
1159
1159
  response = requests.put(baseUrl, json=questionDef, headers=self.headers_post)
1160
1160
  assert response.status_code == 200, "Couldn't update question."
1161
1161
 
1162
+ def addSurveyBlock(self, surveyId, blockDef):
1163
+ """Add block to existing Survey
1164
+
1165
+ Args:
1166
+ surveyId (str):
1167
+ Survey ID string as returned by getSurveyId
1168
+ blockDef (dict):
1169
+ Full block definition dictionary
1170
+
1171
+ Returns:
1172
+ str:
1173
+ Block ID
1174
+
1175
+ ..notes::
1176
+ See https://api.qualtrics.com/2d5286cc34ed6-create-block
1177
+
1178
+ """
1179
+ baseUrl = "https://{0}{2}survey-definitions/{1}/blocks".format(
1180
+ self.dataCenter, surveyId, self.qualtricsapi
1181
+ )
1182
+
1183
+ response = requests.post(baseUrl, json=blockDef, headers=self.headers_post)
1184
+ assert response.status_code == 200, "Couldn't add block."
1185
+
1186
+ return response.json()["result"]["BlockID"]
1187
+
1188
+ def updateSurveyBlock(self, surveyId, blockId, blockData):
1189
+ """Add block to existing Survey
1190
+
1191
+ Args:
1192
+ surveyId (str):
1193
+ Survey ID string as returned by getSurveyId
1194
+ blockId (str):
1195
+ Block ID string
1196
+ blockData (dict):
1197
+ Full block definition dictionary
1198
+
1199
+ Returns:
1200
+ dict:
1201
+ response json payload
1202
+
1203
+ ..notes::
1204
+ See https://api.qualtrics.com/54c20622ffd25-update-block
1205
+
1206
+ """
1207
+ baseUrl = "https://{0}{1}survey-definitions/{2}/blocks/{3}".format(
1208
+ self.dataCenter, self.qualtricsapi, surveyId, blockId
1209
+ )
1210
+
1211
+ response = requests.put(baseUrl, json=blockData, headers=self.headers_put)
1212
+ assert response.status_code == 200, "Couldn't update block."
1213
+
1214
+ return response.json()
1215
+
1162
1216
  def getSurveyQuotas(self, surveyId):
1163
1217
  """Get all quotas for a survey
1164
1218
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: cornellGrading
3
- Version: 2.22.0
3
+ Version: 2.24.0
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