diff --git a/TODO b/TODO index 119ba0b70b0677d6c8a9bfe683482f9d16d3c545..f3b514112e546bfb7ea6e883bb736d3d494b8cf5 100644 --- a/TODO +++ b/TODO @@ -16,8 +16,6 @@ - Custom matcher classes -- Create grading opportunity at first flow open - - Make is_graded_answer required Ideas diff --git a/course/flow.py b/course/flow.py index 51ed82edf3a7b42191159f214714e7351acc6513..d0dc369caf7216ca9dcbce1e7670649cd39e30aa 100644 --- a/course/flow.py +++ b/course/flow.py @@ -781,6 +781,14 @@ def start_flow(pctx, flow_identifier): session.save() + if session.for_credit: + # Create flow grading opportunity. This makes the flow + # show up in the grade book. + + from course.models import get_flow_grading_opportunity + get_flow_grading_opportunity( + pctx.course, flow_identifier, fctx.flow_desc) + get_flow_session_id_map(request)[flow_identifier] = session.id page_count = set_up_flow_session_page_data(fctx.repo, session,