Posts made by Itamar Tzadok

I know. But I have an even more advanced assignment type (wip) than the advanced uploading of files assignment. See illustration of a multipart assignment (using online text, but can use file upload with or instead the online text, no limit to number of files). smile

Grading all parts as a whole

Grading by part

User view

Wouldn't it be great to do all that in one activity? As a student, upload a file and comment on your work, possibly a few short comments targeting different aspects (which you can then group by aspect to get a better view on students perception of those aspects), all in one entry. Then the instructor can view a list of all students with their submissions and comments and grade, all in one page.  smile

For multiple files you need to add multiple file fields.

What you call category is just the default display of an entry. If you you want a tabular (aka aligned) list, it is not staitforward in the standard database module. Search this forum or the module docs for instructions and we can take it from there. smile

One possible approach with your current implementation of the list view is the following. The following code goes into the js template:

function highlightRows() {
    var myTables=document.getElementsByTagName('table');
    var myRows = [];
    for (var i=0;i<myTables.length;i++){
        if (myTables[i].getAttribute('name')=='listviewrow'){
            myRows.push(myTables[i]);
        }
    }
    for (var i=0;i<myRows.length;i++){
        myRows[i].className = 'd'+(i%2);
    }
};

Then in the list view, you should switch to html mode and add to the table tag in the repeated entry section the following clause:

 name='listviewrow'

and you need to add in the list footer section the following code:

<script type="text/javascript">highlightRows();</script>

Finally modify the css definitions in the css template to

table.d0 td {
    background-color: #FFFFFF; color: white;
}
table.d1 td {
    background-color: #F5F5DC; color: yellow;
}

 

(note that your definition of background-color and color to the same color doesn't make much sense. the 'color' attribute determines the color of the text and so you won't see any text. You won't get this effect in your sample, however, because there the color is defined inline and thus overrides the class definition)

With a bit of luck this would work (it works on your sample database). It minimizes the script in the list view and so you can continue to modify the list header and repeated entry sections in wysiwyg mode without mucking the script.

hth smile