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
c914a46a
Commit
c914a46a
authored
Sep 18, 2012
by
Calen Pennington
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #691 from MITx/feature/victor/anon-deep-links
Feature/victor/anon deep links
parents
ba92bdc2
a788db53
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
25 deletions
+17
-25
common/djangoapps/student/views.py
+2
-0
lms/djangoapps/courseware/views.py
+3
-0
lms/templates/index.html
+7
-24
lms/templates/login_modal.html
+5
-1
No files found.
common/djangoapps/student/views.py
View file @
c914a46a
...
...
@@ -82,6 +82,8 @@ def index(request, extra_context={}, user=None):
domain
=
domain
)
context
=
{
'universities'
:
universities
,
'entries'
:
entries
}
context
.
update
(
extra_context
)
if
request
.
REQUEST
.
get
(
'next'
,
False
):
context
[
'show_login_immediately'
]
=
True
return
render_to_response
(
'index.html'
,
context
)
def
course_from_id
(
course_id
):
...
...
lms/djangoapps/courseware/views.py
View file @
c914a46a
...
...
@@ -404,6 +404,9 @@ def university_profile(request, org_id):
context
=
dict
(
courses
=
courses
,
org_id
=
org_id
)
template_file
=
"university_profile/{0}.html"
.
format
(
org_id
)
.
lower
()
if
request
.
REQUEST
.
get
(
'next'
,
False
):
context
[
'show_login_immediately'
]
=
True
return
render_to_response
(
template_file
,
context
)
def
render_notifications
(
request
,
course
,
notifications
):
...
...
lms/templates/index.html
View file @
c914a46a
...
...
@@ -147,28 +147,10 @@
% if show_signup_immediately is not UNDEFINED:
<script
type=
"text/javascript"
>
function
dosignup
(){
comp
=
document
.
getElementById
(
'signup_action'
);
try
{
//in firefox
comp
.
click
();
return
;
}
catch
(
ex
)
{}
try
{
// in old chrome
if
(
document
.
createEvent
)
{
var
e
=
document
.
createEvent
(
'MouseEvents'
);
e
.
initEvent
(
'click'
,
true
,
true
);
comp
.
dispatchEvent
(
e
);
return
;
}
}
catch
(
ex
)
{}
try
{
// in IE, safari
if
(
document
.
createEventObject
)
{
var
evObj
=
document
.
createEventObject
();
comp
.
fireEvent
(
"onclick"
,
evObj
);
return
;
}
}
catch
(
ex
)
{}
}
$
(
window
).
load
(
dosignup
);
$
(
window
).
load
(
function
()
{
$
(
'#signup_action'
).
trigger
(
"click"
);});
</script>
% endif
% elif show_login_immediately is not UNDEFINED:
<script
type=
"text/javascript"
>
$
(
window
).
load
(
function
()
{
$
(
'#login'
).
trigger
(
"click"
);});
</script>
% endif
\ No newline at end of file
lms/templates/login_modal.html
View file @
c914a46a
...
...
@@ -46,7 +46,11 @@
(
function
()
{
$
(
document
).
delegate
(
'#login_form'
,
'ajax:success'
,
function
(
data
,
json
,
xhr
)
{
if
(
json
.
success
)
{
location
.
href
=
"${reverse('dashboard')}"
;
%
if
request
.
REQUEST
.
get
(
'next'
,
False
):
location
.
href
=
"${request.REQUEST.get('next')}"
;
%
else
:
location
.
href
=
"${reverse('dashboard')}"
;
%
endif
}
else
{
if
(
$
(
'#login_error'
).
length
==
0
)
{
$
(
'#login_form'
).
prepend
(
'<div id="login_error" class="modal-form-error"></div>'
);
...
...
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