cornellGrading 2.16.2__tar.gz → 2.17.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 (23) hide show
  1. {cornellGrading-2.16.2/cornellGrading.egg-info → cornellgrading-2.17.0}/PKG-INFO +1 -1
  2. {cornellGrading-2.16.2 → cornellgrading-2.17.0}/cornellGrading/__init__.py +1 -1
  3. {cornellGrading-2.16.2 → cornellgrading-2.17.0}/cornellGrading/cornellQualtrics.py +53 -25
  4. {cornellGrading-2.16.2 → cornellgrading-2.17.0/cornellGrading.egg-info}/PKG-INFO +1 -1
  5. {cornellGrading-2.16.2 → cornellgrading-2.17.0}/LICENSE +0 -0
  6. {cornellGrading-2.16.2 → cornellgrading-2.17.0}/MANIFEST.in +0 -0
  7. {cornellGrading-2.16.2 → cornellgrading-2.17.0}/README.md +0 -0
  8. {cornellGrading-2.16.2 → cornellgrading-2.17.0}/cornellGrading/cornellGrading.py +0 -0
  9. {cornellGrading-2.16.2 → cornellgrading-2.17.0}/cornellGrading/cornellInterface.py +0 -0
  10. {cornellGrading-2.16.2 → cornellgrading-2.17.0}/cornellGrading/dueDatesFromCSV.py +0 -0
  11. {cornellGrading-2.16.2 → cornellgrading-2.17.0}/cornellGrading/pandocHTMLParser.py +0 -0
  12. {cornellGrading-2.16.2 → cornellgrading-2.17.0}/cornellGrading/upload_MC_questions.py +0 -0
  13. {cornellGrading-2.16.2 → cornellgrading-2.17.0}/cornellGrading.egg-info/SOURCES.txt +0 -0
  14. {cornellGrading-2.16.2 → cornellgrading-2.17.0}/cornellGrading.egg-info/dependency_links.txt +0 -0
  15. {cornellGrading-2.16.2 → cornellgrading-2.17.0}/cornellGrading.egg-info/entry_points.txt +0 -0
  16. {cornellGrading-2.16.2 → cornellgrading-2.17.0}/cornellGrading.egg-info/requires.txt +0 -0
  17. {cornellGrading-2.16.2 → cornellgrading-2.17.0}/cornellGrading.egg-info/top_level.txt +0 -0
  18. {cornellGrading-2.16.2 → cornellgrading-2.17.0}/pyproject.toml +0 -0
  19. {cornellGrading-2.16.2 → cornellgrading-2.17.0}/scripts/canvastex.py +0 -0
  20. {cornellGrading-2.16.2 → cornellgrading-2.17.0}/scripts/matlabgrader.py +0 -0
  21. {cornellGrading-2.16.2 → cornellgrading-2.17.0}/scripts/setupSelfGrading.py +0 -0
  22. {cornellGrading-2.16.2 → cornellgrading-2.17.0}/setup.cfg +0 -0
  23. {cornellGrading-2.16.2 → cornellgrading-2.17.0}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: cornellGrading
3
- Version: 2.16.2
3
+ Version: 2.17.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.16.2"
2
+ __version__ = "2.17.0"
3
3
  from .cornellGrading import cornellGrading
4
4
  from .cornellQualtrics import cornellQualtrics
@@ -659,6 +659,34 @@ class cornellQualtrics:
659
659
 
660
660
  return response.json()["result"]["elements"]
661
661
 
