@@ -97,19 +97,8 @@ impl CourseRefresher {
9797 self . progress_reporter
9898 . finish_step ( "Updated course options" . to_string ( ) , None ) ?;
9999
100- // make_solutions
101100 let new_solution_path = new_cache_path. join ( "solution" ) ;
102- log:: info!( "preparing solution to {}" , new_solution_path. display( ) ) ;
103- task_executor:: prepare_solution ( & new_clone_path, & new_solution_path) ?;
104- self . progress_reporter
105- . finish_step ( "Prepared solutions" . to_string ( ) , None ) ?;
106-
107- // make_stubs
108101 let new_stub_path = new_cache_path. join ( "stub" ) ;
109- log:: info!( "preparing stubs to {}" , new_stub_path. display( ) ) ;
110- task_executor:: prepare_stub ( & new_clone_path, & new_stub_path) ?;
111- self . progress_reporter
112- . finish_step ( "Prepared stubs" . to_string ( ) , None ) ?;
113102
114103 // find exercises in new clone path
115104 log:: info!( "finding exercises" ) ;
@@ -118,6 +107,28 @@ impl CourseRefresher {
118107 self . progress_reporter
119108 . finish_step ( "Located exercises" . to_string ( ) , None ) ?;
120109
110+ // make_solutions
111+ log:: info!( "preparing solutions to {}" , new_solution_path. display( ) ) ;
112+ for exercise in & exercises {
113+ task_executor:: prepare_solution (
114+ & new_clone_path. join ( & exercise. path ) ,
115+ & new_solution_path. join ( & exercise. path ) ,
116+ ) ?;
117+ }
118+ self . progress_reporter
119+ . finish_step ( "Prepared solutions" . to_string ( ) , None ) ?;
120+
121+ // make_stubs
122+ log:: info!( "preparing stubs to {}" , new_stub_path. display( ) ) ;
123+ for exercise in & exercises {
124+ task_executor:: prepare_stub (
125+ & new_clone_path. join ( & exercise. path ) ,
126+ & new_stub_path. join ( & exercise. path ) ,
127+ ) ?;
128+ }
129+ self . progress_reporter
130+ . finish_step ( "Prepared stubs" . to_string ( ) , None ) ?;
131+
121132 // make_zips_of_solutions
122133 let new_solution_zip_path = new_cache_path. join ( "solution_zip" ) ;
123134 log:: info!( "compressing solutions" ) ;
@@ -523,6 +534,7 @@ courses:
523534 let exercises =
524535 get_exercises ( & temp. path ( ) . join ( "course" ) , & temp. path ( ) . join ( "course" ) ) . unwrap ( ) ;
525536 assert_eq ! ( exercises. len( ) , 1 ) ;
537+ assert_eq ! ( exercises[ 0 ] . path, Path :: new( "part1/ex1" ) ) ;
526538 assert_eq ! ( exercises[ 0 ] . points. len( ) , 2 ) ;
527539 assert_eq ! ( exercises[ 0 ] . points[ 0 ] , "1" ) ;
528540 assert_eq ! ( exercises[ 0 ] . points[ 1 ] , "2" ) ;
0 commit comments