instructor_dashboard.html 12.4 KB
Newer Older
1
<%inherit file="/main.html" />
2
<%! from django.core.urlresolvers import reverse %>
3
<%namespace name='static' file='/static_content.html'/>
4 5 6

<%block name="headextra">
  <%static:css group='course'/>
7 8
  <script type="text/javascript" src="${static.url('js/vendor/flot/jquery.flot.js')}"></script>
  <script type="text/javascript" src="${static.url('js/vendor/flot/jquery.flot.axislabels.js')}"></script>
9 10
  <script type="text/javascript" src="${static.url('js/course_groups/cohorts.js')}"></script>

11 12
</%block>

13
<%include file="/courseware/course_navigation.html" args="active_page='instructor'" />
14

15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
<style type="text/css">
table.stat_table {
	font-family: verdana,arial,sans-serif;
	font-size:11px;
	color:#333333;
	border-width: 1px;
	border-color: #666666;
	border-collapse: collapse;
}
table.stat_table th {
	border-width: 1px;
	padding: 8px;
	border-style: solid;
	border-color: #666666;
	background-color: #dedede;
}
table.stat_table td {
	border-width: 1px;
	padding: 8px;
	border-style: solid;
	border-color: #666666;
	background-color: #ffffff;
}
38 39 40

a.selectedmode { background-color: yellow; }

41 42 43
textarea {
  height: 200px;
}
44 45
</style>

46 47 48 49 50 51 52 53
<script language="JavaScript" type="text/javascript">
function goto( mode)
{
  document.idashform.idash_mode.value = mode;
  document.idashform.submit() ;
}
</script>

54 55
<section class="container">
<div class="instructor-dashboard-wrapper">
56

57 58 59
  <section class="instructor-dashboard-content">
    <h1>Instructor Dashboard</h1>

60 61 62 63
    <h2>[ <a href="#" onclick="goto('Grades');" class="${modeflag.get('Grades')}">Grades</a> | 
          %if settings.MITX_FEATURES.get('ENABLE_PSYCHOMETRICS'):
            <a href="#" onclick="goto('Psychometrics');" class="${modeflag.get('Psychometrics')}">Psychometrics</a> | 
          %endif
64
          <a href="#" onclick="goto('Admin');" class="${modeflag.get('Admin')}">Admin</a> |
65
          <a href="#" onclick="goto('Forum Admin');" class="${modeflag.get('Forum Admin')}">Forum Admin</a> |
Victor Shnayder committed
66
          <a href="#" onclick="goto('Enrollment');" class="${modeflag.get('Enrollment')}">Enrollment</a> |
67
          <a href="#" onclick="goto('Manage Groups');" class="${modeflag.get('Manage Groups')}">Manage Groups</a> ]
68 69
    </h2>

70 71
  <div style="text-align:right"><span id="djangopid">${djangopid}</span>
  | <span id="mitxver">${mitx_version}</span></div>
72

73
    <form name="idashform" method="POST">
74
    <input type="hidden" name="csrfmiddlewaretoken" value="${ csrf_token }">
75
    <input type="hidden" name="idash_mode" value="">
76

77 78
##----------------------------------------------------------------------------- 
%if modeflag.get('Grades'):
79 80 81 82 83 84

    %if offline_grade_log:
      <p><font color='orange'>Pre-computed grades ${offline_grade_log} available: Use?
          <input type='checkbox' name='use_offline_grades' value='yes'></font> </p>
    %endif

85
    <p>
86
    <a href="${reverse('gradebook', kwargs=dict(course_id=course.id))}">Gradebook</a>
87
    </p>
88 89

    <p>
90
    <a href="${reverse('grade_summary', kwargs=dict(course_id=course.id))}">Grade summary</a>
91
    </p>
92

93 94
    <p>
    <input type="submit" name="action" value="Dump list of enrolled students">
95
    </p>
96 97 98 99

    <p>
    <input type="submit" name="action" value="Dump Grades for all students in this course">
    <input type="submit" name="action" value="Download CSV of all student grades for this course">
100
    </p>
101 102 103 104

    <p>
    <input type="submit" name="action" value="Dump all RAW grades for all students in this course">
    <input type="submit" name="action" value="Download CSV of all RAW grades">
105
    </p>
106 107 108

    <p>
    <input type="submit" name="action" value="Download CSV of answer distributions">
109
    </p>