662
+ def getDistribution(self, surveyId, distributionId):
663
+ """Get a distribution
664
+
665
+ Args:
666
+ surveyId (str):
667
+ Unique id string of survey. Get either from web interface or via
668
+ getSurveyId
669
+ distributionId (str):
670
+ Unique id string of distribution.
671
+
672
+ Returns:
673
+ dict:
674
+ Dictionary encoding distribution definition and stats
675
+
676
+ Notes:
677
+ https://api.qualtrics.com/f5b1d8775d803-get-distribution
678
+
679
+ """
680
+
681
+ baseUrl = "https://{0}{1}distributions/{2}?surveyId={3}".format(
682
+ self.dataCenter, self.qualtricsapi, distributionId, surveyId
683
+ )
684
+
685
+ response = requests.get(baseUrl, headers=self.headers_tokenOnly)
686
+ assert response.status_code == 200
687
+
688
+ return response.json()["result"]
689
+
662
690
  def exportSurvey(self, surveyId, fileFormat="csv", useLabels="true", saveDir=None):
663
691
  """Download and extract survey results
664
692
 
@@ -816,31 +844,31 @@ class cornellQualtrics:
816
844
  "userId": sharewith,
817
845
  "permissions": {
818
846
  "surveyDefinitionManipulation": {
819
- "copySurveyQuestions": True,
820
- "editSurveyFlow": True,
821
- "useBlocks": True,
822
- "useSkipLogic": True,
823
- "useConjoint": True,
824
- "useTriggers": True,
825
- "useQuotas": True,
826
- "setSurveyOptions": True,
827
- "editQuestions": True,
828
- "deleteSurveyQuestions": True,
829
- "useTableOfContents": True,
830
- "useAdvancedQuotas": True,
847
+ "copySurveyQuestions": False,
848
+ "editSurveyFlow": False,
849
+ "useBlocks": False,
850
+ "useSkipLogic": False,
851
+ "useConjoint": False,
852
+ "useTriggers": False,
853
+ "useQuotas": False,
854
+ "setSurveyOptions": False,
855
+ "editQuestions": False,
856
+ "deleteSurveyQuestions": False,
857
+ "useTableOfContents": False,
858
+ "useAdvancedQuotas": False,
831
859
  },
832
860
  "surveyManagement": {
833
- "editSurveys": True,
834
- "activateSurveys": True,
835
- "deactivateSurveys": True,
836
- "copySurveys": True,
837
- "distributeSurveys": True,
838
- "deleteSurveys": True,
839
- "translateSurveys": True,
861
+ "editSurveys": False,
862
+ "activateSurveys": False,
863
+ "deactivateSurveys": False,
864
+ "copySurveys": False,
865
+ "distributeSurveys": False,
866
+ "deleteSurveys": False,
867
+ "translateSurveys": False,
840
868
  },
841
869
  "response": {
842
- "editSurveyResponses": True,
843
- "createResponseSets": True,
870
+ "editSurveyResponses": False,
871
+ "createResponseSets": False,
844
872
  "viewResponseId": True,
845
873
  "useCrossTabs": True,
846
874
  "useScreenouts": True,
@@ -991,7 +1019,7 @@ class cornellQualtrics:
991
1019
  return response.json()["result"]
992
1020
 
993
1021
  def updateSurveyOptions(self, surveyId, data):
994
- """Return survey options
1022
+ """Update survey options
995
1023
 
996
1024
  Args:
997
1025
  surveyId (str):
@@ -1199,8 +1227,8 @@ class cornellQualtrics:
1199
1227
  Message ID string
1200
1228
 
1201
1229
  Returns:
1202
- list:
1203
- message dictionaries
1230
+ dict:
1231
+ message contents
1204
1232
 
1205
1233
  """
1206
1234
  baseUrl = "https://{0}{2}libraries/{1}/messages/{3}".format(
@@ -1210,7 +1238,7 @@ class cornellQualtrics:
1210
1238
  response = requests.get(baseUrl, headers=self.headers_tokenOnly)
1211
1239
  assert response.status_code == 200, "Couldn't get messages"
1212
1240
 
1213
- return response.json()["result"]["elements"]
1241
+ return response.json()["result"]
1214
1242
 
1215
1243
  def createLibraryMessage(self, libraryId, subject, msg, category="thankYou"):
1216
1244
  """Create message in a library
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: cornellGrading
3
- Version: 2.16.2
3
+ Version: 2.17.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