-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into 15954_archive
- Loading branch information
Showing
50 changed files
with
706 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -104,6 +104,5 @@ dist | |
.tern-port | ||
|
||
/lib | ||
examples | ||
|
||
*.iml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
const { codio, auth } = require('../auth.js') | ||
const { libraryId, libraryName } = require('../data.js') | ||
|
||
async function main() { | ||
await auth | ||
const search = {"Assessment Type": "Advanced Code Test"} | ||
const result = await codio.assessment.find(libraryId, search) | ||
console.log(result) | ||
|
||
} | ||
|
||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
const { codio, auth } = require('../auth.js') | ||
const { libraryId, libraryName, projectPath } = require('../data.js') | ||
|
||
async function main() { | ||
|
||
await auth | ||
|
||
const result = await codio.assessment.fromCodioProject(libraryId, projectPath) | ||
// const result = await codio.assessment.fromCodioProject(libraryName, projectPath) | ||
console.log(result) | ||
|
||
} | ||
|
||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
const { codio, auth } = require('../auth.js') | ||
|
||
async function main() { | ||
await auth | ||
const result = await codio.assessment.listLibraries() | ||
console.log(result) | ||
|
||
} | ||
|
||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
const { codio, auth } = require('../auth.js') | ||
const { assignmentId, courseId } = require('../data.js') | ||
|
||
async function main() { | ||
await auth | ||
|
||
const result = await codio.assignment.getSettings(courseId, assignmentId) | ||
console.log(result) | ||
} | ||
|
||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
const { codio, auth } = require('../auth.js') | ||
const { assignmentId, courseId, projectPath, stackVersionId } = require('../data.js') | ||
|
||
async function main() { | ||
await auth | ||
|
||
changelog = 'test' | ||
data = {changelog: changelog, stack: `${stackVersionId}:latest`, withStackUpdate: true} | ||
|
||
const result = await codio.assignment.publish(courseId, assignmentId, projectPath, data) | ||
|
||
} | ||
|
||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
const { codio, auth } = require('../auth.js') | ||
const { assignmentId, courseId, stackVersionId, archivePath } = require('../data.js') | ||
|
||
async function main() { | ||
await auth | ||
|
||
changelog = 'changelog value' | ||
data = {changelog: changelog, stack: `${stackVersionId}:latest`, withStackUpdate: true} | ||
|
||
const result = await codio.assignment.publishArchive(courseId, assignmentId, archivePath, data) | ||
} | ||
|
||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
const { codio, auth } = require('../auth.js') | ||
const { assignmentId, courseId, stackVersionId, projectPath, yamlMapDir } = require('../data.js') | ||
|
||
async function main() { | ||
await auth | ||
|
||
changelog = 'changelog value' | ||
data = {changelog: changelog, stack: `${stackVersionId}:latest`, withStackUpdate: true} | ||
|
||
const result = await codio.assignment.reducePublish(courseId, projectPath, yamlMapDir, data) | ||
|
||
} | ||
|
||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
const { codio, auth } = require('../auth.js') | ||
const { assignmentId, courseId } = require('../data.js') | ||
|
||
async function main() { | ||
await auth | ||
|
||
const result = await codio.assignment.updateSettings(courseId, assignmentId, { | ||
enableResetAssignmentByStudent: true, | ||
disableDownloadByStudent: true, | ||
// visibilityOnDisabled: 'NO_ACCESS', | ||
visibilityOnDisabled: 'READ_ONLY', | ||
// visibilityOnCompleted: 'NO_ACCESS', | ||
// visibilityOnCompleted: 'READ_ONLY', | ||
visibilityOnCompleted: 'READ_ONLY_RESUBMIT', | ||
// startTime: null, | ||
startTime: new Date('2024-05-01T13:59:59+01:00'), | ||
// endTime: null, | ||
// endTime: new Date('2022-05-20T13:59:59+01:00'), | ||
endTime: new Date('2025-07-31T13:59:59Z'), | ||
// action: 'DISABLE', | ||
// action: 'COMPLETE', | ||
action: 'DISABLE_AND_COMPLETE' | ||
|
||
}) | ||
console.log(result) | ||
|
||
} | ||
|
||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
const { codio, auth } = require('../auth.js') | ||
const { assignmentId, courseId, studentId } = require('../data.js') | ||
|
||
async function main() { | ||
await auth | ||
|
||
const result = await codio.assignment.updateStudentTimeExtension(courseId, assignmentId, studentId, { | ||
extendedDeadline: 55, | ||
extendedTimeLimit: '22' | ||
}) | ||
console.log(result) | ||
|
||
} | ||
|
||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
const library = require('../lib') | ||
const codio = library.default.v1 | ||
|
||
codio.setDomain('codio.com') // codio.co.uk for UK domain | ||
const auth = codio.auth(`your client_id`, `your client_secret`) | ||
|
||
module.exports = { codio, auth } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
const { codio, auth } = require('../auth.js') | ||
const { assignmentId, courseId } = require('../data.js') | ||
|
||
async function main() { | ||
await auth | ||
|
||
const result = await codio.course.assignmentStudentsProgress(courseId, assignmentId) | ||
console.log(result) | ||
|
||
} | ||
|
||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
const { codio, auth } = require('../auth.js') | ||
const { courseId } = require('../data.js') | ||
|
||
async function main() { | ||
await auth | ||
|
||
const result = await codio.course.createSourceExport(courseId) | ||
console.log(result) | ||
} | ||
|
||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
const { codio, auth } = require('../auth.js') | ||
const { courseId } = require('../data.js') | ||
|
||
async function main() { | ||
await auth | ||
|
||
const result = await codio.course.createWorkExport(courseId) | ||
console.log(result) | ||
} | ||
|
||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
const { codio, auth } = require('../auth.js') | ||
const { assignmentId, courseId } = require('../data.js') | ||
|
||
async function main() { | ||
await auth | ||
const filePath = '/home/codio/workspace/assessmentData.csv' | ||
|
||
const result = await codio.course.downloadAssessmentData(courseId, assignmentId, filePath) | ||
|
||
} | ||
|
||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
const { codio, auth } = require('../auth.js') | ||
const { assignmentId, courseId } = require('../data.js') | ||
|
||
async function main() { | ||
await auth | ||
const filePath = '/home/codio/workspace/assignment.csv' | ||
|
||
const result = await codio.course.downloadAssignmentCSV(courseId, assignmentId, filePath) | ||
|
||
} | ||
|
||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
const { codio, auth } = require('../auth.js') | ||
const { courseId } = require('../data.js') | ||
|
||
async function main() { | ||
await auth | ||
const filePath = '/home/codio/workspace/export_source.zip' | ||
|
||
const result = await codio.course.downloadSourceExport(courseId, filePath) | ||
|
||
} | ||
|
||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
const { codio, auth } = require('../auth.js') | ||
const { assignmentId, courseId, studentId } = require('../data.js') | ||
|
||
async function main() { | ||
await auth | ||
const filePath = '/home/codio/workspace/file.csv' | ||
|
||
const result = await codio.course.downloadStudentAssignment(courseId, assignmentId, studentId, filePath) | ||
|
||
} | ||
|
||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
const { codio, auth } = require('../auth.js') | ||
const { courseId, studentId } = require('../data.js') | ||
|
||
async function main() { | ||
await auth | ||
const filePath = '/home/codio/workspace/student.csv' | ||
|
||
const result = await codio.course.downloadStudentCSV(courseId, studentId, filePath) | ||
|
||
} | ||
|
||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
const { codio, auth } = require('../auth.js') | ||
const { assignmentId, courseId, studentId } = require('../data.js') | ||
|
||
async function main() { | ||
await auth | ||
const filePath = '/home/codio/workspace/export_work.zip' | ||
|
||
const result = await codio.course.downloadWorkExport(courseId, filePath) | ||
|
||
} | ||
|
||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
const { codio, auth } = require('../auth.js') | ||
const { assignmentId, courseId } = require('../data.js') | ||
|
||
async function main() { | ||
await auth | ||
|
||
const result = await codio.course.exportAssessmentData(courseId, assignmentId) | ||
console.log(result) | ||
} | ||
|
||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
const { codio, auth } = require('../auth.js') | ||
const { assignmentId, courseId } = require('../data.js') | ||
|
||
async function main() { | ||
await auth | ||
|
||
const result = await codio.course.exportAssignmentCSV(courseId, assignmentId) | ||
console.log(result) | ||
} | ||
|
||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
const { codio, auth } = require('../auth.js') | ||
const { assignmentId, courseId, studentId } = require('../data.js') | ||
|
||
async function main() { | ||
await auth | ||
|
||
const result = await codio.course.exportStudentAssignment(courseId, assignmentId, studentId) | ||
console.log(result) | ||
} | ||
|
||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
const { codio, auth } = require('../auth.js') | ||
const { courseId, studentId } = require('../data.js') | ||
|
||
async function main() { | ||
await auth | ||
|
||
const result = await codio.course.exportStudentCSV(courseId, studentId) | ||
console.log(result) | ||
} | ||
|
||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
const { codio, auth } = require('../auth.js') | ||
const { courseName} = require('../data.js') | ||
|
||
async function main() { | ||
await auth | ||
|
||
const result = await codio.course.findByName(courseName, true) | ||
console.log(result) | ||
|
||
} | ||
|
||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
const { codio, auth } = require('../auth.js') | ||
const { courseId } = require('../data.js') | ||
|
||
async function main() { | ||
await auth | ||
const taskId = 'your task id' | ||
|
||
const result = await codio.course.getSourceExportProgress(courseId, taskId) | ||
console.log(result) | ||
} | ||
|
||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
const { codio, auth } = require('../auth.js') | ||
const { courseId } = require('../data.js') | ||
|
||
async function main() { | ||
await auth | ||
|
||
const result = await codio.course.getSourceExports(courseId) | ||
console.log(result) | ||
} | ||
|
||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
const { codio, auth } = require('../auth.js') | ||
const { courseId } = require('../data.js') | ||
|
||
async function main() { | ||
await auth | ||
|
||
const result = await codio.course.getStudents(courseId) | ||
console.log(result) | ||
|
||
} | ||
|
||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
const { codio, auth } = require('../auth.js') | ||
const { courseId } = require('../data.js') | ||
|
||
async function main() { | ||
await auth | ||
|
||
const result = await codio.course.getTeachers(courseId) | ||
console.log(result) | ||
|
||
} | ||
|
||
main() |
Oops, something went wrong.