Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
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
edx
edx-platform
Commits
80e49443
Commit
80e49443
authored
Feb 07, 2013
by
Brian Wilson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
minor cleanup
parent
2974b9ee
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
30 deletions
+4
-30
common/djangoapps/student/views.py
+3
-25
common/lib/xmodule/xmodule/modulestore/xml.py
+1
-1
lms/djangoapps/courseware/models.py
+0
-4
No files found.
common/djangoapps/student/views.py
View file @
80e49443
...
...
@@ -14,20 +14,19 @@ from django.contrib.auth import logout, authenticate, login
from
django.contrib.auth.forms
import
PasswordResetForm
from
django.contrib.auth.models
import
User
from
django.contrib.auth.decorators
import
login_required
from
django.core.cache
import
cache
from
django.core.context_processors
import
csrf
from
django.core.mail
import
send_mail
from
django.core.urlresolvers
import
reverse
from
django.core.validators
import
validate_email
,
validate_slug
,
ValidationError
from
django.db
import
IntegrityError
from
django.http
import
HttpResponse
,
HttpResponseForbidden
,
Http404
,
\
HttpResponseRedirect
from
django.http
import
HttpResponse
,
HttpResponseRedirect
,
Http404
from
django.shortcuts
import
redirect
from
django_future.csrf
import
ensure_csrf_cookie
,
csrf_exempt
from
mitxmako.shortcuts
import
render_to_response
,
render_to_string
from
bs4
import
BeautifulSoup
from
django.core.cache
import
cache
from
django_future.csrf
import
ensure_csrf_cookie
,
csrf_exempt
from
student.models
import
(
Registration
,
UserProfile
,
TestCenterUser
,
TestCenterUserForm
,
TestCenterRegistration
,
TestCenterRegistrationForm
,
PendingNameChange
,
PendingEmailChange
,
...
...
@@ -1059,27 +1058,6 @@ def accept_name_change(request):
return
accept_name_change_by_id
(
int
(
request
.
POST
[
'id'
]))
# TODO: This is a giant kludge to give Pearson something to test against ASAP.
# Will need to get replaced by something that actually ties into TestCenterUser
@csrf_exempt
def
atest_center_login
(
request
):
if
not
settings
.
MITX_FEATURES
.
get
(
'ENABLE_PEARSON_HACK_TEST'
):
raise
Http404
client_candidate_id
=
request
.
POST
.
get
(
"clientCandidateID"
)
# registration_id = request.POST.get("registrationID")
exit_url
=
request
.
POST
.
get
(
"exitURL"
)
error_url
=
request
.
POST
.
get
(
"errorURL"
)
if
client_candidate_id
==
"edX003671291147"
:
user
=
authenticate
(
username
=
settings
.
PEARSON_TEST_USER
,
password
=
settings
.
PEARSON_TEST_PASSWORD
)
login
(
request
,
user
)
return
redirect
(
'/courses/MITx/6.002x/2012_Fall/courseware/Final_Exam/Final_Exam_Fall_2012/'
)
else
:
return
HttpResponseForbidden
()
@csrf_exempt
def
test_center_login
(
request
):
# errors are returned by navigating to the error_url, adding a query parameter named "code"
...
...
common/lib/xmodule/xmodule/modulestore/xml.py
View file @
80e49443
...
...
@@ -73,7 +73,7 @@ class ImportSystem(XMLParsingSystem, MakoDescriptorSystem):
# VS[compat]. Take this out once course conversion is done (perhaps leave the uniqueness check)
# tags that really need unique names--they store (or should store) state.
need_uniq_names
=
(
'problem'
,
'sequential'
,
'video'
,
'course'
,
'chapter'
,
'videosequence'
,
'
fixedtime
'
)
need_uniq_names
=
(
'problem'
,
'sequential'
,
'video'
,
'course'
,
'chapter'
,
'videosequence'
,
'
timelimit
'
)
attr
=
xml_data
.
attrib
tag
=
xml_data
.
tag
...
...
lms/djangoapps/courseware/models.py
View file @
80e49443
...
...
@@ -12,9 +12,6 @@ file and check it in at the same time as your model changes. To do that,
ASSUMPTIONS: modules have unique IDs, even across different module_types
"""
from
datetime
import
datetime
,
timedelta
from
calendar
import
timegm
from
django.db
import
models
from
django.contrib.auth.models
import
User
...
...
@@ -211,4 +208,3 @@ class OfflineComputedGradeLog(models.Model):
def
__unicode__
(
self
):
return
"[OCGLog]
%
s:
%
s"
%
(
self
.
course_id
,
self
.
created
)
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