Skip to content

Commit 4006b16

Browse files
committed
removed superfluous functions
1 parent 1f45990 commit 4006b16

File tree

2 files changed

+3
-30
lines changed

2 files changed

+3
-30
lines changed

tmc-langs-util/src/task_executor.rs

Lines changed: 2 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ mod tar_helper;
77
mod tmc_zip;
88

99
pub use self::course_refresher::{refresh_course, ModeBits, RefreshData, RefreshExercise};
10-
pub use self::submission_packaging::{OutputFormat, TmcParams};
10+
pub use self::submission_packaging::{prepare_submission, OutputFormat, TmcParams};
11+
pub use self::submission_processing::prepare_solution;
1112

1213
use crate::error::UtilError;
1314
use crate::{ExerciseDesc, ExercisePackagingConfiguration, RunResult, StyleValidationResult};
@@ -28,12 +29,6 @@ use tmc_langs_python3::Python3Plugin;
2829
use tmc_langs_r::RPlugin;
2930
use walkdir::WalkDir;
3031

31-
/// See `submission_processing::prepare_solution`.
32-
pub fn prepare_solution(exercise_path: &Path, dest_root: &Path) -> Result<(), UtilError> {
33-
submission_processing::prepare_solution(exercise_path, dest_root)?;
34-
Ok(())
35-
}
36-
3732
/// See `submission_processing::prepare_stub`.
3833
pub fn prepare_stub(exercise_path: &Path, dest_path: &Path) -> Result<(), UtilError> {
3934
submission_processing::prepare_stub(&exercise_path, dest_path)?;
@@ -45,28 +40,6 @@ pub fn prepare_stub(exercise_path: &Path, dest_path: &Path) -> Result<(), UtilEr
4540
Ok(())
4641
}
4742

48-
/// Takes a submission zip and turns it into an archive suitable for
49-
/// further processing by among other things resetting the test files
50-
pub fn prepare_submission(
51-
zip_path: &Path,
52-
target_path: &Path,
53-
toplevel_dir_name: Option<String>,
54-
tmc_params: TmcParams,
55-
clone_path: &Path,
56-
stub_zip_path: Option<&Path>,
57-
output_format: OutputFormat,
58-
) -> Result<(), UtilError> {
59-
submission_packaging::prepare_submission(
60-
zip_path,
61-
target_path,
62-
toplevel_dir_name,
63-
tmc_params,
64-
clone_path,
65-
stub_zip_path,
66-
output_format,
67-
)
68-
}
69-
7043
/// See `LanguagePlugin::check_code_style`.
7144
pub fn run_check_code_style(
7245
path: &Path,

tmc-langs-util/src/task_executor/submission_packaging.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,7 @@ pub fn prepare_submission(
366366
let tmc_project_yml = TmcProjectYml::from(clone_path)?;
367367
for extra_student_file in tmc_project_yml.extra_student_files {
368368
// todo secure path
369-
let source = received_dir.join(&extra_student_file);
369+
let source = project_root.join(&extra_student_file);
370370
if source.exists() {
371371
let target = dest.join(&extra_student_file);
372372
file_util::copy(source, target)?;

0 commit comments

Comments
 (0)