Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
RecommenderXBlock
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
RecommenderXBlock
Commits
05ea1efa
Commit
05ea1efa
authored
Jan 20, 2015
by
swdanielli
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
version migration
parent
ec7c4724
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
recommender/recommender.py
+5
-5
No files found.
recommender/recommender.py
View file @
05ea1efa
...
...
@@ -35,7 +35,7 @@ from urlparse import urlparse, urlunparse
from
webob.response
import
Response
from
xblock.core
import
XBlock
from
xblock.exceptions
import
JsonHandlerError
from
xblock.fields
import
Scope
,
List
,
Dict
,
Boolean
,
String
from
xblock.fields
import
Scope
,
List
,
Dict
,
Boolean
,
String
,
JSONField
from
xblock.fragment
import
Fragment
from
xblock.reference.plugins
import
Filesystem
...
...
@@ -101,13 +101,13 @@ class RecommenderXBlock(XBlock):
# a cumbersome data migration.
# "descriptionText" : (String) a potentially longer overview of the resource }
# we use url as key (index) of resource
default_recommendations
=
Dict
(
default_recommendations
=
JSONField
(
help
=
"Dict of instructor-supplied help resources to seed the resource list with."
,
default
=
{},
scope
=
Scope
.
content
)
# A dict of recommendations provided by students.
# Usage: the same as default_recommendations
recommendations
=
Dict
(
recommendations
=
JSONField
(
help
=
"Current set of recommended resources"
,
default
=
{},
scope
=
Scope
.
user_state_summary
)
...
...
@@ -768,8 +768,8 @@ class RecommenderXBlock(XBlock):
when viewing courses.
"""
self
.
recommendations
=
(
self
.
recommendations
or
self
.
default_recommendations
or
data_structure_upgrade
(
self
.
recommendations
)
or
data_structure_upgrade
(
self
.
default_recommendations
)
or
{}
)
...
...
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