@01-edu/shared 1.2.3 → 1.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/attrs-defs.js +31 -17
- package/package.json +1 -1
- package/toolbox.js +0 -6
package/attrs-defs.js
CHANGED
|
@@ -2434,6 +2434,7 @@ types.levelDefinition = TypeObject({
|
|
|
2434
2434
|
type: {
|
|
2435
2435
|
skills: {
|
|
2436
2436
|
...skillsList,
|
|
2437
|
+
label: 'Skills required',
|
|
2437
2438
|
instruction: 'Expertises required',
|
|
2438
2439
|
},
|
|
2439
2440
|
objects: {
|
|
@@ -2452,8 +2453,9 @@ types.levelDefinition = TypeObject({
|
|
|
2452
2453
|
},
|
|
2453
2454
|
})
|
|
2454
2455
|
const sharedLevelsDefinitions = {
|
|
2455
|
-
label: '
|
|
2456
|
-
instruction:
|
|
2456
|
+
label: 'Level requirements',
|
|
2457
|
+
instruction:
|
|
2458
|
+
'Set the requirements and conditions for the user to access specific levels',
|
|
2457
2459
|
value: (...args) => [
|
|
2458
2460
|
mapValues(types.levelDefinition.type, subDef =>
|
|
2459
2461
|
getDefaultValue(subDef, ...args),
|
|
@@ -3853,13 +3855,16 @@ types.adminSelectionValidation = TypeObject({
|
|
|
3853
3855
|
options: ['admin_selection'],
|
|
3854
3856
|
}),
|
|
3855
3857
|
},
|
|
3856
|
-
label: 'Admin selection
|
|
3858
|
+
label: 'Admin selection',
|
|
3859
|
+
description: 'Admins manually select which submissions move forward.',
|
|
3857
3860
|
})
|
|
3858
3861
|
|
|
3859
3862
|
const getTesterImage = ({ attrs }) =>
|
|
3860
3863
|
attrs.language && `ghcr.io/01-edu/test-${attrs.language}`
|
|
3861
3864
|
types.testerValidation = TypeObject({
|
|
3862
|
-
label: '
|
|
3865
|
+
label: 'Automatic testing',
|
|
3866
|
+
description:
|
|
3867
|
+
'The solution submitted by the user will be automatically tested and a result will immediately be available.',
|
|
3863
3868
|
type: {
|
|
3864
3869
|
type: Literal('tester', {
|
|
3865
3870
|
required: true,
|
|
@@ -3949,11 +3954,11 @@ const sharedTypesForm = {
|
|
|
3949
3954
|
...Functions({ 'README in audit folder': getAuditPath }),
|
|
3950
3955
|
}
|
|
3951
3956
|
types.adminAuditValidationDelay = Literal(0, {
|
|
3952
|
-
label: '
|
|
3957
|
+
label: 'Audit duration',
|
|
3953
3958
|
editable: true,
|
|
3954
3959
|
required: true,
|
|
3955
3960
|
instruction:
|
|
3956
|
-
'Time
|
|
3961
|
+
'Time that the admins have to complete an audit before it expires', // TODO: convert to MS
|
|
3957
3962
|
})
|
|
3958
3963
|
types.adminAuditValidationRequired = Literal(1, {
|
|
3959
3964
|
label: 'Number required',
|
|
@@ -3973,7 +3978,8 @@ types.adminAuditValidationRatio = Literal(1, {
|
|
|
3973
3978
|
})
|
|
3974
3979
|
|
|
3975
3980
|
types.adminAuditValidation = TypeObject({
|
|
3976
|
-
label: 'Admin audit
|
|
3981
|
+
label: 'Admin audit',
|
|
3982
|
+
description: 'Only admins can evaluate this content.',
|
|
3977
3983
|
type: {
|
|
3978
3984
|
type: Literal('admin_audit', {
|
|
3979
3985
|
required: true,
|
|
@@ -3997,10 +4003,11 @@ types.adminAuditValidation = TypeObject({
|
|
|
3997
4003
|
})
|
|
3998
4004
|
|
|
3999
4005
|
types.userAuditValidationDelay = Literal((2 * WEEK) / MIN, {
|
|
4000
|
-
label: '
|
|
4006
|
+
label: 'Audit duration',
|
|
4001
4007
|
required: true,
|
|
4002
4008
|
editable: true,
|
|
4003
|
-
instruction:
|
|
4009
|
+
instruction:
|
|
4010
|
+
'Time that the users have to complete an audit before it expires', // TODO: convert to MS
|
|
4004
4011
|
})
|
|
4005
4012
|
types.userAuditValidationRequired = Literal(5, {
|
|
4006
4013
|
label: 'Number required',
|
|
@@ -4022,10 +4029,11 @@ types.userAuditValidationRatio = Literal(2, {
|
|
|
4022
4029
|
})
|
|
4023
4030
|
|
|
4024
4031
|
types.matchInfluence = TypeObject({
|
|
4025
|
-
label: '
|
|
4032
|
+
label: 'Audit Attribution Influence',
|
|
4026
4033
|
editable: true,
|
|
4027
4034
|
required: true,
|
|
4028
|
-
instruction:
|
|
4035
|
+
instruction:
|
|
4036
|
+
'Adjust the weights in the match algorithm to influence how audits are attributed',
|
|
4029
4037
|
type: {
|
|
4030
4038
|
auditsRatio: Literal(2.0, {
|
|
4031
4039
|
label: 'Current Audit Ratio',
|
|
@@ -4051,7 +4059,9 @@ types.matchInfluence = TypeObject({
|
|
|
4051
4059
|
})
|
|
4052
4060
|
|
|
4053
4061
|
types.userAuditValidation = TypeObject({
|
|
4054
|
-
label: 'User audit
|
|
4062
|
+
label: 'User audit',
|
|
4063
|
+
description:
|
|
4064
|
+
'Users will be assigned as auditors to peer-review the project submission. You can customise the rules of audit attribution and requirements for the group to succeed.',
|
|
4055
4065
|
type: {
|
|
4056
4066
|
type: Literal('user_audit', {
|
|
4057
4067
|
required: true,
|
|
@@ -4078,19 +4088,23 @@ types.userAuditValidation = TypeObject({
|
|
|
4078
4088
|
editable: true,
|
|
4079
4089
|
type: 'array',
|
|
4080
4090
|
label: 'Pre questions',
|
|
4081
|
-
instruction:
|
|
4091
|
+
instruction:
|
|
4092
|
+
'Define a set of questions that appear before the main audit. Go to “edit & preview” mode to visualize the question content',
|
|
4082
4093
|
},
|
|
4083
4094
|
postQuestions: {
|
|
4084
4095
|
editable: true,
|
|
4085
4096
|
type: 'array',
|
|
4086
4097
|
label: 'Post questions',
|
|
4087
|
-
instruction:
|
|
4098
|
+
instruction:
|
|
4099
|
+
'Define a set of questions that appear after the main audit. Go to “edit & preview” mode to visualize the question content',
|
|
4088
4100
|
},
|
|
4089
4101
|
},
|
|
4090
4102
|
})
|
|
4091
4103
|
|
|
4092
4104
|
types.raidAuditorValidation = TypeObject({
|
|
4093
|
-
label: '
|
|
4105
|
+
label: 'Dedicated auditors for event',
|
|
4106
|
+
description:
|
|
4107
|
+
'Define a list of users that will audit the content. This list is created on each event related to this content, and needs to be available before the event ends.',
|
|
4094
4108
|
type: {
|
|
4095
4109
|
type: Literal('dedicated_auditors_for_event', {
|
|
4096
4110
|
required: true,
|
|
@@ -4113,8 +4127,8 @@ types.raidAuditorValidation = TypeObject({
|
|
|
4113
4127
|
})
|
|
4114
4128
|
|
|
4115
4129
|
const sharedValidations = {
|
|
4116
|
-
label: '
|
|
4117
|
-
instruction: '
|
|
4130
|
+
label: 'Evaluations required',
|
|
4131
|
+
instruction: 'Define the evaluation methods for this content',
|
|
4118
4132
|
check: value => {
|
|
4119
4133
|
if (!value.length) throw Error('must have at least one element')
|
|
4120
4134
|
},
|
package/package.json
CHANGED
package/toolbox.js
CHANGED
|
@@ -64,12 +64,6 @@ export const handleKeyDownEvent = args => {
|
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
66
|
|
|
67
|
-
export const swap = (arr, i, j) => {
|
|
68
|
-
const newArr = [...arr] // don’t mutate the original
|
|
69
|
-
;[newArr[i], newArr[j]] = [newArr[j], newArr[i]]
|
|
70
|
-
return newArr
|
|
71
|
-
}
|
|
72
|
-
|
|
73
67
|
export const last = array => array[array.length - 1]
|
|
74
68
|
|
|
75
69
|
export const upperFirst = str =>
|