legacy_instructor_dashboard.html 18.5 KB
Newer Older
1 2 3
## NOTE: This is the template for the LEGACY instructor dashboard         ##
## We are no longer supporting this file or accepting changes into it.    ##
## Please see lms/templates/instructor for instructor dashboard templates ##
4

5
<%inherit file="../main.html" />
6
<%namespace name='static' file='/static_content.html'/>
7 8 9 10
<%!
from django.utils.translation import ugettext as _
from django.core.urlresolvers import reverse
%>
11

12
<%block name="pagetitle">${_("Legacy Instructor Dashboard")}</%block>
13 14
<%block name="nav_skip">#instructor-dashboard-content</%block>

15
<%block name="headextra">
16
<%static:css group='style-course-vendor'/>
17 18
<%static:css group='style-vendor-tinymce-content'/>
<%static:css group='style-vendor-tinymce-skin'/>
19 20
<%static:css group='style-course'/>

21 22 23 24 25 26 27
  <script type="text/javascript">
    // This is a hack to get tinymce to work correctly in Firefox until the annotator tool is refactored to not include
    // tinymce globally.
    if(typeof window.Range.prototype === "undefined") {
        window.Range.prototype = { };
    }
  </script>
28 29
  <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>
30 31
  <script type="text/javascript" src="${static.url('js/vendor/jquery-jvectormap-1.1.1/jquery-jvectormap-1.1.1.min.js')}"></script>
  <script type="text/javascript" src="${static.url('js/vendor/jquery-jvectormap-1.1.1/jquery-jvectormap-world-mill-en.js')}"></script>
32
  <script type="text/javascript" src="${static.url('js/course_groups/cohorts.js')}"></script>
33
  <script type="text/javascript" src="${static.url('js/vendor/codemirror-compressed.js')}"></script>
34 35
  <script type="text/javascript" src="${static.url('js/vendor/tinymce/js/tinymce/tinymce.full.min.js')}"></script>
  <script type="text/javascript" src="${static.url('js/vendor/tinymce/js/tinymce/jquery.tinymce.min.js')}"></script>
36 37 38
  <script type="text/javascript">
    (function() {window.baseUrl = "${settings.STATIC_URL}";})(this);
  </script>
39
  <%static:js group='module-descriptor-js'/>
40
%if instructor_tasks is not None:
41
  <script type="text/javascript" src="${static.url('js/pending_tasks.js')}"></script>
42
%endif
43 44
</%block>

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

47 48
<style type="text/css">
table.stat_table {
49 50 51 52 53 54
    font-family: verdana,arial,sans-serif;
    font-size:11px;
    color:#333333;
    border-width: 1px;
    border-color: #666666;
    border-collapse: collapse;
55 56
}
table.stat_table th {
57 58 59 60 61
    border-width: 1px;
    padding: 8px;
    border-style: solid;
    border-color: #666666;
    background-color: #dedede;
62 63
}
table.stat_table td {
64 65 66 67 68
    border-width: 1px;
    padding: 8px;
    border-style: solid;
    border-color: #666666;
    background-color: #ffffff;
69
}
70
.divScroll {
71 72
    height: 200px;
    overflow: scroll;
73
}
74 75 76

a.selectedmode { background-color: yellow; }

77 78 79
textarea {
  height: 200px;
}
80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118

.jvectormap-label {
    position: absolute;
    display: none;
    border: solid 1px #CDCDCD;
    -webkit-border-radius: 3px;
    -moz-border-radius: 3px;
    border-radius: 3px;
    background: #292929;
    color: white;
    font-family: sans-serif, Verdana;
    font-size: smaller;
    padding: 3px;
}

.jvectormap-zoomin, .jvectormap-zoomout {
    position: absolute;
    left: 10px;
    -webkit-border-radius: 3px;
    -moz-border-radius: 3px;
    border-radius: 3px;
    background: #292929;
    padding: 3px;
    color: white;
    width: 10px;
    height: 10px;
    cursor: pointer;
    line-height: 10px;
    text-align: center;
}

