======================================================
The Build a Course Portlet - Course Creation Made Easy
======================================================

The Build A Course portlet makes it simple to create a basic course with
commonly used documents. To use the Build a Course portlet, simply log in (you 
must have the correct permissions to use the portlet) and click on the 
'Build a Course' link in the right column. Enter information about the course
and click submit.

This document provides a demonstration of this functionality by using the portlet
to build a Biology course. 

To create the course we first login as a Producer.

    >>> from Products.Five.testbrowser import Browser
    >>> browser = Browser()
    >>> portal_url = self.portal.absolute_url()
    >>> browser.open(portal_url)
    >>> self.setRoles(['Producer',])
    >>> self.portal.portal_membership.addMember('produceruser','secret',('Producer',),())
    >>> browser.getLink('Log in').click()
    >>> browser.getControl('Login Name').value = 'produceruser'
    >>> browser.getControl('Password').value = 'secret'
    >>> browser.getControl('Log in').click()

Click on the *Build a Course* link to build a course and enter some information about the course.

    >>> browser.getLink('Build a Course').click()
    >>> 'Create a new course using the fields below.' in browser.contents
    True
    >>> browser.getControl(name='form.newdivision').value = 'Biology'
    >>> browser.getControl('Title').value = 'Introduction to Biology'
    >>> browser.getControl('Course ID').value = 'BIO101'
    >>> browser.getControl('Term').value = 'Fall 2004'
    >>> browser.getControl(name='form.templates').getControl(value='schedule_view').selected = False
    >>> browser.getControl('Submit').click()

The preview screen allows us to customize the course page and add additional information 
about the course.

    >>> browser.getControl('Description').value = 'This is an introductory Biology Course'
    >>> browser.getControl('Level').value = ['Graduate']
    >>> browser.getControl('Instructor Name').value = 'Dr. Biologia'
    >>> browser.getControl('Display Instructor Email Address').selected = True
    >>> browser.getControl('Instructor is Primary Author').selected = True
    >>> browser.getControl('Save').click()

We now verify that information is displaying correctly

    >>> 'Introduction to Biology' in browser.contents
    True
    >>> 'Fall 2004' in browser.contents
    True
    >>> 'BIO101' in browser.contents
    True
    >>> 'Put any additional information about the course not in the right hand side of the box here.' in browser.contents
    True

and verify that the syllabus and about pages were created correctly.

    >>> browser.getLink('Syllabus').click()
    >>> 'Paragraph about Course' in browser.contents
    True
    >>> browser.getLink('About Professor').click()
    >>> 'About Professor' in browser.contents
    True

The course has been successfully created! You can now edit the information in the
course and add additional content.
