#!/usr/local/bin/python # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # C Y B E R C H A I R V E R S I O N 4 # # # # Copyright (c) University of Twente, The Netherlands # # http://www.utwente.nl # # Author: Richard van de Stadt (cyberchair@borbala.com) # # Department of Computer Science # # TRESE Group (http://trese.cs.utwente.nl) # # and # # Borbala Online Conference Services # # http://www.borbala.com # # # # A demo system has been installed at http://www.cyberchair.org # # # # This program is free software. It is part of CyberChair, a system to # # manage online submissions and reviews. You can redistribute it and/or # # modify it under the terms of the GNU General Public License as published # # by the Free Software Foundation; either version 2 of the License, or (at # # your option) any later version. This copyright text must stay in this file. # # Please send modifications you make to cyberchair@cs.utwente.nl, so that # # others may profit from them. # # # # If you use CyberChair, it would be nice if you mention its use on your # # conference or workshop website and in the proceedings. Please send a copy # # of the proceedings to: # # # # University of Twente # # Department of Computer Science # # Richard R. van de Stadt # # P.O. Box 217 or Drienerlolaan 5 # # 7500 AE Enschede 7522 NB Enschede # # The Netherlands # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # This version of CyberChair was created on Mon May 19 17:59:50 2003 # by request of Adam Stephens (unixadmin@ilrt.org) from # Organization: University of Bristol # Conference of workshop: The 2003 UK Workshop on Computational Intelligence # (UKCI2003) # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # @(#) June, 2003 # Script modified to expand reviewer's HTML form. # # @(#) Mar 15 2000 # script for handling the review form input. # @(#) Dec 15 1999 - adaption for ECOOP 2000 - main fields are no longer # on the review form # import cgi, re, os, string, sys from generic import header, footer, openforread, reviewfieldseparator, reviewrecordseparator from constantsNew import reviewsdir, conferencename, maintaineremail import traceback from submit_email import send_email #(recipient(s), body, subject) from time import time, ctime from constantsNew import genTargetFramesProg from showreviewTable import writeReview from generic import getReviewerFuzzy def checkfields( aForm ): from constantsNew import reqkeywordsfilename result=1 # first check fields that should always be there if (not aForm.has_key('version_number') or not aForm.has_key('emailaddress') or not aForm.has_key('paper_number') or not aForm.has_key('reviewer_number') ): print '

Some hidden keyword are not there!

