Index: waeup/branches/ulif-layout/src/waeup/browser.txt
===================================================================
--- waeup/branches/ulif-layout/src/waeup/browser.txt	(revision 4762)
+++ waeup/branches/ulif-layout/src/waeup/browser.txt	(revision 4763)
@@ -555,4 +555,164 @@
 
 
+CertificateCourses
+==================
+
+Once we have a certificate, we can add also certificate courses. These
+are references to courses with some extra data.
+
+Before we can work with certificate courses, we need some certificates
+and courses to be available.
+
+  >>> root = getRootFolder()
+  >>> dept = root['myuniversity']['faculties']['TF']['TD']
+
+  >>> browser.open(dept_url + '/addcourse')
+  >>> ctrl = browser.getControl(name='form.title')
+  >>> ctrl.value = 'Another course with same code'
+  >>> browser.getControl(name='form.code').value = 'COURSE1'
+  >>> browser.getControl(name='form.title').value = 'Course 1'	
+  >>> browser.getControl('Add course').click()
+
+  >>> browser.open(dept_url + '/addcourse')
+  >>> ctrl = browser.getControl(name='form.title')
+  >>> ctrl.value = 'Another course with same code'
+  >>> browser.getControl(name='form.code').value = 'COURSE2'
+  >>> browser.getControl(name='form.title').value = 'Course 2'
+  >>> browser.getControl('Add course').click()
+
+  >>> browser.open(dept_url + '/addcertificate')
+  >>> ctrl = browser.getControl(name='form.title')
+  >>> ctrl.value = 'Another cert with same code'
+  >>> browser.getControl(name='form.code').value = 'CERT1'
+  >>> browser.getControl(name='form.title').value = 'Certificate 1'
+  >>> browser.getControl(name='form.category').value = 'UME'
+  >>> browser.getControl(name='form.study_mode').value = 'combined'
+  >>> browser.getControl(name='form.start_level').value = '100'
+  >>> browser.getControl(name='form.end_level').value = '400'
+  >>> browser.getControl(name='form.application_category').value = 'UME'
+  >>> browser.getControl(name='form.m_prefix').value = 'something'
+  >>> browser.getControl(name='form.max_pass').value = '400'
+  >>> browser.getControl('Add certificate').click()
+
+  >>> browser.open(dept_url + '/addcertificate')
+  >>> ctrl = browser.getControl(name='form.title')
+  >>> ctrl.value = 'Another cert with same code'
+  >>> browser.getControl(name='form.code').value = 'CERT2'
+  >>> browser.getControl(name='form.title').value = 'Certificate 2'
+  >>> browser.getControl(name='form.category').value = 'UME'
+  >>> browser.getControl(name='form.study_mode').value = 'combined'
+  >>> browser.getControl(name='form.start_level').value = '100'
+  >>> browser.getControl(name='form.end_level').value = '400'
+  >>> browser.getControl(name='form.application_category').value = 'UME'
+  >>> browser.getControl(name='form.m_prefix').value = 'something'
+  >>> browser.getControl(name='form.max_pass').value = '400'
+  >>> browser.getControl('Add certificate').click()
+  
+
+Adding certificatecourses
+-------------------------
+
+Certcourses are stored in :class:`ICertificate` instances
+with their code as key.
+
+Each certificate provides a ``Add course`` action button near top.
+
+Certificates provide an add-form to add new certcourses:
+
+  >>> cert_url = dept_url + '/certificates/CERT1'
+  >>> browser.open(cert_url + '/addcertificatecourse')
+  >>> print browser.contents
+  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"...
+  ...<span class="required">*</span><span>Level of this course</span>
+  ...
+
+In the add-form we will get a list of available courses to select
+from. This list will contain all courses stored in the site, not only
+the ones from local department:
+
+  >>> ctrl = browser.getControl(name='form.course')
+  >>> ctrl.displayOptions
+  ['COURSE1 Course 1', 'COURSE2 Course 2']
+
+If we do not select anything else, the first item will be
+selected. That's okay for us. Finally, we create the
+certificatecourse:
+
+  >>> browser.getControl('Add course').click()
+
+Our certificatecourse will be linked on the parent certificate page:
+
+  >>> browser.open(cert_url)
+  >>> browser.getLink('COURSE1').click()
+  >>> browser.url
+  'http://localhost/my...sity/faculties/TF/TD/certificates/CERT1/COURSE1_100'
+
+When we started to add a new certificatecourse, we can also cancel the
+process before submitting. This will bring us back to the certificate
+page:
+
+  >>> browser.open(cert_url + '/addcertificatecourse')
+  >>> browser.getControl('Cancel').click()
+  >>> browser.url
+  'http://localhost/myuniversity/faculties/TF/TD/certificates/CERT1'
+
+
+Modifying certificatecourses
+----------------------------
+
+We can change the settings for a certcourse by clicking on the
+provided 'Edit settings' link:
+
+  >>> browser.open(cert_url + '/COURSE1_100')
+  >>> browser.getLink('Edit settings').click()
+
+Let's set a new level (it was 100 before) and save the form. This will
+bring us to the certificate index page afterwards:
+
+  >>> browser.getControl(name='form.level').value = "200" 
+  >>> ctrl = browser.getControl("Save and return")
+  >>> ctrl.click()
+
+As we changed the level, also the URL will change:
+
+  >>> browser.getLink('COURSE1').click()
+  >>> browser.url
+  'http://localhost/myun.../TF/TD/certificates/CERT1/COURSE1_200'
+
+If we go to the settings page and click ``Cancel`` nothing will be
+changed:
+
+  >>> browser.getLink('Edit settings').click()
+  >>> browser.getControl(name='form.level').value = "666"
+  >>> browser.getControl('Cancel').click()
+
+Our certcourse provides a new level of 200 and not 666:
+
+  >>> browser.open(cert_url + '/COURSE1_200')
+  >>> print browser.contents
+  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"...
+  ...Level of this course
+  ...200...
+  ...
+
+
+Deleting certificatecourses
+---------------------------
+
+We can delete certcourses by browsing the containing certificate and
+clicking on the appropriate 'Delete' button. As we have only one
+certcourse, there is only one 'Delete' button yet:
+
+  >>> browser.open(cert_url)
+  >>> 'COURSE1_200' in browser.contents
+  True
+
+  >>> browser.getControl('delete').click()
+
+  >>> browser.open(cert_url)
+  >>> 'COURSE1_200' in browser.contents
+  False
+
+
 Data Center
 ===========