.jvectormap-zoomin {
    top: 10px;
}

.jvectormap-zoomout {
    top: 30px;
}

119 120
</style>

121 122 123 124 125 126 127 128
<script language="JavaScript" type="text/javascript">
function goto( mode)
{
  document.idashform.idash_mode.value = mode;
  document.idashform.submit() ;
}
</script>

129 130
<section class="container">
<div class="instructor-dashboard-wrapper">
131

132
  <section class="instructor-dashboard-content" id="instructor-dashboard-content">
133 134 135 136
    <div class="wrap-instructor-info studio-view beta-button-wrapper">
      %if studio_url:
        <a class="instructor-info-action" href="${studio_url}">${_("View Course in Studio")}</a>
      %endif
137
      <a class="instructor-info-action beta-button" href="${ standard_dashboard_url }">${_("Back To Instructor Dashboard")}</a>
138
    </div>
139

140
    <h1>${_("Legacy Instructor Dashboard")}</h1>
141

142 143
    %if settings.FEATURES.get('IS_EDX_DOMAIN', False):
    ## Only show this banner on the edx.org website (other sites may choose to show this if they wish)
144
    <div class="wrapper-msg urgency-low msg-warning is-shown">
145
        <p>${_("You are using the legacy instructor dashboard, which we will retire in the near future.")} <a href="${ standard_dashboard_url }">${_("Return to the Instructor Dashboard")} <i class="icon fa fa-double-angle-right"></i></a></p>
146
          <p class="note">${_("If the Instructor Dashboard is missing functionality, please contact your PM to let us know.")}</p>
147
    </div>
148
    %endif
149

150
    <h2 class="navbar">[ <a href="#" onclick="goto('Grades');" class="${modeflag.get('Grades')}">Grades</a> |
151
          %if settings.FEATURES.get('ENABLE_PSYCHOMETRICS'):
152
            <a href="#" onclick="goto('Psychometrics');" class="${modeflag.get('Psychometrics')}">${_("Psychometrics")}</a> |
153
          %endif
154 155 156 157 158
          <a href="#" onclick="goto('Admin');" class="${modeflag.get('Admin')}">${_("Admin")}</a> |
          <a href="#" onclick="goto('Forum Admin');" class="${modeflag.get('Forum Admin')}">${_("Forum Admin")}</a> |
          <a href="#" onclick="goto('Enrollment');" class="${modeflag.get('Enrollment')}">${_("Enrollment")}</a> |
          <a href="#" onclick="goto('Data');" class="${modeflag.get('Data')}">${_("DataDump")}</a> |
          <a href="#" onclick="goto('Manage Groups');" class="${modeflag.get('Manage Groups')}">${_("Manage Groups")}</a>
159
          %if show_email_tab:
160
             | <a href="#" onclick="goto('Email')" class="${modeflag.get('Email')}">${_("Email")}</a>
161
          %endif
162 163 164
          %if settings.FEATURES.get('CLASS_DASHBOARD'):
             | <a href="#" onclick="goto('Metrics');" class="${modeflag.get('Metrics')}">${_("Metrics")}</a>
          %endif
165
      ]
166 167 168
    </h2>

    <form name="idashform" method="POST">
169
    <input type="hidden" name="csrfmiddlewaretoken" value="${ csrf_token }">
170
    <input type="hidden" name="idash_mode" value="">
171

172
##-----------------------------------------------------------------------------
173
%if modeflag.get('Grades'):
174 175

    %if offline_grade_log:
176 177
      <p>
        <span class="copy-warning">Pre-computed grades ${offline_grade_log} available: Use?
178
          <input type='checkbox' name='use_offline_grades' value="yes">
179 180
        </span>
      </p>
181 182
    %endif

183 184 185 186

    <hr width="40%" style="align:left">
    <h2>${_("Grade Downloads")}</h2>
    % if disable_buttons:
