Skip to content
Snippets Groups Projects
  • Calen Pennington's avatar
    WIP: Merging multicourse and xmodule descriptor changes · a1f98e76
    Calen Pennington authored
    The basic form has been fleshed out. Things still to do:
    1) Extend get_course interface to the rest of modulestore
    2) Make courses actually load
    3) Make org/course/maybe others metadata attributes for course_module (see xml_module), so
    that they are loaded/saved on import/export to xml
    a1f98e76
views.py 449 B
from django.contrib.auth.decorators import login_required
from mitxmako.shortcuts import render_to_response

@login_required
def index(request, course_id=None, page=0): 
    course_location = CourseDescriptor.id_to_location(course_id)
    course = modulestore().get_item(course_location)
    return render_to_response('staticbook.html',{'page':int(page), 'course': course})

def index_shifted(request, page):
    return index(request, int(page)+24)