' return 0 else: reqkeywordsfile = openforread(reqkeywordsfilename) reqkeywordslist = reqkeywordsfile.readlines() reqkeywordsfile.close() missing='' for keywordindex in range (len(reqkeywordslist)): keywordline=string.split (reqkeywordslist[keywordindex],'#') #keynr=keywordline[0] keyword=keywordline[1] keytext=keywordline[2] if not aForm.has_key(keyword): result=0 missing=missing + '

  • ' + keytext if result == 0: print '

    Warning: You have not filled in the following review topics:

    ' print '' print 'If you care to fill them in, please use the \'back\' button of your browser to return' print 'to your review form and fill in the missing parts.
    ' print 'Alternatively, if your browser does not remember the state of a form, you can go back' print 'to your personal review page, select the paper number, and click \'Update your review\'.
    ' print '(The version number of your review might have been increased now, depending on your browser.)

    ' return 1 # write_field writes the given field from the specified form # to the specified file. If the field does not exist, a '0' is # written. # write_field also filters out any reviewfieldseparators in the field # def write_field(aFile, aForm, aName): if aForm.has_key(aName) and aForm[aName].value != "": aFile.write (re.sub(reviewfieldseparator, ' ', aForm[aName].value) ) else: aFile.write('0') def write_delim( aFile ): aFile.write(reviewfieldseparator) # get_field returns the contents of the field or 'not filled in' if the field # does not exist def get_field(aForm, aName): if aForm.has_key(aName) and aForm[aName].value != "": return re.sub('"', ' ', aForm[aName].value) else: return 'not filled in' ################ # main program ################ try: header('Review processing feedback' ) #Uncomment next 3 lines when review submission is closed. #print '

    Review submission is closed

    ' #footer() #sys.exit() # the following parses the input values etc and # returns dictionary with keys/values form = cgi.FieldStorage() #For testing: #cgi.print_form(form) # check if all needed form data is present # (also to prevent users from calling the script # in a wrong way) # get review file name from the form fields filename = 'p' + form['paper_number'].value + 'r' + form['reviewer_number'].value # open the review file in the correct directory try: f = open(reviewsdir + filename, 'a') except (IOError), s: print '

    Error opening review file (', s, ')\n' # append the data from the form to the review file # use fieldseparator and recordseparator as defined in generic.py write_field(f, form, 'version_number' ) write_delim(f) write_field(f, form, 'reviewer_number' ) write_delim(f) write_field(f, form, 'paper_number' ) write_delim(f) write_field(f, form, 'classification' ) write_delim(f) write_field(f, form, 'expertise' ) write_delim(f) #write_field(f, form, 'fit_theme' ) #write_delim(f) # write_field(f, form, 'contribution_type') # write_delim(f) write_field(f, form, 'relevance') write_delim(f) write_field(f, form, 'significance') # 3rd arg. is the HTML form button name from /cgi-bin/generatereview.py write_delim(f) write_field(f, form, 'soundness') write_delim(f) write_field(f, form, 'presentation') write_delim(f) write_field(f, form, 'readability') write_delim(f) write_field(f, form, 'summary') write_delim(f) write_field(f, form, 'comments_for_pc' ) write_delim(f) # write_field(f, form, 'comments_for_authors' ) # write_delim(f) # write_field(f, form, 'in_favour_or_against' ) # write_delim(f) # write_field(f, form, 'co_reviewers' ) # write_delim(f) write_field(f, form, 'email_feedback' ) f.write(reviewrecordseparator) f.close() if (checkfields(form) == 1) : print '

    Your review has been stored.\n' print '

    The conflict status of the reviews of this paper will be marked on your review page after you click continue below.' print '

    You can change your review until the deadline.\n' print '


    ' email = 'Reviewer ' + get_field(form, 'reviewer_number') +' has submitted an ' + conferencename + ' review form ' email = email + 'for paper ' + get_field(form, 'paper_number') email = email + ',\nwhich was stored on ' + ctime(time()) + '.' email = email + '\n\nThe following is an overview of the review:\n' # now add the entered values to the email from constantsNew import reqkeywordsfilename reviewformfile = openforread(reqkeywordsfilename) reviewformlist = reviewformfile.readlines() reviewformfile.close() missing='' email = email + '\nVersion number: ' + get_field(form, 'version_number') email = email + '\nPaper number: ' + get_field(form, 'paper_number') email = email + '\nReviewer number: ' + get_field(form, 'reviewer_number') email = email + '\n1 - Classification: ' + get_field(form, 'classification') email = email + '\n2 - Your overall expertise on the areas of this paper: ' + get_field(form, 'expertise') #email = email + '\n3 - Fits theme of OO: ' + get_field(form, 'fit_theme') # email = email + '\n3 - Contribution type: ' # con_type = get_field(form, 'contribution_type') # if (con_type == '1'): # email = email + 'Excellent' # elif (con_type == '2'): # email = email + 'Good' # elif (con_type == '3'): # email = email + 'Fair' # elif (con_type == '4'): # email = email + 'Weak' # elif (con_type == '5'): # email = email + 'Poor' # else: # email = email + con_type email = email + '\n3 - Relevance: ' tmp_val = get_field(form, 'relevance') email = email + tmp_val + " - " if (tmp_val == 'A'): email = email + 'Excellent' elif (tmp_val == 'B'): email = email + 'Good' elif (tmp_val == 'C'): email = email + 'Fair' elif (tmp_val == 'D'): email = email + 'Weak' elif (tmp_val == 'E'): email = email + 'Poor' email = email + '\n4 - Significance: ' tmp_val = get_field(form, 'significance') email = email + tmp_val + " - " if (tmp_val == 'A'): email = email + 'Excellent' elif (tmp_val == 'B'): email = email + 'Good' elif (tmp_val == 'C'): email = email + 'Fair' elif (tmp_val == 'D'): email = email + 'Weak' elif (tmp_val == 'E'): email = email + 'Poor' email = email + '\n5 - Soundness: ' tmp_val = get_field(form, 'soundness') email = email + tmp_val + " - " if (tmp_val == 'A'): email = email + 'Excellent' elif (tmp_val == 'B'): email = email + 'Good' elif (tmp_val == 'C'): email = email + 'Fair' elif (tmp_val == 'D'): email = email + 'Weak' elif (tmp_val == 'E'): email = email + 'Poor' email = email + '\n6 - Presentation: ' tmp_val = get_field(form, 'presentation') email = email + tmp_val + " - " if (tmp_val == 'A'): email = email + 'Excellent' elif (tmp_val == 'B'): email = email + 'Good' elif (tmp_val == 'C'): email = email + 'Fair' elif (tmp_val == 'D'): email = email + 'Weak' elif (tmp_val == 'E'): email = email + 'Poor' email = email + '\n7 - Readability: ' tmp_val = get_field(form, 'readability') email = email + tmp_val + " - " if (tmp_val == 'A'): email = email + 'Excellent' elif (tmp_val == 'B'): email = email + 'Good' elif (tmp_val == 'C'): email = email + 'Fair' elif (tmp_val == 'D'): email = email + 'Weak' elif (tmp_val == 'E'): email = email + 'Poor' email = email + '\n8 - Further comments:\n' + 78 * '-' + '\n' + get_field(form, 'summary') + '\n' + 78 * '-' + '\n' email = email + '\n9 - Comments for the programme committee:\n' + 78*'-' + '\n' + get_field(form, 'comments_for_pc') + '\n' + 78 * '-' + '\n' # email = email + '\n6 - Comments for the author(s):\n' + 78*'-' + '\n' + get_field(form, 'comments_for_authors') + '\n' + 78 * '-' + '\n' # email = email + '\n7 - Points in favour or against:\n' + 78 * '-' + '\n' + get_field(form, 'in_favour_or_against') + '\n' + 78 * '-' + '\n' # email = email + '\n8 - Co-reviewer(s) for this paper:\n' + get_field(form, 'co_reviewers') #print '
    '
    		#print email
    		#print '
    ' email = email + '\n=====END=====\n' # for the email message only # add email address of reviewer to mail message if get_field (form, 'email_feedback') == "Yes": recipient = get_field (form, 'emailaddress') print '
    ' print '

    Feedback by email is on its way to ', recipient,'

    ' else: recipient='' # So the chair and maintainer do get a copy writeReview (form['reviewer_number'].value, form['paper_number'].value) send_email (recipient, email, conferencename + " Paper " + get_field(form, 'paper_number') + " Review Feedback") print '

    Continue

    (MSIE: click the paper number again in the top frame)' footer() except: if sys.exc_type <> SystemExit: print '
    '
    		print 'Alert! Please send the output below to ' + maintaineremail
    		traceback.print_exc(file=sys.stdout)
    		cgi.print_form(form)
    		print '
    '