187 188 189 190 191 192

    <div class="msg msg-warning">

      <div class="copy">
        <p>
          ${_("Note: some of these buttons are known to time out for larger "
193 194
              "courses. We have disabled those features for courses "
              "with more than {max_enrollment} students.").format(
195
              max_enrollment=settings.FEATURES['MAX_ENROLLMENT_INSTR_BUTTONS']
196 197 198 199
            )}
        </p>
      </div>
    </div>
200 201
    % endif

202
    <p>
203
    <input type="submit" name="action" value="Dump list of enrolled students" class="${'is-disabled' if disable_buttons else ''}" aria-disabled="${'true' if disable_buttons else 'false'}">
204
    </p>
205 206

    <p>
207 208
    <input type="submit" name="action" value="Dump all RAW grades for all students in this course" class="${'is-disabled' if disable_buttons else ''}" aria-disabled="${'true' if disable_buttons else 'false'}">
    <input type="submit" name="action" value="Download CSV of all RAW grades" class="${'is-disabled' if disable_buttons else ''}" aria-disabled="${'true' if disable_buttons else 'false'}" >
209
    </p>
210 211

    <p>
212
  %if not settings.FEATURES.get('ENABLE_ASYNC_ANSWER_DISTRIBUTION'):
213
    <input type="submit" name="action" value="Download CSV of answer distributions" class="${'is-disabled' if disable_buttons else ''}" aria-disabled="${'true' if disable_buttons else 'false'}" >
214
  %endif
215
    <p  class="is-deprecated">
216 217 218 219
      ${_("To download student grades and view the grading configuration for your course, visit the Data Download section of the Instructor Dashboard.")}
    </p>
    <p class="is-deprecated">
      ${_("To view the Gradebook (only available for courses with a small number of enrolled students), visit the Student Admin section of the Instructor Dashboard.")}
220
    </p>
221
    </p>
222 223
    <hr width="40%" style="align:left">

224
  %if settings.FEATURES.get('REMOTE_GRADEBOOK_URL','') and instructor_access:
225

226
    <%
227
        rg = course.remote_gradebook
228 229
    %>

230 231
    <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>
232 233

    <ul>
234
    <li>${_("Gradebook name:")} <span class="copy-confirm">${rg.get('name','None defined!')}</span>
235 236
    <br/>
    <br/>
Adam Palay committed
237 238
    <input type="submit" name="action" value="List assignments available in remote gradebook">
    <input type="submit" name="action" value="List enrolled students matching remote gradebook">
239 240 241
    <br/>
    <br/>
    </li>
Adam Palay committed
242
    <li><input type="submit" name="action" value="List assignments available for this course">
243 244 245
    <br/>
    <br/>
    </li>
246
    <li>${_("Assignment name:")} <input type="text" name="assignment_name" size=40 >
247 248
    <br/>
    <br/>
Adam Palay committed
249 250 251
    <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">
252 253
    </li>
    </ul>
254
    <hr width="40%" style="align:left">
255 256

  %endif
257
  %if settings.FEATURES.get('ENABLE_INSTRUCTOR_BACKGROUND_TASKS'):
258
    <H2>${_("Course-specific grade adjustment")}</h2>
259

260
    <p class="is-deprecated">${_("To perform these actions, visit the Student Admin section of the Instructor Dashboard.")}</p>
261

262 263
  %endif

264
    <h2>${_("Student-specific grade inspection and adjustment")}</h2>
265

266
    <p class="is-deprecated">${_("To perform these actions, visit the Student Admin section of the Instructor Dashboard.")}</p>
267

268 269
 %endif

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

273
    <p>${_("Select a problem and an action:")}
274 275 276 277 278 279 280 281 282 283
    </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>
Adam Palay committed
284
    <input type="submit" name="action" value="Generate Histogram and IRT Plot">
285
    </p>
286

287 288 289 290
    <p></p>

%endif

291
##-----------------------------------------------------------------------------
292
%if modeflag.get('Admin'):
293

294 295
  %if instructor_access or admin_access:
    <p class="is-deprecated">${_("To add or remove course staff or instructors, visit the Membership section of the Instructor Dashboard.")}</p>