110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145
    <hr width="40%" style="align:left">

  %if settings.MITX_FEATURES.get('REMOTE_GRADEBOOK_URL','') and instructor_access:
  
    <%
        rg = course.metadata.get('remote_gradebook',{})
    %>

    <h3>Export grades to remote gradebook</h3>
    <p>The assignments defined for this course should match the ones
    stored in the gradebook, for this to work properly!</p>

    <ul>
    <li>Gradebook name: <font color="green">${rg.get('name','None defined!')}</font>
    <br/>
    <br/>
    <input type="submit" name="action" value="List assignments available in remote gradebook">
    <input type="submit" name="action" value="List enrolled students matching remote gradebook">
    <br/>
    <br/>
    </li>
    <li><input type="submit" name="action" value="List assignments available for this course">
    <br/>
    <br/>
    </li>
    <li>Assignment name: <input type="text" name="assignment_name" size=40 >
    <br/>
    <br/>
    <input type="submit" name="action" value="Display grades for assignment">
    <input type="submit" name="action" value="Export grades for assignment to remote gradebook">
    <input type="submit" name="action" value="Export CSV file of grades for assignment">
    </li>
    </ul>

  %endif

146 147 148 149 150
    <H2>Student-specific grade inspection and adjustment</h2>
    <p>edX email address or their username: </p>
    <p><input type="text" name="unique_student_identifier">  <input type="submit" name="action" value="Get link to student's progress page"></p>
    <p>and, if you want to reset the number of attempts for a problem, the urlname of that problem</p>
    <p> <input type="text" name="problem_to_reset"> <input type="submit" name="action" value="Reset student's attempts">  </p>
151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168
 %endif

##----------------------------------------------------------------------------- 
%if modeflag.get('Psychometrics'):

    <p>Select a problem and an action:
    </p>

    <p>
    <select name="Problem">
    %for problem, count in sorted(problems.items(), key=lambda x: x[0]):
        <option value="${problem}">${problem} [${count}]</option>
    %endfor
    </select>
    </p>
    <p>
    <input type="submit" name="action" value="Generate Histogram and IRT Plot">
    </p>
169

170 171 172 173 174 175 176
    <p></p>

%endif

##----------------------------------------------------------------------------- 
%if modeflag.get('Admin'):
  %if instructor_access:
177 178
    <hr width="40%" style="align:left">
    <p>
179
    <input type="submit" name="action" value="List course staff members">
180
    <p>
181 182
    <input type="text" name="staffuser">
    <input type="submit" name="action" value="Remove course staff">
183
    <input type="submit" name="action" value="Add course staff">
184
    <hr width="40%" style="align:left">
185
  %endif
186

187 188 189 190 191 192 193 194 195 196
  %if admin_access:
    <hr width="40%" style="align:left">
    <p>
    <input type="submit" name="action" value="List course instructors">
    <p>
    <input type="text" name="instructor"> <input type="submit" name="action" value="Remove instructor">
    <input type="submit" name="action" value="Add instructor">
    <hr width="40%" style="align:left">
  %endif

197
  %if settings.MITX_FEATURES['ENABLE_MANUAL_GIT_RELOAD'] and admin_access:
198
    <p>
199 200
    <input type="submit" name="action" value="Reload course from XML files">
    <input type="submit" name="action" value="GIT pull and Reload course">
201
  %endif
202 203
%endif

204 205 206 207 208
##----------------------------------------------------------------------------- 
%if modeflag.get('Forum Admin'):
  %if instructor_access:
    <hr width="40%" style="align:left">
    <p>
Brian Wilson committed
209
    <input type="submit" name="action" value="List course forum admins">
210 211 212 213 214 215 216 217 218 219 220
    <p>
    <input type="text" name="forumadmin"> <input type="submit" name="action" value="Remove forum admin">
    <input type="submit" name="action" value="Add forum admin">
    <hr width="40%" style="align:left">
  %endif

  %if instructor_access or forum_admin_access:
    <p>
    <input type="submit" name="action" value="List course forum moderators">
    <input type="submit" name="action" value="List course forum community TAs">
    <p>
221 222 223 224
    <input type="text" name="forummoderator"> 
    <input type="submit" name="action" value="Remove forum moderator">
    <input type="submit" name="action" value="Add forum moderator">
    <input type="submit" name="action" value="Remove forum community TA">
225 226
    <input type="submit" name="action" value="Add forum community TA">
    <hr width="40%" style="align:left">
227 228
  %else:
  <p>User requires forum administrator privileges to perform administration tasks.  See instructor.</p>
229 230 231
  %endif
%endif

