diff --git a/cms/templates/base.html b/cms/templates/base.html index 935917b11a..92f37c0a51 100644 --- a/cms/templates/base.html +++ b/cms/templates/base.html @@ -6,11 +6,7 @@ - % if settings.MITX_FEATURES['USE_DJANGO_PIPELINE']: <%static:css group='base-style'/> - % else: - - % endif <%block name="title"></%block> @@ -27,12 +23,7 @@ - % if settings.MITX_FEATURES['USE_DJANGO_PIPELINE']: <%static:js group='main'/> - % else: - - % endif - <%static:js group='module-js'/> diff --git a/cms/templates/signup.html b/cms/templates/signup.html index d3eedc8070..f22e3c7950 100644 --- a/cms/templates/signup.html +++ b/cms/templates/signup.html @@ -10,10 +10,10 @@
-
+
-
-
+ +
@@ -64,17 +64,17 @@ }); } - $('form#enroll_form').submit(function(e) { + $('form#register_form').submit(function(e) { e.preventDefault(); - var submit_data = $('#enroll_form').serialize(); + var submit_data = $('#register_form').serialize(); postJSON('/create_account', submit_data, function(json) { if(json.success) { - $('#enroll').html(json.value); + $('#register').html(json.value); } else { - $('#enroll_error').html(json.value).stop().css("background-color", "#933").animate({ backgroundColor: "#333"}, 2000); + $('#register_error').html(json.value).stop().css("background-color", "#933").animate({ backgroundColor: "#333"}, 2000); } } ); diff --git a/common/djangoapps/pipeline_mako/templates/static_content.html b/common/djangoapps/pipeline_mako/templates/static_content.html index 00c2c4dff4..225e3e0542 100644 --- a/common/djangoapps/pipeline_mako/templates/static_content.html +++ b/common/djangoapps/pipeline_mako/templates/static_content.html @@ -5,6 +5,24 @@ from static_replace import replace_urls %> <%def name='url(file)'>${staticfiles_storage.url(file)} -<%def name='css(group)'>${compressed_css(group)} -<%def name='js(group)'>${compressed_js(group)} + +<%def name='css(group)'> + % if settings.MITX_FEATURES['USE_DJANGO_PIPELINE']: + ${compressed_css(group)} + % else: + % for filename in settings.PIPELINE_CSS[group]['source_filenames']: + + % endfor + %endif + +<%def name='js(group)'> + % if settings.MITX_FEATURES['USE_DJANGO_PIPELINE']: + ${compressed_js(group)} + % else: + % for filename in settings.PIPELINE_JS[group]['source_filenames']: + + % endfor + %endif + + <%def name='replace_urls(text)'>${replace_urls(text)} diff --git a/common/djangoapps/student/migrations/0011_auto__chg_field_courseenrollment_user__del_unique_courseenrollment_use.py b/common/djangoapps/student/migrations/0011_auto__chg_field_courseenrollment_user__del_unique_courseenrollment_use.py index 769c08fd29..bb74eed0b4 100644 --- a/common/djangoapps/student/migrations/0011_auto__chg_field_courseenrollment_user__del_unique_courseenrollment_use.py +++ b/common/djangoapps/student/migrations/0011_auto__chg_field_courseenrollment_user__del_unique_courseenrollment_use.py @@ -8,19 +8,22 @@ from django.db import models class Migration(SchemaMigration): def forwards(self, orm): - # Removing unique constraint on 'CourseEnrollment', fields ['user'] - db.delete_unique('student_courseenrollment', ['user_id']) - - - # Changing field 'CourseEnrollment.user' - db.alter_column('student_courseenrollment', 'user_id', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'])) + # This table is dropped in a subsequent migration. This migration was causing problems when using InnoDB, + # so we are just dropping it. + pass + # # Removing unique constraint on 'CourseEnrollment', fields ['user'] + # db.delete_unique('student_courseenrollment', ['user_id']) + # + # + # # Changing field 'CourseEnrollment.user' + # db.alter_column('student_courseenrollment', 'user_id', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'])) def backwards(self, orm): - - # Changing field 'CourseEnrollment.user' - db.alter_column('student_courseenrollment', 'user_id', self.gf('django.db.models.fields.related.OneToOneField')(to=orm['auth.User'], unique=True)) - # Adding unique constraint on 'CourseEnrollment', fields ['user'] - db.create_unique('student_courseenrollment', ['user_id']) + pass + # # Changing field 'CourseEnrollment.user' + # db.alter_column('student_courseenrollment', 'user_id', self.gf('django.db.models.fields.related.OneToOneField')(to=orm['auth.User'], unique=True)) + # # Adding unique constraint on 'CourseEnrollment', fields ['user'] + # db.create_unique('student_courseenrollment', ['user_id']) models = { diff --git a/lms/djangoapps/student/migrations/0011_auto__chg_field_userprofile_country.py b/common/djangoapps/student/migrations/0019_create_approved_demographic_fields_fall_2012.py similarity index 71% rename from lms/djangoapps/student/migrations/0011_auto__chg_field_userprofile_country.py rename to common/djangoapps/student/migrations/0019_create_approved_demographic_fields_fall_2012.py index 47909cef49..d260e263f7 100644 --- a/lms/djangoapps/student/migrations/0011_auto__chg_field_userprofile_country.py +++ b/common/djangoapps/student/migrations/0019_create_approved_demographic_fields_fall_2012.py @@ -8,14 +8,70 @@ from django.db import models class Migration(SchemaMigration): def forwards(self, orm): + # Deleting field 'UserProfile.occupation' + db.delete_column('auth_userprofile', 'occupation') + + # Deleting field 'UserProfile.telephone_number' + db.delete_column('auth_userprofile', 'telephone_number') + + # Deleting field 'UserProfile.date_of_birth' + db.delete_column('auth_userprofile', 'date_of_birth') + + # Deleting field 'UserProfile.country' + db.delete_column('auth_userprofile', 'country') + + # Adding field 'UserProfile.year_of_birth' + db.add_column('auth_userprofile', 'year_of_birth', + self.gf('django.db.models.fields.IntegerField')(db_index=True, null=True, blank=True), + keep_default=False) + + # Adding field 'UserProfile.level_of_education' + db.add_column('auth_userprofile', 'level_of_education', + self.gf('django.db.models.fields.CharField')(db_index=True, max_length=6, null=True, blank=True), + keep_default=False) + + # Adding field 'UserProfile.goals' + db.add_column('auth_userprofile', 'goals', + self.gf('django.db.models.fields.TextField')(null=True, blank=True), + keep_default=False) + + # Adding index on 'UserProfile', fields ['gender'] + db.create_index('auth_userprofile', ['gender']) - # Changing field 'UserProfile.country' - db.alter_column('auth_userprofile', 'country', self.gf('django_countries.fields.CountryField')(max_length=2, null=True)) def backwards(self, orm): + # Removing index on 'UserProfile', fields ['gender'] + db.delete_index('auth_userprofile', ['gender']) + + # Adding field 'UserProfile.occupation' + db.add_column('auth_userprofile', 'occupation', + self.gf('django.db.models.fields.CharField')(max_length=255, null=True, blank=True), + keep_default=False) + + # Adding field 'UserProfile.telephone_number' + db.add_column('auth_userprofile', 'telephone_number', + self.gf('django.db.models.fields.CharField')(max_length=25, null=True, blank=True), + keep_default=False) + + # Adding field 'UserProfile.date_of_birth' + db.add_column('auth_userprofile', 'date_of_birth', + self.gf('django.db.models.fields.DateField')(null=True, blank=True), + keep_default=False) + + # Adding field 'UserProfile.country' + db.add_column('auth_userprofile', 'country', + self.gf('django_countries.fields.CountryField')(max_length=2, null=True, blank=True), + keep_default=False) + + # Deleting field 'UserProfile.year_of_birth' + db.delete_column('auth_userprofile', 'year_of_birth') + + # Deleting field 'UserProfile.level_of_education' + db.delete_column('auth_userprofile', 'level_of_education') + + # Deleting field 'UserProfile.goals' + db.delete_column('auth_userprofile', 'goals') - # Changing field 'UserProfile.country' - db.alter_column('auth_userprofile', 'country', self.gf('django.db.models.fields.CharField')(max_length=255, null=True)) models = { 'auth.group': { @@ -80,8 +136,9 @@ class Migration(SchemaMigration): 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) }, 'student.courseenrollment': { - 'Meta': {'object_name': 'CourseEnrollment'}, - 'course_id': ('django.db.models.fields.CharField', [], {'max_length': '255'}), + 'Meta': {'unique_together': "(('user', 'course_id'),)", 'object_name': 'CourseEnrollment'}, + 'course_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), + 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'db_index': 'True', 'blank': 'True'}), 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) }, @@ -107,19 +164,18 @@ class Migration(SchemaMigration): }, 'student.userprofile': { 'Meta': {'object_name': 'UserProfile', 'db_table': "'auth_userprofile'"}, - 'country': ('django_countries.fields.CountryField', [], {'max_length': '2', 'null': 'True', 'blank': 'True'}), 'courseware': ('django.db.models.fields.CharField', [], {'default': "'course.xml'", 'max_length': '255', 'blank': 'True'}), - 'date_of_birth': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'gender': ('django.db.models.fields.CharField', [], {'max_length': '6', 'null': 'True', 'blank': 'True'}), + 'gender': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '6', 'null': 'True', 'blank': 'True'}), + 'goals': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'language': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), + 'level_of_education': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '6', 'null': 'True', 'blank': 'True'}), 'location': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), 'mailing_address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'meta': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), + 'meta': ('django.db.models.fields.TextField', [], {'blank': 'True'}), 'name': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'occupation': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'telephone_number': ('django.db.models.fields.CharField', [], {'max_length': '25', 'null': 'True', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'profile'", 'unique': 'True', 'to': "orm['auth.User']"}) + 'user': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'profile'", 'unique': 'True', 'to': "orm['auth.User']"}), + 'year_of_birth': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}) }, 'student.usertestgroup': { 'Meta': {'object_name': 'UserTestGroup'}, diff --git a/common/djangoapps/student/models.py b/common/djangoapps/student/models.py index 70619311e4..ca5081254e 100644 --- a/common/djangoapps/student/models.py +++ b/common/djangoapps/student/models.py @@ -5,14 +5,15 @@ If you make changes to this model, be sure to create an appropriate migration file and check it in at the same time as your model changes. To do that, 1. Go to the mitx dir -2. ./manage.py schemamigration user --auto description_of_your_change -3. Add the migration file created in mitx/courseware/migrations/ +2. django-admin.py schemamigration student --auto --settings=lms.envs.dev --pythonpath=. description_of_your_change +3. Add the migration file created in mitx/common/djangoapps/student/migrations/ """ +from datetime import datetime +import json import uuid from django.db import models from django.contrib.auth.models import User -import json from django_countries import CountryField #from cache_toolbox import cache_model, cache_relation @@ -21,23 +22,43 @@ class UserProfile(models.Model): class Meta: db_table = "auth_userprofile" - GENDER_CHOICES = (('m', 'Male'), ('f', 'Female'), ('o', 'Other')) - ## CRITICAL TODO/SECURITY # Sanitize all fields. # This is not visible to other users, but could introduce holes later user = models.OneToOneField(User, unique=True, db_index=True, related_name='profile') name = models.CharField(blank=True, max_length=255, db_index=True) - language = models.CharField(blank=True, max_length=255, db_index=True) - location = models.CharField(blank=True, max_length=255, db_index=True) # TODO: What are we doing with this? + meta = models.TextField(blank=True) # JSON dictionary for future expansion courseware = models.CharField(blank=True, max_length=255, default='course.xml') - gender = models.CharField(blank=True, null=True, max_length=6, choices=GENDER_CHOICES) - date_of_birth = models.DateField(blank=True, null=True) + + # Location is no longer used, but is held here for backwards compatibility + # for users imported from our first class. + language = models.CharField(blank=True, max_length=255, db_index=True) + location = models.CharField(blank=True, max_length=255, db_index=True) + + # Optional demographic data we started capturing from Fall 2012 + this_year = datetime.now().year + VALID_YEARS = range(this_year, this_year - 120, -1) + year_of_birth = models.IntegerField(blank=True, null=True, db_index=True) + GENDER_CHOICES = (('m', 'Male'), ('f', 'Female'), ('o', 'Other')) + gender = models.CharField(blank=True, null=True, max_length=6, db_index=True, + choices=GENDER_CHOICES) + LEVEL_OF_EDUCATION_CHOICES = (('p_se', 'Doctorate in science or engineering'), + ('p_oth', 'Doctorate in another field'), + ('m', "Master's or professional degree"), + ('b', "Bachelor's degree"), + ('hs', "Secondary/high school"), + ('jhs', "Junior secondary/junior high/middle school"), + ('el', "Elementary/primary school"), + ('none', "None"), + ('other', "Other")) + level_of_education = models.CharField( + blank=True, null=True, max_length=6, db_index=True, + choices=LEVEL_OF_EDUCATION_CHOICES + ) mailing_address = models.TextField(blank=True, null=True) - country = CountryField(blank=True, null=True) - telephone_number = models.CharField(blank=True, null=True, max_length=25) - occupation = models.CharField(blank=True, null=True, max_length=255) + goals = models.TextField(blank=True, null=True) + def get_meta(self): js_str = self.meta diff --git a/common/djangoapps/student/views.py b/common/djangoapps/student/views.py index 9d2ea93049..82fd521148 100644 --- a/common/djangoapps/student/views.py +++ b/common/djangoapps/student/views.py @@ -71,26 +71,25 @@ def index(request): for entry in entries: soup = BeautifulSoup(entry.description) entry.image = soup.img['src'] if soup.img else None + entry.summary = soup.getText() - courses = modulestore().get_courses() universities = defaultdict(list) - for university, group in itertools.groupby(courses, lambda course: course.org): - [universities[university].append(course) for course in group] + courses = sorted(modulestore().get_courses(), key=lambda course: course.number) + for course in courses: + universities[course.org].append(course) return render_to_response('index.html', {'universities': universities, 'entries': entries}) +def course_from_id(id): + course_loc = CourseDescriptor.id_to_location(id) + return modulestore().get_item(course_loc) @login_required @ensure_csrf_cookie def dashboard(request): - csrf_token = csrf(request)['csrf_token'] user = request.user enrollments = CourseEnrollment.objects.filter(user=user) - def course_from_id(id): - course_loc = CourseDescriptor.id_to_location(id) - return modulestore().get_item(course_loc) - # Build our courses list for the user, but ignore any courses that no longer # exist (because the course IDs have changed). Still, we don't delete those # enrollments, because it could have been a data push snafu. @@ -101,18 +100,80 @@ def dashboard(request): except ItemNotFoundError: log.error("User {0} enrolled in non-existant course {1}" .format(user.username, enrollment.course_id)) + + + message = "" + if not user.is_active: + message = render_to_string('registration/activate_account_notice.html', {'email': user.email}) - context = {'csrf': csrf_token, 'courses': courses} + context = {'courses': courses, 'message' : message} return render_to_response('dashboard.html', context) +def try_change_enrollment(request): + """ + This method calls change_enrollment if the necessary POST + parameters are present, but does not return anything. It + simply logs the result or exception. This is usually + called after a registration or login, as secondary action. + It should not interrupt a successful registration or login. + """ + if 'enrollment_action' in request.POST: + try: + enrollment_output = change_enrollment(request) + # There isn't really a way to display the results to the user, so we just log it + # We expect the enrollment to be a success, and will show up on the dashboard anyway + log.info("Attempted to automatically enroll after login. Results: {0}".format(enrollment_output)) + except Exception, e: + log.exception("Exception automatically enrolling after login: {0}".format(str(e))) + + +@login_required +def change_enrollment_view(request): + return HttpResponse(json.dumps(change_enrollment(request))) + +def change_enrollment(request): + if request.method != "POST": + raise Http404 + + action = request.POST.get("enrollment_action" , "") + user = request.user + course_id = request.POST.get("course_id", None) + if course_id == None: + return HttpResponse(json.dumps({'success': False, 'error': 'There was an error receiving the course id.'})) + + if action == "enroll": + # Make sure the course exists + # We don't do this check on unenroll, or a bad course id can't be unenrolled from + try: + course = course_from_id(course_id) + except ItemNotFoundError: + log.error("User {0} tried to enroll in non-existant course {1}" + .format(user.username, enrollment.course_id)) + return {'success': False, 'error': 'The course requested does not exist.'} + + enrollment, created = CourseEnrollment.objects.get_or_create(user=user, course_id=course.id) + return {'success': True} + + elif action == "unenroll": + try: + enrollment = CourseEnrollment.objects.get(user=user, course_id=course_id) + enrollment.delete() + return {'success': True} + except CourseEnrollment.DoesNotExist: + return {'success': False, 'error': 'You are not enrolled for this course.'} + else: + return {'success': False, 'error': 'Invalid enrollment_action.'} + + return {'success': False, 'error': 'We weren\'t able to unenroll you. Please try again.'} + # Need different levels of logging @ensure_csrf_cookie def login_user(request, error=""): ''' AJAX request to log in the user. ''' if 'email' not in request.POST or 'password' not in request.POST: return HttpResponse(json.dumps({'success': False, - 'error': 'Invalid login'})) # TODO: User error message + 'value': 'There was an error receiving your login information. Please email us.'})) # TODO: User error message email = request.POST['email'] password = request.POST['password'] @@ -121,14 +182,14 @@ def login_user(request, error=""): except User.DoesNotExist: log.warning("Login failed - Unknown user email: {0}".format(email)) return HttpResponse(json.dumps({'success': False, - 'error': 'Invalid login'})) # TODO: User error message + 'value': 'Email or password is incorrect.'})) # TODO: User error message username = user.username user = authenticate(username=username, password=password) if user is None: log.warning("Login failed - password for {0} is invalid".format(email)) return HttpResponse(json.dumps({'success': False, - 'error': 'Invalid login'})) + 'value': 'Email or password is incorrect.'})) if user is not None and user.is_active: try: @@ -143,11 +204,14 @@ def login_user(request, error=""): log.exception(e) log.info("Login success - {0} ({1})".format(username, email)) + + try_change_enrollment(request) + return HttpResponse(json.dumps({'success':True})) log.warning("Login failed - Account not active for user {0}".format(username)) return HttpResponse(json.dumps({'success':False, - 'error': 'Account not active. Check your e-mail.'})) + 'value': 'This account has not been activated. Please check your e-mail for the activation instructions.'})) @ensure_csrf_cookie def logout_user(request): @@ -243,17 +307,20 @@ def create_account(request, post_override=None): up = UserProfile(user=u) up.name = post_vars['name'] - up.country = post_vars['country'] + up.level_of_education = post_vars['level_of_education'] up.gender = post_vars['gender'] up.mailing_address = post_vars['mailing_address'] - - date_fields = ['date_of_birth__year', 'date_of_birth__month', 'date_of_birth__day'] - if all(len(post_vars[field]) > 0 for field in date_fields): - up.date_of_birth = date(int(post_vars['date_of_birth__year']), - int(post_vars['date_of_birth__month']), - int(post_vars['date_of_birth__day'])) - - up.save() + up.goals = post_vars['goals'] + + try: + up.year_of_birth = int(post_vars['year_of_birth']) + except ValueError: + up.year_of_birth = None # If they give us garbage, just ignore it instead + # of asking them to put an integer. + try: + up.save() + except Exception: + log.exception("UserProfile creation failed for user {0}.".format(u.id)) d = {'name': post_vars['name'], 'key': r.activation_key, @@ -275,10 +342,17 @@ def create_account(request, post_override=None): log.exception(sys.exc_info()) js['value'] = 'Could not send activation e-mail.' return HttpResponse(json.dumps(js)) - - js={'success': True, - 'value': render_to_string('registration/reg_complete.html', {'email': post_vars['email'], - 'csrf': csrf(request)['csrf_token']})} + + # Immediately after a user creates an account, we log them in. They are only + # logged in until they close the browser. They can't log in again until they click + # the activation link from the email. + login_user = authenticate(username=post_vars['username'], password = post_vars['password'] ) + login(request, login_user) + request.session.set_expiry(0) + + try_change_enrollment(request) + + js={'success': True} return HttpResponse(json.dumps(js), mimetype="application/json") def create_random_account(create_account_function): @@ -308,14 +382,15 @@ def activate_account(request, key): ''' r=Registration.objects.filter(activation_key=key) if len(r)==1: + user_logged_in = request.user.is_authenticated() + already_active = True if not r[0].user.is_active: r[0].activate() - resp = render_to_response("activation_complete.html",{'csrf':csrf(request)['csrf_token']}) - return resp - resp = render_to_response("activation_active.html",{'csrf':csrf(request)['csrf_token']}) + already_active = False + resp = render_to_response("registration/activation_complete.html",{'user_logged_in':user_logged_in, 'already_active' : already_active}) return resp if len(r)==0: - return render_to_response("activation_invalid.html",{'csrf':csrf(request)['csrf_token']}) + return render_to_response("registration/activation_invalid.html",{'csrf':csrf(request)['csrf_token']}) return HttpResponse("Unknown error. Please e-mail us to let us know how it happened.") @ensure_csrf_cookie diff --git a/lms/djangoapps/courseware/views.py b/lms/djangoapps/courseware/views.py index 77ecc990c3..3fc691daa7 100644 --- a/lms/djangoapps/courseware/views.py +++ b/lms/djangoapps/courseware/views.py @@ -57,10 +57,10 @@ def format_url_params(params): @cache_if_anonymous def courses(request): # TODO: Clean up how 'error' is done. - courses = modulestore().get_courses() + courses = sorted(modulestore().get_courses(), key=lambda course: course.number) universities = defaultdict(list) - for university, group in itertools.groupby(courses, lambda course: course.org): - [universities[university].append(course) for course in group] + for course in courses: + universities[course.org].append(course) return render_to_response("courses.html", { 'universities': universities }) @@ -269,46 +269,13 @@ def course_about(request, course_id): course = check_course(course_id, course_must_be_open=False) registered = registered_for_course(course, request.user) return render_to_response('portal/course_about.html', {'course': course, 'registered': registered}) - - -@login_required -def change_enrollment(request): - if request.method != "POST": - raise Http404 - - course_id = request.POST.get("course_id", None) - if course_id == None: - return HttpResponse(json.dumps({'success': False, 'error': 'There was an error receiving the course id.'})) - action = request.POST.get("enrollment_action" , "") - - user = request.user - - if action == "enroll": - # Make sure the course exists - # We don't do this check on unenroll, or a bad course id can't be unenrolled from - course = check_course(course_id, course_must_be_open=False) - - enrollment, created = CourseEnrollment.objects.get_or_create(user=user, course_id=course.id) - return HttpResponse(json.dumps({'success': True})) - - elif action == "unenroll": - try: - enrollment = CourseEnrollment.objects.get(user=user, course_id=course_id) - enrollment.delete() - return HttpResponse(json.dumps({'success': True})) - except CourseEnrollment.DoesNotExist: - return HttpResponse(json.dumps({'success': False, 'error': 'You are not enrolled for this course.'})) - else: - return HttpResponse(json.dumps({'success': False, 'error': 'Invalid enrollment_action.'})) - - return HttpResponse(json.dumps({'success': False, 'error': 'We weren\'t able to unenroll you. Please try again.'})) @ensure_csrf_cookie @cache_if_anonymous def university_profile(request, org_id): - all_courses = modulestore().get_courses() + all_courses = sorted(modulestore().get_courses(), key=lambda course: course.number) valid_org_ids = set(c.org for c in all_courses) if org_id not in valid_org_ids: raise Http404("University Profile not found for {0}".format(org_id)) diff --git a/lms/djangoapps/student/migrations/0012_auto__chg_field_userprofile_location.py b/lms/djangoapps/student/migrations/0012_auto__chg_field_userprofile_location.py deleted file mode 100644 index ea6fb91abc..0000000000 --- a/lms/djangoapps/student/migrations/0012_auto__chg_field_userprofile_location.py +++ /dev/null @@ -1,133 +0,0 @@ -# -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - - # Changing field 'UserProfile.location' - db.alter_column('auth_userprofile', 'location', self.gf('django.db.models.fields.CharField')(max_length=255, null=True)) - - def backwards(self, orm): - - # Changing field 'UserProfile.location' - db.alter_column('auth_userprofile', 'location', self.gf('django.db.models.fields.CharField')(default='', max_length=255)) - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'about': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'avatar_type': ('django.db.models.fields.CharField', [], {'default': "'n'", 'max_length': '1'}), - 'bronze': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), - 'consecutive_days_visit_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'country': ('django_countries.fields.CountryField', [], {'max_length': '2', 'blank': 'True'}), - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'date_of_birth': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'display_tag_filter_strategy': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'email_isvalid': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'email_key': ('django.db.models.fields.CharField', [], {'max_length': '32', 'null': 'True'}), - 'email_tag_filter_strategy': ('django.db.models.fields.SmallIntegerField', [], {'default': '1'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'gold': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), - 'gravatar': ('django.db.models.fields.CharField', [], {'max_length': '32'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'ignored_tags': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'interesting_tags': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'last_seen': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'location': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}), - 'new_response_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'questions_per_page': ('django.db.models.fields.SmallIntegerField', [], {'default': '10'}), - 'real_name': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}), - 'reputation': ('django.db.models.fields.PositiveIntegerField', [], {'default': '1'}), - 'seen_response_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'show_country': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'silver': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'w'", 'max_length': '2'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}), - 'website': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'student.courseenrollment': { - 'Meta': {'object_name': 'CourseEnrollment'}, - 'course_id': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.pendingemailchange': { - 'Meta': {'object_name': 'PendingEmailChange'}, - 'activation_key': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'new_email': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.pendingnamechange': { - 'Meta': {'object_name': 'PendingNameChange'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'new_name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'rationale': ('django.db.models.fields.CharField', [], {'max_length': '1024', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.registration': { - 'Meta': {'object_name': 'Registration', 'db_table': "'auth_registration'"}, - 'activation_key': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.userprofile': { - 'Meta': {'object_name': 'UserProfile', 'db_table': "'auth_userprofile'"}, - 'country': ('django_countries.fields.CountryField', [], {'max_length': '2', 'null': 'True', 'blank': 'True'}), - 'courseware': ('django.db.models.fields.CharField', [], {'default': "'course.xml'", 'max_length': '255', 'blank': 'True'}), - 'date_of_birth': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'gender': ('django.db.models.fields.CharField', [], {'max_length': '6', 'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'language': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'location': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'mailing_address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'meta': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'occupation': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'telephone_number': ('django.db.models.fields.CharField', [], {'max_length': '25', 'null': 'True', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'profile'", 'unique': 'True', 'to': "orm['auth.User']"}) - }, - 'student.usertestgroup': { - 'Meta': {'object_name': 'UserTestGroup'}, - 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_index': 'True'}), - 'users': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.User']", 'db_index': 'True', 'symmetrical': 'False'}) - } - } - - complete_apps = ['student'] \ No newline at end of file diff --git a/lms/envs/common.py b/lms/envs/common.py index 336c47f715..f0571d19cf 100644 --- a/lms/envs/common.py +++ b/lms/envs/common.py @@ -293,6 +293,10 @@ PIPELINE_CSS = { 'source_filenames': ['sass/application.scss'], 'output_filename': 'css/application.css', }, + 'course': { + 'source_filenames': ['sass/application.scss', 'css/vendor/codemirror.css', 'css/vendor/jquery.treeview.css'], + 'output_filename': 'css/course.css', + }, 'ie-fixes': { 'source_filenames': ['sass/ie.scss'], 'output_filename': 'css/ie.css', @@ -301,11 +305,47 @@ PIPELINE_CSS = { PIPELINE_ALWAYS_RECOMPILE = ['sass/application.scss', 'sass/ie.scss'] +courseware_only_js = [ + PROJECT_ROOT / 'static/coffee/src/' + pth + '.coffee' + for pth + in ['courseware', 'histogram', 'navigation', 'time', ] +] +courseware_only_js += [ + pth for pth + in glob2.glob(PROJECT_ROOT / 'static/coffee/src/modules/**/*.coffee') +] + +main_vendor_js = [ + 'js/vendor/jquery.min.js', + 'js/vendor/jquery-ui.min.js', + 'js/vendor/swfobject/swfobject.js', + 'js/vendor/jquery.cookie.js', + 'js/vendor/jquery.qtip.min.js', +] + PIPELINE_JS = { 'application': { - 'source_filenames': [pth.replace(PROJECT_ROOT / 'static/', '') for pth in glob2.glob(PROJECT_ROOT / 'static/coffee/src/**/*.coffee')], + # Application will contain all paths not in courseware_only_js + 'source_filenames': [ + pth.replace(PROJECT_ROOT / 'static/', '') + for pth in glob2.glob(PROJECT_ROOT / 'static/coffee/src/**/*.coffee')\ + if pth not in courseware_only_js + ] + [ + 'js/form.ext.js', + 'js/my_courses_dropdown.js', + 'js/toggle_login_modal.js', + 'js/sticky_filter.js', + ], 'output_filename': 'js/application.js' }, + 'courseware': { + 'source_filenames': [pth.replace(PROJECT_ROOT / 'static/', '') for pth in courseware_only_js], + 'output_filename': 'js/courseware.js' + }, + 'main_vendor': { + 'source_filenames': main_vendor_js, + 'output_filename': 'js/main_vendor.js', + }, 'spec': { 'source_filenames': [pth.replace(PROJECT_ROOT / 'static/', '') for pth in glob2.glob(PROJECT_ROOT / 'static/coffee/spec/**/*.coffee')], 'output_filename': 'js/spec.js' diff --git a/lms/static/css/codemirror.css b/lms/static/css/vendor/codemirror.css similarity index 100% rename from lms/static/css/codemirror.css rename to lms/static/css/vendor/codemirror.css diff --git a/lms/static/images/favicon.ico b/lms/static/images/favicon.ico new file mode 100644 index 0000000000..13801059f1 Binary files /dev/null and b/lms/static/images/favicon.ico differ diff --git a/lms/static/js/toggle_login_modal.js b/lms/static/js/toggle_login_modal.js index 4f07f81bb5..006a9e88a6 100644 --- a/lms/static/js/toggle_login_modal.js +++ b/lms/static/js/toggle_login_modal.js @@ -7,9 +7,11 @@ closeButton: null, position: 'fixed' } - - var overlay = $("
"); - $("body").append(overlay); + + if ($("#lean_overlay").length == 0) { + var overlay = $("
"); + $("body").append(overlay); + } options = $.extend(defaults, options); @@ -51,7 +53,11 @@ $(modal_id).find(".notice").hide().html(""); var notice = $(this).data('notice') if(notice !== undefined) { - $(modal_id).find(".notice").show().html(notice); + $notice = $(modal_id).find(".notice"); + $notice.show().html(notice); + // This is for activating leanModal links that were in the notice. We should have a cleaner way of + // allowing all dynamically added leanmodal links to work. + $notice.find("a[rel*=leanModal]").leanModal({ top : 120, overlay: 1, closeButton: ".close-modal", position: 'absolute' }); } window.scrollTo(0, 0); e.preventDefault(); @@ -71,8 +77,13 @@ $(this).leanModal({ top : 120, overlay: 1, closeButton: ".close-modal", position: 'absolute' }); embed = $($(this).attr('href')).find('iframe') if(embed.length > 0) { - embed.data('src', embed.attr('src') + '?autoplay=1'); - embed.attr('src', ''); + if(embed.attr('src').indexOf("?") > 0) { + embed.data('src', embed.attr('src') + '&autoplay=1&rel=0'); + embed.attr('src', ''); + } else { + embed.data('src', embed.attr('src') + '?autoplay=1&rel=0'); + embed.attr('src', ''); + } } }); })(jQuery); diff --git a/lms/static/sass/application.scss b/lms/static/sass/application.scss index 282ffb1d5f..32e57ebcb1 100644 --- a/lms/static/sass/application.scss +++ b/lms/static/sass/application.scss @@ -8,13 +8,6 @@ @import 'base/extends'; @import 'base/animations'; - -// Courseware styles -@import 'sass_old/base/variables'; -@import 'sass_old/base/extends'; -@import 'sass_old/base/functions'; - - // Multicourse styles @import 'shared/forms'; @import 'shared/footer'; @@ -24,22 +17,12 @@ @import 'shared/modal'; @import 'shared/activation_messages'; -@import 'home'; -@import 'dashboard'; -@import 'courseware_subnav'; -@import 'courses'; -@import 'course_about'; -@import 'jobs'; -@import 'about_pages'; -@import 'press_release'; -@import 'password_reset'; -@import 'error-pages'; - - -// Courseware styles -@import 'sass_old/courseware/courseware'; -@import 'sass_old/courseware/sequence-nav'; -@import 'sass_old/courseware/sidebar'; -@import 'sass_old/courseware/video'; -@import 'sass_old/courseware/amplifier'; -@import 'sass_old/courseware/problems'; +@import 'multicourse/home'; +@import 'multicourse/dashboard'; +@import 'multicourse/courses'; +@import 'multicourse/course_about'; +@import 'multicourse/jobs'; +@import 'multicourse/about_pages'; +@import 'multicourse/press_release'; +@import 'multicourse/password_reset'; +@import 'multicourse/error-pages'; diff --git a/lms/static/sass/base/_font_face.scss b/lms/static/sass/base/_font_face.scss index 56b1c1f498..c57a0a9b09 100644 --- a/lms/static/sass/base/_font_face.scss +++ b/lms/static/sass/base/_font_face.scss @@ -1,6 +1,5 @@ /* Generated by Font Squirrel (http://www.fontsquirrel.com) on January 25, 2012 05:06:34 PM America/New_York */ - @font-face { font-family: 'Open Sans'; src: url('../fonts/OpenSans-Light-webfont.eot'); @@ -32,7 +31,7 @@ url('../fonts/OpenSans-Regular-webfont.woff') format('woff'), url('../fonts/OpenSans-Regular-webfont.ttf') format('truetype'), url('../fonts/OpenSans-Regular-webfont.svg#OpenSansRegular') format('svg'); - font-weight: 600; + font-weight: 400; font-style: normal; } @@ -49,31 +48,6 @@ } -// Not used in UI -// @font-face { -// font-family: 'Open Sans'; -// src: url('../fonts/OpenSans-Semibold-webfont.eot'); -// src: url('../fonts/OpenSans-Semibold-webfont.eot?#iefix') format('embedded-opentype'), -// url('../fonts/OpenSans-Semibold-webfont.woff') format('woff'), -// url('../fonts/OpenSans-Semibold-webfont.ttf') format('truetype'), -// url('../fonts/OpenSans-Semibold-webfont.svg#OpenSansSemibold') format('svg'); -// font-weight: 600; -// font-style: normal; - -// } - -// @font-face { -// font-family: 'Open Sans'; -// src: url('../fonts/OpenSans-SemiboldItalic-webfont.eot'); -// src: url('../fonts/OpenSans-SemiboldItalic-webfont.eot?#iefix') format('embedded-opentype'), -// url('../fonts/OpenSans-SemiboldItalic-webfont.woff') format('woff'), -// url('../fonts/OpenSans-SemiboldItalic-webfont.ttf') format('truetype'), -// url('../fonts/OpenSans-SemiboldItalic-webfont.svg#OpenSansSemiboldItalic') format('svg'); -// font-weight: 600; -// font-style: italic; - -// } - @font-face { font-family: 'Open Sans'; src: url('../fonts/OpenSans-Bold-webfont.eot'); diff --git a/lms/static/sass/course.scss b/lms/static/sass/course.scss new file mode 100644 index 0000000000..81d1e34a0e --- /dev/null +++ b/lms/static/sass/course.scss @@ -0,0 +1,23 @@ +@import 'bourbon/bourbon'; + +@import 'base/reset'; +@import 'base/font_face'; +@import 'base/variables'; +@import 'base/base'; +@import 'base/mixins'; +@import 'base/extends'; +@import 'base/animations'; + +// Course styles +@import 'course/courseware_subnav'; + +// Courseware styles +@import 'course/old/base/variables'; +@import 'course/old/base/extends'; +@import 'course/old/base/functions'; +@import 'course/old/courseware/courseware'; +@import 'course/old/courseware/sequence-nav'; +@import 'course/old/courseware/sidebar'; +@import 'course/old/courseware/video'; +@import 'course/old/courseware/amplifier'; +@import 'course/old/courseware/problems'; diff --git a/lms/static/sass/_courseware_subnav.scss b/lms/static/sass/course/_courseware_subnav.scss similarity index 100% rename from lms/static/sass/_courseware_subnav.scss rename to lms/static/sass/course/_courseware_subnav.scss diff --git a/lms/static/sass/sass_old/.gitignore b/lms/static/sass/course/old/.gitignore similarity index 100% rename from lms/static/sass/sass_old/.gitignore rename to lms/static/sass/course/old/.gitignore diff --git a/lms/static/sass/sass_old/README.md b/lms/static/sass/course/old/README.md similarity index 100% rename from lms/static/sass/sass_old/README.md rename to lms/static/sass/course/old/README.md diff --git a/lms/static/sass/sass_old/_gradebook.scss b/lms/static/sass/course/old/_gradebook.scss similarity index 100% rename from lms/static/sass/sass_old/_gradebook.scss rename to lms/static/sass/course/old/_gradebook.scss diff --git a/lms/static/sass/sass_old/_help.scss b/lms/static/sass/course/old/_help.scss similarity index 100% rename from lms/static/sass/sass_old/_help.scss rename to lms/static/sass/course/old/_help.scss diff --git a/lms/static/sass/sass_old/_info.scss b/lms/static/sass/course/old/_info.scss similarity index 100% rename from lms/static/sass/sass_old/_info.scss rename to lms/static/sass/course/old/_info.scss diff --git a/lms/static/sass/sass_old/_profile.scss b/lms/static/sass/course/old/_profile.scss similarity index 100% rename from lms/static/sass/sass_old/_profile.scss rename to lms/static/sass/course/old/_profile.scss diff --git a/lms/static/sass/sass_old/_textbook.scss b/lms/static/sass/course/old/_textbook.scss similarity index 100% rename from lms/static/sass/sass_old/_textbook.scss rename to lms/static/sass/course/old/_textbook.scss diff --git a/lms/static/sass/sass_old/application.scss b/lms/static/sass/course/old/application.scss similarity index 100% rename from lms/static/sass/sass_old/application.scss rename to lms/static/sass/course/old/application.scss diff --git a/lms/static/sass/sass_old/base/_base.scss b/lms/static/sass/course/old/base/_base.scss similarity index 100% rename from lms/static/sass/sass_old/base/_base.scss rename to lms/static/sass/course/old/base/_base.scss diff --git a/lms/static/sass/sass_old/base/_extends.scss b/lms/static/sass/course/old/base/_extends.scss similarity index 100% rename from lms/static/sass/sass_old/base/_extends.scss rename to lms/static/sass/course/old/base/_extends.scss diff --git a/lms/static/sass/sass_old/base/_font-face.scss b/lms/static/sass/course/old/base/_font-face.scss similarity index 100% rename from lms/static/sass/sass_old/base/_font-face.scss rename to lms/static/sass/course/old/base/_font-face.scss diff --git a/lms/static/sass/sass_old/base/_functions.scss b/lms/static/sass/course/old/base/_functions.scss similarity index 100% rename from lms/static/sass/sass_old/base/_functions.scss rename to lms/static/sass/course/old/base/_functions.scss diff --git a/lms/static/sass/sass_old/base/_reset.scss b/lms/static/sass/course/old/base/_reset.scss similarity index 100% rename from lms/static/sass/sass_old/base/_reset.scss rename to lms/static/sass/course/old/base/_reset.scss diff --git a/lms/static/sass/sass_old/base/_variables.scss b/lms/static/sass/course/old/base/_variables.scss similarity index 100% rename from lms/static/sass/sass_old/base/_variables.scss rename to lms/static/sass/course/old/base/_variables.scss diff --git a/lms/static/sass/sass_old/bourbon/_bourbon.scss b/lms/static/sass/course/old/bourbon/_bourbon.scss similarity index 100% rename from lms/static/sass/sass_old/bourbon/_bourbon.scss rename to lms/static/sass/course/old/bourbon/_bourbon.scss diff --git a/lms/static/sass/sass_old/bourbon/addons/_button.scss b/lms/static/sass/course/old/bourbon/addons/_button.scss similarity index 100% rename from lms/static/sass/sass_old/bourbon/addons/_button.scss rename to lms/static/sass/course/old/bourbon/addons/_button.scss diff --git a/lms/static/sass/sass_old/bourbon/addons/_clearfix.scss b/lms/static/sass/course/old/bourbon/addons/_clearfix.scss similarity index 100% rename from lms/static/sass/sass_old/bourbon/addons/_clearfix.scss rename to lms/static/sass/course/old/bourbon/addons/_clearfix.scss diff --git a/lms/static/sass/sass_old/bourbon/addons/_font-family.scss b/lms/static/sass/course/old/bourbon/addons/_font-family.scss similarity index 100% rename from lms/static/sass/sass_old/bourbon/addons/_font-family.scss rename to lms/static/sass/course/old/bourbon/addons/_font-family.scss diff --git a/lms/static/sass/sass_old/bourbon/addons/_html5-input-types.scss b/lms/static/sass/course/old/bourbon/addons/_html5-input-types.scss similarity index 100% rename from lms/static/sass/sass_old/bourbon/addons/_html5-input-types.scss rename to lms/static/sass/course/old/bourbon/addons/_html5-input-types.scss diff --git a/lms/static/sass/sass_old/bourbon/addons/_position.scss b/lms/static/sass/course/old/bourbon/addons/_position.scss similarity index 100% rename from lms/static/sass/sass_old/bourbon/addons/_position.scss rename to lms/static/sass/course/old/bourbon/addons/_position.scss diff --git a/lms/static/sass/sass_old/bourbon/addons/_timing-functions.scss b/lms/static/sass/course/old/bourbon/addons/_timing-functions.scss similarity index 100% rename from lms/static/sass/sass_old/bourbon/addons/_timing-functions.scss rename to lms/static/sass/course/old/bourbon/addons/_timing-functions.scss diff --git a/lms/static/sass/sass_old/bourbon/css3/_animation.scss b/lms/static/sass/course/old/bourbon/css3/_animation.scss similarity index 100% rename from lms/static/sass/sass_old/bourbon/css3/_animation.scss rename to lms/static/sass/course/old/bourbon/css3/_animation.scss diff --git a/lms/static/sass/sass_old/bourbon/css3/_appearance.scss b/lms/static/sass/course/old/bourbon/css3/_appearance.scss similarity index 100% rename from lms/static/sass/sass_old/bourbon/css3/_appearance.scss rename to lms/static/sass/course/old/bourbon/css3/_appearance.scss diff --git a/lms/static/sass/sass_old/bourbon/css3/_background-image.scss b/lms/static/sass/course/old/bourbon/css3/_background-image.scss similarity index 100% rename from lms/static/sass/sass_old/bourbon/css3/_background-image.scss rename to lms/static/sass/course/old/bourbon/css3/_background-image.scss diff --git a/lms/static/sass/sass_old/bourbon/css3/_background-size.scss b/lms/static/sass/course/old/bourbon/css3/_background-size.scss similarity index 100% rename from lms/static/sass/sass_old/bourbon/css3/_background-size.scss rename to lms/static/sass/course/old/bourbon/css3/_background-size.scss diff --git a/lms/static/sass/sass_old/bourbon/css3/_border-image.scss b/lms/static/sass/course/old/bourbon/css3/_border-image.scss similarity index 100% rename from lms/static/sass/sass_old/bourbon/css3/_border-image.scss rename to lms/static/sass/course/old/bourbon/css3/_border-image.scss diff --git a/lms/static/sass/sass_old/bourbon/css3/_border-radius.scss b/lms/static/sass/course/old/bourbon/css3/_border-radius.scss similarity index 100% rename from lms/static/sass/sass_old/bourbon/css3/_border-radius.scss rename to lms/static/sass/course/old/bourbon/css3/_border-radius.scss diff --git a/lms/static/sass/sass_old/bourbon/css3/_box-shadow.scss b/lms/static/sass/course/old/bourbon/css3/_box-shadow.scss similarity index 100% rename from lms/static/sass/sass_old/bourbon/css3/_box-shadow.scss rename to lms/static/sass/course/old/bourbon/css3/_box-shadow.scss diff --git a/lms/static/sass/sass_old/bourbon/css3/_box-sizing.scss b/lms/static/sass/course/old/bourbon/css3/_box-sizing.scss similarity index 100% rename from lms/static/sass/sass_old/bourbon/css3/_box-sizing.scss rename to lms/static/sass/course/old/bourbon/css3/_box-sizing.scss diff --git a/lms/static/sass/sass_old/bourbon/css3/_columns.scss b/lms/static/sass/course/old/bourbon/css3/_columns.scss similarity index 100% rename from lms/static/sass/sass_old/bourbon/css3/_columns.scss rename to lms/static/sass/course/old/bourbon/css3/_columns.scss diff --git a/lms/static/sass/sass_old/bourbon/css3/_flex-box.scss b/lms/static/sass/course/old/bourbon/css3/_flex-box.scss similarity index 100% rename from lms/static/sass/sass_old/bourbon/css3/_flex-box.scss rename to lms/static/sass/course/old/bourbon/css3/_flex-box.scss diff --git a/lms/static/sass/sass_old/bourbon/css3/_inline-block.scss b/lms/static/sass/course/old/bourbon/css3/_inline-block.scss similarity index 100% rename from lms/static/sass/sass_old/bourbon/css3/_inline-block.scss rename to lms/static/sass/course/old/bourbon/css3/_inline-block.scss diff --git a/lms/static/sass/sass_old/bourbon/css3/_linear-gradient.scss b/lms/static/sass/course/old/bourbon/css3/_linear-gradient.scss similarity index 100% rename from lms/static/sass/sass_old/bourbon/css3/_linear-gradient.scss rename to lms/static/sass/course/old/bourbon/css3/_linear-gradient.scss diff --git a/lms/static/sass/sass_old/bourbon/css3/_radial-gradient.scss b/lms/static/sass/course/old/bourbon/css3/_radial-gradient.scss similarity index 100% rename from lms/static/sass/sass_old/bourbon/css3/_radial-gradient.scss rename to lms/static/sass/course/old/bourbon/css3/_radial-gradient.scss diff --git a/lms/static/sass/sass_old/bourbon/css3/_transform.scss b/lms/static/sass/course/old/bourbon/css3/_transform.scss similarity index 100% rename from lms/static/sass/sass_old/bourbon/css3/_transform.scss rename to lms/static/sass/course/old/bourbon/css3/_transform.scss diff --git a/lms/static/sass/sass_old/bourbon/css3/_transition.scss b/lms/static/sass/course/old/bourbon/css3/_transition.scss similarity index 100% rename from lms/static/sass/sass_old/bourbon/css3/_transition.scss rename to lms/static/sass/course/old/bourbon/css3/_transition.scss diff --git a/lms/static/sass/sass_old/bourbon/css3/_user-select.scss b/lms/static/sass/course/old/bourbon/css3/_user-select.scss similarity index 100% rename from lms/static/sass/sass_old/bourbon/css3/_user-select.scss rename to lms/static/sass/course/old/bourbon/css3/_user-select.scss diff --git a/lms/static/sass/sass_old/bourbon/functions/_deprecated-webkit-gradient.scss b/lms/static/sass/course/old/bourbon/functions/_deprecated-webkit-gradient.scss similarity index 100% rename from lms/static/sass/sass_old/bourbon/functions/_deprecated-webkit-gradient.scss rename to lms/static/sass/course/old/bourbon/functions/_deprecated-webkit-gradient.scss diff --git a/lms/static/sass/sass_old/bourbon/functions/_flex-grid.scss b/lms/static/sass/course/old/bourbon/functions/_flex-grid.scss similarity index 100% rename from lms/static/sass/sass_old/bourbon/functions/_flex-grid.scss rename to lms/static/sass/course/old/bourbon/functions/_flex-grid.scss diff --git a/lms/static/sass/sass_old/bourbon/functions/_grid-width.scss b/lms/static/sass/course/old/bourbon/functions/_grid-width.scss similarity index 100% rename from lms/static/sass/sass_old/bourbon/functions/_grid-width.scss rename to lms/static/sass/course/old/bourbon/functions/_grid-width.scss diff --git a/lms/static/sass/sass_old/bourbon/functions/_linear-gradient.scss b/lms/static/sass/course/old/bourbon/functions/_linear-gradient.scss similarity index 100% rename from lms/static/sass/sass_old/bourbon/functions/_linear-gradient.scss rename to lms/static/sass/course/old/bourbon/functions/_linear-gradient.scss diff --git a/lms/static/sass/sass_old/bourbon/functions/_modular-scale.scss b/lms/static/sass/course/old/bourbon/functions/_modular-scale.scss similarity index 100% rename from lms/static/sass/sass_old/bourbon/functions/_modular-scale.scss rename to lms/static/sass/course/old/bourbon/functions/_modular-scale.scss diff --git a/lms/static/sass/sass_old/bourbon/functions/_radial-gradient.scss b/lms/static/sass/course/old/bourbon/functions/_radial-gradient.scss similarity index 100% rename from lms/static/sass/sass_old/bourbon/functions/_radial-gradient.scss rename to lms/static/sass/course/old/bourbon/functions/_radial-gradient.scss diff --git a/lms/static/sass/sass_old/bourbon/functions/_render-gradients.scss b/lms/static/sass/course/old/bourbon/functions/_render-gradients.scss similarity index 100% rename from lms/static/sass/sass_old/bourbon/functions/_render-gradients.scss rename to lms/static/sass/course/old/bourbon/functions/_render-gradients.scss diff --git a/lms/static/sass/sass_old/bourbon/functions/_tint-shade.scss b/lms/static/sass/course/old/bourbon/functions/_tint-shade.scss similarity index 100% rename from lms/static/sass/sass_old/bourbon/functions/_tint-shade.scss rename to lms/static/sass/course/old/bourbon/functions/_tint-shade.scss diff --git a/lms/static/sass/sass_old/bourbon/lib/bourbon.rb b/lms/static/sass/course/old/bourbon/lib/bourbon.rb similarity index 100% rename from lms/static/sass/sass_old/bourbon/lib/bourbon.rb rename to lms/static/sass/course/old/bourbon/lib/bourbon.rb diff --git a/lms/static/sass/sass_old/bourbon/lib/bourbon/sass_extensions.rb b/lms/static/sass/course/old/bourbon/lib/bourbon/sass_extensions.rb similarity index 100% rename from lms/static/sass/sass_old/bourbon/lib/bourbon/sass_extensions.rb rename to lms/static/sass/course/old/bourbon/lib/bourbon/sass_extensions.rb diff --git a/lms/static/sass/sass_old/bourbon/lib/bourbon/sass_extensions/functions.rb b/lms/static/sass/course/old/bourbon/lib/bourbon/sass_extensions/functions.rb similarity index 100% rename from lms/static/sass/sass_old/bourbon/lib/bourbon/sass_extensions/functions.rb rename to lms/static/sass/course/old/bourbon/lib/bourbon/sass_extensions/functions.rb diff --git a/lms/static/sass/sass_old/bourbon/lib/bourbon/sass_extensions/functions/compact.rb b/lms/static/sass/course/old/bourbon/lib/bourbon/sass_extensions/functions/compact.rb similarity index 100% rename from lms/static/sass/sass_old/bourbon/lib/bourbon/sass_extensions/functions/compact.rb rename to lms/static/sass/course/old/bourbon/lib/bourbon/sass_extensions/functions/compact.rb diff --git a/lms/static/sass/sass_old/courseware/_amplifier.scss b/lms/static/sass/course/old/courseware/_amplifier.scss similarity index 100% rename from lms/static/sass/sass_old/courseware/_amplifier.scss rename to lms/static/sass/course/old/courseware/_amplifier.scss diff --git a/lms/static/sass/sass_old/courseware/_courseware.scss b/lms/static/sass/course/old/courseware/_courseware.scss similarity index 100% rename from lms/static/sass/sass_old/courseware/_courseware.scss rename to lms/static/sass/course/old/courseware/_courseware.scss diff --git a/lms/static/sass/sass_old/courseware/_problems.scss b/lms/static/sass/course/old/courseware/_problems.scss similarity index 100% rename from lms/static/sass/sass_old/courseware/_problems.scss rename to lms/static/sass/course/old/courseware/_problems.scss diff --git a/lms/static/sass/sass_old/courseware/_sequence-nav.scss b/lms/static/sass/course/old/courseware/_sequence-nav.scss similarity index 100% rename from lms/static/sass/sass_old/courseware/_sequence-nav.scss rename to lms/static/sass/course/old/courseware/_sequence-nav.scss diff --git a/lms/static/sass/sass_old/courseware/_sidebar.scss b/lms/static/sass/course/old/courseware/_sidebar.scss similarity index 100% rename from lms/static/sass/sass_old/courseware/_sidebar.scss rename to lms/static/sass/course/old/courseware/_sidebar.scss diff --git a/lms/static/sass/sass_old/courseware/_video.scss b/lms/static/sass/course/old/courseware/_video.scss similarity index 100% rename from lms/static/sass/sass_old/courseware/_video.scss rename to lms/static/sass/course/old/courseware/_video.scss diff --git a/lms/static/sass/sass_old/discussion/_answers.scss b/lms/static/sass/course/old/discussion/_answers.scss similarity index 100% rename from lms/static/sass/sass_old/discussion/_answers.scss rename to lms/static/sass/course/old/discussion/_answers.scss diff --git a/lms/static/sass/sass_old/discussion/_askbot-original.scss b/lms/static/sass/course/old/discussion/_askbot-original.scss similarity index 100% rename from lms/static/sass/sass_old/discussion/_askbot-original.scss rename to lms/static/sass/course/old/discussion/_askbot-original.scss diff --git a/lms/static/sass/sass_old/discussion/_badges.scss b/lms/static/sass/course/old/discussion/_badges.scss similarity index 100% rename from lms/static/sass/sass_old/discussion/_badges.scss rename to lms/static/sass/course/old/discussion/_badges.scss diff --git a/lms/static/sass/sass_old/discussion/_discussion.scss b/lms/static/sass/course/old/discussion/_discussion.scss similarity index 100% rename from lms/static/sass/sass_old/discussion/_discussion.scss rename to lms/static/sass/course/old/discussion/_discussion.scss diff --git a/lms/static/sass/sass_old/discussion/_form-wmd-toolbar.scss b/lms/static/sass/course/old/discussion/_form-wmd-toolbar.scss similarity index 100% rename from lms/static/sass/sass_old/discussion/_form-wmd-toolbar.scss rename to lms/static/sass/course/old/discussion/_form-wmd-toolbar.scss diff --git a/lms/static/sass/sass_old/discussion/_forms.scss b/lms/static/sass/course/old/discussion/_forms.scss similarity index 100% rename from lms/static/sass/sass_old/discussion/_forms.scss rename to lms/static/sass/course/old/discussion/_forms.scss diff --git a/lms/static/sass/sass_old/discussion/_modals.scss b/lms/static/sass/course/old/discussion/_modals.scss similarity index 100% rename from lms/static/sass/sass_old/discussion/_modals.scss rename to lms/static/sass/course/old/discussion/_modals.scss diff --git a/lms/static/sass/sass_old/discussion/_profile.scss b/lms/static/sass/course/old/discussion/_profile.scss similarity index 100% rename from lms/static/sass/sass_old/discussion/_profile.scss rename to lms/static/sass/course/old/discussion/_profile.scss diff --git a/lms/static/sass/sass_old/discussion/_question-view.scss b/lms/static/sass/course/old/discussion/_question-view.scss similarity index 100% rename from lms/static/sass/sass_old/discussion/_question-view.scss rename to lms/static/sass/course/old/discussion/_question-view.scss diff --git a/lms/static/sass/sass_old/discussion/_questions.scss b/lms/static/sass/course/old/discussion/_questions.scss similarity index 100% rename from lms/static/sass/sass_old/discussion/_questions.scss rename to lms/static/sass/course/old/discussion/_questions.scss diff --git a/lms/static/sass/sass_old/discussion/_sidebar.scss b/lms/static/sass/course/old/discussion/_sidebar.scss similarity index 100% rename from lms/static/sass/sass_old/discussion/_sidebar.scss rename to lms/static/sass/course/old/discussion/_sidebar.scss diff --git a/lms/static/sass/sass_old/discussion/_tags.scss b/lms/static/sass/course/old/discussion/_tags.scss similarity index 100% rename from lms/static/sass/sass_old/discussion/_tags.scss rename to lms/static/sass/course/old/discussion/_tags.scss diff --git a/lms/static/sass/sass_old/layout/_calculator.scss b/lms/static/sass/course/old/layout/_calculator.scss similarity index 100% rename from lms/static/sass/sass_old/layout/_calculator.scss rename to lms/static/sass/course/old/layout/_calculator.scss diff --git a/lms/static/sass/sass_old/layout/_footer.scss b/lms/static/sass/course/old/layout/_footer.scss similarity index 100% rename from lms/static/sass/sass_old/layout/_footer.scss rename to lms/static/sass/course/old/layout/_footer.scss diff --git a/lms/static/sass/sass_old/layout/_header.scss b/lms/static/sass/course/old/layout/_header.scss similarity index 100% rename from lms/static/sass/sass_old/layout/_header.scss rename to lms/static/sass/course/old/layout/_header.scss diff --git a/lms/static/sass/sass_old/layout/_layout.scss b/lms/static/sass/course/old/layout/_layout.scss similarity index 100% rename from lms/static/sass/sass_old/layout/_layout.scss rename to lms/static/sass/course/old/layout/_layout.scss diff --git a/lms/static/sass/sass_old/layout/_leanmodal.scss b/lms/static/sass/course/old/layout/_leanmodal.scss similarity index 98% rename from lms/static/sass/sass_old/layout/_leanmodal.scss rename to lms/static/sass/course/old/layout/_leanmodal.scss index 81639493ee..0c96e6524a 100644 --- a/lms/static/sass/sass_old/layout/_leanmodal.scss +++ b/lms/static/sass/course/old/layout/_leanmodal.scss @@ -84,7 +84,7 @@ div.leanModal_box { form { text-align: left; - div#enroll_error, div#login_error, div#pwd_error { + div#register_error, div#login_error, div#pwd_error { $error-color: #333; background-color: $error-color; border: darken($error-color, 20%); diff --git a/lms/static/sass/sass_old/marketing-ie.scss b/lms/static/sass/course/old/marketing-ie.scss similarity index 100% rename from lms/static/sass/sass_old/marketing-ie.scss rename to lms/static/sass/course/old/marketing-ie.scss diff --git a/lms/static/sass/sass_old/marketing.scss b/lms/static/sass/course/old/marketing.scss similarity index 100% rename from lms/static/sass/sass_old/marketing.scss rename to lms/static/sass/course/old/marketing.scss diff --git a/lms/static/sass/sass_old/marketing/_base.scss b/lms/static/sass/course/old/marketing/_base.scss similarity index 100% rename from lms/static/sass/sass_old/marketing/_base.scss rename to lms/static/sass/course/old/marketing/_base.scss diff --git a/lms/static/sass/sass_old/marketing/_extends.scss b/lms/static/sass/course/old/marketing/_extends.scss similarity index 100% rename from lms/static/sass/sass_old/marketing/_extends.scss rename to lms/static/sass/course/old/marketing/_extends.scss diff --git a/lms/static/sass/sass_old/marketing/_footer.scss b/lms/static/sass/course/old/marketing/_footer.scss similarity index 100% rename from lms/static/sass/sass_old/marketing/_footer.scss rename to lms/static/sass/course/old/marketing/_footer.scss diff --git a/lms/static/sass/sass_old/marketing/_header.scss b/lms/static/sass/course/old/marketing/_header.scss similarity index 100% rename from lms/static/sass/sass_old/marketing/_header.scss rename to lms/static/sass/course/old/marketing/_header.scss diff --git a/lms/static/sass/sass_old/marketing/_index.scss b/lms/static/sass/course/old/marketing/_index.scss similarity index 100% rename from lms/static/sass/sass_old/marketing/_index.scss rename to lms/static/sass/course/old/marketing/_index.scss diff --git a/lms/static/sass/sass_old/marketing/_variables.scss b/lms/static/sass/course/old/marketing/_variables.scss similarity index 100% rename from lms/static/sass/sass_old/marketing/_variables.scss rename to lms/static/sass/course/old/marketing/_variables.scss diff --git a/lms/static/sass/sass_old/plugins/_jquery-ui-1.8.16.custom.scss b/lms/static/sass/course/old/plugins/_jquery-ui-1.8.16.custom.scss similarity index 100% rename from lms/static/sass/sass_old/plugins/_jquery-ui-1.8.16.custom.scss rename to lms/static/sass/course/old/plugins/_jquery-ui-1.8.16.custom.scss diff --git a/lms/static/sass/sass_old/plugins/_jquery.qtip.min.scss b/lms/static/sass/course/old/plugins/_jquery.qtip.min.scss similarity index 100% rename from lms/static/sass/sass_old/plugins/_jquery.qtip.min.scss rename to lms/static/sass/course/old/plugins/_jquery.qtip.min.scss diff --git a/lms/static/sass/sass_old/print.scss b/lms/static/sass/course/old/print.scss similarity index 100% rename from lms/static/sass/sass_old/print.scss rename to lms/static/sass/course/old/print.scss diff --git a/lms/static/sass/sass_old/wiki/_basic-html.scss b/lms/static/sass/course/old/wiki/_basic-html.scss similarity index 100% rename from lms/static/sass/sass_old/wiki/_basic-html.scss rename to lms/static/sass/course/old/wiki/_basic-html.scss diff --git a/lms/static/sass/sass_old/wiki/_create.scss b/lms/static/sass/course/old/wiki/_create.scss similarity index 100% rename from lms/static/sass/sass_old/wiki/_create.scss rename to lms/static/sass/course/old/wiki/_create.scss diff --git a/lms/static/sass/sass_old/wiki/_sidebar.scss b/lms/static/sass/course/old/wiki/_sidebar.scss similarity index 100% rename from lms/static/sass/sass_old/wiki/_sidebar.scss rename to lms/static/sass/course/old/wiki/_sidebar.scss diff --git a/lms/static/sass/sass_old/wiki/_table.scss b/lms/static/sass/course/old/wiki/_table.scss similarity index 100% rename from lms/static/sass/sass_old/wiki/_table.scss rename to lms/static/sass/course/old/wiki/_table.scss diff --git a/lms/static/sass/sass_old/wiki/_wiki.scss b/lms/static/sass/course/old/wiki/_wiki.scss similarity index 100% rename from lms/static/sass/sass_old/wiki/_wiki.scss rename to lms/static/sass/course/old/wiki/_wiki.scss diff --git a/lms/static/sass/_about_pages.scss b/lms/static/sass/multicourse/_about_pages.scss similarity index 100% rename from lms/static/sass/_about_pages.scss rename to lms/static/sass/multicourse/_about_pages.scss diff --git a/lms/static/sass/_course_about.scss b/lms/static/sass/multicourse/_course_about.scss similarity index 100% rename from lms/static/sass/_course_about.scss rename to lms/static/sass/multicourse/_course_about.scss diff --git a/lms/static/sass/_courses.scss b/lms/static/sass/multicourse/_courses.scss similarity index 100% rename from lms/static/sass/_courses.scss rename to lms/static/sass/multicourse/_courses.scss diff --git a/lms/static/sass/_dashboard.scss b/lms/static/sass/multicourse/_dashboard.scss similarity index 100% rename from lms/static/sass/_dashboard.scss rename to lms/static/sass/multicourse/_dashboard.scss diff --git a/lms/static/sass/_error-pages.scss b/lms/static/sass/multicourse/_error-pages.scss similarity index 100% rename from lms/static/sass/_error-pages.scss rename to lms/static/sass/multicourse/_error-pages.scss diff --git a/lms/static/sass/_home.scss b/lms/static/sass/multicourse/_home.scss similarity index 74% rename from lms/static/sass/_home.scss rename to lms/static/sass/multicourse/_home.scss index 4ef25f106c..c7cda46cb4 100644 --- a/lms/static/sass/_home.scss +++ b/lms/static/sass/multicourse/_home.scss @@ -8,7 +8,7 @@ border-bottom: 1px solid rgb(80,80,80); @include box-shadow(0 1px 0 0 rgba(255,255,255, 0.9), inset 0 -1px 5px 0 rgba(0,0,0, 0.1)); @include clearfix; - height: 430px; + height: 460px; margin-top: -69px; overflow: hidden; padding: 0px; @@ -17,10 +17,11 @@ .outer-wrapper { @extend .animation-home-header-pop-up; margin: 0 auto; - padding: 200px 10px 0px; + padding: 240px 10px 0px; position: relative; max-width: 1200px; min-width: 760px; + @include clearfix; } .title { @@ -30,29 +31,16 @@ @include box-shadow(0 4px 25px 0 rgba(0,0,0, 0.5)); @include box-sizing(border-box); height: 120px; - @include inline-block; - margin-left: grid-width(1) + $gw-gutter; - margin-right: $gw-gutter; + margin-left: grid-width(2) + $gw-gutter; + float: left; position: relative; text-align: center; @include transition(all, 0.2s, linear); vertical-align: top; &:hover { - height: 165px; - - > hgroup { - h1 { - border-bottom: 1px solid rgb(200,200,200); - padding-bottom: 10px; - } - h2 { - opacity: 0; - } - } - .actions { - opacity: 1; + display: none; } } @@ -80,123 +68,21 @@ text-transform: lowercase; } } + } - .actions { - @include clearfix; - @include box-sizing(border-box); - left: 0px; - opacity: 0; - padding: 20px 30px 0px; - position: absolute; - @include transition(opacity, 0.2s, linear); - top: 75px; - width: flex-grid(12); - - .main-cta { - float: left; - margin-right: flex-gutter(); - width: flex-grid(6); - - > a.find-courses { - @include button(shiny, $blue); - @include box-sizing(border-box); - @include border-radius(3px); - display: block; - font: normal 1.2rem/1.6rem $sans-serif; - letter-spacing: 1px; - padding: 10px 0px; - text-transform: uppercase; - text-align: center; - width: flex-grid(12); - - &:hover { - color: rgb(255,255,255); - } - } - } - - .secondary-actions { - @include box-sizing(border-box); - @include clearfix; - float: left; - width: flex-grid(6); - - .social-sharing { - @include box-sizing(border-box); - float: left; - height: 44px; - margin-right: flex-gutter(); - position: relative; - text-align: center; - width: flex-grid(12); - - &:hover { - .sharing-message { - opacity: 1; - top: 50px; - } - } - - .sharing-message { - @include background-image(linear-gradient(-90deg, rgba(0,0,0, 0.9) 0%, - rgba(0,0,0, 0.7) 100%)); - border: 1px solid rgba(0,0,0, 0.5); - @include border-radius(4px); - @include box-shadow(0 4px 25px 0 rgba(0,0,0, 0.5)); - @include box-sizing(border-box); - color: rgb(255,255,255); - float: right; - font-family: $serif; - font-size: 0.9em; - font-style: italic; - left: 50%; - margin-left: -110px; - opacity: 0; - padding: 6px 10px; - position: absolute; - text-align: center; - @include transition(all, 0.15s, ease-out); - top: 25px; - width: 220px; - - &:hover { - opacity: 0; - } - } - - .share { - height: 44px; - @include inline-block; - margin-right: 10px; - opacity: 0.5; - @include transition(all, 0.15s, linear); - width: 44px; - - &:hover { - opacity: 1; - } - - img { - width: 100%; - } - - &:last-child { - margin-right: 0px; - } - } - } - } - } + .actions { + display: none; } .media { background: #FFF; background: rgba(255,255,255, 0.93); border: 1px solid rgb(100,100,100); + border-left: 0; @include box-sizing(border-box); - @include box-shadow(0 4px 25px 0 rgba(0,0,0, 0.5)); + // @include box-shadow(0 4px 25px 0 rgba(0,0,0, 0.5)); height: 120px; - @include inline-block; + float: left; padding: 4px; position: relative; vertical-align: top; @@ -249,8 +135,6 @@ } &:hover { - cursor: pointer; - .play-intro { @include background-image(linear-gradient(-90deg, rgba(0,0,0, 0.75), rgba(0,0,0, 0.8))); @include box-shadow(0 1px 12px 0 rgba(0,0,0, 0.5)); diff --git a/lms/static/sass/_jobs.scss b/lms/static/sass/multicourse/_jobs.scss similarity index 100% rename from lms/static/sass/_jobs.scss rename to lms/static/sass/multicourse/_jobs.scss diff --git a/lms/static/sass/_password_reset.scss b/lms/static/sass/multicourse/_password_reset.scss similarity index 100% rename from lms/static/sass/_password_reset.scss rename to lms/static/sass/multicourse/_password_reset.scss diff --git a/lms/static/sass/_press_release.scss b/lms/static/sass/multicourse/_press_release.scss similarity index 100% rename from lms/static/sass/_press_release.scss rename to lms/static/sass/multicourse/_press_release.scss diff --git a/lms/static/sass/shared/_modal.scss b/lms/static/sass/shared/_modal.scss index 5e132a0993..aea82910c7 100644 --- a/lms/static/sass/shared/_modal.scss +++ b/lms/static/sass/shared/_modal.scss @@ -210,7 +210,7 @@ .citizenship, .gender { float: left; - width: flex-grid(6); + width: flex-grid(4); } .citizenship { diff --git a/lms/templates/activation_active.html b/lms/templates/activation_active.html deleted file mode 100644 index b3ac51d055..0000000000 --- a/lms/templates/activation_active.html +++ /dev/null @@ -1,14 +0,0 @@ -<%! from django.core.urlresolvers import reverse %> -<%inherit file="main.html" /> - -<%namespace name='static' file='static_content.html'/> - -
- -
-

Account already active!

-
- -

This account has already been activated. You can now login.

-
-
diff --git a/lms/templates/activation_complete.html b/lms/templates/activation_complete.html deleted file mode 100644 index f48e8896b4..0000000000 --- a/lms/templates/activation_complete.html +++ /dev/null @@ -1,14 +0,0 @@ -<%! from django.core.urlresolvers import reverse %> -<%inherit file="main.html" /> - -<%namespace name='static' file='static_content.html'/> - -
- -
-

Activation Complete!

-
- -

Thanks for activating your account. You can now login.

-
-
diff --git a/lms/templates/contact.html b/lms/templates/contact.html index 44383afc73..940d4862c4 100644 --- a/lms/templates/contact.html +++ b/lms/templates/contact.html @@ -19,7 +19,7 @@

We are always seeking feedback to improve our courses. If you are an enrolled student and have any questions, feedback, suggestions, or any other issues specific to a particular class, please post on the discussion forums of that class.

General Inquiries and Feedback

-

"If you have a general question about edX please email info@edx.org. To see if your question has already been answered, visit ourFAQ page. You can also join the discussion on our facebook page. Though we may not have a chance to respond to every email, we take all feedback into consideration.

+

"If you have a general question about edX please email info@edx.org. To see if your question has already been answered, visit our FAQ page. You can also join the discussion on our facebook page. Though we may not have a chance to respond to every email, we take all feedback into consideration.

Technical Inquiries and Feedback

If you have suggestions/feedback about the overall edX platform, or are facing general technical issues with the platform (e.g., issues with email addresses and passwords), you can reach us at technical@edx.org. For technical questions, please make sure you are using a current version of Firefox or Chrome, and include browser and version in your e-mail, as well as screenshots or other pertinent details. If you find a bug or other issues, you can reach us at the following: bugs@edx.org.

diff --git a/lms/templates/courseware.html b/lms/templates/courseware.html index 599383c3e2..464760f8da 100644 --- a/lms/templates/courseware.html +++ b/lms/templates/courseware.html @@ -3,16 +3,35 @@ <%block name="bodyclass">courseware <%block name="title">Courseware – MITx 6.002x -<%block name="headextra"> - - - <%block name="js_extra"> - - + + + ## codemirror + + + ## alternate codemirror + ## + ## + ## + + ## image input: for clicking on images (see imageinput.html) + + + ## TODO (cpennington): Remove this when we have a good way for modules to specify js to load on the page + ## and in the wiki + + + + <%static:js group='courseware'/> + <%static:css group='course'/> + + <%include file="mathjax_include.html" /> + + + <%include file="course_navigation.html" args="active_page='courseware'" /> diff --git a/lms/templates/dashboard.html b/lms/templates/dashboard.html index a12b8c2f37..c0273ef709 100644 --- a/lms/templates/dashboard.html +++ b/lms/templates/dashboard.html @@ -8,7 +8,36 @@ <%block name="title">Dashboard +<%block name="js_extra"> + + +
+ +
+ ${message} +
+
@@ -48,10 +77,10 @@
${get_course_about_section(course, 'university')} -

${get_course_about_section(course, "title")}

+

${course.number} ${course.title}

-

Class Starts - 9/2/2012

+

Class Starts - ${course.start_date_text}

@@ -61,7 +90,7 @@
-

60% complete

+ ##

60% complete

@@ -105,25 +134,3 @@ - - diff --git a/lms/templates/gradebook.html b/lms/templates/gradebook.html index 12f820c8c9..7c2908dc77 100644 --- a/lms/templates/gradebook.html +++ b/lms/templates/gradebook.html @@ -1,10 +1,13 @@ <%inherit file="main.html" /> <%namespace name='static' file='static_content.html'/> -<%block name="headextra"> +<%block name="js_extra"> + + +<%block name="headextra">