296 297
  %endif

298
  %if settings.FEATURES['ENABLE_MANUAL_GIT_RELOAD'] and admin_access:
299
    <p>
Adam Palay committed
300 301
    <input type="submit" name="action" value="Reload course from XML files">
    <input type="submit" name="action" value="GIT pull and Reload course">
302
  %endif
303 304
%endif

305
##-----------------------------------------------------------------------------
306
%if modeflag.get('Forum Admin'):
307
    <p class="is-deprecated">${_("To manage forum roles, visit the Membership section of the Instructor Dashboard.")}</p>
308 309
%endif

310
##-----------------------------------------------------------------------------
311 312 313
%if modeflag.get('Enrollment'):

    <hr width="40%" style="align:left">
314 315
    <h2>${_("Enrollment Data")}</h2>
    % if disable_buttons:
316 317 318 319 320

    <div class="msg msg-warning">
      <div class="copy">
        <p>
          ${_("Note: some of these buttons are known to time out for larger "
321 322
              "courses. We have disabled those features for courses "
              "with more than {max_enrollment} students.").format(
323
              max_enrollment=settings.FEATURES['MAX_ENROLLMENT_INSTR_BUTTONS']
324 325 326 327
            )}
        </p>
      </div>
    </div>
328 329
    % endif

330 331 332 333 334 335 336 337
    <p class="is-deprecated">
      ${_("To download a CSV file containing profile information for students who are enrolled in this course, visit the Data Download section of the Instructor Dashboard.")}
    </p>

    <p class="is-deprecated">
      ${_("To download a list of students who may enroll in this course but have not yet signed up for it, visit the Data Download section of the Instructor Dashboard.")}
    </p>

338 339
    <hr width="40%" style="align:left">

340
  %if settings.FEATURES.get('REMOTE_GRADEBOOK_URL','') and instructor_access:
341

342
    <%
343
        rg = course.remote_gradebook
344 345
    %>

346
    <p>${_("Pull enrollment from remote gradebook")}</p>
347
    <ul>
348
    <li>${_("Gradebook name:")} <span class="copy-confirm">${rg.get('name','None defined!')}</span>
349
    <li>${_("Section:")} <input type="text" name="gradebook_section" size=40 value="${rg.get('section','')}"></li>
350
    </ul>
Adam Palay committed
351 352 353 354
    <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">
355
    <hr width="40%" style="align:left">
356

357 358 359
  %endif
%endif

360
##-----------------------------------------------------------------------------
361

362 363
%if modeflag.get('Data'):
    <hr width="40%" style="align:left">
364 365
    <p class="is-deprecated">
      ${_("To download a CSV listing student responses to a given problem, visit the Data Download section of the Instructor Dashboard.")}
366
    </p>
367

368
    <p class="is-deprecated">
369
      ${_("To download student profile data and anonymized IDs, visit the Data Download section of the Instructor Dashboard.")}
370
    </p>
371 372
    <hr width="40%" style="align:left">
%endif
373 374

##-----------------------------------------------------------------------------
375

376 377
%if modeflag.get('Manage Groups'):
  %if instructor_access:
378
    %if course_is_cohorted:
379
      <p class="is-deprecated">${_("To manage beta tester roles and cohorts, visit the Membership section of the Instructor Dashboard.")}</p>
380 381
    %else:
      <p class="is-deprecated">${_("To manage beta tester roles, visit the Membership section of the Instructor Dashboard.")}</p>
382
    %endif
383 384 385
  %endif
%endif

386 387 388
##-----------------------------------------------------------------------------

%if modeflag.get('Email'):
389
    <p class="is-deprecated">${_("To send email, visit the Email section of the Instructor Dashboard.")}</p>
390 391
%endif

392
    </form>
393
##-----------------------------------------------------------------------------
394

395
%if msg:
396
    <p></p><p id="idash_msg">${msg}</p>
397
%endif
398 399

##-----------------------------------------------------------------------------
400

