def problem_rheader(r, tabs=[]):
    ' Problem rheader '
    if (r.representation == 'html'):
        if (r.record is None):
            return None
        problem = r.record
        tabs = [(T('Problems'), 'problems'), (T('Solutions'), 'solution'), (T('Discuss'), 'discuss'), (T('Vote'), 'vote'), (T('Scale of Results'), 'results')]
        duser = s3db.delphi_DelphiUser(problem.group_id)
        if duser.authorised:
            tabs.append((T('Edit'), None))
        rheader_tabs = s3_rheader_tabs(r, tabs)
        rtable = TABLE(TR(TH(('%s: ' % T('Problem'))), problem.name, TH(('%s: ' % T('Active'))), problem.active), TR(TH(('%s: ' % T('Description'))), problem.description), TR(TH(('%s: ' % T('Criteria'))), problem.criteria))
        if (r.component and (r.component_name == 'solution') and r.component_id):
            stable = s3db.delphi_solution
            query = (stable.id == r.component_id)
            solution = db(query).select(stable.name, stable.description, limitby=(0, 1)).first()
            rtable.append(DIV(TR(TH(('%s: ' % T('Solution'))), solution.name), TR(TH(('%s: ' % T('Description'))), solution.description)))
        rheader = DIV(rtable, rheader_tabs)
        return rheader
Problem rheader
def problem_rheader(r, tabs=[]):
    '  '
    if (r.representation == 'html'):
        if (r.record is None):
            return None
        problem = r.record
        tabs = [(T('Problems'), 'problems'), (T('Solutions'), 'solution'), (T('Discuss'), 'discuss'), (T('Vote'), 'vote'), (T('Scale of Results'), 'results')]
        duser = s3db.delphi_DelphiUser(problem.group_id)
        if duser.authorised:
            tabs.append((T('Edit'), None))
        rheader_tabs = s3_rheader_tabs(r, tabs)
        rtable = TABLE(TR(TH(('%s: ' % T('Problem'))), problem.name, TH(('%s: ' % T('Active'))), problem.active), TR(TH(('%s: ' % T('Description'))), problem.description), TR(TH(('%s: ' % T('Criteria'))), problem.criteria))
        if (r.component and (r.component_name == 'solution') and r.component_id):
            stable = s3db.delphi_solution
            query = (stable.id == r.component_id)
            solution = db(query).select(stable.name, stable.description, limitby=(0, 1)).first()
            rtable.append(DIV(TR(TH(('%s: ' % T('Solution'))), solution.name), TR(TH(('%s: ' % T('Description'))), solution.description)))
        rheader = DIV(rtable, rheader_tabs)
        return rheader