This dissertation investigates the design of large online courses from the pedagogical perspective of knowledge communities. Much of the learning sciences literature has concerned itself with groups of up to 20-30 students, but in universities, courses of several hundred to more than a thousand students are common. At the same time, new models for life-long and informal learning, such as Massive Open Online Courses, are emerging. Amidst this growing enthusiasm for innovation around technology and design in teaching, there is a need for theoretically grounded innovations and rigorous research around practical models that support new approaches to learning. One recent model, known as Knowledge Community and Inquiry (KCI), engages students in the co-construction of a community knowledge base, with a commonly held understanding of the collective nature of their learning, and then provides a sequence of scaffolded inquiry activities where students make use of the knowledge base as a resource. Inspired by this approach to designing courses, the research began with a redesign of an in-service teacher education course, which increased in size from 25 to 75 students. This redesign was carefully analyzed, and design principles extracted. The second step was the design of a Massive Open Online Course for several thousand in-service teachers on technology and inquiry, in collaboration with an affiliated secondary school. A number of innovative design ideas were necessary to accommodate the large number of users, the much larger diversity in terms of background, interest, and engagement among MOOC learners, and the opportunities provided by the platform. The resulting design encompasses a 6- week long curriculum script, and a number of overlapping micro-scripts supported by a custom- written platform that integrated with the EdX platform in a seamless manner. This thesis presents the course structure, including connection to disciplinary principles, its affordances for community and collaboration and its support of individual differentiated learning and collective epistemology. It offers design principles for scripting and orchestrating collective inquiry designs for MOOCS and higher education courses.