Changeset 10539


Ignore:
Timestamp:
27 Aug 2013, 19:13:51 (11 years ago)
Author:
Henrik Bettermann
Message:

After some experiments with dynamical roles which allow lecturers to edit the score attribute of course tickets through the UI, I decided to discard the idea completely. It's not feasible and very dangerous to enable lecturers to edit course tickets directly: There are too many course tickets, too many lecturers and to many restrictions. The solution will be that lecturers export the course tickets of their courses, fill the score column and re-upload the csv file. This is still not easy to implement because we can't allow lecturers to access the data center directly. Further discussions are necessary ...

Location:
main/waeup.kofa/trunk/src/waeup/kofa/students
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/students/studylevel.py

    r10479 r10539  
    2222import grok
    2323from zope.component.interfaces import IFactory
    24 from zope.component import createObject
     24from zope.catalog.interfaces import ICatalog
     25from zope.component import createObject, queryUtility
    2526from zope.interface import implementedBy
    2627from waeup.kofa.interfaces import academic_sessions_vocab
     
    270271        return getGradeWeightFromScore(self.score)[1]
    271272
     273    @property
     274    def course(self):
     275        """Returns the course the ticket is referring to. Returns
     276        None if the course has been removed.
     277
     278        This method is not used in Kofa anymore.
     279        """
     280        cat = queryUtility(ICatalog, name='courses_catalog')
     281        result = cat.searchResults(code=(self.code, self.code))
     282        if len(result) != 1:
     283            return None
     284        return list(result)[0]
     285
    272286CourseTicket = attrs_to_fields(CourseTicket)
    273287
  • main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_browser.py

    r10536 r10539  
    16611661        self.browser.getControl("Show").click()
    16621662        self.assertTrue(self.student_id in self.browser.contents)
    1663         # XXX: So far the lecturer can neither access ths student ...
     1663        # The course ticket can be linked with the course.
     1664        self.assertEqual(
     1665            self.student['studycourse']['100']['COURSE1'].course,
     1666            self.course)
     1667        # Lecturer can neither access ths student ...
    16641668        self.assertRaises(
    16651669            Unauthorized, self.browser.open, self.student_path)
    16661670        # ... nor the respective course ticket since a
    1667         # CourseTicketPrincipalRoleManager does not yet exist.
     1671        # editing course tickets by lecturers is not feasible.
     1672        # Course results must be imported.
    16681673        self.assertTrue('COURSE1' in self.student['studycourse']['100'].keys())
    16691674        course_ticket_path = self.student_path + '/studycourse/100/COURSE1'
Note: See TracChangeset for help on using the changeset viewer.