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
afac5145
Commit
afac5145
authored
May 16, 2014
by
Sarina Canelake
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3757 from edx/sarina/fix-git_import
Sarina/fix git import
parents
56a6b99f
b3462d1c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
3 deletions
+8
-3
lms/djangoapps/courseware/module_render.py
+1
-1
lms/djangoapps/dashboard/git_import.py
+6
-1
lms/djangoapps/psychometrics/psychoanalyze.py
+1
-1
No files found.
lms/djangoapps/courseware/module_render.py
View file @
afac5145
...
@@ -503,7 +503,7 @@ def get_module_system_for_user(user, field_data_cache,
...
@@ -503,7 +503,7 @@ def get_module_system_for_user(user, field_data_cache,
if
settings
.
FEATURES
.
get
(
'ENABLE_PSYCHOMETRICS'
):
if
settings
.
FEATURES
.
get
(
'ENABLE_PSYCHOMETRICS'
):
system
.
set
(
system
.
set
(
'psychometrics_handler'
,
# set callback for updating PsychometricsData
'psychometrics_handler'
,
# set callback for updating PsychometricsData
make_psychometrics_data_update_handler
(
course_id
,
user
,
descriptor
.
location
.
to_deprecated_string
()
)
make_psychometrics_data_update_handler
(
course_id
,
user
,
descriptor
.
location
)
)
)
system
.
set
(
u'user_is_staff'
,
has_access
(
user
,
u'staff'
,
descriptor
.
location
,
course_id
))
system
.
set
(
u'user_is_staff'
,
has_access
(
user
,
u'staff'
,
descriptor
.
location
,
course_id
))
...
...
lms/djangoapps/dashboard/git_import.py
View file @
afac5145
...
@@ -17,7 +17,9 @@ from django.utils.translation import ugettext as _
...
@@ -17,7 +17,9 @@ from django.utils.translation import ugettext as _
import
mongoengine
import
mongoengine
from
dashboard.models
import
CourseImportLog
from
dashboard.models
import
CourseImportLog
from
opaque_keys
import
InvalidKeyError
from
xmodule.modulestore.keys
import
CourseKey
from
xmodule.modulestore.keys
import
CourseKey
from
xmodule.modulestore.locations
import
SlashSeparatedCourseKey
log
=
logging
.
getLogger
(
__name__
)
log
=
logging
.
getLogger
(
__name__
)
...
@@ -230,7 +232,10 @@ def add_repo(repo, rdir_in, branch=None):
...
@@ -230,7 +232,10 @@ def add_repo(repo, rdir_in, branch=None):
match
=
re
.
search
(
r'(?ms)===> IMPORTING course (\S+)'
,
ret_import
)
match
=
re
.
search
(
r'(?ms)===> IMPORTING course (\S+)'
,
ret_import
)
if
match
:
if
match
:
course_id
=
match
.
group
(
1
)
course_id
=
match
.
group
(
1
)
course_key
=
CourseKey
.
from_string
(
course_id
)
try
:
course_key
=
CourseKey
.
from_string
(
course_id
)
except
InvalidKeyError
:
course_key
=
SlashSeparatedCourseKey
.
from_deprecated_string
(
course_id
)
cdir
=
'{0}/{1}'
.
format
(
GIT_REPO_DIR
,
course_key
.
course
)
cdir
=
'{0}/{1}'
.
format
(
GIT_REPO_DIR
,
course_key
.
course
)
log
.
debug
(
'Studio course dir = {0}'
.
format
(
cdir
))
log
.
debug
(
'Studio course dir = {0}'
.
format
(
cdir
))
...
...
lms/djangoapps/psychometrics/psychoanalyze.py
View file @
afac5145
...
@@ -307,7 +307,7 @@ def make_psychometrics_data_update_handler(course_id, user, module_state_key):
...
@@ -307,7 +307,7 @@ def make_psychometrics_data_update_handler(course_id, user, module_state_key):
the PsychometricData instance for the given StudentModule instance.
the PsychometricData instance for the given StudentModule instance.
"""
"""
sm
,
status
=
StudentModule
.
objects
.
get_or_create
(
sm
,
status
=
StudentModule
.
objects
.
get_or_create
(
course_id
=
course_id
.
to_deprecated_string
()
,
course_id
=
course_id
,
student
=
user
,
student
=
user
,
module_state_key
=
module_state_key
,
module_state_key
=
module_state_key
,
defaults
=
{
'state'
:
'{}'
,
'module_type'
:
'problem'
},
defaults
=
{
'state'
:
'{}'
,
'module_type'
:
'problem'
},
...
...
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