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

« back to all changes in this revision

Viewing changes to ivle/webapp/tutorial/media/tutorial.js

  • Committer: Matt Giuca
  • Date: 2010-02-24 12:47:31 UTC
  • mto: This revision was merged to the branch mainline in revision 1701.
  • Revision ID: matt.giuca@gmail.com-20100224124731-r4tgywr2djomab4s
worksheet page: If the viewer has permission to edit, the list of exercises in the contents is replaced by a table showing the statistics on each exercise, including the number of students who have attempted and completed the exercise. Fixed up JavaScript so the dynamic change to a green ball still works on this modified view.

Show diffs side-by-side

added added

removed removed

Lines of Context:
344
344
            + exerciseid);
345
345
        toc_li.setAttribute("class",
346
346
            (testresponse.completed ? "complete" : "incomplete"));
 
347
        /* If it is a table row, also set the image */
 
348
        if (toc_li.tagName.toLowerCase() == "tr")
 
349
        {
 
350
            toc_li_img = toc_li.getElementsByTagName("img")[0];
 
351
            toc_li_img.setAttribute("src", "/+media/ivle.webapp.tutorial/"
 
352
                + "images/tiny/"
 
353
                + (testresponse.completed ? "complete" : "incomplete")
 
354
                + ".png");
 
355
        }
347
356
        summaryli.setAttribute("class",
348
357
            (testresponse.completed ? "complete" : "incomplete"));
349
358
        summarycomplete.removeChild(summarycomplete.lastChild);