Skip to content

Commit

Permalink
grade table.
Browse files Browse the repository at this point in the history
  • Loading branch information
andres-gimenez committed Oct 8, 2024
1 parent 7308f04 commit a389da5
Show file tree
Hide file tree
Showing 7 changed files with 84 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/g-exam.typ
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#import "./global.typ" : *
#import "./auxiliary.typ": *
#import "./g-question.typ": *
#import "./g-option.typ": *
#import "./g-solution.typ": *
#import "./g-clarification.typ": *

Expand Down
14 changes: 14 additions & 0 deletions src/g-option.typ
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#import"./global.typ": *

/// Define a new block of options.
///
/// *Example:*
/// ```
/// #g-subquestion(points:2)[This is a sub-question]
/// ```
///
/// - body (string, content): Body of option label.
#let g-option(
body) = {
body
}
4 changes: 1 addition & 3 deletions src/lib.typ
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#let version = version((0,3,0))

#import "g-exam.typ": g-exam, g-question, g-subquestion, g-solution, g-clarification
// #import "g-command.typ": g-question, g-subquestion, g-solution, g-clarification
// #import "g-sugar.typ": *
#import "g-exam.typ": g-exam, g-question, g-subquestion, g-option, g-solution, g-clarification
13 changes: 13 additions & 0 deletions test/grade-table/test-001-question-point.typ
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#import "../../src/lib.typ": *

#show: g-exam.with(
show-student-data: "first-page",
show-grade-table: true,
)

#g-question(points:2.1)[]
#g-question(points:3)[]
#g-question(points:2.3)[]
#g-question(points:3)[]
#g-question(points:2.1)[]
#g-question(points:3.3)[]
16 changes: 16 additions & 0 deletions test/grade-table/test-002-subquestion-point.typ
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#import "../../src/lib.typ": *

#show: g-exam.with(
show-student-data: "first-page",
show-grade-table: true,
)


#g-question()[]
#g-subquestion(points:1)[]
#g-subquestion(points:1)[]

#g-question(points:3)[]
#g-subquestion(points:1.2)[]
#g-subquestion(points:1.3)[]

16 changes: 16 additions & 0 deletions test/grade-table/test-003-sugar.typ
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#import "../../src/lib.typ": *

#show: g-exam.with(
show-student-data: "first-page",
show-grade-table: true,
)


=? []
==? (points:1) []
==? (points:2) []

=? (points:3)[]
==? (points:1.2)[]
==? (points:1.3)[]

23 changes: 23 additions & 0 deletions test/grade-table/test-004-multioptions-points.typ
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#import "../../src/lib.typ": *

#show: g-exam.with(
show-student-data: "first-page",
show-grade-table: true,
)

#g-option()[Option A]
#g-question(points:2.1)[]
#g-question(points:3)[]
#g-question(points:2.3)[]
#g-question(points:3)[]
#g-question(points:2.1)[]
#g-question(points:3.3)[]

#g-option()[Option B]
#g-question(points:2.1)[]
#g-question(points:3)[]
#g-question(points:2.3)[]
#g-question(points:3)[]
#g-question(points:2.1)[]
#g-question(points:3.3)[]

0 comments on commit a389da5

Please sign in to comment.