Commit 66a01957 by Bridger Maxwell

Merged in stable.

parents 1df5fa19 ca4c73a9
......@@ -78,17 +78,23 @@ def evaluator(variables, functions, string, cs=False):
# log.debug("functions: {0}".format(functions))
# log.debug("string: {0}".format(string))
def lower_dict(d):
return dict([(k.lower(), d[k]) for k in d])
all_variables = copy.copy(default_variables)
all_variables.update(variables)
all_functions = copy.copy(default_functions)
if not cs:
all_variables = lower_dict(all_variables)
all_functions = lower_dict(all_functions)
all_variables.update(variables)
all_functions.update(functions)
if not cs:
string_cs = string.lower()
for v in all_variables.keys():
all_variables[v.lower()]=all_variables[v]
for f in all_functions.keys():
all_functions[f.lower()]=all_functions[f]
all_functions = lower_dict(all_functions)
all_variables = lower_dict(all_variables)
CasedLiteral = CaselessLiteral
else:
string_cs = string
......
......@@ -35,6 +35,11 @@ class ModelsTest(unittest.TestCase):
self.assertTrue(abs(calc.evaluator(variables, functions, "k*T/q-0.025"))<0.001)
self.assertTrue(abs(calc.evaluator(variables, functions, "e^(j*pi)")+1)<0.00001)
self.assertTrue(abs(calc.evaluator(variables, functions, "j||1")-0.5-0.5j)<0.00001)
variables['t'] = 1.0
self.assertTrue(abs(calc.evaluator(variables, functions, "t")-1.0)<0.00001)
self.assertTrue(abs(calc.evaluator(variables, functions, "T")-1.0)<0.00001)
self.assertTrue(abs(calc.evaluator(variables, functions, "t", cs=True)-1.0)<0.00001)
self.assertTrue(abs(calc.evaluator(variables, functions, "T", cs=True)-298)<0.2)
exception_happened = False
try:
calc.evaluator({},{}, "5+7 QWSEKO")
......
from django.conf.urls.defaults import *
urlpatterns = patterns('',
url(r'^$', 'heartbeat.views.heartbeat', name='heartbeat'),
)
import json
from datetime import datetime
from django.http import HttpResponse
def heartbeat(request):
"""
Simple view that a loadbalancer can check to verify that the app is up
"""
output = {
'date': datetime.now().isoformat()
}
return HttpResponse(json.dumps(output, indent=4))
......@@ -24,7 +24,7 @@ from django_future.csrf import ensure_csrf_cookie
from models import Registration, UserProfile, PendingNameChange, PendingEmailChange
log = logging.getLogger("mitx.user")
log = logging.getLogger("mitx.student")
def csrf_token(context):
''' A csrf token that can be included in a form.
......
Transitional for moving to new settings scheme.
To use:
django-admin.py runserver --settings=envs.dev --pythonpath=.
NOTE: Using manage.py will automatically run mitx/settings.py first, regardless
of what you send it for an explicit --settings flag. It still works, but might
have odd side effects. Using django-admin.py avoids that problem.
django-admin.py is installed by default when you install Django.
To use with gunicorn_django in debug mode:
gunicorn_django envs/dev.py
# askbot livesettings
"""
There are other askbot settings in common.py that covers things like where the
templates are located, etc. This file is purely for askbot forum *behavior*.
This means things like karma limits, the ability to post questions as wikis,
anonymous questions, etc.
"""
LIVESETTINGS_OPTIONS = {
1: {
'DB' : False,
......@@ -88,9 +94,9 @@ LIVESETTINGS_OPTIONS = {
'MIN_TITLE_LENGTH' : 1,
'MIN_QUESTION_BODY_LENGTH' : 1,
'MIN_ANSWER_BODY_LENGTH' : 1,
'WIKI_ON' : True,
'WIKI_ON' : False,
'ALLOW_ASK_ANONYMOUSLY' : True,
'ALLOW_POSTING_BEFORE_LOGGING_IN' : True,
'ALLOW_POSTING_BEFORE_LOGGING_IN' : False,
'ALLOW_SWAPPING_QUESTION_WITH_ANSWER' : False,
'MAX_TAG_LENGTH' : 20,
'MIN_TITLE_LENGTH' : 1,
......@@ -172,8 +178,8 @@ LIVESETTINGS_OPTIONS = {
},
'MARKUP' : {
'MARKUP_CODE_FRIENDLY' : False,
'ENABLE_MATHJAX' : False, # FIXME: Test with this enabled
'MATHJAX_BASE_URL' : u'',
'ENABLE_MATHJAX' : True,
'MATHJAX_BASE_URL' : u'/static/js/mathjax-MathJax-c9db6ac/',
'ENABLE_AUTO_LINKING' : False,
'AUTO_LINK_PATTERNS' : u'',
'AUTO_LINK_URLS' : u'',
......@@ -181,21 +187,21 @@ LIVESETTINGS_OPTIONS = {
'MIN_REP' : {
'MIN_REP_TO_ACCEPT_OWN_ANSWER' : 1,
'MIN_REP_TO_ANSWER_OWN_QUESTION' : 1,
'MIN_REP_TO_CLOSE_OTHERS_QUESTIONS' : 100,
'MIN_REP_TO_CLOSE_OTHERS_QUESTIONS' : 1200,
'MIN_REP_TO_CLOSE_OWN_QUESTIONS' : 1,
'MIN_REP_TO_DELETE_OTHERS_COMMENTS' : 2000,
'MIN_REP_TO_DELETE_OTHERS_POSTS' : 5000,
'MIN_REP_TO_EDIT_OTHERS_POSTS' : 2000,
'MIN_REP_TO_EDIT_WIKI' : 1,
'MIN_REP_TO_DELETE_OTHERS_COMMENTS' : 5000,
'MIN_REP_TO_DELETE_OTHERS_POSTS' : 10000,
'MIN_REP_TO_EDIT_OTHERS_POSTS' : 5000,
'MIN_REP_TO_EDIT_WIKI' : 200,
'MIN_REP_TO_FLAG_OFFENSIVE' : 1,
'MIN_REP_TO_HAVE_STRONG_URL' : 250,
'MIN_REP_TO_LEAVE_COMMENTS' : 1,
'MIN_REP_TO_LOCK_POSTS' : 4000,
'MIN_REP_TO_LOCK_POSTS' : 10000,
'MIN_REP_TO_REOPEN_OWN_QUESTIONS' : 1,
'MIN_REP_TO_RETAG_OTHERS_QUESTIONS' : 1,
'MIN_REP_TO_RETAG_OTHERS_QUESTIONS' : 100,
'MIN_REP_TO_UPLOAD_FILES' : 1,
'MIN_REP_TO_VIEW_OFFENSIVE_FLAGS' : 2000,
'MIN_REP_TO_VOTE_DOWN' : 1,
'MIN_REP_TO_VOTE_DOWN' : 15,
'MIN_REP_TO_VOTE_UP' : 1,
},
'QA_SITE_SETTINGS' : {
......@@ -275,7 +281,7 @@ LIVESETTINGS_OPTIONS = {
'VOTE_RULES' : {
'MAX_VOTES_PER_USER_PER_DAY' : 30,
'MAX_FLAGS_PER_USER_PER_DAY' : 5,
'MIN_DAYS_FOR_STAFF_TO_ACCEPT_ANSWER' : 7,
'MIN_DAYS_FOR_STAFF_TO_ACCEPT_ANSWER' : 0,
'MIN_DAYS_TO_ANSWER_OWN_QUESTION' : 0,
'MIN_FLAGS_TO_DELETE_POST' : 5,
'MIN_FLAGS_TO_HIDE_POST' : 3,
......@@ -284,4 +290,4 @@ LIVESETTINGS_OPTIONS = {
},
},
},
}
}
\ No newline at end of file
"""
This is the default template for our main set of AWS servers. This does NOT
cover the content machines, which use content.py
Common traits:
* Use memcached, and cache-backed sessions
* Use a MySQL 5.1 database
"""
import json
from common import *
############################### ALWAYS THE SAME ################################
DEBUG = False
TEMPLATE_DEBUG = False
EMAIL_BACKEND = 'django_ses.SESBackend'
SESSION_ENGINE = 'django.contrib.sessions.backends.cache'
DEFAULT_FILE_STORAGE = 'storages.backends.s3boto.S3BotoStorage'
########################### NON-SECURE ENV CONFIG ##############################
# Things like server locations, ports, etc.
with open(ENV_ROOT / "env.json") as env_file:
ENV_TOKENS = json.load(env_file)
SITE_NAME = ENV_TOKENS['SITE_NAME']
CSRF_COOKIE_DOMAIN = ENV_TOKENS['CSRF_COOKIE_DOMAIN']
BOOK_URL = ENV_TOKENS['BOOK_URL']
MEDIA_URL = ENV_TOKENS['MEDIA_URL']
LOG_DIR = ENV_TOKENS['LOG_DIR']
CACHES = ENV_TOKENS['CACHES']
LOGGING = logsettings.get_logger_config(LOG_DIR,
logging_env=ENV_TOKENS['LOGGING_ENV'],
syslog_addr=(ENV_TOKENS['SYSLOG_SERVER'], 514),
debug=False)
############################## SECURE AUTH ITEMS ###############################
# Secret things: passwords, access keys, etc.
with open(ENV_ROOT / "auth.json") as auth_file:
AUTH_TOKENS = json.load(auth_file)
SECRET_KEY = AUTH_TOKENS['SECRET_KEY']
AWS_ACCESS_KEY_ID = AUTH_TOKENS["AWS_ACCESS_KEY_ID"]
AWS_SECRET_ACCESS_KEY = AUTH_TOKENS["AWS_SECRET_ACCESS_KEY"]
DATABASES = AUTH_TOKENS['DATABASES']
\ No newline at end of file
......@@ -2,15 +2,15 @@
This is the common settings file, intended to set sane defaults. If you have a
piece of configuration that's dependent on a set of feature flags being set,
then create a function that returns the calculated value based on the value of
MITX_FEATURES[...]. That classes that extend this one can change the feature
MITX_FEATURES[...]. Modules that extend this one can change the feature
configuration in an environment specific config file and re-calculate those
values.
We should make a method that calls all these config methods so that you just
make one call at the end of your site-specific dev file and it reset all the
make one call at the end of your site-specific dev file to reset all the
dependent variables (like INSTALLED_APPS) for you.
TODO:
Longer TODO:
1. Right now our treatment of static content in general and in particular
course-specific static content is haphazard.
2. We should have a more disciplined approach to feature flagging, even if it
......@@ -18,15 +18,14 @@ TODO:
3. We need to handle configuration for multiple courses. This could be as
multiple sites, but we do need a way to map their data assets.
"""
import os
import platform
import sys
import tempfile
import djcelery
from path import path
from askbotsettings import LIVESETTINGS_OPTIONS
from askbotsettings import * # this is where LIVESETTINGS_OPTIONS comes from
import logsettings
################################### FEATURES ###################################
COURSEWARE_ENABLED = True
......@@ -39,21 +38,21 @@ MITX_FEATURES = {
'SAMPLE' : False
}
# Used for A/B testing
DEFAULT_GROUPS = []
# If this is true, random scores will be generated for the purpose of debugging the profile graphs
GENERATE_PROFILE_SCORES = False
############################# SET PATH INFORMATION #############################
PROJECT_ROOT = path(__file__).abspath().dirname().dirname() # /mitxweb
ENV_ROOT = PROJECT_ROOT.dirname() # virtualenv dir /mitxweb is in
#ASKBOT_ROOT = ENV_ROOT / "3rdparty" / "askbot-devel"
ASKBOT_ROOT = ENV_ROOT / "askbot-devel"
#COURSES_ROOT = ENV_ROOT / "courses"
COURSES_ROOT = ENV_ROOT / "data"
# FIXME: code shouldn't expect trailing "/"
# FIXME: To support multiple courses, we should walk the courses dir at startup
#DATA_DIR = COURSES_ROOT / "6002x" / ""
DATA_DIR = COURSES_ROOT
#print DATA_DIR, COURSES_ROOT, ASKBOT_ROOT, ENV_ROOT, PROJECT_ROOT
sys.path.append(ENV_ROOT)
sys.path.append(ASKBOT_ROOT)
sys.path.append(ASKBOT_ROOT / "askbot" / "deps")
......@@ -61,35 +60,51 @@ sys.path.append(PROJECT_ROOT / 'djangoapps')
sys.path.append(PROJECT_ROOT / 'lib')
################################## MITXWEB #####################################
# This is where we stick our compiled template files
# This is where we stick our compiled template files. Most of the app uses Mako
# templates
MAKO_MODULE_DIR = tempfile.mkdtemp('mako')
MAKO_TEMPLATES = {}
MAKO_TEMPLATES['course'] = [DATA_DIR]
MAKO_TEMPLATES['sections'] = [DATA_DIR+'/sections']
MAKO_TEMPLATES['custom_tags'] = [DATA_DIR+'/custom_tags']
MAKO_TEMPLATES['main'] = [ENV_ROOT+'/templates/']
MAKO_TEMPLATES['sections'] = [DATA_DIR / 'sections']
MAKO_TEMPLATES['custom_tags'] = [DATA_DIR / 'custom_tags']
MAKO_TEMPLATES['main'] = [PROJECT_ROOT / 'templates',
DATA_DIR / 'info',
DATA_DIR / 'problems']
# This is where Django Template lookup is defined. There are a few of these
# still left lying around.
TEMPLATE_DIRS = (
PROJECT_ROOT / "templates",
DATA_DIR / "problems",
)
TEXTBOOK_DIR = ENV_ROOT / "books" / "circuits_agarwal_lang"
TEMPLATE_CONTEXT_PROCESSORS = (
'django.core.context_processors.request',
'askbot.context.application_settings',
'django.contrib.messages.context_processors.messages',
#'django.core.context_processors.i18n',
'askbot.user_messages.context_processors.user_messages',#must be before auth
'django.core.context_processors.auth', #this is required for admin
'django.core.context_processors.csrf', #necessary for csrf protection
)
# FIXME ???????? --
# FIXME:
# We should have separate S3 staged URLs in case we need to make changes to
# these assets and test them.
LIB_URL = '/static/lib/'
# LIB_URL = 'https://mitxstatic.s3.amazonaws.com/js/' # For AWS deploys
LIB_URL = '/static/js/'
# Dev machines shouldn't need the book
# BOOK_URL = '/static/book/'
BOOK_URL = 'https://mitxstatic.s3.amazonaws.com/book_images/' # For AWS deploys
# FIXME ??????? What are these exactly?
# Configuration option for when we want to grab server error pages
STATIC_GRAB = False
DEV_CONTENT = True
# FIXME: Should we be doing this truncation?
TRACK_MAX_EVENT = 1000
GENERATE_PROFILE_SCORES = False
TRACK_MAX_EVENT = 10000
DEBUG_TRACK_LOG = False
############################### DJANGO BUILT-INS ###############################
# Change DEBUG/TEMPLATE_DEBUG in your environment settings files, not here
......@@ -101,8 +116,8 @@ SITE_ID = 1
SITE_NAME = "localhost:8000"
CSRF_COOKIE_DOMAIN = '127.0.0.1'
HTTPS = 'on'
#ROOT_URLCONF = 'mitxweb.urls'
ROOT_URLCONF = 'mitx.urls'
IGNORABLE_404_ENDS = ('favicon.ico')
# Email
EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
......@@ -116,48 +131,17 @@ MANAGERS = ADMINS
# Static content
STATIC_URL = '/static/'
ADMIN_MEDIA_PREFIX = '/static/admin/'
STATIC_ROOT = ENV_ROOT / "staticfiles" # FIXME: Should this and uploads be moved out of the repo?
STATIC_ROOT = ENV_ROOT / "staticfiles" # We don't run collectstatic -- this is to appease askbot checks
# FIXME: We should iterate through the courses we have, adding the static
# contents for each of them.
STATICFILES_DIRS = (
# FIXME: Need to add entries for book, data/images, etc.
# PROJECT_ROOT / "static",
ENV_ROOT / "static",
# contents for each of them. (Right now we just use symlinks.)
STATICFILES_DIRS = [
PROJECT_ROOT / "static",
ASKBOT_ROOT / "askbot" / "skins",
# ("circuits", DATA_DIR / "images"),
# ("handouts", DATA_DIR / "handouts"),
# ("subs", DATA_DIR / "subs"),
# ("book", TEXTBOOK_DIR)
)
print STATICFILES_DIRS
# Templates
TEMPLATE_DIRS = (
ENV_ROOT / "templates",
# PROJECT_ROOT / "templates",
# DATA_DIR / "problems",
)
TEMPLATE_CONTEXT_PROCESSORS = (
'django.core.context_processors.request',
'askbot.context.application_settings',
#'django.core.context_processors.i18n',
'askbot.user_messages.context_processors.user_messages',#must be before auth
'django.core.context_processors.auth', #this is required for admin
'django.core.context_processors.csrf', #necessary for csrf protection
)
# Storage
DEFAULT_FILE_STORAGE = 'django.core.files.storage.FileSystemStorage'
MEDIA_ROOT = ENV_ROOT / "uploads"
MEDIA_URL = "/discussion/upfiles/"
FILE_UPLOAD_TEMP_DIR = os.path.join(os.path.dirname(__file__), 'tmp').replace('\\','/')
FILE_UPLOAD_HANDLERS = (
'django.core.files.uploadhandler.MemoryFileUploadHandler',
'django.core.files.uploadhandler.TemporaryFileUploadHandler',
)
# This is how you would use the textbook images locally
# ("book", ENV_ROOT / "book_images")
]
# Locale/Internationalization
TIME_ZONE = 'America/New_York' # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
......@@ -165,79 +149,8 @@ LANGUAGE_CODE = 'en' # http://www.i18nguy.com/unicode/language-identifiers.html
USE_I18N = True
USE_L10N = True
################################### LOGGING ####################################
# Might want to rewrite this to use logger code and push more things to the root
# logger.
pid = os.getpid() # So we can log which process is creating the log
hostname = platform.node().split(".")[0]
SYSLOG_ADDRESS = ('syslog.m.i4x.org', 514)
handlers = ['console']
# FIXME: re-enable syslogger later
# if not DEBUG:
# handlers.append('syslogger')
LOGGING = {
'version': 1,
'disable_existing_loggers': True,
'formatters' : {
'standard' : {
'format' : '%(asctime)s %(levelname)s %(process)d [%(name)s] %(filename)s:%(lineno)d - %(message)s',
},
'syslog_format' : {
'format' : '[%(name)s] %(levelname)s [' + hostname + ' %(process)d] [%(filename)s:%(lineno)d] - %(message)s',
},
'raw' : {
'format' : '%(message)s',
}
},
'handlers' : {
'console' : {
'level' : 'DEBUG',
'class' : 'logging.StreamHandler',
'formatter' : 'standard',
'stream' : sys.stdout,
},
'console_err' : {
'level' : 'ERROR',
'class' : 'logging.StreamHandler',
'formatter' : 'standard',
'stream' : sys.stderr,
},
'syslogger' : {
'level' : 'INFO',
'class' : 'logging.handlers.SysLogHandler',
'address' : SYSLOG_ADDRESS,
'formatter' : 'syslog_format',
},
'mail_admins' : {
'level': 'ERROR',
'class': 'django.utils.log.AdminEmailHandler',
},
},
'loggers' : {
'django' : {
'handlers' : handlers + ['mail_admins'],
'propagate' : True,
'level' : 'INFO'
},
'tracking' : {
'handlers' : [] if DEBUG else ['syslogger'], # handlers,
'level' : 'DEBUG',
'propagate' : False,
},
'root' : {
'handlers' : handlers,
'level' : 'DEBUG',
'propagate' : False
},
'mitx' : {
'handlers' : handlers,
'level' : 'DEBUG',
'propagate' : False
},
}
}
# Messages
MESSAGE_STORAGE = 'django.contrib.messages.storage.session.SessionStorage'
#################################### AWS #######################################
# S3BotoStorage insists on a timeout for uploaded assets. We should make it
......@@ -288,14 +201,19 @@ TEMPLATE_LOADERS = (
MIDDLEWARE_CLASSES = (
'util.middleware.ExceptionLoggingMiddleware',
'django.middleware.cache.UpdateCacheMiddleware',
'django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
# Instead of AuthenticationMiddleware, we use a cached backed version
#'django.contrib.auth.middleware.AuthenticationMiddleware',
'cache_toolbox.middleware.CacheBackedAuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'track.middleware.TrackMiddleware',
'mitxmako.middleware.MakoMiddleware',
# 'debug_toolbar.middleware.DebugToolbarMiddleware',
'askbot.middleware.anon_user.ConnectToSessionMessagesMiddleware',
'askbot.middleware.forum_mode.ForumModeMiddleware',
'askbot.middleware.cancel.CancelActionMiddleware',
......@@ -303,46 +221,41 @@ MIDDLEWARE_CLASSES = (
'askbot.middleware.view_log.ViewLogMiddleware',
'askbot.middleware.spaceless.SpacelessMiddleware',
# 'askbot.middleware.pagesize.QuestionsPageSizeMiddleware',
# 'debug_toolbar.middleware.DebugToolbarMiddleware',
)
################################### APPS #######################################
def installed_apps():
"""If you want to get a different set of INSTALLED_APPS out of this, you'll
have to set ASKBOT_ENABLED and COURSEWARE_ENABLED to True/False and call
this method. We can't just take these as params because other pieces of the
code check fo the value of these constants.
"""
# We always install these
STANDARD_APPS = ['django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.humanize',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
'django.contrib.staticfiles',
'track',
'util']
COURSEWARE_APPS = ['circuit',
'courseware',
'student',
'static_template_view',
'staticbook',
'simplewiki',
'perfstats']
ASKBOT_APPS = ['django.contrib.sitemaps',
'django.contrib.admin',
'south',
'askbot.deps.livesettings',
'askbot',
'keyedcache',
'robots',
'django_countries',
'djcelery',
'djkombu',
'followit']
return tuple(STANDARD_APPS +
(COURSEWARE_APPS if COURSEWARE_ENABLED else []) +
(ASKBOT_APPS if ASKBOT_ENABLED else []))
INSTALLED_APPS = installed_apps()
INSTALLED_APPS = (
# Standard ones that are always installed...
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.humanize',
'django.contrib.messages',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.staticfiles',
'south',
# Our courseware
'circuit',
'courseware',
'perfstats',
'student',
'static_template_view',
'staticbook',
'simplewiki',
'track',
'util',
# For Askbot
'django.contrib.sitemaps',
'django.contrib.admin',
'django_countries',
'djcelery',
'djkombu',
'askbot',
'askbot.deps.livesettings',
'followit',
'keyedcache',
'robots',
)
"""
These are debug machines used for content creators, so they're kind of a cross
between dev machines and AWS machines.
"""
from aws import *
DEBUG = True
TEMPLATE_DEBUG = True
EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
################################ DEBUG TOOLBAR #################################
INSTALLED_APPS += ('debug_toolbar',)
MIDDLEWARE_CLASSES += ('debug_toolbar.middleware.DebugToolbarMiddleware',)
DEBUG_TOOLBAR_PANELS = (
'debug_toolbar.panels.version.VersionDebugPanel',
'debug_toolbar.panels.timer.TimerDebugPanel',
'debug_toolbar.panels.settings_vars.SettingsVarsDebugPanel',
'debug_toolbar.panels.headers.HeaderDebugPanel',
'debug_toolbar.panels.request_vars.RequestVarsDebugPanel',
'debug_toolbar.panels.sql.SQLDebugPanel',
'debug_toolbar.panels.signals.SignalDebugPanel',
'debug_toolbar.panels.logger.LoggingPanel',
# Enabling the profiler has a weird bug as of django-debug-toolbar==0.9.4 and
# Django=1.3.1/1.4 where requests to views get duplicated (your method gets
# hit twice). So you can uncomment when you need to diagnose performance
# problems, but you shouldn't leave it on.
# 'debug_toolbar.panels.profiling.ProfilingDebugPanel',
)
"""
This config file runs the simplest dev environment using sqlite, and db-based
sessions. Assumes structure:
/envroot/
/db # This is where it'll write the database file
/mitx # The location of this repo
/log # Where we're going to write log files
"""
from common import *
DEBUG = True
TEMPLATE_DEBUG = True
LOGGING = logsettings.get_logger_config(ENV_ROOT / "log",
logging_env="dev",
tracking_filename="tracking.log",
debug=True)
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': ENV_ROOT / "db" / "mitx.db",
}
}
CACHES = {
# This is the cache used for most things. Askbot will not work without a
# functioning cache -- it relies on caching to load its settings in places.
# In staging/prod envs, the sessions also live here.
'default': {
'BACKEND': 'django.core.cache.backends.locmem.LocMemCache',
'LOCATION': 'mitx_loc_mem_cache'
},
# The general cache is what you get if you use our util.cache. It's used for
# things like caching the course.xml file for different A/B test groups.
# We set it to be a DummyCache to force reloading of course.xml in dev.
# In staging environments, we would grab VERSION from data uploaded by the
# push process.
'general': {
'BACKEND': 'django.core.cache.backends.dummy.DummyCache',
'KEY_PREFIX': 'general',
'VERSION': 4,
}
}
# Dummy secret key for dev
SECRET_KEY = '85920908f28904ed733fe576320db18cabd7b6cd'
################################ DEBUG TOOLBAR #################################
INSTALLED_APPS += ('debug_toolbar',)
MIDDLEWARE_CLASSES += ('debug_toolbar.middleware.DebugToolbarMiddleware',)
INTERNAL_IPS = ('127.0.0.1',)
DEBUG_TOOLBAR_PANELS = (
'debug_toolbar.panels.version.VersionDebugPanel',
'debug_toolbar.panels.timer.TimerDebugPanel',
'debug_toolbar.panels.settings_vars.SettingsVarsDebugPanel',
'debug_toolbar.panels.headers.HeaderDebugPanel',
'debug_toolbar.panels.request_vars.RequestVarsDebugPanel',
'debug_toolbar.panels.sql.SQLDebugPanel',
'debug_toolbar.panels.signals.SignalDebugPanel',
'debug_toolbar.panels.logger.LoggingPanel',
# Enabling the profiler has a weird bug as of django-debug-toolbar==0.9.4 and
# Django=1.3.1/1.4 where requests to views get duplicated (your method gets
# hit twice). So you can uncomment when you need to diagnose performance
# problems, but you shouldn't leave it on.
# 'debug_toolbar.panels.profiling.ProfilingDebugPanel',
)
############################ FILE UPLOADS (ASKBOT) #############################
DEFAULT_FILE_STORAGE = 'django.core.files.storage.FileSystemStorage'
MEDIA_ROOT = ENV_ROOT / "uploads"
MEDIA_URL = "/static/uploads/"
STATICFILES_DIRS.append(("uploads", MEDIA_ROOT))
FILE_UPLOAD_TEMP_DIR = ENV_ROOT / "uploads"
FILE_UPLOAD_HANDLERS = (
'django.core.files.uploadhandler.MemoryFileUploadHandler',
'django.core.files.uploadhandler.TemporaryFileUploadHandler',
)
"""
This config file tries to mimic the production environment more closely than the
normal dev.py. It assumes you're running a local instance of MySQL 5.1 and that
you're running memcached. You'll want to use this to test caching and database
migrations.
Assumptions:
* MySQL 5.1 (version important -- askbot breaks on 5.5)
Dir structure:
/envroot/
/mitx # The location of this repo
/log # Where we're going to write log files
"""
from dev import *
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'wwc',
'USER': 'root',
'PASSWORD': '',
'HOST': '127.0.0.1',
'PORT': '3306',
}
}
CACHES = {
'default': {
'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
'LOCATION': '127.0.0.1:11211',
},
'general': {
'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
'LOCATION': '127.0.0.1:11211',
'KEY_PREFIX' : 'general',
'VERSION' : 5,
}
}
SESSION_ENGINE = 'django.contrib.sessions.backends.cache'
import os
import os.path
import platform
import sys
def get_logger_config(log_dir,
logging_env="no_env",
tracking_filename=None,
syslog_addr=None,
debug=False):
"""Return the appropriate logging config dictionary. You should assign the
result of this to the LOGGING var in your settings. The reason it's done
this way instead of registering directly is because I didn't want to worry
about resetting the logging state if this is called multiple times when
settings are extended."""
# If we're given an explicit place to put tracking logs, we do that (say for
# debugging). However, logging is not safe for multiple processes hitting
# the same file. So if it's left blank, we dynamically create the filename
# based on the PID of this worker process.
if tracking_filename:
tracking_file_loc = os.path.join(log_dir, tracking_filename)
else:
pid = os.getpid() # So we can log which process is creating the log
tracking_file_loc = os.path.join(log_dir, "tracking_{0}.log".format(pid))
hostname = platform.node().split(".")[0]
syslog_format = ("[%(name)s][env:{logging_env}] %(levelname)s [{hostname} " +
" %(process)d] [%(filename)s:%(lineno)d] - %(message)s").format(
logging_env=logging_env, hostname=hostname)
handlers = ['console'] if debug else ['console', 'syslogger']
return {
'version': 1,
'disable_existing_loggers': True,
'formatters' : {
'standard' : {
'format' : '%(asctime)s %(levelname)s %(process)d [%(name)s] %(filename)s:%(lineno)d - %(message)s',
},
'syslog_format' : { 'format' : syslog_format },
'raw' : { 'format' : '%(message)s' },
},
'handlers' : {
'console' : {
'level' : 'DEBUG' if debug else 'INFO',
'class' : 'logging.StreamHandler',
'formatter' : 'standard',
'stream' : sys.stdout,
},
'syslogger' : {
'level' : 'INFO',
'class' : 'logging.handlers.SysLogHandler',
'address' : syslog_addr,
'formatter' : 'syslog_format',
},
'tracking' : {
'level' : 'DEBUG',
'class' : 'logging.handlers.WatchedFileHandler',
'filename' : tracking_file_loc,
'formatter' : 'raw',
},
},
'loggers' : {
'django' : {
'handlers' : handlers,
'propagate' : True,
'level' : 'INFO'
},
'tracking' : {
'handlers' : ['tracking'],
'level' : 'DEBUG',
'propagate' : False,
},
'root' : {
'handlers' : handlers,
'level' : 'DEBUG',
'propagate' : False
},
'mitx' : {
'handlers' : handlers,
'level' : 'DEBUG',
'propagate' : False
},
}
}
\ No newline at end of file
"""
This config file runs the simplest dev environment using sqlite, and db-based
sessions. Assumes structure:
/envroot/
/db # This is where it'll write the database file
/mitx # The location of this repo
/log # Where we're going to write log files
"""
from common import *
LOGGING = logsettings.get_logger_config(PROJECT_ROOT / "log",
logging_env="dev",
tracking_filename="tracking.log",
debug=True)
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': PROJECT_ROOT / "db" / "mitx.db",
}
}
CACHES = {
# This is the cache used for most things. Askbot will not work without a
# functioning cache -- it relies on caching to load its settings in places.
# In staging/prod envs, the sessions also live here.
'default': {
'BACKEND': 'django.core.cache.backends.locmem.LocMemCache',
'LOCATION': 'mitx_loc_mem_cache'
},
# The general cache is what you get if you use our util.cache. It's used for
# things like caching the course.xml file for different A/B test groups.
# We set it to be a DummyCache to force reloading of course.xml in dev.
# In staging environments, we would grab VERSION from data uploaded by the
# push process.
'general': {
'BACKEND': 'django.core.cache.backends.dummy.DummyCache',
'KEY_PREFIX': 'general',
'VERSION': 4,
}
}
# Dummy secret key for dev
SECRET_KEY = '85920908f28904ed733fe576320db18cabd7b6cd'
############################ FILE UPLOADS (ASKBOT) #############################
DEFAULT_FILE_STORAGE = 'django.core.files.storage.FileSystemStorage'
MEDIA_ROOT = PROJECT_ROOT / "uploads"
MEDIA_URL = "/static/uploads/"
STATICFILES_DIRS.append(("uploads", MEDIA_ROOT))
FILE_UPLOAD_TEMP_DIR = PROJECT_ROOT / "uploads"
FILE_UPLOAD_HANDLERS = (
'django.core.files.uploadhandler.MemoryFileUploadHandler',
'django.core.files.uploadhandler.TemporaryFileUploadHandler',
)
import sys
import json
import random
import copy
from collections import defaultdict
from argparse import ArgumentParser, FileType
def generate_user(user_number):
return {
"pk": user_number,
"model": "auth.user",
"fields": {
"status": "w",
"last_name": "Last",
"gold": 0,
"is_staff": False,
"user_permissions": [],
"interesting_tags": "",
"email_key": None,
"date_joined": "2012-04-26 11:36:39",
"first_name": "",
"email_isvalid": False,
"avatar_type": "n",
"website": "",
"is_superuser": False,
"date_of_birth": None,
"last_login": "2012-04-26 11:36:48",
"location": "",
"new_response_count": 0,
"email": "user{num}@example.com".format(num=user_number),
"username": "user{num}".format(num=user_number),
"is_active": True,
"consecutive_days_visit_count": 0,
"email_tag_filter_strategy": 1,
"groups": [],
"password": "sha1$90e6f$562a1d783a0c47ce06ebf96b8c58123a0671bbf0",
"silver": 0,
"bronze": 0,
"questions_per_page": 10,
"about": "",
"show_country": True,
"country": "",
"display_tag_filter_strategy": 0,
"seen_response_count": 0,
"real_name": "",
"ignored_tags": "",
"reputation": 1,
"gravatar": "366d981a10116969c568a18ee090f44c",
"last_seen": "2012-04-26 11:36:39"
}
}
def parse_args(args=sys.argv[1:]):
parser = ArgumentParser()
parser.add_argument('-d', '--data', type=FileType('r'), default=sys.stdin)
parser.add_argument('-o', '--output', type=FileType('w'), default=sys.stdout)
parser.add_argument('count', type=int)
return parser.parse_args(args)
def main(args=sys.argv[1:]):
args = parse_args(args)
data = json.load(args.data)
unique_students = set(entry['fields']['student'] for entry in data)
if args.count > len(unique_students) * 0.1:
raise Exception("Can't be sufficiently anonymous selecting {count} of {unique} students".format(
count=args.count, unique=len(unique_students)))
by_problems = defaultdict(list)
for entry in data:
by_problems[entry['fields']['module_id']].append(entry)
out_data = []
out_pk = 1
for name, answers in by_problems.items():
for student_id in xrange(args.count):
sample = random.choice(answers)
data = copy.deepcopy(sample)
data["fields"]["student"] = student_id + 1
data["pk"] = out_pk
out_pk += 1
out_data.append(data)
for student_id in xrange(args.count):
out_data.append(generate_user(student_id))
json.dump(out_data, args.output, indent=2)
if __name__ == "__main__":
sys.exit(main())
......@@ -6,12 +6,12 @@ REPO_ROOT = File.dirname(__FILE__)
BUILD_DIR = File.join(REPO_ROOT, "build")
# Packaging constants
DEPLOY_DIR = "/opt/packages"
DEPLOY_DIR = "/opt/wwc"
PACKAGE_NAME = "mitx"
LINK_PATH = "/opt/wwc/mitx"
VERSION = "0.1"
COMMIT = (ENV["GIT_COMMIT"] || `git rev-parse HEAD`).chomp()[0, 10]
BRANCH = (ENV["GIT_BRANCH"] || `git symbolic-ref -q HEAD`).chomp().gsub('refs/heads/', '').gsub('origin/', '').gsub('/', '_')
BRANCH = (ENV["GIT_BRANCH"] || `git symbolic-ref -q HEAD`).chomp().gsub('refs/heads/', '').gsub('origin/', '')
BUILD_NUMBER = (ENV["BUILD_NUMBER"] || "dev").chomp()
if BRANCH == "master"
......@@ -19,14 +19,23 @@ if BRANCH == "master"
else
DEPLOY_NAME = "#{PACKAGE_NAME}-#{BRANCH}-#{BUILD_NUMBER}-#{COMMIT}"
end
INSTALL_DIR_PATH = File.join(DEPLOY_DIR, DEPLOY_NAME)
PACKAGE_REPO = "packages@gp.mitx.mit.edu:/opt/pkgrepo.incoming"
NORMALIZED_DEPLOY_NAME = DEPLOY_NAME.downcase().gsub(/[_\/]/, '-')
INSTALL_DIR_PATH = File.join(DEPLOY_DIR, NORMALIZED_DEPLOY_NAME)
# Set up the clean and clobber tasks
CLOBBER.include('build')
CLEAN.include("#{BUILD_DIR}/*.deb", "#{BUILD_DIR}/util")
task :default do
sh("mkdir -p reports")
sh("touch reports/nosetests.xml")
end
task :test do
sh("django-admin.py test --settings=envs.test --pythonpath=. $(ls djangoapps)")
end
task :package do
FileUtils.mkdir_p(BUILD_DIR)
......@@ -38,10 +47,13 @@ task :package do
#! /bin/sh
set -e
set -x
chown -R makeitso:makeitso #{INSTALL_DIR_PATH}
service gunicorn stop
rm -f #{LINK_PATH}
ln -s #{INSTALL_DIR_PATH} #{LINK_PATH}
chown makeitso:makeitso #{LINK_PATH}
service gunicorn start
POSTINSTALL
postinstall.close()
......@@ -50,23 +62,13 @@ task :package do
args = ["fakeroot", "fpm", "-s", "dir", "-t", "deb",
"--after-install=#{postinstall.path}",
"--prefix=#{INSTALL_DIR_PATH}",
"--exclude=build",
"--exclude=rakefile",
"--exclude=.git",
"--exclude=**/*.pyc",
"-C", "#{REPO_ROOT}",
"--depends=python-mysqldb",
"--depends=python-django",
"--depends=python-pip",
"--depends=python-flup",
"--depends=python-numpy",
"--depends=python-scipy",
"--depends=python-matplotlib",
"--depends=python-libxml2",
"--depends=python2.7-dev",
"--depends=libxml2-dev",
"--depends=libxslt-dev",
"--depends=python-markdown",
"--depends=python-pygments",
"--depends=mysql-client",
"--provides=#{PACKAGE_NAME}",
"--name=#{DEPLOY_NAME}",
"--name=#{NORMALIZED_DEPLOY_NAME}",
"--version=#{VERSION}",
"-a", "all",
"."]
......@@ -75,5 +77,5 @@ task :package do
end
task :publish => :package do
sh("scp #{BUILD_DIR}/#{DEPLOY_NAME}_#{VERSION}-1_all.deb #{PACKAGE_REPO}")
sh("scp #{BUILD_DIR}/#{NORMALIZED_DEPLOY_NAME}_#{VERSION}*.deb #{PACKAGE_REPO}")
end
Transitional for moving to new settings scheme.
To use:
django-admin runserver --settings=settings2.dev --pythonpath="."
from common import *
EMAIL_BACKEND = 'django_ses.SESBackend'
SESSION_ENGINE = 'django.contrib.sessions.backends.cache'
DEFAULT_FILE_STORAGE = 'storages.backends.s3boto.S3BotoStorage'
CSRF_COOKIE_DOMAIN = '.mitx.mit.edu'
LIB_URL = 'https://mitxstatic.s3.amazonaws.com/js/'
BOOK_URL = 'https://mitxstatic.s3.amazonaws.com/book_images/'
CACHES = {
'default': {
'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
}
}
DEBUG = False
TEMPLATE_DEBUG = False
"""
This config file runs the simplest dev environment using sqlite, and db-based
sessions.
"""
from common import *
CSRF_COOKIE_DOMAIN = 'localhost'
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': ENV_ROOT / "db" / "mitx.db",
}
}
# Make this unique, and don't share it with anybody.
SECRET_KEY = '85920908f28904ed733fe576320db18cabd7b6cd'
DEBUG = True
TEMPLATE_DEBUG = False
# This is disabling ASKBOT, but not properly overwriting INSTALLED_APPS. ???
# It's because our ASKBOT_ENABLED here is actually shadowing the real one.
#
# ASKBOT_ENABLED = True
# MITX_FEATURES['SAMPLE'] = True # Switch to this system so we get around the shadowing
#
# INSTALLED_APPS = installed_apps()
"""
This config file tries to mimic the production environment more closely than the
normal dev.py. It assumes you're running a local instance of MySQL 5.1 and that
you're running memcached.
"""
from common import *
CSRF_COOKIE_DOMAIN = 'localhost'
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
'NAME': 'wwc', # Or path to database file if using sqlite3.
'USER': 'root', # Not used with sqlite3.
'PASSWORD': '', # Not used with sqlite3.
'HOST': '127.0.0.1', # Set to empty string for localhost. Not used with sqlite3.
'PORT': '3306', # Set to empty string for default. Not used with sqlite3.
}
}
# Make this unique, and don't share it with anybody.
SECRET_KEY = '85920908f28904ed733fe576320db18cabd7b6cd'
CACHES = {
'default': {
'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
'LOCATION': '127.0.0.1:11211',
}
}
SESSION_ENGINE = 'django.contrib.sessions.backends.cache'
DEBUG = True
TEMPLATE_DEBUG = True
\ No newline at end of file
from common import *
GENERATE_RANDOM_USER_CREDENTIALS = True
from aws import *
# Staging specific overrides
SITE_NAME = "staging.mitx.mit.edu"
AWS_STORAGE_BUCKET_NAME = 'mitx_askbot_stage'
CACHES['default']['LOCATION'] = ['***REMOVED***',
'***REMOVED***']
### Secure Data Below Here ###
SECRET_KEY = ""
AWS_ACCESS_KEY_ID = ""
AWS_SECRET_ACCESS_KEY = ""
/*
html5doctor.com Reset Stylesheet
html5doctor.com Reset Stylesheet
v1.6.1
Last Updated: 2010-09-17
Author: Richard Clark - http://richclarkdesign.com
......@@ -116,7 +116,7 @@ input, select {
font-weight: 800;
font-style: italic; }
.clearfix:after, .topbar:after, nav.sequence-nav:after, div.book-wrapper section.book nav:after, div.profile-wrapper section.course-info div#grade:after, div.wiki-wrapper section.wiki-body header:after, html body section.main-content:after, html body section.outside-app:after, div.header-wrapper header:after, div.header-wrapper header hgroup:after, div.header-wrapper header nav ul:after, footer:after, li.calc-main div#calculator_wrapper form:after, li.calc-main div#calculator_wrapper form div.input-wrapper:after, div.leanModal_box#enroll ol:after, div.course-wrapper section.course-content .problem-set:after, div.course-wrapper section.course-content section.problems-wrapper:after, div.course-wrapper section.course-content div#seq_content:after, div.course-wrapper section.course-content ol.vert-mod > li:after, section.course-content div.video-subtitles div.video-wrapper section.video-controls:after, section.course-content div.video-subtitles div.video-wrapper section.video-controls div#slider:after, section.course-content nav.sequence-bottom ul:after, div#graph-container:after, div#schematic-container:after, div.book-wrapper section.book nav ul:after, div.info-wrapper section.updates > ol > li:after, div.info-wrapper section.handouts ol li:after, div.profile-wrapper section.course-info header:after, div.profile-wrapper section.course-info > ol > li:after, div#wiki_panel div#wiki_create_form:after, div.wiki-wrapper section.wiki-body:after, ul.badge-list li.badge:after {
.clearfix:after, .topbar:after, nav.sequence-nav:after, div.book-wrapper section.book nav:after, div.profile-wrapper section.course-info div#grade:after, div.wiki-wrapper section.wiki-body header:after, html body section.main-content:after, html body section.outside-app:after, div.header-wrapper header:after, div.header-wrapper header hgroup:after, div.header-wrapper header nav ul:after, footer:after, li.calc-main div#calculator_wrapper form:after, li.calc-main div#calculator_wrapper form div.input-wrapper:after, div.leanModal_box#enroll ol:after, div.course-wrapper section.course-content .problem-set:after, div.course-wrapper section.course-content section.problems-wrapper:after, div.course-wrapper section.course-content div#seq_content:after, div.course-wrapper section.course-content ol.vert-mod > li:after, section.course-content div.video-subtitles div.video-wrapper section.video-controls:after, section.course-content div.video-subtitles div.video-wrapper section.video-controls div#slider:after, section.course-content nav.sequence-bottom ul:after, section.tool-wrapper:after, section.tool-wrapper div#controlls-container:after, section.tool-wrapper div#controlls-container div.graph-controls div.music-wrapper:after, section.tool-wrapper div#controlls-container div.graph-controls div.inputs-wrapper:after, section.tool-wrapper div#controlls-container div.schematic-sliders div.top-sliders:after, div.book-wrapper section.book nav ul:after, div.info-wrapper section.updates > ol > li:after, div.info-wrapper section.handouts ol li:after, div.profile-wrapper section.course-info header:after, div.profile-wrapper section.course-info > ol > li:after, div#wiki_panel div#wiki_create_form:after, div.wiki-wrapper section.wiki-body:after, ul.badge-list li.badge:after {
content: ".";
display: block;
height: 0;
......@@ -133,7 +133,7 @@ input, select {
display: table;
width: 100%; }
h1.top-header, div.course-wrapper section.course-content h1, div.info-wrapper section.updates > h1, div.profile-wrapper section.course-info header, div.gradebook-wrapper section.gradebook-content h1, div.question-list-header {
h1.top-header, div.course-wrapper section.course-content ol.vert-mod > li header, div.info-wrapper section.updates > h1, div.profile-wrapper section.course-info header, div.gradebook-wrapper section.gradebook-content h1, div.question-list-header {
background: #f3f3f3;
border-bottom: 1px solid #e3e3e3;
margin: -22.652px -22.652px 22.652px;
......@@ -465,8 +465,7 @@ a:visited {
a:link, a:visited {
text-decoration: none; }
p a, li > a, span > a, a .inline {
border-bottom: 1px solid #bbb;
font-style: italic; }
border-bottom: 1px solid #bbb; }
a:hover, a:focus {
color: #000; }
......@@ -505,6 +504,13 @@ html body section.main-content, html body section.outside-app {
-o-border-radius: 4px;
border-radius: 4px;
margin-top: 11.326px; } }
html body div.qtip div.ui-tooltip-content {
border: none;
background: rgba(0, 0, 0, 0.8);
color: #fff;
font: 12px "Open Sans", "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Geneva, Verdana, sans-serif;
margin-top: -30px;
margin-right: -20px; }
html body section.outside-app {
max-width: 600px;
padding: 22.652px; }
......@@ -703,10 +709,36 @@ footer nav ul.social li.linkedin a {
background: url("/static/images/linkedin.png") 0 0 no-repeat; }
li.calc-main {
bottom: -36px;
bottom: -126px;
left: 0;
position: fixed;
width: 100%; }
width: 100%;
-webkit-transition-property: bottom;
-moz-transition-property: bottom;
-ms-transition-property: bottom;
-o-transition-property: bottom;
transition-property: bottom;
-webkit-transition-duration: 0.15s;
-moz-transition-duration: 0.15s;
-ms-transition-duration: 0.15s;
-o-transition-duration: 0.15s;
transition-duration: 0.15s;
-webkit-transition-timing-function: ease-out;
-moz-transition-timing-function: ease-out;
-ms-transition-timing-function: ease-out;
-o-transition-timing-function: ease-out;
transition-timing-function: ease-out;
-webkit-transition-delay: 0;
-moz-transition-delay: 0;
-ms-transition-delay: 0;
-o-transition-delay: 0;
transition-delay: 0;
z-index: 99;
-webkit-appearance: none; }
li.calc-main.open {
bottom: -36px; }
li.calc-main.open div#calculator_wrapper form div.input-wrapper div.help-wrapper dl {
display: block; }
li.calc-main a.calc {
text-indent: -9999px;
overflow: hidden;
......@@ -741,9 +773,13 @@ li.calc-main div#calculator_wrapper {
background: rgba(17, 17, 17, 0.9);
position: relative;
top: -36px;
clear: both; }
clear: both;
max-height: 90px; }
li.calc-main div#calculator_wrapper form {
padding: 22.652px; }
padding: 22.652px;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box; }
li.calc-main div#calculator_wrapper form input#calculator_button {
background: #111;
border: 1px solid #000;
......@@ -759,13 +795,14 @@ li.calc-main div#calculator_wrapper form input#calculator_button {
-moz-box-sizing: border-box;
box-sizing: border-box;
color: #fff;
float: left;
font-size: 30px;
font-weight: bold;
margin: 0 1.012%;
padding: 0;
text-shadow: none;
width: 4.251%;
float: left;
margin: 0 1.012%; }
-webkit-appearance: none;
width: 4.251%; }
li.calc-main div#calculator_wrapper form input#calculator_button:hover {
color: #333; }
li.calc-main div#calculator_wrapper form input#calculator_output {
......@@ -783,12 +820,13 @@ li.calc-main div#calculator_wrapper form input#calculator_output {
font-weight: bold;
margin: 1px 0 0;
padding: 10px;
-webkit-appearance: none;
width: 31.984%; }
li.calc-main div#calculator_wrapper form div.input-wrapper {
position: relative;
width: 61.741%;
float: left;
margin: 0;
float: left; }
position: relative;
width: 61.741%; }
li.calc-main div#calculator_wrapper form div.input-wrapper input#calculator_input {
border: none;
-webkit-box-shadow: none;
......@@ -799,6 +837,7 @@ li.calc-main div#calculator_wrapper form div.input-wrapper input#calculator_inpu
box-sizing: border-box;
font-size: 16px;
padding: 10px;
-webkit-appearance: none;
width: 100%; }
li.calc-main div#calculator_wrapper form div.input-wrapper input#calculator_input:focus {
outline: none;
......@@ -831,6 +870,7 @@ li.calc-main div#calculator_wrapper form div.input-wrapper div.help-wrapper dl {
right: -40px;
top: -110px;
width: 500px;
display: none;
-webkit-transition-property: all;
-moz-transition-property: all;
-ms-transition-property: all;
......@@ -2663,8 +2703,20 @@ button.ui-button::-moz-focus-inner {
border-color: #AAA;
color: #111; }
html {
height: 100%;
max-height: 100%; }
body.courseware {
height: 100%;
max-height: 100%; }
div.course-wrapper ul, div.course-wrapper ol {
list-style: none; }
div.course-wrapper section.course-content {
overflow: hidden; }
div.course-wrapper section.course-content h1 {
margin: 0 0 22.652px; }
div.course-wrapper section.course-content p {
margin-bottom: 22.652px; }
div.course-wrapper section.course-content p:empty {
......@@ -2778,13 +2830,44 @@ div.course-wrapper section.course-content ol.vert-mod > li {
border-bottom: 1px solid #ddd;
margin-bottom: 15px;
padding: 0 0 15px; }
div.course-wrapper section.course-content ol.vert-mod > li header {
margin-bottom: 0; }
div.course-wrapper section.course-content ol.vert-mod > li header h1 {
margin: 0; }
div.course-wrapper section.course-content ol.vert-mod > li header h2 {
float: right;
margin-right: 0;
margin-top: 8px;
text-align: right;
padding-right: 0; }
div.course-wrapper section.course-content ol.vert-mod > li:last-child {
border-bottom: none;
margin-bottom: 0;
padding-bottom: 0; }
div.course-wrapper section.course-content section.tutorials ul {
div.course-wrapper section.course-content ol.vert-mod > li ul {
list-style: disc outside none;
margin-left: 22.652px; }
padding-left: 1em; }
div.course-wrapper section.course-content section.tutorials h2 {
margin-bottom: 22.652px; }
div.course-wrapper section.course-content section.tutorials ul {
margin: 0;
zoom: 1; }
div.course-wrapper section.course-content section.tutorials ul:before, div.course-wrapper section.course-content section.tutorials ul:after {
content: "";
display: table; }
div.course-wrapper section.course-content section.tutorials ul:after {
clear: both; }
div.course-wrapper section.course-content section.tutorials ul li {
width: 31.522%;
float: left;
margin-right: 2.717%;
margin-bottom: 22.652px; }
div.course-wrapper section.course-content section.tutorials ul li:nth-child(3n) {
margin-right: 0; }
div.course-wrapper section.course-content section.tutorials ul li:nth-child(3n+1) {
clear: both; }
div.course-wrapper section.course-content section.tutorials ul li a {
font-weight: bold; }
div.course-wrapper section.course-content div.staff_info {
zoom: 1;
white-space: pre-wrap;
......@@ -2819,6 +2902,26 @@ div.course-wrapper section.course-content div.ui-slider a.ui-slider-handle {
div.course-wrapper section.course-content div.ui-slider a.ui-slider-handle:hover, div.course-wrapper section.course-content div.ui-slider a.ui-slider-handle:focus {
background-color: #bf4040;
outline: none; }
div.course-wrapper section.course-content div.ui-tabs {
border: 0;
-webkit-border-radius: 0;
-moz-border-radius: 0;
-ms-border-radius: 0;
-o-border-radius: 0;
border-radius: 0;
margin: 0;
padding: 0; }
div.course-wrapper section.course-content div.ui-tabs .ui-tabs-nav {
background: none;
border: 0;
margin-bottom: 11.326px; }
div.course-wrapper section.course-content div.ui-tabs .ui-tabs-panel {
-webkit-border-radius: 0;
-moz-border-radius: 0;
-ms-border-radius: 0;
-o-border-radius: 0;
border-radius: 0;
padding: 0; }
div.course-wrapper.closed section.course-index {
width: 3.077%; }
div.course-wrapper.closed section.course-index header#open_close_accordion {
......@@ -2883,14 +2986,42 @@ section.course-index div#accordion ul.ui-accordion-content li a p {
section.course-index div#accordion ul.ui-accordion-content li a p.subtitle {
color: #666; }
@-moz-document url-prefix() {
a.add-fullscreen {
display: none !important; } }
section.course-content .dullify, section.course-content div.video-subtitles div.video-wrapper section.video-controls ul.vcr, section.course-content div.video-subtitles div.video-wrapper section.video-controls div.secondary-controls {
opacity: .4;
-webkit-transition-property: all;
-moz-transition-property: all;
-ms-transition-property: all;
-o-transition-property: all;
transition-property: all;
-webkit-transition-duration: 0.15s;
-moz-transition-duration: 0.15s;
-ms-transition-duration: 0.15s;
-o-transition-duration: 0.15s;
transition-duration: 0.15s;
-webkit-transition-timing-function: ease-out;
-moz-transition-timing-function: ease-out;
-ms-transition-timing-function: ease-out;
-o-transition-timing-function: ease-out;
transition-timing-function: ease-out;
-webkit-transition-delay: 0;
-moz-transition-delay: 0;
-ms-transition-delay: 0;
-o-transition-delay: 0;
transition-delay: 0; }
section.course-content .dullify:hover, section.course-content div.video-subtitles div.video-wrapper section.video-controls ul.vcr:hover, section.course-content div.video-subtitles div.video-wrapper section.video-controls div.secondary-controls:hover {
opacity: 1; }
section.course-content div.video-subtitles {
zoom: 1;
padding: 6px 22.652px;
margin: 0 -22.652px;
border-top: 1px solid #e1e1e1;
border-bottom: 1px solid #e1e1e1;
background: #f3f3f3;
position: relative;
zoom: 1; }
display: block; }
section.course-content div.video-subtitles:before, section.course-content div.video-subtitles:after {
content: "";
display: table; }
......@@ -2926,6 +3057,8 @@ section.course-content div.video-subtitles div.video-wrapper section.video-contr
border: 1px solid #000;
border-top: 0;
color: #ccc; }
section.course-content div.video-subtitles div.video-wrapper section.video-controls:hover ul, section.course-content div.video-subtitles div.video-wrapper section.video-controls:hover div {
opacity: 1; }
section.course-content div.video-subtitles div.video-wrapper section.video-controls div#slider {
-webkit-border-radius: 0;
-moz-border-radius: 0;
......@@ -2979,6 +3112,7 @@ section.course-content div.video-subtitles div.video-wrapper section.video-contr
color: #fff;
font: bold 12px "Open Sans", "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Geneva, Verdana, sans-serif;
margin-bottom: 6px;
margin-right: 0;
padding: 4px;
text-align: center;
-webkit-font-smoothing: antialiased;
......@@ -3045,22 +3179,11 @@ section.course-content div.video-subtitles div.video-wrapper section.video-contr
section.course-content div.video-subtitles div.video-wrapper section.video-controls div#slider a.ui-slider-handle:focus, section.course-content div.video-subtitles div.video-wrapper section.video-controls div#slider a.ui-slider-handle:hover {
background-color: #bf4040;
outline: none; }
section.course-content div.video-subtitles div.video-wrapper section.video-controls div#slider:hover {
height: 14px;
margin-top: -7px; }
section.course-content div.video-subtitles div.video-wrapper section.video-controls div#slider:hover a.ui-slider-handle {
-webkit-border-radius: 20px;
-moz-border-radius: 20px;
-ms-border-radius: 20px;
-o-border-radius: 20px;
border-radius: 20px;
height: 20px;
margin-left: -10px;
top: -4px;
width: 20px; }
section.course-content div.video-subtitles div.video-wrapper section.video-controls ul.vcr {
float: left;
margin-right: 22.652px; }
margin-right: 22.652px;
list-style: none;
padding: 0; }
section.course-content div.video-subtitles div.video-wrapper section.video-controls ul.vcr li {
float: left;
margin-bottom: 0; }
......@@ -3072,8 +3195,8 @@ section.course-content div.video-subtitles div.video-wrapper section.video-contr
border-right: 1px solid #000;
display: block;
cursor: pointer;
height: 14px;
padding: 16.989px;
line-height: 46px;
padding: 0 16.989px;
text-indent: -9999px;
width: 14px;
-webkit-transition-property: all;
......@@ -3112,15 +3235,21 @@ section.course-content div.video-subtitles div.video-wrapper section.video-contr
section.course-content div.video-subtitles div.video-wrapper section.video-controls div.secondary-controls {
float: right; }
section.course-content div.video-subtitles div.video-wrapper section.video-controls div.secondary-controls div.speeds {
float: left; }
section.course-content div.video-subtitles div.video-wrapper section.video-controls div.secondary-controls div.speeds a {
background: url("/static/images/closed-arrow.png") 10px center no-repeat;
border-left: 1px solid #000;
border-right: 1px solid #000;
display: block;
-webkit-box-shadow: 1px 0 0 #555555, inset 1px 0 0 #555555;
-moz-box-shadow: 1px 0 0 #555555, inset 1px 0 0 #555555;
box-shadow: 1px 0 0 #555555, inset 1px 0 0 #555555;
float: left;
line-height: 0;
padding-right: 5.663px;
zoom: 1;
cursor: pointer;
line-height: 46px;
margin-right: 0;
padding-left: 15px;
position: relative;
-webkit-transition-property: all;
-moz-transition-property: all;
-ms-transition-property: all;
......@@ -3141,67 +3270,100 @@ section.course-content div.video-subtitles div.video-wrapper section.video-contr
-ms-transition-delay: 0;
-o-transition-delay: 0;
transition-delay: 0;
cursor: pointer;
-webkit-font-smoothing: antialiased; }
section.course-content div.video-subtitles div.video-wrapper section.video-controls div.secondary-controls div.speeds h3, section.course-content div.video-subtitles div.video-wrapper section.video-controls div.secondary-controls div.speeds div#wiki_panel input[type="button"], div#wiki_panel section.course-content div.video-subtitles div.video-wrapper section.video-controls div.secondary-controls div.speeds input[type="button"] {
float: left;
padding: 0 5.663px 0 11.326px;
font-weight: normal;
text-transform: uppercase;
-webkit-font-smoothing: antialiased;
width: 110px;
color: #fff; }
section.course-content div.video-subtitles div.video-wrapper section.video-controls div.secondary-controls div.speeds a:before, section.course-content div.video-subtitles div.video-wrapper section.video-controls div.secondary-controls div.speeds a:after {
content: "";
display: table; }
section.course-content div.video-subtitles div.video-wrapper section.video-controls div.secondary-controls div.speeds a:after {
clear: both; }
section.course-content div.video-subtitles div.video-wrapper section.video-controls div.secondary-controls div.speeds a.open {
background: url("/static/images/open-arrow.png") 10px center no-repeat; }
section.course-content div.video-subtitles div.video-wrapper section.video-controls div.secondary-controls div.speeds a.open ol#video_speeds {
opacity: 1;
display: block; }
section.course-content div.video-subtitles div.video-wrapper section.video-controls div.secondary-controls div.speeds a h3, section.course-content div.video-subtitles div.video-wrapper section.video-controls div.secondary-controls div.speeds a div#wiki_panel input[type="button"], div#wiki_panel section.course-content div.video-subtitles div.video-wrapper section.video-controls div.secondary-controls div.speeds a input[type="button"] {
color: #999;
font-size: 12px;
font-weight: normal;
float: left;
letter-spacing: 1px;
color: #999;
line-height: 46px; }
section.course-content div.video-subtitles div.video-wrapper section.video-controls div.secondary-controls div.speeds p.active {
display: -moz-inline-box;
-moz-box-orient: vertical;
display: inline-block;
vertical-align: baseline;
zoom: 1;
*display: inline;
*vertical-align: auto;
padding: 0 11.326px 0 0;
margin-bottom: 0;
padding: 0 5.663px 0 11.326px;
text-transform: uppercase; }
section.course-content div.video-subtitles div.video-wrapper section.video-controls div.secondary-controls div.speeds a p.active {
font-weight: bold;
display: none; }
section.course-content div.video-subtitles div.video-wrapper section.video-controls div.secondary-controls div.speeds ol#video_speeds {
display: -moz-inline-box;
-moz-box-orient: vertical;
display: inline-block;
vertical-align: baseline;
zoom: 1;
*display: inline;
*vertical-align: auto; }
section.course-content div.video-subtitles div.video-wrapper section.video-controls div.secondary-controls div.speeds ol#video_speeds li {
float: left;
margin-bottom: 0;
padding: 0 11.326px 0 0; }
section.course-content div.video-subtitles div.video-wrapper section.video-controls div.secondary-controls div.speeds a ol#video_speeds {
background-color: #444;
border: 1px solid #000;
-webkit-box-shadow: inset 1px 0 0 #555555, 0 3px 0 #444444;
-moz-box-shadow: inset 1px 0 0 #555555, 0 3px 0 #444444;
box-shadow: inset 1px 0 0 #555555, 0 3px 0 #444444;
left: -1px;
display: none;
position: absolute;
top: 0;
width: 100%;
z-index: 10;
-webkit-transition-property: all;
-moz-transition-property: all;
-ms-transition-property: all;
-o-transition-property: all;
transition-property: all;
-webkit-transition-duration: 0.15s;
-moz-transition-duration: 0.15s;
-ms-transition-duration: 0.15s;
-o-transition-duration: 0.15s;
transition-duration: 0.15s;
-webkit-transition-timing-function: ease-out;
-moz-transition-timing-function: ease-out;
-ms-transition-timing-function: ease-out;
-o-transition-timing-function: ease-out;
transition-timing-function: ease-out;
-webkit-transition-delay: 0;
-moz-transition-delay: 0;
-ms-transition-delay: 0;
-o-transition-delay: 0;
transition-delay: 0;
opacity: 0; }
section.course-content div.video-subtitles div.video-wrapper section.video-controls div.secondary-controls div.speeds a ol#video_speeds li {
border-bottom: 1px solid #000;
-webkit-box-shadow: 0 1px 0 #555555;
-moz-box-shadow: 0 1px 0 #555555;
box-shadow: 0 1px 0 #555555;
color: #fff;
cursor: pointer;
padding: 0 5.663px;
line-height: 46px; }
section.course-content div.video-subtitles div.video-wrapper section.video-controls div.secondary-controls div.speeds ol#video_speeds li.active {
padding: 0 11.326px; }
section.course-content div.video-subtitles div.video-wrapper section.video-controls div.secondary-controls div.speeds a ol#video_speeds li.active {
font-weight: bold; }
section.course-content div.video-subtitles div.video-wrapper section.video-controls div.secondary-controls div.speeds ol#video_speeds li:last-child {
section.course-content div.video-subtitles div.video-wrapper section.video-controls div.secondary-controls div.speeds a ol#video_speeds li:last-child {
border-bottom: 0;
margin-top: 0;
-webkit-box-shadow: none;
-moz-box-shadow: none;
box-shadow: none; }
section.course-content div.video-subtitles div.video-wrapper section.video-controls div.secondary-controls div.speeds ol#video_speeds li:hover {
section.course-content div.video-subtitles div.video-wrapper section.video-controls div.secondary-controls div.speeds a ol#video_speeds li:hover {
color: #aaa;
background-color: #666; }
section.course-content div.video-subtitles div.video-wrapper section.video-controls div.secondary-controls div.speeds a:hover {
opacity: 1;
background-color: #444; }
section.course-content div.video-subtitles div.video-wrapper section.video-controls div.secondary-controls div.speeds:hover {
opacity: 1; }
section.course-content div.video-subtitles div.video-wrapper section.video-controls div.secondary-controls a.hide-subtitles {
float: left;
display: block;
padding: 0 11.326px;
margin-left: 0;
section.course-content div.video-subtitles div.video-wrapper section.video-controls div.secondary-controls a.add-fullscreen {
background: url(/static/images/fullscreen.png) center no-repeat;
border-right: 1px solid #000;
-webkit-box-shadow: 1px 0 0 #555555, inset 1px 0 0 #555555;
-moz-box-shadow: 1px 0 0 #555555, inset 1px 0 0 #555555;
box-shadow: 1px 0 0 #555555, inset 1px 0 0 #555555;
color: #797979;
display: block;
float: left;
line-height: 46px;
width: 30px;
margin-left: 0;
padding: 0 11.326px;
text-indent: -9999px;
font-weight: 800;
background: url("/static/images/cc.png") center no-repeat;
-webkit-font-smoothing: antialiased;
-webkit-transition-property: all;
-moz-transition-property: all;
-ms-transition-property: all;
......@@ -3222,18 +3384,23 @@ section.course-content div.video-subtitles div.video-wrapper section.video-contr
-ms-transition-delay: 0;
-o-transition-delay: 0;
transition-delay: 0;
opacity: 1;
position: relative; }
section.course-content div.video-subtitles div.video-wrapper section.video-controls div.secondary-controls a.hide-subtitles:after {
text-indent: 0;
position: absolute;
top: 0;
right: -40px;
content: "turn off";
width: 30px; }
section.course-content div.video-subtitles div.video-wrapper section.video-controls div.secondary-controls a.add-fullscreen:hover {
color: #fff;
text-decoration: none;
background-color: #444; }
section.course-content div.video-subtitles div.video-wrapper section.video-controls div.secondary-controls a.hide-subtitles {
float: left;
display: block;
width: 70px;
opacity: 0;
visibility: hidden;
padding: 0 11.326px;
margin-left: 0;
color: #797979;
line-height: 46px;
width: 30px;
text-indent: -9999px;
font-weight: 800;
background: url("/static/images/cc.png") center no-repeat;
-webkit-font-smoothing: antialiased;
-webkit-transition-property: all;
-moz-transition-property: all;
-ms-transition-property: all;
......@@ -3253,21 +3420,30 @@ section.course-content div.video-subtitles div.video-wrapper section.video-contr
-moz-transition-delay: 0;
-ms-transition-delay: 0;
-o-transition-delay: 0;
transition-delay: 0; }
transition-delay: 0;
opacity: 1;
position: relative; }
section.course-content div.video-subtitles div.video-wrapper section.video-controls div.secondary-controls a.hide-subtitles:hover {
color: #fff;
text-decoration: none;
background-color: #444;
padding-right: 80px;
background-position: 11px center; }
section.course-content div.video-subtitles div.video-wrapper section.video-controls div.secondary-controls a.hide-subtitles:hover:after {
right: 0;
opacity: 1;
visibility: visible; }
background-color: #444; }
section.course-content div.video-subtitles div.video-wrapper section.video-controls div.secondary-controls a.hide-subtitles.off {
opacity: .7; }
section.course-content div.video-subtitles div.video-wrapper section.video-controls div.secondary-controls a.hide-subtitles.off:after {
content: "turn on"; }
section.course-content div.video-subtitles div.video-wrapper:hover section.video-controls ul, section.course-content div.video-subtitles div.video-wrapper:hover section.video-controls div {
opacity: 1; }
section.course-content div.video-subtitles div.video-wrapper:hover section.video-controls div#slider {
height: 14px;
margin-top: -7px; }
section.course-content div.video-subtitles div.video-wrapper:hover section.video-controls div#slider a.ui-slider-handle {
-webkit-border-radius: 20px;
-moz-border-radius: 20px;
-ms-border-radius: 20px;
-o-border-radius: 20px;
border-radius: 20px;
height: 20px;
margin-left: -10px;
top: -4px;
width: 20px; }
section.course-content div.video-subtitles ol.subtitles {
float: left;
width: 31.522%;
......@@ -3314,6 +3490,94 @@ section.course-content div.video-subtitles.closed div.video-wrapper {
section.course-content div.video-subtitles.closed ol.subtitles {
width: 0px;
height: 0; }
section.course-content div.video-subtitles.fullscreen {
background: rgba(0, 0, 0, 0.95);
border: 0;
margin: 0;
bottom: 0;
height: 100%;
left: 0;
max-height: 100%;
padding: 0;
position: fixed;
top: 0;
width: 100%;
z-index: 999;
overflow: hidden; }
section.course-content div.video-subtitles.fullscreen.closed ol.subtitles {
width: auto;
height: auto;
right: -31.984%; }
section.course-content div.video-subtitles.fullscreen a.exit {
position: absolute;
top: 20px;
left: 20px;
color: #aaa;
text-transform: uppercase;
letter-spacing: 1px;
font-style: 12px;
display: none; }
section.course-content div.video-subtitles.fullscreen a.exit::after {
content: "✖";
display: -moz-inline-box;
-moz-box-orient: vertical;
display: inline-block;
vertical-align: baseline;
zoom: 1;
*display: inline;
*vertical-align: auto;
padding-left: 6px; }
section.course-content div.video-subtitles.fullscreen a.exit:hover {
color: #993333; }
section.course-content div.video-subtitles.fullscreen div.tc-wrapper div.video-wrapper {
width: 100%; }
section.course-content div.video-subtitles.fullscreen div.tc-wrapper object#myytplayer, section.course-content div.video-subtitles.fullscreen div.tc-wrapper iframe {
height: 100%;
position: fixed;
top: 0;
bottom: 0;
left: 0;
overflow: hidden; }
section.course-content div.video-subtitles.fullscreen div.tc-wrapper section.video-controls {
position: absolute;
bottom: 0;
left: 0;
width: 100%;
z-index: 9999; }
section.course-content div.video-subtitles.fullscreen ol.subtitles {
position: fixed;
top: 0;
right: 0;
bottom: 0;
height: 100%;
background: rgba(0, 0, 0, 0.8);
padding: 22.652px;
max-width: 23.482%;
max-height: 100%;
-webkit-transition-property: all;
-moz-transition-property: all;
-ms-transition-property: all;
-o-transition-property: all;
transition-property: all;
-webkit-transition-duration: 0.15s;
-moz-transition-duration: 0.15s;
-ms-transition-duration: 0.15s;
-o-transition-duration: 0.15s;
transition-duration: 0.15s;
-webkit-transition-timing-function: ease-out;
-moz-transition-timing-function: ease-out;
-ms-transition-timing-function: ease-out;
-o-transition-timing-function: ease-out;
transition-timing-function: ease-out;
-webkit-transition-delay: 0;
-moz-transition-delay: 0;
-ms-transition-delay: 0;
-o-transition-delay: 0;
transition-delay: 0; }
section.course-content div.video-subtitles.fullscreen ol.subtitles li {
color: #aaa; }
section.course-content div.video-subtitles.fullscreen ol.subtitles li.current {
color: #fff; }
div.course-wrapper.closed section.course-content div.video-subtitles ol.subtitles {
max-height: 577px; }
......@@ -3323,9 +3587,11 @@ nav.sequence-nav {
-moz-box-sizing: border-box;
box-sizing: border-box;
margin-bottom: 22.652px;
position: relative; }
position: relative;
top: -1px; }
nav.sequence-nav ol {
border-bottom: 1px solid #e4d080;
border-top: 1px solid #e4d080;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
......@@ -3469,6 +3735,7 @@ nav.sequence-nav ol li p::after {
width: 10px; }
nav.sequence-nav ul {
margin-right: 1px;
list-style: none !important;
position: absolute;
right: 0;
top: 0;
......@@ -3507,27 +3774,30 @@ nav.sequence-nav ul li.next a {
nav.sequence-nav ul li.next a:hover {
background-color: none; }
section.course-content div#seq_content {
margin-bottom: 60px; }
section.course-content nav.sequence-bottom {
bottom: -22.652px;
section.course-content {
position: relative; }
section.course-content nav.sequence-bottom {
margin: 45.304px 0 0;
text-align: center; }
section.course-content nav.sequence-bottom ul {
background-color: #f2e7bf;
background-color: #f2e7bf;
border: 1px solid #e4d080;
border-bottom: 0;
-webkit-border-radius: 3px 3px 0 0;
-moz-border-radius: 3px 3px 0 0;
-ms-border-radius: 3px 3px 0 0;
-o-border-radius: 3px 3px 0 0;
border-radius: 3px 3px 0 0;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
-ms-border-radius: 3px;
-o-border-radius: 3px;
border-radius: 3px;
-webkit-box-shadow: inset 0 0 0 1px #faf7e9;
-moz-box-shadow: inset 0 0 0 1px #faf7e9;
box-shadow: inset 0 0 0 1px #faf7e9;
margin: 0 auto;
overflow: hidden;
width: 106px; }
display: -moz-inline-box;
-moz-box-orient: vertical;
display: inline-block;
vertical-align: baseline;
zoom: 1;
*display: inline;
*vertical-align: auto; }
section.course-content nav.sequence-bottom ul li {
float: left; }
section.course-content nav.sequence-bottom ul li.prev, section.course-content nav.sequence-bottom ul li.next {
......@@ -3537,8 +3807,7 @@ section.course-content nav.sequence-bottom ul li.prev a, section.course-content
background-repeat: no-repeat;
border-bottom: none;
display: block;
display: block;
padding: 16.989px 4px;
padding: 11.326px 4px;
text-indent: -9999px;
-webkit-transition-property: all;
-moz-transition-property: all;
......@@ -3564,14 +3833,14 @@ section.course-content nav.sequence-bottom ul li.prev a, section.course-content
section.course-content nav.sequence-bottom ul li.prev a:hover, section.course-content nav.sequence-bottom ul li.next a:hover {
background-color: #eddfaa;
color: #7e691a;
color: #7e691a;
opacity: .5;
text-decoration: none; }
section.course-content nav.sequence-bottom ul li.prev a.disabled, section.course-content nav.sequence-bottom ul li.next a.disabled {
background-color: #fffffe;
opacity: .4; }
section.course-content nav.sequence-bottom ul li.prev a {
background-image: url("/static/images/sequence-nav/previous-icon.png"); }
background-image: url("/static/images/sequence-nav/previous-icon.png");
border-right: 1px solid #e4d080; }
section.course-content nav.sequence-bottom ul li.prev a:hover {
background-color: none; }
section.course-content nav.sequence-bottom ul li.next a {
......@@ -3579,64 +3848,313 @@ section.course-content nav.sequence-bottom ul li.next a {
section.course-content nav.sequence-bottom ul li.next a:hover {
background-color: none; }
div#graph-container {
border-top: 1px solid #ddd;
padding-top: 22.652px; }
div#graph-container canvas#graph {
width: 48.641%;
float: left;
margin-right: 2.717%; }
div#graph-container div.graph-controls {
width: 48.641%;
float: left; }
div#graph-container div.graph-controls select#musicTypeSelect {
display: block;
margin-bottom: 22.652px; }
div#graph-container div.graph-controls div#graph-output {
section.tool-wrapper {
background: #073642;
border-top: 1px solid #000203;
border-bottom: 1px solid #000203;
-webkit-box-shadow: inset 0 0 0 4px #084150;
-moz-box-shadow: inset 0 0 0 4px #084150;
box-shadow: inset 0 0 0 4px #084150;
margin: 22.652px -22.652px 0;
color: #839496;
display: table; }
section.tool-wrapper div#graph-container {
background: none;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
display: table-cell;
padding: 22.652px;
vertical-align: top;
width: 51.359%; }
section.tool-wrapper div#graph-container .ui-widget-content {
background: none;
border: none;
-webkit-border-radius: 0;
-moz-border-radius: 0;
-ms-border-radius: 0;
-o-border-radius: 0;
border-radius: 0; }
section.tool-wrapper div#graph-container canvas {
width: 100%; }
section.tool-wrapper div#graph-container ul.ui-tabs-nav {
background: #062e39;
margin: -22.652px -22.652px 0;
padding: 0;
position: relative;
width: 110%;
-webkit-border-radius: 0;
-moz-border-radius: 0;
-ms-border-radius: 0;
-o-border-radius: 0;
border-radius: 0;
border-bottom: 1px solid #03181d; }
section.tool-wrapper div#graph-container ul.ui-tabs-nav li {
margin-bottom: 0;
background: none;
color: #fff;
border: none;
-webkit-border-radius: 0;
-moz-border-radius: 0;
-ms-border-radius: 0;
-o-border-radius: 0;
border-radius: 0; }
section.tool-wrapper div#graph-container ul.ui-tabs-nav li.ui-tabs-selected {
border-right: 1px solid #03181d;
border-left: 1px solid #03181d;
background-color: #073642; }
section.tool-wrapper div#graph-container ul.ui-tabs-nav li.ui-tabs-selected:first-child {
border-left: none; }
section.tool-wrapper div#graph-container ul.ui-tabs-nav li.ui-tabs-selected a {
color: #eee8d5; }
section.tool-wrapper div#graph-container ul.ui-tabs-nav li a {
border: none;
font: bold 12px "Open Sans", "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Geneva, Verdana, sans-serif;
text-transform: uppercase;
letter-spacing: 1px;
color: #839496; }
section.tool-wrapper div#graph-container ul.ui-tabs-nav li a:hover {
color: #eee8d5; }
section.tool-wrapper div#controlls-container {
background: #062e39;
border-right: 1px solid #001317;
-webkit-box-shadow: 1px 0 0 #004355, inset 0 0 0 4px #06323d;
-moz-box-shadow: 1px 0 0 #004355, inset 0 0 0 4px #06323d;
box-shadow: 1px 0 0 #004355, inset 0 0 0 4px #06323d;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
display: table-cell;
padding: 22.652px;
vertical-align: top;
width: 48.641%; }
section.tool-wrapper div#controlls-container div.graph-controls div.music-wrapper {
padding: 0 0 22.652px;
margin-bottom: 22.652px;
border-bottom: 1px solid #021014;
-webkit-box-shadow: 0 1px 0 #083e4b;
-moz-box-shadow: 0 1px 0 #083e4b;
box-shadow: 0 1px 0 #083e4b; }
section.tool-wrapper div#controlls-container div.graph-controls div.music-wrapper input#playButton {
display: block;
margin-bottom: 22.652px; }
div#graph-container div.graph-controls div#graph-listen {
border: 1px solid #3d5962;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
-ms-border-radius: 3px;
-o-border-radius: 3px;
border-radius: 3px;
-webkit-box-shadow: inset 0 1px 0 0 #939da0;
-moz-box-shadow: inset 0 1px 0 0 #939da0;
box-shadow: inset 0 1px 0 0 #939da0;
color: white;
display: inline;
font-size: 11px;
font-weight: bold;
background-color: #637c84;
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #637c84), color-stop(100%, #43626b));
background-image: -webkit-linear-gradient(top, #637c84, #43626b);
background-image: -moz-linear-gradient(top, #637c84, #43626b);
background-image: -ms-linear-gradient(top, #637c84, #43626b);
background-image: -o-linear-gradient(top, #637c84, #43626b);
background-image: linear-gradient(top, #637c84, #43626b);
padding: 6px 18px 7px;
text-shadow: 0 1px 0 #31505a;
-webkit-background-clip: padding-box;
font: bold 14px "Open Sans", "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Geneva, Verdana, sans-serif;
border-color: #001317;
float: right; }
section.tool-wrapper div#controlls-container div.graph-controls div.music-wrapper input#playButton:hover {
-webkit-box-shadow: inset 0 1px 0 0 #778589;
-moz-box-shadow: inset 0 1px 0 0 #778589;
box-shadow: inset 0 1px 0 0 #778589;
cursor: pointer;
background-color: #5c6c71;
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #5c6c71), color-stop(100%, #3e5961));
background-image: -webkit-linear-gradient(top, #5c6c71, #3e5961);
background-image: -moz-linear-gradient(top, #5c6c71, #3e5961);
background-image: -ms-linear-gradient(top, #5c6c71, #3e5961);
background-image: -o-linear-gradient(top, #5c6c71, #3e5961);
background-image: linear-gradient(top, #5c6c71, #3e5961); }
section.tool-wrapper div#controlls-container div.graph-controls div.music-wrapper input#playButton:active {
border: 1px solid #3d5962;
-webkit-box-shadow: inset 0 0 8px 4px #395057, inset 0 0 8px 4px #395057, 0 1px 1px 0 #eeeeee;
-moz-box-shadow: inset 0 0 8px 4px #395057, inset 0 0 8px 4px #395057, 0 1px 1px 0 #eeeeee;
box-shadow: inset 0 0 8px 4px #395057, inset 0 0 8px 4px #395057, 0 1px 1px 0 #eeeeee; }
section.tool-wrapper div#controlls-container div.graph-controls div.music-wrapper input#playButton:active {
-webkit-box-shadow: none;
-moz-box-shadow: none;
box-shadow: none; }
section.tool-wrapper div#controlls-container div.graph-controls div.music-wrapper input#playButton[value="Stop"] {
border: 1px solid #030d15;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
-ms-border-radius: 3px;
-o-border-radius: 3px;
border-radius: 3px;
-webkit-box-shadow: inset 0 1px 0 0 #215f8a;
-moz-box-shadow: inset 0 1px 0 0 #215f8a;
box-shadow: inset 0 1px 0 0 #215f8a;
color: white;
display: inline;
font-size: 11px;
font-weight: bold;
background-color: #0f3550;
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #0f3550), color-stop(100%, #041623));
background-image: -webkit-linear-gradient(top, #0f3550, #041623);
background-image: -moz-linear-gradient(top, #0f3550, #041623);
background-image: -ms-linear-gradient(top, #0f3550, #041623);
background-image: -o-linear-gradient(top, #0f3550, #041623);
background-image: linear-gradient(top, #0f3550, #041623);
padding: 6px 18px 7px;
text-shadow: 0 1px 0 #000203;
-webkit-background-clip: padding-box;
font: bold 14px "Open Sans", "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Geneva, Verdana, sans-serif; }
section.tool-wrapper div#controlls-container div.graph-controls div.music-wrapper input#playButton[value="Stop"]:hover {
-webkit-box-shadow: inset 0 1px 0 0 #174362;
-moz-box-shadow: inset 0 1px 0 0 #174362;
box-shadow: inset 0 1px 0 0 #174362;
cursor: pointer;
background-color: #0c2739;
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #0c2739), color-stop(100%, #030d15));
background-image: -webkit-linear-gradient(top, #0c2739, #030d15);
background-image: -moz-linear-gradient(top, #0c2739, #030d15);
background-image: -ms-linear-gradient(top, #0c2739, #030d15);
background-image: -o-linear-gradient(top, #0c2739, #030d15);
background-image: linear-gradient(top, #0c2739, #030d15); }
section.tool-wrapper div#controlls-container div.graph-controls div.music-wrapper input#playButton[value="Stop"]:active {
border: 1px solid #030d15;
-webkit-box-shadow: inset 0 0 8px 4px #010507, inset 0 0 8px 4px #010507, 0 1px 1px 0 #eeeeee;
-moz-box-shadow: inset 0 0 8px 4px #010507, inset 0 0 8px 4px #010507, 0 1px 1px 0 #eeeeee;
box-shadow: inset 0 0 8px 4px #010507, inset 0 0 8px 4px #010507, 0 1px 1px 0 #eeeeee; }
section.tool-wrapper div#controlls-container div.graph-controls div.music-wrapper input#playButton[value="Stop"]:active {
-webkit-box-shadow: none;
-moz-box-shadow: none;
box-shadow: none; }
section.tool-wrapper div#controlls-container div.graph-controls div.inputs-wrapper {
zoom: 1;
margin-bottom: 22.652px;
padding: 0 0 22.652px;
margin-bottom: 22.652px;
border-bottom: 1px solid #021014;
-webkit-box-shadow: 0 1px 0 #083e4b;
-moz-box-shadow: 0 1px 0 #083e4b;
box-shadow: 0 1px 0 #083e4b; }
section.tool-wrapper div#controlls-container div.graph-controls div.inputs-wrapper:before, section.tool-wrapper div#controlls-container div.graph-controls div.inputs-wrapper:after {
content: "";
display: table; }
section.tool-wrapper div#controlls-container div.graph-controls div.inputs-wrapper:after {
clear: both; }
section.tool-wrapper div#controlls-container div.graph-controls p {
display: -moz-inline-box;
-moz-box-orient: vertical;
display: inline-block;
vertical-align: baseline;
zoom: 1;
*display: inline;
*vertical-align: auto;
margin: 0;
-webkit-font-smoothing: antialiased;
font-weight: bold;
text-shadow: 0 -1px 0 #021014; }
section.tool-wrapper div#controlls-container div.graph-controls ul {
display: -moz-inline-box;
-moz-box-orient: vertical;
display: inline-block;
vertical-align: baseline;
zoom: 1;
*display: inline;
*vertical-align: auto;
margin-bottom: 0; }
section.tool-wrapper div#controlls-container div.graph-controls ul li {
display: -moz-inline-box;
-moz-box-orient: vertical;
display: inline-block;
vertical-align: baseline;
zoom: 1;
*display: inline;
*vertical-align: auto;
margin-bottom: 0; }
section.tool-wrapper div#controlls-container div.graph-controls ul li input {
margin-right: 5px; }
section.tool-wrapper div#controlls-container div.graph-controls div#graph-listen {
margin-top: 8px;
margin-right: 20px;
display: block;
margin-bottom: 22.652px; }
div#graph-container div.graph-controls p {
margin-bottom: 11.326px; }
div#graph-container div.graph-controls div#label {
display: inline-block; }
div#graph-container div.graph-controls input#playButton {
display: block; }
div#schematic-container canvas {
width: 48.641%;
text-align: right;
float: left;
margin-right: 2.717%; }
div#schematic-container div.schematic-sliders {
width: 48.641%;
float: left; }
div#schematic-container div.schematic-sliders div.slider-label#vs {
margin-top: 45.304px; }
div#schematic-container div.schematic-sliders div.slider-label {
margin-bottom: 11.326px; }
div#schematic-container div.schematic-sliders div.slider {
margin-bottom: 22.652px; }
div.graph-controls label, div#graph-listen label {
margin-bottom: 0; }
section.tool-wrapper div#controlls-container label {
-webkit-border-radius: 2px;
-moz-border-radius: 2px;
-ms-border-radius: 2px;
-o-border-radius: 2px;
border-radius: 2px;
font-weight: bold;
padding: 3px; }
div.graph-controls label[for="vinCheckbox"], div.graph-controls label[for="vinRadioButton"], div#graph-listen label[for="vinCheckbox"], div#graph-listen label[for="vinRadioButton"] {
color: #fff;
padding: 3px;
-webkit-font-smoothing: antialiased; }
section.tool-wrapper div#controlls-container label[for="vinCheckbox"], section.tool-wrapper div#controlls-container label[for="vinRadioButton"] {
color: #409fbf; }
div.graph-controls label[for="voutCheckbox"], div.graph-controls label[for="voutRadioButton"], div#graph-listen label[for="voutCheckbox"], div#graph-listen label[for="voutRadioButton"] {
section.tool-wrapper div#controlls-container label[for="voutCheckbox"], section.tool-wrapper div#controlls-container label[for="voutRadioButton"] {
color: #e1a600; }
div.graph-controls label[for="vrCheckbox"], div.graph-controls label[for="vrRadioButton"], div#graph-listen label[for="vrCheckbox"], div#graph-listen label[for="vrRadioButton"] {
section.tool-wrapper div#controlls-container label[for="vrCheckbox"], section.tool-wrapper div#controlls-container label[for="vrRadioButton"] {
color: #49c944; }
div.graph-controls label[for="vcCheckbox"], div.graph-controls label[for="vcRadioButton"], div#graph-listen label[for="vcCheckbox"], div#graph-listen label[for="vcRadioButton"] {
section.tool-wrapper div#controlls-container label[for="vcCheckbox"], section.tool-wrapper div#controlls-container label[for="vcRadioButton"] {
color: #e1a600; }
div.graph-controls label[for="vlCheckbox"], div.graph-controls label[for="vlRadioButton"], div#graph-listen label[for="vlCheckbox"], div#graph-listen label[for="vlRadioButton"] {
section.tool-wrapper div#controlls-container label[for="vlCheckbox"], section.tool-wrapper div#controlls-container label[for="vlRadioButton"] {
color: #a26784; }
section.tool-wrapper div#controlls-container div.schematic-sliders div.top-sliders {
padding: 0 0 22.652px;
margin-bottom: 22.652px;
border-bottom: 1px solid #021014;
-webkit-box-shadow: 0 1px 0 #083e4b;
-moz-box-shadow: 0 1px 0 #083e4b;
box-shadow: 0 1px 0 #083e4b; }
section.tool-wrapper div#controlls-container div.schematic-sliders div.top-sliders select#musicTypeSelect {
display: -moz-inline-box;
-moz-box-orient: vertical;
display: inline-block;
vertical-align: baseline;
zoom: 1;
*display: inline;
*vertical-align: auto;
font: 16px "Open Sans", "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Geneva, Verdana, sans-serif;
margin-bottom: 0; }
section.tool-wrapper div#controlls-container div.schematic-sliders div.top-sliders p {
display: -moz-inline-box;
-moz-box-orient: vertical;
display: inline-block;
vertical-align: baseline;
zoom: 1;
*display: inline;
*vertical-align: auto;
-webkit-font-smoothing: antialiased;
text-shadow: 0 -1px 0 #021014;
margin: 0 11.326px 22.652px 0;
font-weight: bold; }
section.tool-wrapper div#controlls-container div.schematic-sliders div.slider-label {
margin-bottom: 11.326px;
font-weight: bold;
text-shadow: 0 -1px 0 #021014;
-webkit-font-smoothing: antialiased; }
section.tool-wrapper div#controlls-container div.schematic-sliders div.slider {
margin-bottom: 22.652px; }
section.tool-wrapper div#controlls-container div.schematic-sliders div.slider.ui-slider-horizontal {
height: 0.4em;
background: #00232c;
border: 1px solid #000b0d;
-webkit-box-shadow: none;
-moz-box-shadow: none;
box-shadow: none; }
section.tool-wrapper div#controlls-container div.schematic-sliders div.slider .ui-slider-handle {
background: #637c84 url("/static/images/amplifier-slider-handle.png") center no-repeat;
border: 1px solid #000b0d;
-webkit-box-shadow: inset 0 1px 0 #8ba1a8;
-moz-box-shadow: inset 0 1px 0 #8ba1a8;
box-shadow: inset 0 1px 0 #8ba1a8;
margin-top: -0.3em; }
section.tool-wrapper div#controlls-container div.schematic-sliders div.slider .ui-slider-handle:hover, section.tool-wrapper div#controlls-container div.schematic-sliders div.slider .ui-slider-handle:active {
background-color: #6e8992; }
div.book-wrapper section.book-sidebar {
-webkit-box-sizing: border-box;
......
/* line 1, sass/marketing-ie.scss */
body {
margin: 0;
padding: 0; }
/* line 6, sass/marketing-ie.scss */
.wrapper, .subpage, section.copyright, section.tos, section.privacy-policy, section.honor-code, header.announcement div, section.index-content, footer {
margin: 0;
overflow: hidden; }
/* line 12, sass/marketing-ie.scss */
div#enroll form {
display: none; }
......@@ -671,6 +671,11 @@ section.index-content section.course h2 {
@media screen and (min-width: 500px) and (max-width: 781px) {
section.index-content section.course h2 {
padding-top: 207.104px; } }
section.index-content section.course div.announcement p.announcement-button a {
margin-top: 0; }
section.index-content section.course div.announcement img {
max-width: 100%;
margin-bottom: 25.888px; }
section.index-content section.about-course {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
......
/*
* jQuery UI Touch Punch 0.2.2
*
* Copyright 2011, Dave Furfero
* Dual licensed under the MIT or GPL Version 2 licenses.
*
* Depends:
* jquery.ui.widget.js
* jquery.ui.mouse.js
*/
(function(b){b.support.touch="ontouchend" in document;if(!b.support.touch){return;}var c=b.ui.mouse.prototype,e=c._mouseInit,a;function d(g,h){if(g.originalEvent.touches.length>1){return;}g.preventDefault();var i=g.originalEvent.changedTouches[0],f=document.createEvent("MouseEvents");f.initMouseEvent(h,true,true,window,1,i.screenX,i.screenY,i.clientX,i.clientY,false,false,false,false,0,null);g.target.dispatchEvent(f);}c._touchStart=function(g){var f=this;if(a||!f._mouseCapture(g.originalEvent.changedTouches[0])){return;}a=true;f._touchMoved=false;d(g,"mouseover");d(g,"mousemove");d(g,"mousedown");};c._touchMove=function(f){if(!a){return;}this._touchMoved=true;d(f,"mousemove");};c._touchEnd=function(f){if(!a){return;}d(f,"mouseup");d(f,"mouseout");if(!this._touchMoved){d(f,"click");}a=false;};c._mouseInit=function(){var f=this;f.element.bind("touchstart",b.proxy(f,"_touchStart")).bind("touchmove",b.proxy(f,"_touchMove")).bind("touchend",b.proxy(f,"_touchEnd"));e.call(f);};})(jQuery);
\ No newline at end of file
mathjax-MathJax-c9db6ac/
\ No newline at end of file
......@@ -7,21 +7,12 @@
<ul>
% for section in chapter['sections']:
<li
% if 'active' in section and section['active']:
class="active"
% endif
>
<li${' class="active"' if 'active' in section and section['active'] else ''}>
<a href="${reverse('courseware_section', args=format_url_params([course_name, chapter['name'], section['name']]))}">
<p>${section['name']}</p>
<p class="subtitle">
${section['format']}
% if 'due' in section and section['due']!="":
due ${section['due']}
% endif
${section['format']} ${"due " + section['due'] if 'due' in section and section['due'] != '' else ''}
</p>
</a>
% endfor
......
<%inherit file="main.html" />
<%block name="bodyclass">courseware</%block>
<%block name="title"><title>Courseware – MITx 6.002x</title></%block>
<%block name="js_extra">
......
......@@ -6,9 +6,7 @@
<p class="ie-warning"> Enrollment requires a modern web browser with JavaScript enabled. You don't have this. You can&rsquo;t enroll without upgrading, since you couldn&rsquo;t take the course without upgrading. Feel free to download the latest version of <a href="http://www.mozilla.org/en-US/firefox/new/">Mozilla Firefox</a> or <a href="http://support.google.com/chrome/bin/answer.py?hl=en&answer=95346">Google Chrome</a>, for free, to enroll and take this course.</p>
<![endif]-->
<p class="disclaimer">
Please note that 6.002x has already started.
Several assignment due dates for 6.002x have already passed. It is now impossible for newly enrolled students to get 100% of the points in the course, although new students can still earn points for assignments whose due dates have not passed, and students have access to all of the course material that has been released for the course.
</p>
Please note that 6.002x has now passed its half-way point. The midterm exam and several assignment due dates for 6.002x have already passed. It is now impossible for newly enrolled students to earn a passing grade and a completion certificate for the course. However, new students have access to all of the course material that has been released for the course, so you are welcome to enroll and browse the course. </p>
<form name="enroll" id="enroll_form" method="get">
<fieldset><% if 'error' in locals(): e = error %>
......
MITx's prototype offering, 6.002x, is now open. To log in, visit
MITx's prototype offering, 6.002x, is open. To log in, visit
% if is_secure:
https://6002x.mitx.mit.edu
......@@ -16,7 +16,7 @@ place to reset it.
Once you log in, we recommend that you start the course by reviewing
the "System Usage Sequence" in the Overview section, and the "6.002x
At-a-Glance (Calendar)" handout under the Course Info tab. After you
familiarize yourself with the various features of the MITx platform,
familiarize yourself with the features of the MITx platform,
you can jump right into the coursework by working on "Administrivia
and Circuit Elements", the first Lecture Sequence in Week 1.
......
......@@ -11,7 +11,7 @@
<h2>6.002x</h2>
<a class="enroll" rel="leanModal" href="#enroll"><noscript>In order to</noscript> Enroll in 6.002x Circuits <span>&amp;</span> Electronics <noscript>you need to have javascript enabled</noscript></a>
</section>
<p>6.002x (Circuits and Electronics) is an experimental on-line adaptation of MIT&rsquo;s first undergraduate analog design course: 6.002. This course will run, free of charge, for students worldwide from March 5, 2012 through June 8, 2012.</p>
<p>6.002x (Circuits and Electronics) is an experimental on-line adaptation of MIT&rsquo;s first undergraduate analog design course: 6.002. This course is running, free of charge, for students worldwide from March 5, 2012 through June 8, 2012.</p>
</section>
</%block>
......
......@@ -4,7 +4,7 @@
<%block name="title"><title>MITx 6.002x</title></%block>
<link rel="stylesheet" href="${ settings.LIB_URL }jquery.treeview.css" type="text/css" media="all" />
<link rel="stylesheet" href="/static/css/application.css" type="text/css" media="all" />
<link rel="stylesheet" href="/static/css/application.css?v4" type="text/css" media="all" />
<script type="text/javascript" src="${ settings.LIB_URL }jquery-1.6.2.min.js"></script>
<script type="text/javascript" src="${ settings.LIB_URL }jquery-ui-1.8.16.custom.min.js"></script>
......@@ -26,7 +26,7 @@
<script type="text/javascript" src="${ settings.LIB_URL }mathjax-MathJax-c9db6ac/MathJax.js?config=TeX-AMS_HTML-full"></script>
</head>
<body class="<%block name="bodyclass"/>">
<body class="<%block name='bodyclass'/>">
<!--[if lte IE 9]>
<p class="ie-warning">You are using a browser that is not supported by <em>MITx</em>, and you might not be able to complete pieces of the course. Please download the latest version of <a href="http://www.mozilla.org/en-US/firefox/new/">Firefox</a> or <a href="https://www.google.com/chrome">Chrome</a> to get the full experience.</p>
<![endif]-->
......@@ -127,15 +127,11 @@ $(function() {
$("#feedback_div").html("Feedback submitted. Thank you");
});
});
});
// Calculator
$(function() {
$("#calculator_wrapper").hide();
$(".calc").click(function(){
$("#calculator_wrapper").slideToggle("fast");
$("li.calc-main").toggleClass('open');
$("#calculator_wrapper #calculator_input").focus();
$(this).toggleClass("closed");
return false;
......@@ -156,10 +152,9 @@ $(function() {
$("#calculator_output").attr("value",data.result);
});
});
});
$(function(){
$("a[rel*=leanModal]").leanModal();
});
</script>
......
<!DOCTYPE html>
<html>
<head>
<title><%block name="title">MITx: MIT's new online learning initiative</%block></title>
<meta name="description" content="<%block name="description">MITx will offer a portfolio of MIT courses for free to a virtual community of learners around the world</%block>" />
<meta name="keywords" content="<%block name="keywords">MITx, online learning, MIT, online laboratory, education, learners, undergraduate, certificate</%block>" />
<!--link rel="stylesheet" href="${ settings.LIB_URL }jquery.treeview.css" type="text/css" media="all" /-->
<link rel="stylesheet" href="/static/css/marketing.css" type="text/css" media="all" />
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<!--[if lt IE 8]>
<link rel="stylesheet" href="/static/css/marketing-ie.css" type="text/css" media="all" />
<![endif]-->
<script type="text/javascript" src="${ settings.LIB_URL }jquery-1.6.2.min.js"></script>
<script type="text/javascript" src="${ settings.LIB_URL }jquery-ui-1.8.16.custom.min.js"></script>
<script type="text/javascript" src="/static/js/jquery.leanModal.min.js"></script>
<!--script type="text/javascript" src="${ settings.LIB_URL }swfobject/swfobject.js"></script-->
<!--script type="text/javascript" src="${ settings.LIB_URL }jquery.treeview.js"></script-->
<!--script type="text/javascript" src="/static/js/video_player.js"></script-->
<!-- <script type="text/javascript" src="/static/js/schematic.js"></script> -->
<script src="/static/js/html5shiv.js"></script>
<%block name="headextra"/>
<script type="text/javascript">
function getCookie(name) {
var cookieValue = null;
if (document.cookie && document.cookie != '') {
var cookies = document.cookie.split(';');
for (var i = 0; i < cookies.length; i++) {
var cookie = jQuery.trim(cookies[i]);
// Does this cookie string begin with the name we want?
if (cookie.substring(0, name.length + 1) == (name + '=')) {
cookieValue = decodeURIComponent(cookie.substring(name.length + 1));
break;
}
}
}
return cookieValue;
}
<head>
<title><%block name="title">MITx: MIT's new online learning initiative</%block></title>
<meta name="description" content="<%block name="description">MITx will offer a portfolio of MIT courses for free to a virtual community of learners around the world</%block>" />
<meta name="keywords" content="<%block name="keywords">MITx, online learning, MIT, online laboratory, education, learners, undergraduate, certificate</%block>" />
<!--link rel="stylesheet" href="${ settings.LIB_URL }jquery.treeview.css" type="text/css" media="all" /-->
<link rel="stylesheet" href="/static/css/marketing.css" type="text/css" media="all" />
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<!--[if lt IE 8]>
<link rel="stylesheet" href="/static/css/marketing-ie.css" type="text/css" media="all" />
<![endif]-->
<script type="text/javascript" src="${ settings.LIB_URL }jquery-1.6.2.min.js"></script>
<script type="text/javascript" src="${ settings.LIB_URL }jquery-ui-1.8.16.custom.min.js"></script>
<script type="text/javascript" src="/static/js/jquery.leanModal.min.js"></script>
<!--script type="text/javascript" src="${ settings.LIB_URL }swfobject/swfobject.js"></script-->
<!--script type="text/javascript" src="${ settings.LIB_URL }jquery.treeview.js"></script-->
<!--script type="text/javascript" src="/static/js/video_player.js"></script-->
<!-- <script type="text/javascript" src="/static/js/schematic.js"></script> -->
<script src="/static/js/html5shiv.js"></script>
<%block name="headextra"/>
<script type="text/javascript">
function getCookie(name) {
var cookieValue = null;
if (document.cookie && document.cookie != '') {
var cookies = document.cookie.split(';');
for (var i = 0; i < cookies.length; i++) {
var cookie = jQuery.trim(cookies[i]);
// Does this cookie string begin with the name we want?
if (cookie.substring(0, name.length + 1) == (name + '=')) {
cookieValue = decodeURIComponent(cookie.substring(name.length + 1));
break;
}
}
}
return cookieValue;
}
function postJSON(url, data, callback) {
$.ajax({type:'POST',
url: url,
dataType: 'json',
data: data,
success: callback,
headers : {'X-CSRFToken':getCookie('csrftoken')}
});
$.ajax({type:'POST',
url: url,
dataType: 'json',
data: data,
success: callback,
headers : {'X-CSRFToken':getCookie('csrftoken')}
});
}
</script>
......@@ -61,25 +61,25 @@ function postJSON(url, data, callback) {
<body>
<%block name="header">
<header class="announcement <%block name="header_class"/>">
<div class="anouncement-wrapper">
<div class="anouncement-wrapper">
<%block name="header_nav">
<nav>
<h1><a href="http://mitx.mit.edu/">MITx</a></h1>
% if settings.COURSEWARE_ENABLED:
<%block name="login_area">
<a rel="leanModal" class="login" href="#login">Log In</a>
</%block>
% endif
<h1><a href="http://mitx.mit.edu/">MITx</a></h1>
% if settings.COURSEWARE_ENABLED:
<%block name="login_area">
<a rel="leanModal" class="login" href="#login">Log In</a>
</%block>
% endif
</nav>
</%block>
<%block name="header_text">
<section>
<h1><em>MITx</em></h1>
<h2>MIT&rsquo;s new online learning initiative</h2>
</section>
</%block>
</div>
<section>
<h1><em>MITx</em></h1>
<h2>MIT&rsquo;s new online learning initiative</h2>
</section>
</%block>
</div>
</header>
</%block>
......@@ -87,95 +87,95 @@ function postJSON(url, data, callback) {
<%block name="bodyextra"/>
<footer>
<div class="footer-wrapper">
<p> Copyright &copy; 2012. MIT. <a href="/t/copyright.html">Some rights reserved.</a></p>
<ul>
<li><a href="/t/tos.html">Terms of Service</a></li>
<li><a href="/t/privacy.html">Privacy Policy</a></li>
<li><a href="/t/honor.html">Honor Code</a></li>
<li><a href="/t/mitx_help.html">Help</a></li>
</ul>
<ul class="social">
<li class="linkedin">
<a href="http://www.linkedin.com/groups/Friends-Alumni-MITx-4316538">Linked In</a>
</li>
<li class="twitter">
<a href="https://twitter.com/#!/MyMITx">Twitter</a>
</li>
<li class="facebook">
<a href="http://www.facebook.com/pages/MITx/378592442151504">Facebook</a>
</li>
</ul>
</div>
<div class="footer-wrapper">
<p> Copyright &copy; 2012. MIT. <a href="/t/copyright.html">Some rights reserved.</a></p>
<ul>
<li><a href="/t/tos.html">Terms of Service</a></li>
<li><a href="/t/privacy.html">Privacy Policy</a></li>
<li><a href="/t/honor.html">Honor Code</a></li>
<li><a href="/t/mitx_help.html">Help</a></li>
</ul>
<ul class="social">
<li class="linkedin">
<a href="http://www.linkedin.com/groups/Friends-Alumni-MITx-4316538">Linked In</a>
</li>
<li class="twitter">
<a href="https://twitter.com/#!/MyMITx">Twitter</a>
</li>
<li class="facebook">
<a href="http://www.facebook.com/pages/MITx/378592442151504">Facebook</a>
</li>
</ul>
</div>
</footer>
% if settings.COURSEWARE_ENABLED:
% if settings.COURSEWARE_ENABLED:
<div id="login" class="leanModal_box"><%include file="login.html" /></div>
% endif
% endif
<div id="pwd_reset" class="leanModal_box"><%include file="password_reset_form.html" /></div>
<div id="reset_done" class="leanModal_box"></div>
<script>
$(document).ready(function(){
/* Handles when the user tries to log in. Grabs form data. Does AJAX.
Either shows error, or redirects. */
$('form#login_form').submit(function(e) {
e.preventDefault();
var submit_data={};
$.each($("[id^=li_]"), function(index,value){
submit_data[value.name]=value.value;
});
submit_data["remember"] = ($('#remember').attr("checked")? true : false);
postJSON('/login',
submit_data,
function(json) {
if(json.success) {
location.href="/info";
} else if($('#login_error').length == 0) {
$('#login_form').prepend('<div id="login_error">Email or password is incorrect.</div>');
} else {
$('#login_error').stop().css("background-color", "#933").animate({ backgroundColor: "#333"}, 2000);
<script>
$(document).ready(function(){
/* Handles when the user tries to log in. Grabs form data. Does AJAX.
Either shows error, or redirects. */
$('form#login_form').submit(function(e) {
e.preventDefault();
var submit_data={};
$.each($("[id^=li_]"), function(index,value){
submit_data[value.name]=value.value;
});
submit_data["remember"] = ($('#remember').attr("checked")? true : false);
postJSON('/login',
submit_data,
function(json) {
if(json.success) {
location.href="/info";
} else if($('#login_error').length == 0) {
$('#login_form').prepend('<div id="login_error">Email or password is incorrect.</div>');
} else {
$('#login_error').stop().css("background-color", "#933").animate({ backgroundColor: "#333"}, 2000);
}
}
}
);
});
$('form#pwd_reset_form').submit(function(e) {
e.preventDefault();
var submit_data = {};
submit_data['email'] = $('#id_email').val();
postJSON('/password_reset/',
submit_data,
function(json){
if (json.success) {
$('#pwd_reset').html(json.value);
} else {
$('#pwd_error').html(json.error).stop().css("background-color", "#933").animate({ backgroundColor: "#333"}, 2000);
);
});
$('form#pwd_reset_form').submit(function(e) {
e.preventDefault();
var submit_data = {};
submit_data['email'] = $('#id_email').val();
postJSON('/password_reset/',
submit_data,
function(json){
if (json.success) {
$('#pwd_reset').html(json.value);
} else {
$('#pwd_error').html(json.error).stop().css("background-color", "#933").animate({ backgroundColor: "#333"}, 2000);
}
}
}
);
});
);
});
});
});
$(function(){
$("a[rel*=leanModal]").leanModal();
$(function(){
$("a[rel*=leanModal]").leanModal();
$("a.login").click(function(){
$("#login_form #li_email").focus();
$("a.login").click(function(){
$("#login_form #li_email").focus();
});
$("a.enroll").click(function(){
$("#enroll_form #ca_email").focus();
$("a.enroll").click(function(){
$("#enroll_form #ca_email").focus();
});
});
</script>
</script>
<%block name="js_extra"/>
<%block name="js_extra"/>
</body>
</html>
......@@ -8,7 +8,7 @@
<section class="intro">
<section class="intro-text">
<p><em>MITx</em> will offer a portfolio of MIT courses for free to a virtual community of learners around the world. It will also enhance the educational experience of its on-campus students, offering them online tools that supplement and enrich their classroom and laboratory experiences.</p>
<p>The first <em>MITx</em> course, 6.002x (Circuits and Electronics), will be launched in an experimental prototype form. Watch this space for further upcoming courses, which will become available in Fall 2012.</p>
<p>The first <em>MITx</em> course, 6.002x (Circuits and Electronics), was launched in an experimental prototype form. Watch this space for further upcoming courses, which will become available in Fall 2012.</p>
</section>
<section class="intro-video">
......@@ -33,17 +33,29 @@
</section>
<section class="course">
<hgroup>
<h1>Spring 2012 Course offering</h1>
<h2>Circuits and Electronics</h2>
<h3>6.002x</h3>
</hgroup>
<div class="announcement">
<h1> Announcement </h1>
<img src="/static/images/marketing/edx-logo.png" alt="" />
<p>
On May 2, it was announced that Harvard University will join MIT as a partner in edX. MITx, which offers online versions of MIT courses, will be a core offering of edX, as will Harvardx, a set of course offerings from Harvard.
</p>
<p class="announcement-button">
<a href="http://edxonline.org">Read more details here <span class="arrow">&#8227;</span></a>
</p>
</div>
<hgroup>
<h1>Spring 2012 Course offering</h1>
<h2>Circuits and Electronics</h2>
<h3>6.002x</h3>
</hgroup>
<p>
<a href="http://6002x.mitx.mit.edu/" class="more-info">More information <span>&amp;</span> Enroll <span class="arrow">&#8227;</span></a>
</p>
<p>Taught by Anant Agarwal, with Gerald Sussman and Piotr Mitros, 6.002x (Circuits and Electronics) is an on-line adaption of 6.002, MIT&rsquo;s first undergraduate analog design course. This prototype course will run, free of charge, for students worldwide from March 5, 2012 through June 8, 2012. Students will be given the opportunity to demonstrate their mastery of the material and earn a certificate from <em>MITx</em>.</p>
<p>Taught by Anant Agarwal, with Gerald Sussman and Piotr Mitros, 6.002x (Circuits and Electronics) is an on-line adaption of 6.002, MIT&rsquo;s first undergraduate analog design course. This prototype course is running, free of charge, for students worldwide from March 5, 2012 through June 8, 2012. Students are given the opportunity to demonstrate their mastery of the material and earn a certificate from <em>MITx</em>.</p>
</section>
</section>
......
......@@ -63,7 +63,7 @@ a {
p &, li > &, span > &, .inline {
border-bottom: 1px solid #bbb;
font-style: italic;
// font-style: italic;
}
&:hover, &:focus {
......
......@@ -2,7 +2,7 @@
// ---------------------------------------- //
// fonts
$body-font-family: "Open Sans", "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Geneva, Verdana, sans-serif;;
$body-font-family: "Open Sans", "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Geneva, Verdana, sans-serif;
$body-font-size: 14px;
// grid
......
// JM MOSFET AMPLIFIER
div#graph-container {
section.tool-wrapper {
background: #073642;
border-top: 1px solid darken(#002b36, 10%);
border-bottom: 1px solid darken(#002b36, 10%);
@include box-shadow(inset 0 0 0 4px darken(#094959, 2%));
margin: lh() (-(lh())) 0;
color: #839496;
@extend .clearfix;
border-top: 1px solid #ddd;
padding-top: lh(1.0);
canvas#graph {
width: flex-grid(4.5, 9);
float: left;
margin-right: flex-gutter(9);
}
div.graph-controls {
width: flex-grid(4.5, 9);
float: left;
select#musicTypeSelect {
display: block;
margin-bottom: lh();
display: table;
div#graph-container {
background: none;
@include box-sizing(border-box);
display: table-cell;
padding: lh();
vertical-align: top;
width: flex-grid(4.5, 9) + flex-gutter(9);
.ui-widget-content {
background: none;
border: none;
@include border-radius(0);
}
div#graph-output {
display: block;
margin-bottom: lh();
canvas {
width: 100%;
}
div#graph-listen {
display: block;
margin-bottom: lh();
ul.ui-tabs-nav {
background: darken(#073642, 2%);
margin: (-(lh())) (-(lh())) 0;
padding: 0;
position: relative;
width: 110%;
@include border-radius(0);
border-bottom: 1px solid darken(#073642, 8%);
li {
margin-bottom: 0;
background: none;
color: #fff;
border: none;
@include border-radius(0);
&.ui-tabs-selected {
border-right: 1px solid darken(#073642, 8%);
border-left: 1px solid darken(#073642, 8%);
background-color: #073642;
&:first-child {
border-left: none;
}
a {
color: #eee8d5;
}
}
a {
border: none;
font: bold 12px $body-font-family;
text-transform: uppercase;
letter-spacing: 1px;
color: #839496;
&:hover {
color: #eee8d5;
}
}
}
}
}
p {
margin-bottom: lh(.5);
}
div#controlls-container {
@extend .clearfix;
background: darken(#073642, 2%);
border-right: 1px solid darken(#002b36, 6%);
@include box-shadow(1px 0 0 lighten(#002b36, 6%), inset 0 0 0 4px darken(#094959, 6%));
@include box-sizing(border-box);
display: table-cell;
padding: lh();
vertical-align: top;
width: flex-grid(4.5, 9);
div#label {
display: inline-block;
div.graph-controls {
div.music-wrapper {
padding: 0 0 lh();
margin-bottom: lh();
border-bottom: 1px solid darken(#073642, 10%);
@include box-shadow(0 1px 0 lighten(#073642, 2%));
@extend .clearfix;
input#playButton {
display: block;
@include button(simple, lighten( #586e75, 5% ));
font: bold 14px $body-font-family;
border-color: darken(#002b36, 6%);
float: right;
&:active {
@include box-shadow(none);
}
&[value="Stop"] {
@include button(simple, darken(#268bd2, 30%));
font: bold 14px $body-font-family;
&:active {
@include box-shadow(none);
}
}
}
}
div.inputs-wrapper {
@include clearfix;
margin-bottom: lh();
padding: 0 0 lh();
margin-bottom: lh();
border-bottom: 1px solid darken(#073642, 10%);
@include box-shadow(0 1px 0 lighten(#073642, 2%));
@extend .clearfix;
}
p {
@include inline-block();
margin: 0;
-webkit-font-smoothing: antialiased;
font-weight: bold;
text-shadow: 0 -1px 0 darken(#073642, 10%);
}
ul {
@include inline-block();
margin-bottom: 0;
li {
@include inline-block();
margin-bottom: 0;
input {
margin-right: 5px;
}
}
}
div#graph-listen {
margin-top: 8px;
margin-right: 20px;
display: block;
text-align: right;
float: left;
margin-bottom: 0;
}
}
input#playButton {
display: block;
label {
@include border-radius(2px);
font-weight: bold;
color: #fff;
padding: 3px;
-webkit-font-smoothing: antialiased;
}
}
}
div#schematic-container {
@extend .clearfix;
//MOSFET AMPLIFIER
label[for="vinCheckbox"], label[for="vinRadioButton"]{
color: desaturate(#00bfff, 50%);
}
canvas {
width: flex-grid(4.5, 9);
float: left;
margin-right: flex-gutter(9);
}
label[for="voutCheckbox"], label[for="voutRadioButton"]{
color: darken(#ffcf48, 20%);
}
div.schematic-sliders {
width: flex-grid(4.5, 9);
float: left;
label[for="vrCheckbox"], label[for="vrRadioButton"]{
color: desaturate(#1df914, 40%);
}
div.slider-label#vs {
margin-top: lh(2.0);
//RC Filters
label[for="vcCheckbox"], label[for="vcRadioButton"]{
color: darken(#ffcf48, 20%);
}
div.slider-label {
margin-bottom: lh(0.5);
//RLC Series
label[for="vlCheckbox"], label[for="vlRadioButton"]{
color: desaturate(#d33682, 40%);
}
div.slider {
margin-bottom: lh(1);
div.schematic-sliders {
div.top-sliders {
padding: 0 0 lh();
margin-bottom: lh();
border-bottom: 1px solid darken(#073642, 10%);
@include box-shadow(0 1px 0 lighten(#073642, 2%));
@extend .clearfix;
select#musicTypeSelect {
@include inline-block();
font: 16px $body-font-family;
margin-bottom: 0;
}
p {
@include inline-block();
-webkit-font-smoothing: antialiased;
text-shadow: 0 -1px 0 darken(#073642, 10%);
margin: 0 lh(.5) lh() 0;
font-weight: bold;
}
}
div.slider-label {
margin-bottom: lh(0.5);
font-weight: bold;
text-shadow: 0 -1px 0 darken(#073642, 10%);
-webkit-font-smoothing: antialiased;
}
div.slider {
margin-bottom: lh(1);
&.ui-slider-horizontal {
height: 0.4em;
background: darken(#002b36, 2%);
border: 1px solid darken(#002b36, 8%);
@include box-shadow(none);
}
.ui-slider-handle {
background: lighten( #586e75, 5% ) url('/static/images/amplifier-slider-handle.png') center no-repeat;
border: 1px solid darken(#002b36, 8%);
@include box-shadow(inset 0 1px 0 lighten( #586e75, 20% ));
margin-top: -.3em;
&:hover, &:active {
background-color: lighten( #586e75, 10% );
}
}
}
}
}
}
//End JM MOSFET AMPLIFIER
// Labels
div.graph-controls, div#graph-listen {
label {
@include border-radius(2px);
font-weight: bold;
padding: 3px;
}
//MOSFET AMPLIFIER
label[for="vinCheckbox"], label[for="vinRadioButton"]{
color: desaturate(#00bfff, 50%);
}
label[for="voutCheckbox"], label[for="voutRadioButton"]{
color: darken(#ffcf48, 20%);
}
label[for="vrCheckbox"], label[for="vrRadioButton"]{
color: desaturate(#1df914, 40%);
}
//RC Filters
label[for="vcCheckbox"], label[for="vcRadioButton"]{
color: darken(#ffcf48, 20%);
}
//RLC Series
label[for="vlCheckbox"], label[for="vlRadioButton"]{
color: desaturate(#d33682, 40%);
}
}
html {
height: 100%;
max-height: 100%;
}
body.courseware {
height: 100%;
max-height: 100%;
}
div.course-wrapper {
@extend .table-wrapper;
......@@ -7,9 +17,10 @@ div.course-wrapper {
section.course-content {
@extend .content;
overflow: hidden;
h1 {
@extend .top-header;
margin: 0 0 lh();
}
p {
......@@ -159,18 +170,63 @@ div.course-wrapper {
margin-bottom: 15px;
padding: 0 0 15px;
header {
@extend h1.top-header;
margin-bottom: 0;
h1 {
margin: 0;
}
h2 {
float: right;
margin-right: 0;
margin-top: 8px;
text-align: right;
padding-right: 0;
}
}
&:last-child {
border-bottom: none;
margin-bottom: 0;
padding-bottom: 0;
}
ul {
list-style: disc outside none;
padding-left: 1em;
}
}
}
section.tutorials {
h2 {
margin-bottom: lh();
}
ul {
list-style: disc outside none;
margin-left: lh();
margin: 0;
@include clearfix();
li {
width: flex-grid(3, 9);
float: left;
margin-right: flex-gutter(9);
margin-bottom: lh();
&:nth-child(3n) {
margin-right: 0;
}
&:nth-child(3n+1) {
clear: both;
}
a {
font-weight: bold;
}
}
}
}
......@@ -202,6 +258,24 @@ div.course-wrapper {
}
}
}
div.ui-tabs {
border: 0;
@include border-radius(0);
margin: 0;
padding: 0;
.ui-tabs-nav {
background: none;
border: 0;
margin-bottom: lh(.5);
}
.ui-tabs-panel {
@include border-radius(0);
padding: 0;
}
}
}
&.closed {
......
......@@ -3,9 +3,11 @@ nav.sequence-nav {
@include box-sizing(border-box);
margin-bottom: $body-line-height;
position: relative;
top: -1px;
ol {
border-bottom: 1px solid darken($cream, 20%);
border-top: 1px solid darken($cream, 20%);
@include box-sizing(border-box);
display: table;
padding-right: flex-grid(1, 9);
......@@ -171,6 +173,7 @@ nav.sequence-nav {
ul {
margin-right: 1px;
list-style: none !important;
position: absolute;
right: 0;
top: 0;
......@@ -232,26 +235,20 @@ nav.sequence-nav {
section.course-content {
div#seq_content {
margin-bottom: 60px;
}
position: relative;
nav.sequence-bottom {
bottom: (-(lh()));
position: relative;
margin: lh(2) 0 0;
text-align: center;
ul {
@extend .clearfix;
background-color: darken(#F6EFD4, 5%);
background-color: darken($cream, 5%);
border: 1px solid darken(#f6efd4, 20%);
border-bottom: 0;
@include border-radius(3px 3px 0 0);
@include border-radius(3px);
@include box-shadow(inset 0 0 0 1px lighten(#f6efd4, 5%));
margin: 0 auto;
overflow: hidden;
width: 106px;
@include inline-block();
li {
float: left;
......@@ -264,15 +261,13 @@ section.course-content {
background-repeat: no-repeat;
border-bottom: none;
display: block;
display: block;
padding: lh(.75) 4px;
padding: lh(.5) 4px;
text-indent: -9999px;
@include transition(all, .4s, $ease-in-out-quad);
width: 45px;
&:hover {
background-color: darken($cream, 10%);
color: darken(#F6EFD4, 60%);
color: darken($cream, 60%);
opacity: .5;
text-decoration: none;
......@@ -288,6 +283,7 @@ section.course-content {
&.prev {
a {
background-image: url('/static/images/sequence-nav/previous-icon.png');
border-right: 1px solid darken(#f6efd4, 20%);
&:hover {
background-color: none;
......
@-moz-document url-prefix() {
a.add-fullscreen {
display: none !important;
}
}
section.course-content {
.dullify {
opacity: .4;
@include transition();
&:hover {
opacity: 1;
}
}
div.video {
}
div.video-subtitles {
@include clearfix();
padding: 6px lh();
margin: 0 (-(lh()));
border-top: 1px solid #e1e1e1;
border-bottom: 1px solid #e1e1e1;
background: #f3f3f3;
position: relative;
@include clearfix();
display: block;
div.video-wrapper {
float: left;
......@@ -39,24 +57,6 @@ section.course-content {
}
}
// ul {
// float: left;
// li {
// margin-top: 5px;
// display: inline-block;
// cursor: pointer;
// border: 0;
// padding: 0;
// div {
// &:empty {
// display: none;
// }
// }
// }
// }
section.video-controls {
@extend .clearfix;
background: #333;
......@@ -65,6 +65,12 @@ section.course-content {
border-top: 0;
color: #ccc;
&:hover {
ul, div {
opacity: 1;
}
}
div#slider {
@extend .clearfix;
@include border-radius(0);
......@@ -89,6 +95,7 @@ section.course-content {
color: #fff;
font: bold 12px $body-font-family;
margin-bottom: 6px;
margin-right: 0;
padding: 4px;
text-align: center;
-webkit-font-smoothing: antialiased;
......@@ -130,23 +137,14 @@ section.course-content {
}
}
&:hover {
height: 14px;
margin-top: -7px;
a.ui-slider-handle {
@include border-radius(20px);
height: 20px;
margin-left: -10px;
top: -4px;
width: 20px;
}
}
}
ul.vcr {
float: left;
margin-right: lh();
@extend .dullify;
list-style: none;
padding: 0;
li {
float: left;
......@@ -158,8 +156,9 @@ section.course-content {
border-right: 1px solid #000;
display: block;
cursor: pointer;
height: 14px;
padding: lh(.75);
// height: 14px;
line-height: 46px;
padding: 0 lh(.75);
text-indent: -9999px;
width: 14px;
@include transition();
......@@ -193,67 +192,118 @@ section.course-content {
div.secondary-controls {
float: right;
@extend .dullify;
div.speeds {
border-left: 1px solid #000;
border-right: 1px solid #000;
@include box-shadow(1px 0 0 #555, inset 1px 0 0 #555);
float: left;
line-height: 0;
padding-right: lh(.25);
margin-right: 0;
@include transition();
cursor: pointer;
-webkit-font-smoothing: antialiased;
h3 {
float: left;
padding: 0 lh(.25) 0 lh(.5);
font-weight: normal;
text-transform: uppercase;
font-size: 12px;
letter-spacing: 1px;
color: #999;
a {
background: url('/static/images/closed-arrow.png') 10px center no-repeat;
border-left: 1px solid #000;
border-right: 1px solid #000;
display: block;
@include box-shadow(1px 0 0 #555, inset 1px 0 0 #555);
@include clearfix();
cursor: pointer;
line-height: 46px; //height of play pause buttons
}
margin-right: 0;
padding-left: 15px;
position: relative;
@include transition();
-webkit-font-smoothing: antialiased;
width: 110px;
color: #fff;
p.active {
@include inline-block();
padding: 0 lh(.5) 0 0;
margin-bottom: 0;
font-weight: bold;
display: none;
}
&.open {
background: url('/static/images/open-arrow.png') 10px center no-repeat;
// fix for now
ol#video_speeds {
@include inline-block();
ol#video_speeds {
opacity: 1;
display: block;
}
}
li {
h3 {
color: #999;
font-size: 12px;
font-weight: normal;
float: left;
color: #fff;
cursor: pointer;
padding: 0 lh(.25);
line-height: 46px; //height of play pause buttons
letter-spacing: 1px;
padding: 0 lh(.25) 0 lh(.5);
text-transform: uppercase;
}
&.active {
font-weight: bold;
}
p.active {
font-weight: bold;
float: left;
margin-bottom: 0;
padding: 0 lh(.5) 0 0;
}
&:last-child {
border-bottom: 0;
margin-top: 0;
@include box-shadow(none);
// fix for now
ol#video_speeds {
background-color: #444;
border: 1px solid #000;
@include box-shadow(inset 1px 0 0 #555, 0 3px 0 #444);
left: -1px;
display: none;
position: absolute;
top:0;
width: 100%;
z-index: 10;
@include transition();
opacity: 0;
li {
border-bottom: 1px solid #000;
@include box-shadow( 0 1px 0 #555);
color: #fff;
cursor: pointer;
padding: 0 lh(.5);
&.active {
font-weight: bold;
}
&:last-child {
border-bottom: 0;
margin-top: 0;
@include box-shadow(none);
}
&:hover {
color: #aaa;
background-color: #666;
}
}
}
&:hover {
background-color: #444;
}
&:hover {
opacity: 1;
background-color: #444;
}
}
}
a.add-fullscreen {
background: url(/static/images/fullscreen.png) center no-repeat;
border-right: 1px solid #000;
@include box-shadow(1px 0 0 #555, inset 1px 0 0 #555);
color: #797979;
display: block;
float: left;
line-height: 46px; //height of play pause buttons
margin-left: 0;
padding: 0 lh(.5);
text-indent: -9999px;
@include transition();
width: 30px;
&:hover {
opacity: 1;
color: #fff;
text-decoration: none;
background-color: #444;
}
}
......@@ -273,43 +323,37 @@ section.course-content {
opacity: 1;
position: relative;
&:after {
text-indent: 0;
position: absolute;
top: 0;
right: -40px;
content: "turn off";
display: block;
width: 70px;
opacity: 0;
visibility: hidden;
@include transition();
}
&:hover {
color: #fff;
text-decoration: none;
background-color: #444;
padding-right: 80px;
background-position: 11px center;
&:after {
right: 0;
opacity: 1;
visibility: visible;
}
}
&.off {
opacity: .7;
&:after {
content: "turn on";
}
}
}
}
}
&:hover section.video-controls {
ul, div {
opacity: 1;
}
div#slider {
height: 14px;
margin-top: -7px;
a.ui-slider-handle {
@include border-radius(20px);
height: 20px;
margin-left: -10px;
top: -4px;
width: 20px;
}
}
}
}
ol.subtitles {
......@@ -358,6 +402,95 @@ section.course-content {
height: 0;
}
}
&.fullscreen {
background: rgba(#000, .95);
border: 0;
margin: 0;
bottom: 0;
height: 100%;
left: 0;
max-height: 100%;
padding: 0;
position: fixed;
top: 0;
width: 100%;
z-index: 999;
overflow: hidden;
&.closed {
ol.subtitles {
width: auto;
height: auto;
right: -(flex-grid(4));
}
}
a.exit {
position: absolute;
top: 20px;
left: 20px;
color: #aaa;
text-transform: uppercase;
letter-spacing: 1px;
font-style: 12px;
display: none;
&::after {
content: "✖";
@include inline-block();
padding-left: 6px;
}
&:hover {
color: $mit-red;
}
}
div.tc-wrapper {
div.video-wrapper {
width: 100%;
}
object#myytplayer, iframe {
height: 100%;
position: fixed;
top: 0;
bottom: 0;
left: 0;
overflow: hidden;
}
section.video-controls {
position: absolute;
bottom: 0;
left: 0;
width: 100%;
z-index: 9999;
}
}
ol.subtitles {
position: fixed;
top: 0;
right: 0;
bottom: 0;
height: 100%;
background: rgba(#000, .8);
padding: lh();
max-width: flex-grid(3);
max-height: 100%;
@include transition();
li {
color: #aaa;
&.current {
color: #fff;
}
}
}
}
}
}
......
......@@ -20,6 +20,7 @@ section.index-content {
p {
line-height: lh();
margin-bottom: lh();
}
ul {
......@@ -237,6 +238,19 @@ section.index-content {
padding-top: lh(8);
}
}
div.announcement {
p.announcement-button {
a {
margin-top: 0;
}
}
img {
max-width: 100%;
margin-bottom: lh();
}
}
}
......
li.calc-main {
bottom: -36px;
bottom: -126px;
left: 0;
position: fixed;
width: 100%;
@include transition(bottom);
z-index: 99;
-webkit-appearance: none;
&.open {
bottom: -36px;
div#calculator_wrapper form div.input-wrapper div.help-wrapper dl {
display: block;
}
}
a.calc {
@include hide-text;
......@@ -33,11 +44,12 @@ li.calc-main {
position: relative;
top: -36px;
clear: both;
max-height: 90px;
form {
padding: lh();
@extend .clearfix;
@include box-sizing(border-box);
input#calculator_button {
background: #111;
......@@ -46,13 +58,14 @@ li.calc-main {
@include box-shadow(none);
@include box-sizing(border-box);
color: #fff;
float: left;
font-size: 30px;
font-weight: bold;
margin: 0 (flex-gutter() / 2);
padding: 0;
text-shadow: none;
-webkit-appearance: none;
width: flex-grid(.5) + flex-gutter();
float: left;
margin: 0 (flex-gutter() / 2);
&:hover {
color: #333;
......@@ -70,15 +83,16 @@ li.calc-main {
font-weight: bold;
margin: 1px 0 0;
padding: 10px;
-webkit-appearance: none;
width: flex-grid(4);
}
div.input-wrapper {
position: relative;
@extend .clearfix;
width: flex-grid(7.5);
margin: 0;
float: left;
margin: 0;
position: relative;
width: flex-grid(7.5);
input#calculator_input {
border: none;
......@@ -86,6 +100,7 @@ li.calc-main {
@include box-sizing(border-box);
font-size: 16px;
padding: 10px;
-webkit-appearance: none;
width: 100%;
&:focus {
......@@ -117,6 +132,7 @@ li.calc-main {
right: -40px;
top: -110px;
width: 500px;
display: none;
@include transition();
&.shown {
......
......@@ -30,6 +30,17 @@ html {
}
}
div.qtip {
div.ui-tooltip-content {
border: none;
background: rgba(#000, .8);
color: #fff;
font: 12px $body-font-family;
margin-top: -30px;
margin-right: -20px;
}
}
section.outside-app {
@extend .main-content;
max-width: 600px;
......
% if name is not UNDEFINED and name != None:
% if name is not UNDEFINED and name != None:
<h1> ${name} </h1>
% endif
<div class="video-subtitles">
<div class="tc-wrapper">
<div class="video-wrapper">
<div class="video-player">
......@@ -28,12 +29,16 @@
<div class="secondary-controls">
<div class="speeds">
<h3>Speed</h3>
<p class="active"></p>
<ol id="video_speeds"></ol>
<a href="#">
<h3>Speed</h3>
<p class="active"></p>
<ol id="video_speeds"></ol>
</a>
</div>
<a href="#" class="hide-subtitles">Captions</a>
<a href="#" class="add-fullscreen" title="Fill browser">Fill Browser</a>
<a href="#" class="hide-subtitles" title="Turn off captions">Captions</a>
</div>
</section>
</section>
......@@ -57,18 +62,63 @@
<li id="stt_p6"><div id="std_p7" onclick="title_seek( 7);"></div></li>
<li id="stt_p6"><div id="std_p7" onclick="title_seek( 8);"></div></li>
</ol>
</div>
</div>
<%block name="js_extra">
<script src="/static/js/jquery.ui.touch-punch.min.js"></script>
<script type="text/javascript" charset="utf-8">
$(function() {
// tooltips for full browser and closed caption
$('.add-fullscreen, .hide-subtitles ').qtip({
position: {
my: 'top right',
at: 'top center'
}
});
//full browser
$('.add-fullscreen').click(function() {
$('div.video-subtitles').toggleClass('fullscreen');
if ($('div.video-subtitles').hasClass('fullscreen')) {
$('div.video-subtitles').append('<a href="#" class="exit">Exit</a>');
} else {
$('a.exit').remove();
}
$('.exit').click(function() {
$('div.video-subtitles').removeClass('fullscreen');
$(this).remove();
return false;
});
var link_title = $(this).attr('title');
$(this).attr('title', (link_title == 'Exit fill browser') ? 'Fill browser' : 'Exit fill browser');
return false;
});
//hide subtitles
$('.hide-subtitles').click(function() {
$('div.video-subtitles').toggleClass('closed');
$(this).toggleClass("off");
var link_title = $(this).attr('title');
$(this).attr('title', (link_title == 'Turn on captions') ? 'Turn off captions' : 'Turn on captions');
return false;
});
$("div.speeds a").hover(function() {
$(this).toggleClass("open");
});
$("div.speeds a").click(function() {
return false;
});
});
</script>
</%block>
......@@ -88,6 +88,7 @@ function add_speed(key, stream) {
var active = $(this).text();
$("p.active").text(active);
});
}
var l=[]
......@@ -128,6 +129,9 @@ $(document).ready(function() {
add_speed(l[i], streams[l[i]])
}
var dropUpHeight = $('ol#video_speeds').height();
console.log(dropUpHeight);
$('ol#video_speeds').css('top', -(dropUpHeight + 2));
});
function toggleVideo(){
......
from django.conf import settings
from django.conf.urls.defaults import patterns, include, url
from django.contrib import admin
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
import django.contrib.auth.views
# Uncomment the next two lines to enable the admin:
......@@ -46,38 +48,44 @@ if settings.END_COURSE_ENABLED:
)
if settings.PERFSTATS:
urlpatterns=urlpatterns + (url(r'^reprofile$','perfstats.views.end_profile'),)
urlpatterns += (url(r'^reprofile$','perfstats.views.end_profile'),)
if settings.COURSEWARE_ENABLED:
urlpatterns=urlpatterns + (url(r'^courseware/$', 'courseware.views.index', name="courseware"),
url(r'^info$', 'util.views.info'),
url(r'^wiki/', include('simplewiki.urls')),
url(r'^courseware/(?P<course>[^/]*)/(?P<chapter>[^/]*)/(?P<section>[^/]*)/$', 'courseware.views.index', name="courseware_section"),
url(r'^courseware/(?P<course>[^/]*)/(?P<chapter>[^/]*)/$', 'courseware.views.index', name="courseware_chapter"),
url(r'^courseware/(?P<course>[^/]*)/$', 'courseware.views.index', name="courseware_course"),
url(r'^section/(?P<section>[^/]*)/$', 'courseware.views.render_section'),
url(r'^modx/(?P<module>[^/]*)/(?P<id>[^/]*)/(?P<dispatch>[^/]*)$', 'courseware.views.modx_dispatch'), #reset_problem'),
url(r'^profile$', 'courseware.views.profile'),
url(r'^profile/(?P<student_id>[^/]*)/$', 'courseware.views.profile'),
url(r'^change_setting$', 'student.views.change_setting'),
url(r'^s/(?P<template>[^/]*)$', 'static_template_view.views.auth_index'),
url(r'^book/(?P<page>[^/]*)$', 'staticbook.views.index'),
url(r'^book-shifted/(?P<page>[^/]*)$', 'staticbook.views.index_shifted'),
url(r'^book*$', 'staticbook.views.index'),
# url(r'^course_info/$', 'student.views.courseinfo'),
# url(r'^show_circuit/(?P<circuit>[^/]*)$', 'circuit.views.show_circuit'),
url(r'^edit_circuit/(?P<circuit>[^/]*)$', 'circuit.views.edit_circuit'),
url(r'^save_circuit/(?P<circuit>[^/]*)$', 'circuit.views.save_circuit'),
url(r'^calculate$', 'util.views.calculate'),
)
urlpatterns += (
url(r'^courseware/$', 'courseware.views.index', name="courseware"),
url(r'^info$', 'util.views.info'),
url(r'^wiki/', include('simplewiki.urls')),
url(r'^courseware/(?P<course>[^/]*)/(?P<chapter>[^/]*)/(?P<section>[^/]*)/$', 'courseware.views.index', name="courseware_section"),
url(r'^courseware/(?P<course>[^/]*)/(?P<chapter>[^/]*)/$', 'courseware.views.index', name="courseware_chapter"),
url(r'^courseware/(?P<course>[^/]*)/$', 'courseware.views.index', name="courseware_course"),
url(r'^section/(?P<section>[^/]*)/$', 'courseware.views.render_section'),
url(r'^modx/(?P<module>[^/]*)/(?P<id>[^/]*)/(?P<dispatch>[^/]*)$', 'courseware.views.modx_dispatch'), #reset_problem'),
url(r'^profile$', 'courseware.views.profile'),
url(r'^profile/(?P<student_id>[^/]*)/$', 'courseware.views.profile'),
url(r'^change_setting$', 'student.views.change_setting'),
url(r'^s/(?P<template>[^/]*)$', 'static_template_view.views.auth_index'),
url(r'^book/(?P<page>[^/]*)$', 'staticbook.views.index'),
url(r'^book-shifted/(?P<page>[^/]*)$', 'staticbook.views.index_shifted'),
url(r'^book*$', 'staticbook.views.index'),
# url(r'^course_info/$', 'student.views.courseinfo'),
# url(r'^show_circuit/(?P<circuit>[^/]*)$', 'circuit.views.show_circuit'),
url(r'^edit_circuit/(?P<circuit>[^/]*)$', 'circuit.views.edit_circuit'),
url(r'^save_circuit/(?P<circuit>[^/]*)$', 'circuit.views.save_circuit'),
url(r'^calculate$', 'util.views.calculate'),
url(r'^heartbeat$', include('heartbeat.urls')),
)
if settings.ASKBOT_ENABLED:
urlpatterns=urlpatterns + (url(r'^%s' % settings.ASKBOT_URL, include('askbot.urls')), \
url(r'^admin/', include(admin.site.urls)), \
url(r'^settings/', include('askbot.deps.livesettings.urls')), \
url(r'^followit/', include('followit.urls')), \
# url(r'^robots.txt$', include('robots.urls')),
urlpatterns += (url(r'^%s' % settings.ASKBOT_URL, include('askbot.urls')), \
url(r'^admin/', include(admin.site.urls)), \
url(r'^settings/', include('askbot.deps.livesettings.urls')), \
url(r'^followit/', include('followit.urls')), \
# url(r'^robots.txt$', include('robots.urls')),
)
urlpatterns = patterns(*urlpatterns)
if settings.DEBUG:
urlpatterns += staticfiles_urlpatterns()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment