Skip to content

Commit

Permalink
learning outcomes TODOs
Browse files Browse the repository at this point in the history
  • Loading branch information
heileman committed Nov 30, 2020
1 parent 96f5596 commit 30d73e6
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 6 deletions.
9 changes: 8 additions & 1 deletion src/DataTypes/Curriculum.jl
Expand Up @@ -37,8 +37,10 @@ mutable struct Curriculum
num_courses::Int # Number of required courses in curriculum
credit_hours::Real # Total number of credit hours in required curriculum
graph::SimpleDiGraph{Int} # Directed graph representation of pre-/co-requisite structure
# of the curriculum
# of the curriculum, note: this is a course graph
learning_outcomes::Array{LearningOutcome} # A list of learning outcomes associated with the curriculum
lo_graph::SimpleDiGraph{Int} # Directed graph representatin of pre-/co-requisite structure of learning
# outcomes in the curriculum
metrics::Dict{String, Any} # Curriculum-related metrics
metadata::Dict{String, Any} # Curriculum-related metadata

Expand Down Expand Up @@ -74,6 +76,7 @@ mutable struct Curriculum
printstyled("WARNING: Curriculum was created, but is invalid due to requisite cycle(s):", color = :yellow)
println(String(take!(errors)))
end
# create_lo_graph!(this)
return this
end

Expand Down Expand Up @@ -177,6 +180,10 @@ function create_graph!(curriculum::Curriculum)
end
end

function create__lo_graph!(curriculum::Curriculum)
# This is the fucntion that needs to be created
end

# find requisite type from vertex ids in a curriculum graph
function requisite_type(curriculum::Curriculum, src_course_id::Int, dst_course_id::Int)
src = 0; dst = 0
Expand Down
2 changes: 1 addition & 1 deletion src/DataTypes/DegreePlan.jl
Expand Up @@ -60,7 +60,7 @@ julia> DegreePlan("Biology 4-year Degree Plan", curriculum, terms)
mutable struct DegreePlan
name::AbstractString # Name of the degree plan
curriculum::Curriculum # Curriculum the degree plan satisfies
additional_courses::Array{AbstractCourse} # Additional (non-required) courses added to the curriculum,
additional_courses::Array{AbstractCourse} # Additional (non-required) courses added to the degree plan,
# e.g., these may be preparatory courses
graph::SimpleDiGraph{Int} # Directed graph representation of pre-/co-requisite structure
# of the degre plan
Expand Down
5 changes: 2 additions & 3 deletions src/DataTypes/LearningOutcome.jl
Expand Up @@ -23,8 +23,7 @@ mutable struct LearningOutcome
description::AbstractString # A description of the learning outcome
hours::Int # number of class hours that should be devoted
# to the learning outcome
requisites::Dict{Int, Requisite} # List of requisites, in
#(requisite_learning_outcome, requisite_type) format
requisites::Dict{Int, Requisite} # List of requisites, in (requisite_learning_outcome, requisite_type) format
metrics::Dict{String, Any} # Learning outcome-related metrics
metadata::Dict{String, Any} # Learning outcome-related metadata

Expand Down Expand Up @@ -57,4 +56,4 @@ function add_lo_requisite!(requisite_lo::Array{LearningOutcome}, lo::LearningOut
for i = 1:length(requisite_lo)
lo.requisites[requisite_lo[i].id] = requisite_type[i]
end
end
end
2 changes: 1 addition & 1 deletion src/Simulation/Report.jl
Expand Up @@ -64,7 +64,7 @@ function simulation_report(simulation, duration, course_passrate, max_credits, r
println("\n\n-------- Course Pass Rates by Term --------")

frame = pass_table(simulation, duration)
show(frame, summary=false, allrows=true, allcols=true, splitcols=true, eltypes=false)
show(frame, summary=false, allrows=true, allcols=true, splitcols=false, eltypes=false)
end

# Return the real passrate of courses in the simulation as a DataFrame
Expand Down
4 changes: 4 additions & 0 deletions test/DataTypes.jl
Expand Up @@ -65,6 +65,10 @@ add_lo_requisite!([lo2, lo3], lo4, [pre, co])
@test length(lo3.requisites) == 0
@test length(lo4.requisites) == 2

# test the uderlying learning outcome graph
#@test nv(curric.graph) == 8
#@test ne(curric.graph) == 5

mapped_ids = CurricularAnalytics.map_vertex_ids(curric)
@test requisite_type(curric,mapped_ids[A.id],mapped_ids[C.id]) == pre
@test requisite_type(curric,mapped_ids[D.id],mapped_ids[C.id]) == co
Expand Down
3 changes: 3 additions & 0 deletions test/test_degree_plan.jl
Expand Up @@ -13,6 +13,9 @@ reqs = Array{AbstractCourse,1}();
push!(reqs, A,B,D);
add_requisite!(reqs,C,[pre,pre,co]);

# add some learning outcomes for each of the courses
# Yiming add code here

curric = Curriculum("Underwater Basket Weaving", [A,B,C,D,E,F,G,H], institution="ACME State University", CIP="445786");

terms = Array{Term}(undef, 4);
Expand Down

0 comments on commit 30d73e6

Please sign in to comment.