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

1165.3.2 by Nick Chadwick
Created a new view for IVLE, allowing lecturers and tutors to
1
<html xmlns="http://www.w3.org/1999/xhtml"
2
      xmlns:py="http://genshi.edgewall.org/">
3
  <head>
4
    <title>Enrol a user - ${offering.subject.name}</title>
5
  </head>
6
  <body>
7
    <h1>Enrol a user in ${offering.subject.name}</h1>
8
    <div id="ivle_padding">
9
      <form action="" method="post">
10
        <p>
11
          <label for="user">Username:</label>
1521 by William Grant
Fix enrolment XHTML too.
12
          <input type="text" id="user" name="user" />
1377 by Matt Giuca
database: Added finer-grained enrol permissions on offerings.
13
          <label for="role">Enrol as:</label>
1521 by William Grant
Fix enrolment XHTML too.
14
          <select id="role" name="role">
1379 by Matt Giuca
Enrolments page: Don't show choices in the list if they are unauthorized. (Note that this is a UI tweak -- roles are already authz-checked.)
15
            <option py:if="'enrol_student' in roles_auth" value="student" selected="selected">Student</option>
16
            <option py:if="'enrol_tutor' in roles_auth" value="tutor">Tutor</option>
17
            <option py:if="'enrol_lecturer' in roles_auth" value="lecturer">Lecturer</option>
1377 by Matt Giuca
database: Added finer-grained enrol permissions on offerings.
18
          </select>
1378 by Matt Giuca
Enrolment page: Added a full stop after error messages (confusing when there are several).
19
          <span py:if="'user' in errors" class="form_error">${errors.user}.</span>
20
          <span py:if="'role' in errors" class="form_error">${errors.role}.</span>
1165.3.2 by Nick Chadwick
Created a new view for IVLE, allowing lecturers and tutors to
21
          <br />
1700 by William Grant
Don't hide global form errors on the enrolment form.
22
          <div class="form_error" py:if="defined('error_value')" py:content="error_value" />
1165.3.2 by Nick Chadwick
Created a new view for IVLE, allowing lecturers and tutors to
23
          <input type="submit" value="Enrol" />
24
        </p>
25
      </form>
26
    </div>
27
  </body>
28
</html>