Пример #1
0
 def _migrate_tracks(self):
     program = convert_to_unicode(
         getattr(self.conf, 'programDescription', ''))
     if program:
         track_settings.set_multi(self.event, {
             'program_render_mode': RenderMode.html,
             'program': program
         })
     for pos, old_track in enumerate(self.conf.program, 1):
         track = Track(title=convert_to_unicode(old_track.title),
                       description=convert_to_unicode(
                           old_track.description),
                       code=convert_to_unicode(old_track._code),
                       position=pos,
                       abstract_reviewers=set())
         self.importer.print_info(
             cformat('%{white!}Track:%{reset} {}').format(track.title))
         for coordinator in old_track._coordinators:
             user = self._user_from_legacy(coordinator)
             if user is None:
                 continue
             self.importer.print_info(
                 cformat('%{blue!}  Coordinator:%{reset} {}').format(user))
             track.conveners.add(user)
             track.abstract_reviewers.add(user)
             self.event.update_principal(
                 user,
                 add_roles={'abstract_reviewer', 'track_convener'},
                 quiet=True)
         self.track_map[old_track] = track
         self.track_map_by_id[int(old_track.id)] = track
         self.event.tracks.append(track)
Пример #2
0
 def _migrate_tracks(self):
     program = convert_to_unicode(getattr(self.conf, 'programDescription', ''))
     if program:
         track_settings.set_multi(self.event, {'program_render_mode': RenderMode.html, 'program': program})
     for pos, old_track in enumerate(self.conf.program, 1):
         track = Track(title=convert_to_unicode(old_track.title),
                       description=convert_to_unicode(old_track.description),
                       code=convert_to_unicode(old_track._code),
                       position=pos,
                       abstract_reviewers=set())
         self.importer.print_info(cformat('%{white!}Track:%{reset} {}').format(track.title))
         for coordinator in old_track._coordinators:
             user = self._user_from_legacy(coordinator)
             if user is None:
                 continue
             self.importer.print_info(cformat('%{blue!}  Coordinator:%{reset} {}').format(user))
             track.conveners.add(user)
             track.abstract_reviewers.add(user)
             self.event.update_principal(user, add_roles={'abstract_reviewer', 'track_convener'}, quiet=True)
         self.track_map[old_track] = track
         self.track_map_by_id[int(old_track.id)] = track
         self.event.tracks.append(track)
Пример #3
0
 def _clone_program(self, new_event):
     track_settings.set_multi(new_event, track_settings.get_all(self.old_event, no_defaults=True))
Пример #4
0
def update_program(event, data):
    track_settings.set_multi(event, data)
    logger.info('Program of %r updated by %r', event, session.user)
    event.log(EventLogRealm.management, EventLogKind.change, 'Tracks',
              'The program has been updated', session.user)
Пример #5
0
def update_program(event, data):
    track_settings.set_multi(event, data)
    logger.info('Program of %r updated by %r', event, session.user)
    event.log(EventLogRealm.management, EventLogKind.change, 'Tracks', 'The program has been updated', session.user)