Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrate the course assignment table according to researchers' preferences #10

Open
wants to merge 41 commits into
base: main
Choose a base branch
from

Conversation

SamuelVch98
Copy link
Collaborator

Integration of the handsontable table into the application.
Ability to save the state of a table, delete data, export it as a CSV file and publish it.
Update README

templates/assignment.html Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
assignment.py Outdated Show resolved Hide resolved
assignment.py Show resolved Hide resolved
assignment.py Outdated Show resolved Hide resolved
static/scripts/index.js Outdated Show resolved Hide resolved
static/scripts/index.js Outdated Show resolved Hide resolved
static/scripts/index.js Outdated Show resolved Hide resolved
static/scripts/index.js Outdated Show resolved Hide resolved
templates/assignment.html Outdated Show resolved Hide resolved
static/scripts/assignment_table.js Outdated Show resolved Hide resolved
static/scripts/assignment_table.js Outdated Show resolved Hide resolved
static/scripts/assignment_table.js Outdated Show resolved Hide resolved
@anthonygego
Copy link
Member

Can you rebase ?

Copy link
Member

@anthonygego anthonygego left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems that we can change the preferences line and put whatever we want in the cells, and then save the table and loose the actual prferences...

Also, I think that you should add some short notice on how to use the table: which cells need to be modified, how....

static/scripts/assignment_table.js Outdated Show resolved Hide resolved
static/scripts/assignment_table.js Outdated Show resolved Hide resolved
@anthonygego
Copy link
Member

Can you fix conflicts and rebase ?

db.py Outdated Show resolved Hide resolved
db.py Outdated Show resolved Hide resolved
db.py Outdated Show resolved Hide resolved
Save comments in assignments to avoid a rigid data structure
Modify the way loads and the number of assistants are calculated to avoid consistency problems
Small fix on issues
static/scripts/assignment_table.js Outdated Show resolved Hide resolved
Comment on lines 244 to 249
if (col > lenFixedHeaders - 1) {
let colData = this.getDataAtCol(col);
if (colData[RowIndices.TOTAL_ASSISTANT_NOW] >= colData[RowIndices.ASSISTANTS]) {
th.style.backgroundColor = 'green';
}
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your check on the number of assignations per course is not complete because you only check if that number is lower or equal to the desired value. You don't check if it goes over (red).

Also, you don't do that check if there is no desired number of assigned researcher. The title remains green all the time. I don't know what is best : giving a number at course creation or just leaving the title white if no number is given. What do you think @anthonygego @luciledierckx

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If there is no desired number of researchers assigned, the value is set to 0 by default. Would you like me to set the header to ‘’white‘’ if the value is the default?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel that in the normal use of the application, we should define a number of researchers per course. Obviously a person creating a course might not now exactly how many are needed at first. And that is why we handle the case where none are given.

I was thinking we might use a way to clearly indicate that desired number is not defined for a course. For example, ith a title in light purple or something similar. It would be a way of saying "Be advised, you didn't define a desired number of researcher !".
That additional color would prevent the case where we confuse the courses that are not fully assigned and those with no desired number of researchers.

I will discuss this possibility with the others.

Copy link
Contributor

@AlexandreDoneux AlexandreDoneux left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As discussed, you should indicate clearly in the table when a course has no number of researcher defined

Add accordions to reduce the legend and controls.
Copy link
Contributor

@AlexandreDoneux AlexandreDoneux left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We want a course that is not fully assigned to be white. Right now it becomes red.
Also, a course with too many researchers assigned stays green instead of turning red.

Comment on lines 244 to 252
let colData = this.getDataAtCol(col);
if (col > lenFixedHeaders - 1) {
if (colData[RowIndices.ASSISTANTS] === 0) {
th.style.backgroundColor = '#E1BEE7';
}
else if (colData[RowIndices.TOTAL_ASSISTANT_NOW] >= colData[RowIndices.ASSISTANTS]) {
th.style.backgroundColor = 'green';
}
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where is the red gone ?

Now it is white when not enough researchers are assigned and turns green when enough are assigned. But if too many are assigned the titles does not change to red... Also the red color is missing from the legend.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, it's my fault, I misunderstood your last comment.

Copy link
Contributor

@AlexandreDoneux AlexandreDoneux left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me other than that last change in the legend. @anthonygego, does it look good ?

Comment on lines +56 to +60
<li><span class="d-inline-block bg-danger"
style="width: 16px; height: 16px; margin-right: 8px;"></span>
Additional
researchers needed
</li>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Additional researchers needed" needs to be "too many researchers assigned"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants