Commit a0a511b3 by Shirley He

update audit and verify to enrollment

parent 9493688c
...@@ -63,15 +63,17 @@ def generate_permutations(fields, index, results, current, fields_dict): ...@@ -63,15 +63,17 @@ def generate_permutations(fields, index, results, current, fields_dict):
for i in range(len(permutations_values)): for i in range(len(permutations_values)):
# add other required default fields to dict # add other required default fields to dict
current["number"] = "123" # will be generated automatically by course creation script
# generate different organization number for each course
# organization_number = "PM9003" + str(i) + "x"
current["number"] = None # will be generated automatically by course creation script
current["organization"] = "RITX" current["organization"] = "RITX"
current["run"] = "3T2017" current["run"] = "3T2017"
current["user"] = "edx@example.com" current["user"] = "edx@example.com"
current["partner"] = "edx" current["partner"] = "edx"
# configure enrollment seat settings
enrollment_dict = {}
enrollment_dict["credit"] = False
enrollment_dict["credit_provider"] = "test-credit-provider"
# enrollment_dict["audit"] = True
# add permutation fields to dict # add permutation fields to dict
fields_dict[permutation_option] = permutations_values[i] fields_dict[permutation_option] = permutations_values[i]
...@@ -85,14 +87,20 @@ def generate_permutations(fields, index, results, current, fields_dict): ...@@ -85,14 +87,20 @@ def generate_permutations(fields, index, results, current, fields_dict):
if permutations_values[i] == None: if permutations_values[i] == None:
fields_dict[permutation_option] = None fields_dict[permutation_option] = None
if all_permutations_keys[i] == "audit" and permutations_values[i] == True:
enrollment_dict["audit"] = permutations_values[i]
if all_permutations_keys[i] == "verify" and permutations_values[i] == True:
enrollment_dict["verify"] = True
if index + 1 < len(all_permutations_keys): if index + 1 < len(all_permutations_keys):
generate_permutations(fields, index + 1, results, current, fields_dict) generate_permutations(fields, index + 1, results, current, fields_dict)
# configure enrollment seat settings
enrollment_dict = {}
enrollment_dict["credit"] = False
enrollment_dict["credit_provider"] = "test-credit-provider"
current["enrollment"] = enrollment_dict current["enrollment"] = enrollment_dict
...@@ -100,7 +108,6 @@ def generate_permutations(fields, index, results, current, fields_dict): ...@@ -100,7 +108,6 @@ def generate_permutations(fields, index, results, current, fields_dict):
results.append(current.copy()) results.append(current.copy())
# results["courses"] = current.copy() # results["courses"] = current.copy()
# print results
wrapper_courses_dict = {} wrapper_courses_dict = {}
wrapper_courses_dict["courses"] = results wrapper_courses_dict["courses"] = results
......
...@@ -16,18 +16,14 @@ ...@@ -16,18 +16,14 @@
"future", "future",
null null
], ],
"seats": [ "audit": [
[ true,
"audit" false,
], null
[
"verified"
],
[
"audit",
"verified"
], ],
[], "verified": [
true,
false,
null null
], ],
...@@ -38,18 +34,19 @@ ...@@ -38,18 +34,19 @@
] ]
}, },
"default_data": { "default_data": {
"start": "past", "start": [
"end": "future", "past"
"seats": [ ],
{ "end": [
"type": [ "future"
"audit",
"verified"
],
"upgrade_deadline": "future"
}
], ],
"display_name": "International Project Management", "display_name": [
"mobile_available": true "International Project Management"
],
"audit": [true],
"verified": [true],
"mobile_available": [
true
]
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment