~azzar1/unity/add-show-desktop-key

« back to all changes in this revision

Viewing changes to ivle/webapp/tutorial/__init__.py

ivle.webapp.tutorial: Recapitalise 'Complete' and 'Incomplete' in body text.

Show diffs side-by-side

added added

removed removed

Lines of Context:
398
398
            ivle.worksheet.get_exercise_status(req.store, req.user, exercise)
399
399
    if saved_text is not None:
400
400
        curctx['exercisepartial'] = saved_text.text
401
 
    if complete:
402
 
        curctx['complete'] = 'complete'
403
 
    else:
404
 
        curctx['complete'] = 'incomplete'
 
401
    curctx['complete'] = 'Complete' if complete else 'Incomplete'
 
402
    curctx['complete_class'] = curctx['complete'].lower()
405
403
 
406
404
    #Save the exercise details to the Table of Contents
407
405
 
408
406
    loader = genshi.template.TemplateLoader(".", auto_reload=True)
409
407
    tmpl = loader.load(os.path.join(os.path.dirname(__file__), "exercise.html"))
410
408
    ex_stream = tmpl.generate(curctx)
411
 
    return {'name': curctx['exercisename'], 'complete': curctx['complete'], \
412
 
              'stream': ex_stream, 'exid': exerciseid}
 
409
    return {'name': curctx['exercisename'],
 
410
            'complete': curctx['complete_class'],
 
411
            'stream': ex_stream,
 
412
            'exid': exerciseid}
413
413
 
414
414
 
415
415
def update_db_worksheet(store, subject, worksheetname, file_mtime,