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

« back to all changes in this revision

Viewing changes to ivle/webapp/admin/templates/subjects.html

Unbreak TestFramework's exception reporting mechanism, and report TestCreationErrors in test mode.

Show diffs side-by-side

added added

removed removed

Lines of Context:
8
8
    <h1>Subjects</h1>
9
9
    <div id="ivle_padding">
10
10
      <p py:if="len(semesters) == 0">You are not currently enrolled in any subjects.</p>
11
 
      <py:for each="(semester, enrolments) in semesters">
12
 
        <py:choose test="semester.state">
13
 
          <h2 py:when="u'current'">${semester.year}, semester ${semester.semester}</h2>
14
 
          <h3 py:otherwise="">${semester.year}, semester ${semester.semester}</h3>
15
 
        </py:choose>
 
11
      <py:for each="(semester, offerings) in semesters">
 
12
        <h2 py:attrs="{'class': 'subject_current' if semester.state == u'current' else None}">
 
13
          ${semester.year}, semester ${semester.semester}
 
14
        </h2>
16
15
        <ul>
17
 
          <py:for each="enrolment in enrolments">
 
16
          <py:for each="offering in offerings">
18
17
            <li>
19
 
              <a href="${offering_url(enrolment.offering)}/+worksheets">${enrolment.offering.subject.name}</a>
20
 
              <py:if test="'edit' in enrolment.offering.get_permissions(user)">
 
18
              <a href="${offering_url(offering)}/+worksheets">${offering.subject.name}</a>
 
19
              <py:if test="'edit' in offering.get_permissions(user)">
21
20
                -
22
 
                <a href="${offering_url(enrolment.offering)}/+groups">(administer groups)</a>
23
 
                <a href="${offering_url(enrolment.offering)}/+enrolments/+new">(enrol users)</a>
 
21
                <a href="${offering_url(offering)}/+projects">(administer projects)</a>
 
22
                <py:if test="'enrol' in offering.get_permissions(user)">
 
23
                  <a href="${offering_url(offering)}/+enrolments/+new">(enrol users)</a>
 
24
                </py:if>
24
25
              </py:if>
25
26
            </li>
26
27
          </py:for>