Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
edx-platform-release
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Hsin-Yu Chien
edx-platform-release
Commits
ee4bc424
Commit
ee4bc424
authored
11 years ago
by
ihoover
Browse files
Options
Downloads
Patches
Plain Diff
remove depracated feature flag `GENERATE_RANDOM_USER_CREDENTIALS`
parent
ceacc3b4
Loading
Loading
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
cms/envs/common.py
+0
-3
0 additions, 3 deletions
cms/envs/common.py
common/djangoapps/student/views.py
+1
-38
1 addition, 38 deletions
common/djangoapps/student/views.py
lms/envs/common.py
+0
-4
0 additions, 4 deletions
lms/envs/common.py
with
1 addition
and
45 deletions
cms/envs/common.py
+
0
−
3
View file @
ee4bc424
...
...
@@ -62,9 +62,6 @@ MITX_FEATURES = {
}
ENABLE_JASMINE
=
False
# needed to use lms student app
GENERATE_RANDOM_USER_CREDENTIALS
=
False
############################# SET PATH INFORMATION #############################
PROJECT_ROOT
=
path
(
__file__
).
abspath
().
dirname
().
dirname
()
# /mitx/cms
...
...
This diff is collapsed.
Click to expand it.
common/djangoapps/student/views.py
+
1
−
38
View file @
ee4bc424
...
...
@@ -676,7 +676,7 @@ def create_account(request, post_override=None):
message
=
render_to_string
(
'
emails/activation_email.txt
'
,
d
)
# dont send email if we are doing load testing or random user generation for some reason
if
not
(
settings
.
GENERATE_RANDOM_USER_CREDENTIALS
or
settings
.
MITX_FEATURES
.
get
(
'
AUTOMATIC_AUTH_FOR_LOAD_TESTING
'
)):
if
not
(
settings
.
MITX_FEATURES
.
get
(
'
AUTOMATIC_AUTH_FOR_LOAD_TESTING
'
)):
try
:
if
settings
.
MITX_FEATURES
.
get
(
'
REROUTE_ACTIVATION_EMAIL
'
):
dest_addr
=
settings
.
MITX_FEATURES
[
'
REROUTE_ACTIVATION_EMAIL
'
]
...
...
@@ -905,43 +905,6 @@ def create_exam_registration(request, post_override=None):
return
HttpResponse
(
json
.
dumps
(
js
),
mimetype
=
"
application/json
"
)
def
get_random_post_override
():
"""
Return a dictionary suitable for passing to post_vars of _do_create_account or post_override
of create_account, with random user info.
"""
def
id_generator
(
size
=
6
,
chars
=
string
.
ascii_uppercase
+
string
.
ascii_lowercase
+
string
.
digits
):
return
''
.
join
(
random
.
choice
(
chars
)
for
x
in
range
(
size
))
return
{
'
username
'
:
"
random_
"
+
id_generator
(),
'
email
'
:
id_generator
(
size
=
10
,
chars
=
string
.
ascii_lowercase
)
+
"
_dummy_test@mitx.mit.edu
"
,
'
password
'
:
id_generator
(),
'
name
'
:
(
id_generator
(
size
=
5
,
chars
=
string
.
ascii_lowercase
)
+
"
"
+
id_generator
(
size
=
7
,
chars
=
string
.
ascii_lowercase
)),
'
honor_code
'
:
u
'
true
'
,
'
terms_of_service
'
:
u
'
true
'
,
}
def
create_random_account
(
create_account_function
):
def
inner_create_random_account
(
request
,
post_override
=
None
):
# This logic ensures that even if we have both
# GENERATE_RANDOM_USER_CREDENTIALS and
# settings.MITX_FEATURES['AUTOMATIC_AUTH_FOR_LOAD_TESTING']
# set to true, then create_account will behave they way
# each feature for automated account generation expects
if
post_override
is
None
:
post_override
=
get_random_post_override
()
return
create_account_function
(
request
,
post_override
)
return
inner_create_random_account
# TODO (vshnayder): do we need GENERATE_RANDOM_USER_CREDENTIALS for anything?
if
settings
.
GENERATE_RANDOM_USER_CREDENTIALS
:
create_account
=
create_random_account
(
create_account
)
def
auto_auth
(
request
):
"""
Automatically logs the user in with a generated random credentials
...
...
This diff is collapsed.
Click to expand it.
lms/envs/common.py
+
0
−
4
View file @
ee4bc424
...
...
@@ -40,12 +40,8 @@ ENABLE_JASMINE = False
# only relevant if MITX_FEATURES['AUTOMATIC_AUTH_FOR_LOAD_TESTING'] = True
MAX_AUTO_AUTH_USERS
=
200
GENERATE_RANDOM_USER_CREDENTIALS
=
False
PERFSTATS
=
False
# # automatic_auth should turn on random_cred of it needs to
# GENERATE_RANDOM_USER_CREDENTIALS = GENERATE_RANDOM_USER_CREDENTIALS or AUTOMATIC_AUTH_FOR_LOAD_TESTING
DISCUSSION_SETTINGS
=
{
'
MAX_COMMENT_DEPTH
'
:
2
,
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment