Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
I
insights
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
insights
Commits
fda4b6fb
Commit
fda4b6fb
authored
Apr 01, 2013
by
Piotr Mitros
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Moved from __import__ to more robust/cleaner import_module
parent
4f820c5f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
18 deletions
+3
-18
README.md
+0
-15
src/djanalytics/core/__init__.py
+0
-1
src/djanalytics/core/helpers.py
+3
-2
No files found.
README.md
View file @
fda4b6fb
...
...
@@ -154,21 +154,6 @@ useful for chaining analytics.
mitmako) or importing. We should figure out a better way to handle
this.
Target markets
--------------
The analytics has several target markets:
1.
Internal system use. As we build out infrastructure for intelligent
tutoring, partnering students into small groups, etc., we need to do
analysis on student interactions with the system.
2.
Marketing. Numbers to figure out student lifecycle.
3.
Instructors. Numbers to figure out who students are, and how to
improve the courses.
4.
Product.
5.
Students.
6.
Board of directors, reporters, etc.
Modes of operation
------------------
...
...
src/djanalytics/core/__init__.py
View file @
fda4b6fb
import
helpers
modules
=
helpers
.
import_view_modules
()
src/djanalytics/core/helpers.py
View file @
fda4b6fb
from
importlib
import
import_module
import
inspect
from
pymongo
import
MongoClient
...
...
@@ -17,7 +18,7 @@ def import_view_modules():
top_level_modules
=
settings
.
INSTALLED_ANALYTICS_MODULES
module_names
=
[]
for
module
in
top_level_modules
:
mod
=
__import__
(
module
)
mod
=
import_module
(
module
)
submodules
=
[]
try
:
submodules
=
mod
.
modules_to_import
# I'd like to deprecate this syntax
...
...
@@ -26,7 +27,7 @@ def import_view_modules():
for
sub_module
in
submodules
:
submod_name
=
"{0}.{1}"
.
format
(
module
,
sub_module
)
module_names
.
append
(
submod_name
)
modules
=
map
(
__import__
,
module_names
)
modules
=
map
(
import_module
,
module_names
)
return
modules
def
namespace
(
f
):
...
...
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