Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
OLAT CI-CD Testing Project
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Requirements
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Lars Oliver Dam
OLAT CI-CD Testing Project
Commits
689f59fc
Commit
689f59fc
authored
12 years ago
by
srosse
Browse files
Options
Downloads
Patches
Plain Diff
OO-343: export the solutions for task course building block
parent
2b9216a5
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/org/olat/course/nodes/TACourseNode.java
+16
-4
16 additions, 4 deletions
src/main/java/org/olat/course/nodes/TACourseNode.java
with
16 additions
and
4 deletions
src/main/java/org/olat/course/nodes/TACourseNode.java
+
16
−
4
View file @
689f59fc
...
@@ -707,11 +707,17 @@ public class TACourseNode extends GenericCourseNode implements AssessableCourseN
...
@@ -707,11 +707,17 @@ public class TACourseNode extends GenericCourseNode implements AssessableCourseN
*/
*/
@Override
@Override
public
void
exportNode
(
File
fExportDirectory
,
ICourse
course
)
{
public
void
exportNode
(
File
fExportDirectory
,
ICourse
course
)
{
// export
only this taskfolder's
tasks
// export
the
tasks
File
fTaskFolder
=
new
File
(
FolderConfig
.
getCanonicalRoot
()
+
TACourseNode
.
getTaskFolderPathRelToFolderRoot
(
course
,
this
));
File
fTaskFolder
=
new
File
(
FolderConfig
.
getCanonicalRoot
()
,
TACourseNode
.
getTaskFolderPathRelToFolderRoot
(
course
,
this
));
File
fNodeExportDir
=
new
File
(
fExportDirectory
,
this
.
getIdent
());
File
fNodeExportDir
=
new
File
(
fExportDirectory
,
getIdent
());
fNodeExportDir
.
mkdirs
();
fNodeExportDir
.
mkdirs
();
FileUtils
.
copyDirContentsToDir
(
fTaskFolder
,
fNodeExportDir
,
false
,
"export task course node"
);
FileUtils
.
copyDirContentsToDir
(
fTaskFolder
,
fNodeExportDir
,
false
,
"export task course node"
);
//export thes solutions
File
fSolutionDir
=
new
File
(
FolderConfig
.
getCanonicalRoot
(),
TACourseNode
.
getFoldernodesPathRelToFolderBase
(
course
.
getCourseEnvironment
())
+
"/"
+
getIdent
());
File
fSolExportDir
=
new
File
(
new
File
(
fExportDirectory
,
"solutions"
),
getIdent
());
fSolExportDir
.
mkdirs
();
FileUtils
.
copyDirContentsToDir
(
fSolutionDir
,
fSolExportDir
,
false
,
"export task course node solutions"
);
}
}
/**
/**
...
@@ -721,9 +727,15 @@ public class TACourseNode extends GenericCourseNode implements AssessableCourseN
...
@@ -721,9 +727,15 @@ public class TACourseNode extends GenericCourseNode implements AssessableCourseN
*/
*/
@Override
@Override
public
Controller
importNode
(
File
importDirectory
,
ICourse
course
,
boolean
unattendedImport
,
UserRequest
ureq
,
WindowControl
wControl
)
{
public
Controller
importNode
(
File
importDirectory
,
ICourse
course
,
boolean
unattendedImport
,
UserRequest
ureq
,
WindowControl
wControl
)
{
File
fNodeImportDir
=
new
File
(
importDirectory
,
this
.
getIdent
());
//import tasks
File
fNodeImportDir
=
new
File
(
importDirectory
,
getIdent
());
File
fTaskfolderDir
=
new
File
(
FolderConfig
.
getCanonicalRoot
()
+
TACourseNode
.
getTaskFolderPathRelToFolderRoot
(
course
,
this
));
File
fTaskfolderDir
=
new
File
(
FolderConfig
.
getCanonicalRoot
()
+
TACourseNode
.
getTaskFolderPathRelToFolderRoot
(
course
,
this
));
FileUtils
.
copyDirContentsToDir
(
fNodeImportDir
,
fTaskfolderDir
,
false
,
"import task course node"
);
FileUtils
.
copyDirContentsToDir
(
fNodeImportDir
,
fTaskfolderDir
,
false
,
"import task course node"
);
File
fSolutionDir
=
new
File
(
FolderConfig
.
getCanonicalRoot
(),
TACourseNode
.
getFoldernodesPathRelToFolderBase
(
course
.
getCourseEnvironment
())
+
"/"
+
getIdent
());
fSolutionDir
.
mkdirs
();
File
fSolImportDir
=
new
File
(
new
File
(
importDirectory
,
"solutions"
),
getIdent
());
FileUtils
.
copyDirContentsToDir
(
fSolImportDir
,
fSolutionDir
,
false
,
"import task course node solutions"
);
return
null
;
return
null
;
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment