@01-edu/shared 1.2.3 → 1.2.4

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 CHANGED
@@ -3853,13 +3853,16 @@ types.adminSelectionValidation = TypeObject({
3853
3853
  options: ['admin_selection'],
3854
3854
  }),
3855
3855
  },
3856
- label: 'Admin selection evaluation',
3856
+ label: 'Admin selection',
3857
+ description: 'Admins manually select which submissions move forward.',
3857
3858
  })
3858
3859
 
3859
3860
  const getTesterImage = ({ attrs }) =>
3860
3861
  attrs.language && `ghcr.io/01-edu/test-${attrs.language}`
3861
3862
  types.testerValidation = TypeObject({
3862
- label: 'Tester evaluation',
3863
+ label: 'Automatic testing',
3864
+ description:
3865
+ 'The solution submitted by the user will be automatically tested and a result will immediately be available.',
3863
3866
  type: {
3864
3867
  type: Literal('tester', {
3865
3868
  required: true,
@@ -3949,11 +3952,11 @@ const sharedTypesForm = {
3949
3952
  ...Functions({ 'README in audit folder': getAuditPath }),
3950
3953
  }
3951
3954
  types.adminAuditValidationDelay = Literal(0, {
3952
- label: 'Delay',
3955
+ label: 'Audit duration',
3953
3956
  editable: true,
3954
3957
  required: true,
3955
3958
  instruction:
3956
- 'Time allowed to complete the audit before it expires. "0s" equals no delay.', // TODO: convert to MS'
3959
+ 'Time that the admins have to complete an audit before it expires', // TODO: convert to MS
3957
3960
  })
3958
3961
  types.adminAuditValidationRequired = Literal(1, {
3959
3962
  label: 'Number required',
@@ -3973,7 +3976,8 @@ types.adminAuditValidationRatio = Literal(1, {
3973
3976
  })
3974
3977
 
3975
3978
  types.adminAuditValidation = TypeObject({
3976
- label: 'Admin audit evaluation',
3979
+ label: 'Admin audit',
3980
+ description: 'Only admins can evaluate this content.',
3977
3981
  type: {
3978
3982
  type: Literal('admin_audit', {
3979
3983
  required: true,
@@ -3997,10 +4001,11 @@ types.adminAuditValidation = TypeObject({
3997
4001
  })
3998
4002
 
3999
4003
  types.userAuditValidationDelay = Literal((2 * WEEK) / MIN, {
4000
- label: 'Delay',
4004
+ label: 'Audit duration',
4001
4005
  required: true,
4002
4006
  editable: true,
4003
- instruction: 'Time allowed to complete the audit before it expires', // TODO: convert to MS
4007
+ instruction:
4008
+ 'Time that the users have to complete an audit before it expires', // TODO: convert to MS
4004
4009
  })
4005
4010
  types.userAuditValidationRequired = Literal(5, {
4006
4011
  label: 'Number required',
@@ -4022,10 +4027,11 @@ types.userAuditValidationRatio = Literal(2, {
4022
4027
  })
4023
4028
 
4024
4029
  types.matchInfluence = TypeObject({
4025
- label: 'Match Algorithm Influence',
4030
+ label: 'Audit Attribution Influence',
4026
4031
  editable: true,
4027
4032
  required: true,
4028
- instruction: 'Adjust weights in the Match algorithm',
4033
+ instruction:
4034
+ 'Adjust the weights in the match algorithm to influence how audits are attributed',
4029
4035
  type: {
4030
4036
  auditsRatio: Literal(2.0, {
4031
4037
  label: 'Current Audit Ratio',
@@ -4051,7 +4057,9 @@ types.matchInfluence = TypeObject({
4051
4057
  })
4052
4058
 
4053
4059
  types.userAuditValidation = TypeObject({
4054
- label: 'User audit evaluation',
4060
+ label: 'User audit',
4061
+ description:
4062
+ '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
4063
  type: {
4056
4064
  type: Literal('user_audit', {
4057
4065
  required: true,
@@ -4078,19 +4086,23 @@ types.userAuditValidation = TypeObject({
4078
4086
  editable: true,
4079
4087
  type: 'array',
4080
4088
  label: 'Pre questions',
4081
- instruction: 'List of questions that appears before the main audit',
4089
+ instruction:
4090
+ 'Define a set of questions that appear before the main audit. Go to “edit & preview” mode to visualize the question content',
4082
4091
  },
4083
4092
  postQuestions: {
4084
4093
  editable: true,
4085
4094
  type: 'array',
4086
4095
  label: 'Post questions',
4087
- instruction: 'List of questions that appears after the main audit',
4096
+ instruction:
4097
+ 'Define a set of questions that appear after the main audit. Go to “edit & preview” mode to visualize the question content',
4088
4098
  },
4089
4099
  },
4090
4100
  })
4091
4101
 
4092
4102
  types.raidAuditorValidation = TypeObject({
4093
- label: 'User audit evaluation (dedicated for event)',
4103
+ label: 'Dedicated auditors for event',
4104
+ description:
4105
+ '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
4106
  type: {
4095
4107
  type: Literal('dedicated_auditors_for_event', {
4096
4108
  required: true,
@@ -4113,8 +4125,8 @@ types.raidAuditorValidation = TypeObject({
4113
4125
  })
4114
4126
 
4115
4127
  const sharedValidations = {
4116
- label: 'Evaluated by',
4117
- instruction: 'List of evaluations to complete in order',
4128
+ label: 'Evaluations required',
4129
+ instruction: 'Define the evaluation methods for this content',
4118
4130
  check: value => {
4119
4131
  if (!value.length) throw Error('must have at least one element')
4120
4132
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@01-edu/shared",
3
- "version": "1.2.3",
3
+ "version": "1.2.4",
4
4
  "type": "module",
5
5
  "description": "",
6
6
  "scripts": {
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 =>