DIKU-EDU/remarks

Add a properties syntax

oleks opened this issue · 10 comments

oleks commented

Some essential properties: student name, id, and grade.
It would be nice to extract just these properties into a CSV format.

Perhaps the format should be similar to org-mode:

# Total: 45/100
  :Name: Donald E. Knuth
  :Grade: 00
## Theory: 40/50
  + Excellent.
  - But you need a CS degree to understand what's going on.
## Practice: 5/50
  + There is an implementation.
  - Only proven correct, but not tested.

I think properties should be global.

The CSV export command syntax could then look something like this:

$ remarks export --format "Name;Grade;Total;Theory;Practice" <path>

This is a prerequisite for #3.

oleks commented

@kirkedal Any objections to the format I suggest above?

athas commented

Can the value of a property contain newlines?

oleks commented

I am thinking of forcing properties to the topmost judgement only. So basically this means that I will change the parser to return an IO [Assignment ([Property], Judgement)] in IO [Judgement].

oleks commented
oleks commented

I also think it could be a useful feature if TA's could fill in certain properties (deep down in their own files).

You were right about this. Parser done! New thought!

The proposed export format mixes titles and total points from different levels. That can quickly get out of hand. Should it be a depth or breath first search. Also I would like to use more wordy name for titles. Instead I propose the following.
All Assignments (that includes leaf-assignments) have 3 predefines properties: Title, Total and MaxPoints. These comes from the header.
When defining a property, we can then refer and read values from to the properties of the leaves. The format here is assuming that they are ordered and thus refers to the numbering in the list. An example could then be:

# Total: 45/100
  :Name: Donald E. Knuth
  :Grade: 00
  :Theory: [1.Total]
  :Practice: [2.Total]
## Theory sharpens the brain: 40/50
  + Excellent.
  - But you need a CS degree to understand what's going on.
## Practice your skills: 5/50
  + There is an implementation.
  - Only proven correct, but not tested.

Then the export command will be uniquely defined.
$ remarks export --format "Name;Grade;Total;Theory;Practice" <path>

I don't like the format for referencing to leaves, but I lack something much better.

This can even be extended to a small scripting language, that can calculate grades and similar. We can even move the calculation of Total and MaxPoints to have a predefined summation of the leaves.

oleks commented