401 402 403 404 405 406 407 408 409
%if datatable and modeflag.get('Psychometrics') is None:

    <br/>
    <br/>
    <p>
      <hr width="100%">
      <h2>${datatable['title'] | h}</h2>
      <table class="stat_table">
        <tr>
410 411 412 413
        %for hname in datatable['header']:
          <th>${hname | h}</th>
        %endfor
        </tr>
414 415
        %for row in datatable['data']:
          <tr>
416 417 418 419
          %for value in row:
            <td>${value | h}</td>
          %endfor
          </tr>
420 421 422 423 424
        %endfor
      </table>
    </p>
%endif

425 426
## Output tasks in progress

427
%if instructor_tasks is not None and len(instructor_tasks) > 0:
428
    <hr width="100%">
429
    <h2>${_("Pending Instructor Tasks")}</h2>
430 431 432
    <div id="task-progress-wrapper">
      <table class="stat_table">
        <tr>
433 434 435 436 437 438 439 440
          <th>${_("Task Type")}</th>
          <th>${_("Task inputs")}</th>
          <th>${_("Task Id")}</th>
          <th>${_("Requester")}</th>
          <th>${_("Submitted")}</th>
          <th>${_("Task State")}</th>
          <th>${_("Duration (sec)")}</th>
          <th>${_("Task Progress")}</th>
441
        </tr>
442
      %for tasknum, instructor_task in enumerate(instructor_tasks):
443
        <tr id="task-progress-entry-${tasknum}" class="task-progress-entry"
444 445
            data-task-id="${instructor_task.task_id}"
            data-in-progress="true">
446 447 448 449 450 451
          <td>${instructor_task.task_type}</td>
          <td>${instructor_task.task_input}</td>
          <td class="task-id">${instructor_task.task_id}</td>
          <td>${instructor_task.requester}</td>
          <td>${instructor_task.created}</td>
          <td class="task-state">${instructor_task.task_state}</td>
452 453
          <td class="task-duration">${_("unknown")}</td>
          <td class="task-progress">${_("unknown")}</td>
454 455 456 457 458 459 460 461 462 463
        </tr>
      %endfor
      </table>
    </div>
  <br/>

%endif

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

464
%if modeflag.get('Admin') and course_stats:
465 466 467 468
    <br/>
    <br/>
    <p>
      <hr width="100%">
469
      <h2>${course_stats['title'] | h}</h2>
470 471
      <table class="stat_table">
        <tr>
472 473 474 475
        %for hname in course_stats['header']:
          <th>${hname | h}</th>
        %endfor
        </tr>
476
        %for row in course_stats['data']:
477
          <tr>
478 479 480 481
            %for value in row:
              <td>${value | h}</td>
            %endfor
          </tr>
482 483 484
        %endfor
      </table>
    </p>
485 486 487 488
%else:
    <br/>
    <br/>
    <h2>${_("Course Statistics At A Glance")}</h2>
489
    <p class="is-deprecated">
490
      ${_("View course statistics in the Admin section of this legacy instructor dashboard.")}
491
    </p>
492 493
%endif

494
##-----------------------------------------------------------------------------
495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514
%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
515 516

##-----------------------------------------------------------------------------
517
## always show msg
518 519


520
##-----------------------------------------------------------------------------
521 522
%if modeflag.get('Admin'):
 % if course_errors is not UNDEFINED:
523
    <h2>${_("Course errors")}</h2>
Victor Shnayder committed
524
    <div id="course-errors">
525 526 527
    %if not course_errors:
          None
    %else:
Victor Shnayder committed
528 529 530
      <ul>
        % for (summary, err) in course_errors:
        <li>${summary | h}
531
        % if err:
Victor Shnayder committed
532
          <ul><li><pre>${err | h}</pre></li></ul>
533 534 535
        % else:
          <p>&nbsp;</p>
        % endif
Victor Shnayder committed
536 537 538
        </li>
        % endfor
        </ul>
539
      %endif
Victor Shnayder committed
540
      </div>
541
  % endif
542
%endif
543

544 545 546
  </section>
</div>
</section>