232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252
##----------------------------------------------------------------------------- 
%if modeflag.get('Enrollment'):

    <hr width="40%" style="align:left">
    <p>
    <input type="submit" name="action" value="List enrolled students">
    <input type="submit" name="action" value="List students who may enroll but may not have yet signed up">
    <p>
    Student Email: <input type="text" name="enstudent"> <input type="submit" name="action" value="Un-enroll student">
    <input type="submit" name="action" value="Enroll student">
    <input type="submit" name="action" value="Un-enroll ALL students">
    <hr width="40%" style="align:left">

  %if settings.MITX_FEATURES.get('REMOTE_GRADEBOOK_URL','') and instructor_access:
  
    <%
        rg = course.metadata.get('remote_gradebook',{})
    %>

    <p>Pull enrollment from remote gradebook</p>
    <ul>
253
    <li>Gradebook name: <font color="green">${rg.get('name','None defined!')}</font>
254 255 256 257 258 259 260 261 262 263
    <li>Section: <input type="text" name="gradebook_section" size=40 value="${rg.get('section','')}"></li>
    </ul>
    <input type="submit" name="action" value="List sections available in remote gradebook">
    <input type="submit" name="action" value="List students in section in remote gradebook">
    <input type="submit" name="action" value="Overload enrollment list using remote gradebook">
    <input type="submit" name="action" value="Merge enrollment list with remote gradebook">
    <hr width="40%" style="align:left">
  
  %endif

Victor Shnayder committed
264
  <p>Add students: enter emails, separated by new lines or commas;</p>
265 266 267 268 269 270 271
  <textarea rows="6" cols="70" name="enroll_multiple"></textarea>
  <input type="submit" name="action" value="Enroll multiple students">

%endif

##----------------------------------------------------------------------------- 

272 273 274 275 276 277
%if modeflag.get('Manage Groups'):
  %if instructor_access:
    <hr width="40%" style="align:left">
    <p>
    <input type="submit" name="action" value="List beta testers">
    <p>
Victor Shnayder committed
278
    Enter usernames or emails for students who should be beta-testers, one per line, or separated by commas.  They will get to
279
    see course materials early, as configured via the <tt>days_early_for_beta</tt> option in the course policy.
280
    </p>
281 282
    <p>
    <textarea cols="50" row="30" name="betausers"></textarea>
283
    <input type="submit" name="action" value="Remove beta testers">
284 285
    <input type="submit" name="action" value="Add beta testers">
    </p>
286
    <hr width="40%" style="align:left">
287

288
    %if course.is_cohorted:
289
    <%include file="/course_groups/cohort_management.html" />
290
    %endif
291

292 293 294
  %endif
%endif

295
    </form>
296
##----------------------------------------------------------------------------- 
297

298 299 300
%if msg:
    <p></p><p>${msg}</p>
%endif
301
##----------------------------------------------------------------------------- 
302 303

%if datatable and modeflag.get('Psychometrics') is None:
304

305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324
    <br/>
    <br/>
    <p>
      <hr width="100%">
      <h2>${datatable['title']}</h2>
      <table class="stat_table">
        <tr>
	%for hname in datatable['header']:
	  <th>${hname}</th>
	%endfor
	</tr>
        %for row in datatable['data']:
          <tr>
	    %for value in row:
	      <td>${value}</td>
	    %endfor
	  </tr>
        %endfor
      </table>
    </p>
325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350
%endif

##-----------------------------------------------------------------------------  
%if modeflag.get('Psychometrics'):

    %for plot in plots:
      <br/>
      <h3>${plot['title']}</h3>
      <br/>
      <p>${plot['info']}</p>
      <br/>
      <div id="plot_${plot['id']}" style="width:600px;height:300px;"></div>
      <script type="text/javascript">
          $(function () {
              ${plot['data']}
              $.plot($("#plot_${plot['id']}"), ${plot['cmd']}  );
          });
      </script>
      <br/>
      <br/>
    %endfor

%endif
 
##-----------------------------------------------------------------------------  
## always show msg
351 352


353 354 355
##----------------------------------------------------------------------------- 
%if modeflag.get('Admin'):
 % if course_errors is not UNDEFINED:
Victor Shnayder committed
356 357
    <h2>Course errors</h2>
    <div id="course-errors">
358 359 360
    %if not course_errors:
          None
    %else:
Victor Shnayder committed
361 362 363
      <ul>
        % for (summary, err) in course_errors:
        <li>${summary | h}
364
        % if err:
Victor Shnayder committed
365
          <ul><li><pre>${err | h}</pre></li></ul>
366 367 368
        % else:
          <p>&nbsp;</p>
        % endif
Victor Shnayder committed
369 370 371
        </li>
        % endfor
        </ul>
372
      %endif
Victor Shnayder committed
373
      </div>
374 375
  % endif
%endif      
376

377 378 379
  </section>
</div>
</section>