Index: main/waeup.kofa/trunk/src/waeup/kofa/browser/browser.txt
===================================================================
--- main/waeup.kofa/trunk/src/waeup/kofa/browser/browser.txt	(revision 10536)
+++ main/waeup.kofa/trunk/src/waeup/kofa/browser/browser.txt	(revision 10540)
@@ -726,4 +726,43 @@
   True
 
+We can grant local roles:
+
+  >>> browser.open('http://localhost/myuniversity/faculties/TF/TD/courses/COURSE1/manage')
+  >>> browser.getControl(name="user").value = ['bob']
+  >>> browser.getControl(
+  ...     name="local_role").value = ['waeup.local.Lecturer']
+  >>> browser.getControl("Add local role").click()
+  >>> print browser.contents
+  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"...
+  ...<td>bob</td>
+  ...
+
+On the portal user page the new local role is displayed:
+
+  >>> browser.getLink("Portal Users").click()
+  >>> print browser.contents
+  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"...
+  ...<td>Lecturer:...
+  ...
+
+The local role can be removed again:
+
+  >>> browser.open('http://localhost/myuniversity/faculties/TF/TD/courses/COURSE1/manage')
+  >>> ctrl = browser.getControl(name='role_id')
+  >>> browser.getControl("Remove selected local roles").click()
+  >>> print browser.contents
+  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"...
+  ...No local role selected...
+  ...
+
+  >>> browser.open('http://localhost/myuniversity/faculties/TF/TD/courses/COURSE1/manage')
+  >>> ctrl = browser.getControl(name='role_id')
+  >>> ctrl.getControl(value='bob|waeup.local.Lecturer').selected = True
+  >>> browser.getControl("Remove selected local roles").click()
+  >>> print browser.contents
+  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"...
+  ...Local role successfully removed...
+  ...
+
 Deleting courses
 ----------------
Index: main/waeup.kofa/trunk/src/waeup/kofa/browser/pages.py
===================================================================
--- main/waeup.kofa/trunk/src/waeup/kofa/browser/pages.py	(revision 10536)
+++ main/waeup.kofa/trunk/src/waeup/kofa/browser/pages.py	(revision 10540)
@@ -2111,8 +2111,23 @@
     grok.name('manage')
     grok.require('waeup.manageAcademics')
+    grok.template('coursemanagepage')
     label = _(u'Edit course')
     pnav = 1
+    taboneactions = [_('Save'),_('Cancel')]
+    tabtwoactions1 = [_('Remove selected local roles')]
+    tabtwoactions2 = [_('Add local role')]
 
     form_fields = grok.AutoFields(ICourse)
+
+    def update(self):
+        tabs.need()
+        self.tab1 = self.tab2 = ''
+        qs = self.request.get('QUERY_STRING', '')
+        if not qs:
+            qs = 'tab1'
+        setattr(self, qs, 'active')
+        warning.need()
+        datatable.need()
+        return super(CourseManageFormPage, self).update()
 
     @action(_('Save'), style='primary')
@@ -2124,4 +2139,22 @@
         self.redirect(self.url(self.context))
         return
+
+    def getLocalRoles(self):
+        roles = ILocalRolesAssignable(self.context)
+        return roles()
+
+    def getUsers(self):
+        return get_all_users()
+
+    def getUsersWithLocalRoles(self):
+        return get_users_with_local_roles(self.context)
+
+    @action(_('Add local role'), validator=NullValidator)
+    def addLocalRole(self, **data):
+        return add_local_role(self, 2, **data)
+
+    @action(_('Remove selected local roles'))
+    def delLocalRoles(self, **data):
+        return del_local_roles(self,2,**data)
 
 #
Index: main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/coursemanagepage.pt
===================================================================
--- main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/coursemanagepage.pt	(revision 10540)
+++ main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/coursemanagepage.pt	(revision 10540)
@@ -0,0 +1,83 @@
+<form action="." tal:attributes="action request/URL" method="POST"
+      enctype="multipart/form-data" i18n:domain="waeup.kofa">
+
+  <ul class="tabs" data-tabs="tabs">
+    <li tal:attributes="class view/tab1"><a href="#tab-1" i18n:translate="">Settings</a></li>
+    <li tal:attributes="class view/tab2"><a href="#tab-3" i18n:translate="">Local Roles</a></li>
+  </ul>
+
+  <div class="tab-content">
+    <div id="tab-1" tal:attributes="class view/tab1">
+    <table class="form-table">
+      <tbody>
+        <tal:widgets content="structure provider:widgets" />
+      </tbody>
+    </table>
+    <div tal:condition="view/availableActions">
+      <span tal:repeat="action view/actions"
+            tal:omit-tag="">
+        <input tal:condition="python:action.label in view.taboneactions"
+               tal:replace="structure action/render"/>
+      </span>
+    </div>
+    </div>
+    <div id="tab-3" tal:attributes="class view/tab2"> <br />
+      <table class="display dataTableManage">
+        <thead>
+          <tr>
+            <th>&nbsp;
+            </th>
+            <th i18n:translate="">User Id
+            </th>
+            <th i18n:translate="">Name
+            </th>
+            <th i18n:translate="">Local Role
+            </th>
+          </tr>
+        </thead>
+        <tbody>
+          <tr tal:repeat="entry view/getUsersWithLocalRoles" class="gradeC"> <td>
+              <input type="checkbox" name="role_id"
+                tal:attributes="value python: entry['user_name']+'|'+entry['local_role']" /> </td>
+            <td tal:content="entry/user_name"> USERNAME </td>
+            <td tal:content="entry/user_title"> USERTITLE </td>
+            <td tal:content="entry/local_role_title"> LOCAL ROLE </td>
+          </tr>
+        </tbody>
+      </table>
+      <div tal:condition="view/availableActions">
+        <span tal:repeat="action view/actions" tal:omit-tag="">
+          <input tal:condition="python:action.label in view.tabtwoactions1"
+            tal:replace="structure action/render"/>
+        </span>
+      </div><br /><br />
+      <table class="form-table">
+        <tr> <td>
+            <select id="user" name="user">
+              <option tal:repeat="user view/getUsers"
+                tal:attributes="value user/name">
+              <span tal:replace="user/val/title">USERTITLE
+              </span>
+              </option>
+            </select> </td> <td>
+            <select id="local_role" name="local_role">
+              <option tal:repeat="localrole view/getLocalRoles"
+                tal:attributes="value localrole/name">
+              <span tal:replace="localrole/title">LOCALROLETITLE
+              </span>
+              </option>
+            </select> </td> <td>
+            <div tal:condition="view/availableActions">
+              <span tal:repeat="action view/actions" tal:omit-tag="">
+                <input tal:condition="python:action.label in view.tabtwoactions2"
+                  tal:replace="structure action/render"/>
+              </span>
+            </div> </td>
+        </tr>
+      </table>
+    </div>
+  </div>
+</form>
+
+
+
