Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
configuration
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
configuration
Commits
a0a511b3
Commit
a0a511b3
authored
Aug 08, 2017
by
Shirley He
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update audit and verify to enrollment
parent
9493688c
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
39 additions
and
35 deletions
+39
-35
util/course-permutation-tool/generate_permutations.py
+16
-9
util/course-permutation-tool/permutations.json
+23
-26
util/course-permutation-tool/test_courses.json
+0
-0
No files found.
util/course-permutation-tool/generate_permutations.py
View file @
a0a511b3
...
...
@@ -63,15 +63,17 @@ def generate_permutations(fields, index, results, current, fields_dict):
for
i
in
range
(
len
(
permutations_values
)):
# add other required default fields to dict
# 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
[
"number"
]
=
"123"
# will be generated automatically by course creation script
current
[
"organization"
]
=
"RITX"
current
[
"run"
]
=
"3T2017"
current
[
"user"
]
=
"edx@example.com"
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
fields_dict
[
permutation_option
]
=
permutations_values
[
i
]
...
...
@@ -85,14 +87,20 @@ def generate_permutations(fields, index, results, current, fields_dict):
if
permutations_values
[
i
]
==
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
):
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
...
...
@@ -100,7 +108,6 @@ def generate_permutations(fields, index, results, current, fields_dict):
results
.
append
(
current
.
copy
())
# results["courses"] = current.copy()
# print results
wrapper_courses_dict
=
{}
wrapper_courses_dict
[
"courses"
]
=
results
...
...
util/course-permutation-tool/permutations.json
View file @
a0a511b3
{
"permutation_data"
:
{
"display_name"
:
[
"display_name"
:
[
"International Project Management"
,
"Cybersecurity Fundamentals"
,
""
,
...
...
@@ -16,18 +16,14 @@
"future"
,
null
],
"seats"
:
[
[
"audit"
],
[
"verified"
],
[
"audit"
,
"verified"
],
[],
"audit"
:
[
true
,
false
,
null
],
"verified"
:
[
true
,
false
,
null
],
...
...
@@ -38,18 +34,19 @@
]
},
"default_data"
:
{
"start"
:
"past"
,
"end"
:
"future"
,
"seats"
:
[
{
"type"
:
[
"audit"
,
"verified"
],
"upgrade_deadline"
:
"future"
}
],
"display_name"
:
"International Project Management"
,
"mobile_available"
:
true
"start"
:
[
"past"
],
"end"
:
[
"future"
],
"display_name"
:
[
"International Project Management"
],
"audit"
:
[
true
],
"verified"
:
[
true
],
"mobile_available"
:
[
true
]
}
}
util/course-permutation-tool/test_courses.json
View file @
a0a511b3
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment