-
-
Save kevintab95/3b2375f71f04476b507b22e7ad8d123f to your computer and use it in GitHub Desktop.
Sequence diagrams for Topic, Story, Subtopic, and Practice Session pages
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
participant acl_decorators | |
participant story_fetchers | |
participant topic_fetchers | |
participant topic_services | |
participant user_services | |
participant story_viewer | |
participant summary_services | |
participant exp_fetchers | |
participant rights_manager | |
participant stats_services | |
Note left of acl_decorators: Receives GET request | |
acl_decorators->story_fetchers: get_story_by_url_fragment() | |
Note over story_fetchers: Get Story by url_fragment from\nmemorystore if key exists\nelse get from datastore | |
story_fetchers-->acl_decorators:Story model | |
acl_decorators->user_services:UserActionsInfo.init() | |
Note over user_services:Does a get_multi call to fetch UserSettingsModel\nand get user settings and initializes UserActionsInfo | |
user_services-->acl_decorators:UserActionsInfo objects | |
acl_decorators->topic_fetchers:get_topic_by_id() | |
Note over topic_fetchers: Get Topic by id from\nmemorystore if key exists\nelse get from datastore | |
topic_fetchers-->acl_decorators:Topic model | |
Note over acl_decorators: Get classroom_url_fragment for the\ntopic id by iterating over the list of\n topic ids in the classroom config\nproperty | |
acl_decorators->topic_services:get_topic_rights() | |
Note over topic_services:Does get call to fetch TopicRightsModel | |
topic_services-->acl_decorators:TopicRights model | |
Note left of acl_decorators: GET StoryPage | |
acl_decorators->story_viewer: StoryPage.get() | |
Note over story_viewer: Returns story-viewer-page.mainpage.html | |
Note left of acl_decorators: GET StoryPageData | |
acl_decorators->story_viewer: StoryPageDataHandler.get() | |
story_viewer->story_fetchers:get_story_by_id() | |
Note over story_fetchers: Get Story by id from\nmemorystore if key exists\nelse get from datastore | |
story_fetchers-->story_viewer:Story model | |
story_viewer->topic_fetchers:get_topic_by_id() | |
Note over topic_fetchers: Get Topic by id from\nmemorystore if key exists\nelse get from datastore | |
topic_fetchers-->story_viewer:Topic model | |
Note left of story_viewer: LOOP BEGIN:\nIterate over Story nodes in each Story | |
story_viewer->story_fetchers:get_completed_nodes_in_story() | |
Note over story_fetchers: Get StoryProgressModel | |
story_fetchers-->story_viewer:List of completed Story Nodes | |
Note left of story_viewer: LOOP END | |
Note over story_viewer: Iterates over ordered_node_dicts\nto populate 'completed'\nnode property | |
Note over story_viewer: Iterates over ordered_node_dicts\nto populate exp_ids list | |
story_viewer->summary_services:get_displayable_exp_summary_dicts_matching_ids() | |
summary_services->exp_fetchers:get_exploration_summaries_matching_ids() | |
Note over exp_fetchers:Does ExpSummaryModel.get_multi() | |
exp_fetchers-->summary_services:exploration_summaries | |
summary_services->rights_manager:get_multiple_exploration_rights_by_ids() | |
Note over rights_manager:Does ExplorationRightsModel.get_multi() | |
rights_manager-->summary_services:exploration_rights_objects | |
summary_services->stats_services:get_exploration_stats_multi() | |
Note over stats_services: Does ExplorationStatsModel.get_multi_stats_models() | |
stats_services-->summary_services:exp_stats_list | |
Note over summary_services: Iterates over exp_stats_list\nto populate view_counts | |
Note over summary_services: Iterates over exploration_summaries\nto populate displayable_exp_summaries | |
summary_services-->story_viewer:displayable_exp_summaries | |
Note over story_viewer: Iterates over ordered_node_dicts\nto populate 'exp_summary_dict'\nnode property | |
Note over story_viewer:Renders JSON | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
participant acl_decorators | |
participant topic_fetchers | |
participant topic_services | |
participant user_services | |
participant subtopic_viewer | |
participant subtopic_page_services | |
Note left of acl_decorators: Receives GET request | |
acl_decorators->topic_fetchers: get_topic_by_url_fragment() | |
Note over topic_fetchers: Get Topic from the memorystore if key exists\nelse get from datastore | |
topic_fetchers-->acl_decorators:Topic model | |
acl_decorators->topic_services:get_topic_rights() | |
Note over topic_services:Does get call to fetch TopicRightsModel | |
topic_services-->acl_decorators:TopicRights model | |
acl_decorators->user_services:UserActionsInfo.init() | |
Note over user_services:Does a get_multi call to fetch UserSettingsModel\nand get user settings and initializes UserActionsInfo | |
user_services-->acl_decorators:UserActionsInfo objects | |
Note over acl_decorators:Iterates over subtopics to\nfind matching url_fragment | |
Note over acl_decorators: Get classroom_url_fragment for the\ntopic id by iterating over the list of\n topic ids in the classroom config\nproperty | |
acl_decorators->subtopic_page_services:get_subtopic_page_by_id() | |
Note over subtopic_page_services:Does get call to fetch SubtopicPageModel | |
subtopic_page_services-->acl_decorators:subtopic_page | |
Note left of acl_decorators: GET Page | |
acl_decorators->subtopic_viewer: SubtopicViewerPage.get() | |
Note over subtopic_viewer: Returns subtopic-viewer-page.mainpage.html | |
Note left of acl_decorators: GET Data | |
acl_decorators->subtopic_viewer: SubtopicPageDataHandler.get() | |
subtopic_viewer->topic_fetchers:get_topic_by_name() | |
Note over topic_fetchers: Get Topic by name from\nmemorystore if key exists\nelse get from datastore | |
topic_fetchers-->subtopic_viewer:Topic model | |
Note left of subtopic_viewer: LOOP BEGIN:\nIterate over subtopics | |
Note over subtopic_viewer:Iterate over subtopics to populate subtopic_title, next_subtopic_dict | |
Note left of subtopic_viewer: LOOP END | |
subtopic_viewer->subtopic_page_services:get_subtopic_page_contents_by_id() | |
Note over subtopic_page_services:Does get call to fetch SubtopicPageModel | |
subtopic_page_services-->subtopic_viewer:page_contents | |
Note over subtopic_viewer:Renders JSON | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd"><svg xmlns="http://www.w3.org/2000/svg" width="3020" height="2655" xmlns:xlink="http://www.w3.org/1999/xlink"><source><![CDATA[participant acl_decorators | |
participant topic_fetchers | |
participant topic_services | |
participant user_services | |
participant topic_viewer | |
participant story_fetchers | |
participant skill_services | |
participant skill_fetchers | |
participant practice_sessions | |
Note left of acl_decorators: Receives GET request | |
acl_decorators->topic_fetchers: get_topic_by_url_fragment() | |
Note over topic_fetchers: Get Topic by url_fragment from\nmemorystore if key exists\nelse get from datastore | |
topic_fetchers-->acl_decorators:Topic model | |
Note over acl_decorators: Get classroom_url_fragment for the\ntopic id by iterating over the list of\n topic ids in the classroom config\nproperty | |
acl_decorators->topic_services:get_topic_rights() | |
Note over topic_services:Does get call to fetch TopicRightsModel | |
topic_services-->acl_decorators:TopicRights model | |
acl_decorators->user_services:UserActionsInfo.init() | |
Note over user_services:Does a get_multi call to fetch UserSettingsModel\nand get user settings and initializes UserActionsInfo | |
user_services-->acl_decorators:UserActionsInfo objects | |
Note left of acl_decorators: GET TopicViewerPage | |
acl_decorators->topic_viewer: TopicViewerPage.get() | |
Note over topic_viewer: Returns topic-viewer-page.mainpage.html | |
Note left of acl_decorators: GET TopicViewerPage Data | |
acl_decorators->topic_viewer: TopicPageDataHandler.get() | |
topic_viewer->topic_fetchers:get_topic_by_name() | |
Note over topic_fetchers: Get Topic by name from\nmemorystore if key exists\nelse get from datastore | |
topic_fetchers-->topic_viewer:Topic model | |
Note left of topic_viewer: LOOP BEGIN:\nIterate over Topic summary ids | |
topic_viewer->story_fetchers:get_story_summary_by_id() | |
story_fetchers-->topic_viewer:Story Summary model | |
Note left of topic_viewer: LOOP END | |
Note left of topic_viewer: LOOP BEGIN:\nIterate over Story nodes in each Story | |
topic_viewer->story_fetchers:get_completed_nodes_in_story() | |
Note over story_fetchers: Get StoryProgressModel | |
story_fetchers-->topic_viewer:List of completed Story Nodes | |
Note left of topic_viewer: LOOP END | |
topic_viewer->skill_services:get_descriptions_of_skills() | |
Note over skill_services:SkillSummaryModel.get_multi() and iterates\nover result to populate skill_id_to_description_dict,\ndeleted_skill_ids | |
skill_services-->topic_viewer:skill_id_to_description_dict, deleted_skill_ids | |
topic_viewer->skill_services:get_multi_user_skill_mastery() | |
Note over skill_services:UserSkillMasteryModel.get_multi() and\npopulates degrees_of_mastery dict | |
skill_services-->topic_viewer:degrees_of_mastery dict | |
Note over topic_viewer:Renders JSON | |
Note left of acl_decorators: GET PracticeSessionsPage | |
acl_decorators->practice_sessions: PracticeSessionsPage.get() | |
Note over practice_sessions: Returns practice-session-page.mainpage.html | |
Note left of acl_decorators: GET PracticeSessionsPage Data | |
acl_decorators->practice_sessions: PracticeSessionsPageDataHandler.get() | |
practice_sessions->topic_fetchers:get_topic_by_name() | |
Note over topic_fetchers: Get Topic by name from\nmemorystore if key exists\nelse get from datastore | |
topic_fetchers-->practice_sessions:Topic model | |
Note over practice_sessions: Iterates over subtopics to populate selected_skill_ids | |
practice_sessions->skill_fetchers:get_multi_skills() | |
Note over skill_fetchers: Does SkillModel.get_multi() and\niterates over results to check\nif skill models exist | |
skill_fetchers-->practice_sessions:skills | |
Note over practice_sessions: Iterates over skills to populate\nskill_ids_to_descriptions_map | |
Note over practice_sessions:Renders JSON]]></source><desc></desc><defs><marker viewBox="0 0 5 5" markerWidth="5" markerHeight="5" orient="auto" refX="5" refY="2.5" id="markerArrowBlock"><path d="M 0 0 L 5 2.5 L 0 5 z"></path></marker><marker viewBox="0 0 9.6 16" markerWidth="4" markerHeight="16" orient="auto" refX="9.6" refY="8" id="markerArrowOpen"><path d="M 9.6,8 1.92,16 0,13.7 5.76,8 0,2.286 1.92,0 9.6,8 z"></path></marker></defs><g class="title"></g><g class="actor"><rect x="251.9296875" y="20" width="154.859375" height="39.21875" stroke="#000000" fill="#ffffff" style="stroke-width: 2;"></rect><text x="261.9296875" y="45.203125" style="font-size: 16px; font-family: "Andale Mono", monospace;"><tspan x="261.9296875">acl_decorators</tspan></text></g><g class="actor"><rect x="251.9296875" y="2596.421875" width="154.859375" height="39.21875" stroke="#000000" fill="#ffffff" style="stroke-width: 2;"></rect><text x="261.9296875" y="2621.625" style="font-size: 16px; font-family: "Andale Mono", monospace;"><tspan x="261.9296875">acl_decorators</tspan></text></g><line x1="329.359375" x2="329.359375" y1="59.21875" y2="2596.421875" stroke="#000000" fill="none" style="stroke-width: 2;"></line><g class="actor"><rect x="532.0234375" y="20" width="154.859375" height="39.21875" stroke="#000000" fill="#ffffff" style="stroke-width: 2;"></rect><text x="542.0234375" y="45.203125" style="font-size: 16px; font-family: "Andale Mono", monospace;"><tspan x="542.0234375">topic_fetchers</tspan></text></g><g class="actor"><rect x="532.0234375" y="2596.421875" width="154.859375" height="39.21875" stroke="#000000" fill="#ffffff" style="stroke-width: 2;"></rect><text x="542.0234375" y="2621.625" style="font-size: 16px; font-family: "Andale Mono", monospace;"><tspan x="542.0234375">topic_fetchers</tspan></text></g><line x1="609.453125" x2="609.453125" y1="59.21875" y2="2596.421875" stroke="#000000" fill="none" style="stroke-width: 2;"></line><g class="actor"><rect x="734.8671875" y="20" width="154.859375" height="39.21875" stroke="#000000" fill="#ffffff" style="stroke-width: 2;"></rect><text x="744.8671875" y="45.203125" style="font-size: 16px; font-family: "Andale Mono", monospace;"><tspan x="744.8671875">topic_services</tspan></text></g><g class="actor"><rect x="734.8671875" y="2596.421875" width="154.859375" height="39.21875" stroke="#000000" fill="#ffffff" style="stroke-width: 2;"></rect><text x="744.8671875" y="2621.625" style="font-size: 16px; font-family: "Andale Mono", monospace;"><tspan x="744.8671875">topic_services</tspan></text></g><line x1="812.296875" x2="812.296875" y1="59.21875" y2="2596.421875" stroke="#000000" fill="none" style="stroke-width: 2;"></line><g class="actor"><rect x="1009.953125" y="20" width="145.234375" height="39.21875" stroke="#000000" fill="#ffffff" style="stroke-width: 2;"></rect><text x="1019.953125" y="45.203125" style="font-size: 16px; font-family: "Andale Mono", monospace;"><tspan x="1019.953125">user_services</tspan></text></g><g class="actor"><rect x="1009.953125" y="2596.421875" width="145.234375" height="39.21875" stroke="#000000" fill="#ffffff" style="stroke-width: 2;"></rect><text x="1019.953125" y="2621.625" style="font-size: 16px; font-family: "Andale Mono", monospace;"><tspan x="1019.953125">user_services</tspan></text></g><line x1="1082.5703125" x2="1082.5703125" y1="59.21875" y2="2596.421875" stroke="#000000" fill="none" style="stroke-width: 2;"></line><g class="actor"><rect x="1431.2109375" y="20" width="136.375" height="39.21875" stroke="#000000" fill="#ffffff" style="stroke-width: 2;"></rect><text x="1441.2109375" y="45.203125" style="font-size: 16px; font-family: "Andale Mono", monospace;"><tspan x="1441.2109375">topic_viewer</tspan></text></g><g class="actor"><rect x="1431.2109375" y="2596.421875" width="136.375" height="39.21875" stroke="#000000" fill="#ffffff" style="stroke-width: 2;"></rect><text x="1441.2109375" y="2621.625" style="font-size: 16px; font-family: "Andale Mono", monospace;"><tspan x="1441.2109375">topic_viewer</tspan></text></g><line x1="1499.3984375" x2="1499.3984375" y1="59.21875" y2="2596.421875" stroke="#000000" fill="none" style="stroke-width: 2;"></line><g class="actor"><rect x="1730.953125" y="20" width="154.859375" height="39.21875" stroke="#000000" fill="#ffffff" style="stroke-width: 2;"></rect><text x="1740.953125" y="45.203125" style="font-size: 16px; font-family: "Andale Mono", monospace;"><tspan x="1740.953125">story_fetchers</tspan></text></g><g class="actor"><rect x="1730.953125" y="2596.421875" width="154.859375" height="39.21875" stroke="#000000" fill="#ffffff" style="stroke-width: 2;"></rect><text x="1740.953125" y="2621.625" style="font-size: 16px; font-family: "Andale Mono", monospace;"><tspan x="1740.953125">story_fetchers</tspan></text></g><line x1="1808.3828125" x2="1808.3828125" y1="59.21875" y2="2596.421875" stroke="#000000" fill="none" style="stroke-width: 2;"></line><g class="actor"><rect x="2001.2265625" y="20" width="154.859375" height="39.21875" stroke="#000000" fill="#ffffff" style="stroke-width: 2;"></rect><text x="2011.2265625" y="45.203125" style="font-size: 16px; font-family: "Andale Mono", monospace;"><tspan x="2011.2265625">skill_services</tspan></text></g><g class="actor"><rect x="2001.2265625" y="2596.421875" width="154.859375" height="39.21875" stroke="#000000" fill="#ffffff" style="stroke-width: 2;"></rect><text x="2011.2265625" y="2621.625" style="font-size: 16px; font-family: "Andale Mono", monospace;"><tspan x="2011.2265625">skill_services</tspan></text></g><line x1="2078.65625" x2="2078.65625" y1="59.21875" y2="2596.421875" stroke="#000000" fill="none" style="stroke-width: 2;"></line><g class="actor"><rect x="2271.5" y="20" width="154.859375" height="39.21875" stroke="#000000" fill="#ffffff" style="stroke-width: 2;"></rect><text x="2281.5" y="45.203125" style="font-size: 16px; font-family: "Andale Mono", monospace;"><tspan x="2281.5">skill_fetchers</tspan></text></g><g class="actor"><rect x="2271.5" y="2596.421875" width="154.859375" height="39.21875" stroke="#000000" fill="#ffffff" style="stroke-width: 2;"></rect><text x="2281.5" y="2621.625" style="font-size: 16px; font-family: "Andale Mono", monospace;"><tspan x="2281.5">skill_fetchers</tspan></text></g><line x1="2348.9296875" x2="2348.9296875" y1="59.21875" y2="2596.421875" stroke="#000000" fill="none" style="stroke-width: 2;"></line><g class="actor"><rect x="2532.1328125" y="20" width="183.765625" height="39.21875" stroke="#000000" fill="#ffffff" style="stroke-width: 2;"></rect><text x="2542.1328125" y="45.203125" style="font-size: 16px; font-family: "Andale Mono", monospace;"><tspan x="2542.1328125">practice_sessions</tspan></text></g><g class="actor"><rect x="2532.1328125" y="2596.421875" width="183.765625" height="39.21875" stroke="#000000" fill="#ffffff" style="stroke-width: 2;"></rect><text x="2542.1328125" y="2621.625" style="font-size: 16px; font-family: "Andale Mono", monospace;"><tspan x="2542.1328125">practice_sessions</tspan></text></g><line x1="2624.015625" x2="2624.015625" y1="59.21875" y2="2596.421875" stroke="#000000" fill="none" style="stroke-width: 2;"></line><g class="note"><rect x="106.703125" y="79.21875" width="202.65625" height="29.21875" stroke="#000000" fill="#ffffff" style="stroke-width: 2;"></rect><text x="111.703125" y="99.421875" style="font-size: 16px; font-family: "Andale Mono", monospace;"><tspan x="111.703125">Receives GET request</tspan></text></g><g class="signal"><text x="339.359375" y="139.03125" style="font-size: 16px; font-family: "Andale Mono", monospace;"><tspan x="339.359375">get_topic_by_url_fragment()</tspan></text><line x1="329.359375" x2="609.453125" y1="147.65625" y2="147.65625" stroke="#000000" fill="none" style="stroke-width: 2; marker-end: url("#markerArrowBlock");"></line></g><g class="note"><rect x="459.5703125" y="167.65625" width="299.765625" height="67.609375" stroke="#000000" fill="#ffffff" style="stroke-width: 2;"></rect><text x="464.5703125" y="187.859375" style="font-size: 16px; font-family: "Andale Mono", monospace;"><tspan x="464.5703125">Get Topic by url_fragment from</tspan><tspan dy="1.2em" x="464.5703125">memorystore if key exists</tspan><tspan dy="1.2em" x="464.5703125">else get from datastore</tspan></text></g><g class="signal"><text x="416.828125" y="265.859375" style="font-size: 16px; font-family: "Andale Mono", monospace;"><tspan x="416.015625">Topic model</tspan></text><line x1="609.453125" x2="329.359375" y1="274.484375" y2="274.484375" stroke="#000000" fill="none" style="stroke-width: 2; stroke-dasharray: 6, 2; marker-end: url("#markerArrowBlock");"></line></g><g class="note"><rect x="141.3359375" y="294.484375" width="376.046875" height="86.8125" stroke="#000000" fill="#ffffff" style="stroke-width: 2;"></rect><text x="146.3359375" y="314.6875" style="font-size: 16px; font-family: "Andale Mono", monospace;"><tspan x="146.3359375">Get classroom_url_fragment for the</tspan><tspan dy="1.2em" x="146.3359375">topic id by iterating over the list of</tspan><tspan dy="1.2em" x="146.3359375">topic ids in the classroom config</tspan><tspan dy="1.2em" x="146.3359375">property</tspan></text></g><g class="signal"><text x="484.1328125" y="411.890625" style="font-size: 16px; font-family: "Andale Mono", monospace;"><tspan x="484.1328125">get_topic_rights()</tspan></text><line x1="329.359375" x2="812.296875" y1="420.515625" y2="420.515625" stroke="#000000" fill="none" style="stroke-width: 2; marker-end: url("#markerArrowBlock");"></line></g><g class="note"><rect x="619.453125" y="440.515625" width="385.6875" height="29.21875" stroke="#000000" fill="#ffffff" style="stroke-width: 2;"></rect><text x="624.453125" y="460.71875" style="font-size: 16px; font-family: "Andale Mono", monospace;"><tspan x="624.453125">Does get call to fetch TopicRightsModel</tspan></text></g><g class="signal"><text x="489.3515625" y="500.328125" style="font-size: 16px; font-family: "Andale Mono", monospace;"><tspan x="488.5390625">TopicRights model</tspan></text><line x1="812.296875" x2="329.359375" y1="508.953125" y2="508.953125" stroke="#000000" fill="none" style="stroke-width: 2; stroke-dasharray: 6, 2; marker-end: url("#markerArrowBlock");"></line></g><g class="signal"><text x="600.00390625" y="539.546875" style="font-size: 16px; font-family: "Andale Mono", monospace;"><tspan x="600.00390625">UserActionsInfo.init()</tspan></text><line x1="329.359375" x2="1082.5703125" y1="548.171875" y2="548.171875" stroke="#000000" fill="none" style="stroke-width: 2; marker-end: url("#markerArrowBlock");"></line></g><g class="note"><rect x="822.296875" y="568.171875" width="520.546875" height="48.40625" stroke="#000000" fill="#ffffff" style="stroke-width: 2;"></rect><text x="827.296875" y="588.375" style="font-size: 16px; font-family: "Andale Mono", monospace;"><tspan x="827.296875">Does a get_multi call to fetch UserSettingsModel</tspan><tspan dy="1.2em" x="827.296875">and get user settings and initializes UserActionsInfo</tspan></text></g><g class="signal"><text x="595.18359375" y="647.171875" style="font-size: 16px; font-family: "Andale Mono", monospace;"><tspan x="595.18359375">UserActionsInfo objects</tspan></text><line x1="1082.5703125" x2="329.359375" y1="655.796875" y2="655.796875" stroke="#000000" fill="none" style="stroke-width: 2; stroke-dasharray: 6, 2; marker-end: url("#markerArrowBlock");"></line></g><g class="note"><rect x="116.328125" y="675.796875" width="193.03125" height="29.21875" stroke="#000000" fill="#ffffff" style="stroke-width: 2;"></rect><text x="121.328125" y="696" style="font-size: 16px; font-family: "Andale Mono", monospace;"><tspan x="121.328125">GET TopicViewerPage</tspan></text></g><g class="signal"><text x="813.63671875" y="735.609375" style="font-size: 16px; font-family: "Andale Mono", monospace;"><tspan x="812.82421875">TopicViewerPage.get()</tspan></text><line x1="329.359375" x2="1499.3984375" y1="744.234375" y2="744.234375" stroke="#000000" fill="none" style="stroke-width: 2; marker-end: url("#markerArrowBlock");"></line></g><g class="note"><rect x="1306.5546875" y="764.234375" width="385.6875" height="29.21875" stroke="#000000" fill="#ffffff" style="stroke-width: 2;"></rect><text x="1311.5546875" y="784.4375" style="font-size: 16px; font-family: "Andale Mono", monospace;"><tspan x="1311.5546875">Returns topic-viewer-page.mainpage.html</tspan></text></g><g class="note"><rect x="68.171875" y="813.453125" width="241.1875" height="29.21875" stroke="#000000" fill="#ffffff" style="stroke-width: 2;"></rect><text x="73.171875" y="833.65625" style="font-size: 16px; font-family: "Andale Mono", monospace;"><tspan x="73.171875">GET TopicViewerPage Data</tspan></text></g><g class="signal"><text x="789.55859375" y="873.265625" style="font-size: 16px; font-family: "Andale Mono", monospace;"><tspan x="788.74609375">TopicPageDataHandler.get()</tspan></text><line x1="329.359375" x2="1499.3984375" y1="881.890625" y2="881.890625" stroke="#000000" fill="none" style="stroke-width: 2; marker-end: url("#markerArrowBlock");"></line></g><g class="signal"><text x="962.91015625" y="912.484375" style="font-size: 16px; font-family: "Andale Mono", monospace;"><tspan x="962.91015625">get_topic_by_name()</tspan></text><line x1="1499.3984375" x2="609.453125" y1="921.109375" y2="921.109375" stroke="#000000" fill="none" style="stroke-width: 2; marker-end: url("#markerArrowBlock");"></line></g><g class="note"><rect x="484.0390625" y="941.109375" width="250.828125" height="67.609375" stroke="#000000" fill="#ffffff" style="stroke-width: 2;"></rect><text x="489.0390625" y="961.3125" style="font-size: 16px; font-family: "Andale Mono", monospace;"><tspan x="489.0390625">Get Topic by name from</tspan><tspan dy="1.2em" x="489.0390625">memorystore if key exists</tspan><tspan dy="1.2em" x="489.0390625">else get from datastore</tspan></text></g><g class="signal"><text x="1001.84765625" y="1039.3125" style="font-size: 16px; font-family: "Andale Mono", monospace;"><tspan x="1001.03515625">Topic model</tspan></text><line x1="609.453125" x2="1499.3984375" y1="1047.9375" y2="1047.9375" stroke="#000000" fill="none" style="stroke-width: 2; stroke-dasharray: 6, 2; marker-end: url("#markerArrowBlock");"></line></g><g class="note"><rect x="1180.4140625" y="1067.9375" width="298.984375" height="48.40625" stroke="#000000" fill="#ffffff" style="stroke-width: 2;"></rect><text x="1185.4140625" y="1088.140625" style="font-size: 16px; font-family: "Andale Mono", monospace;"><tspan x="1185.4140625">LOOP BEGIN:</tspan><tspan dy="1.2em" x="1185.4140625">Iterate over Topic summary ids</tspan></text></g><g class="signal"><text x="1533.4765625" y="1146.9375" style="font-size: 16px; font-family: "Andale Mono", monospace;"><tspan x="1533.4765625">get_story_summary_by_id()</tspan></text><line x1="1499.3984375" x2="1808.3828125" y1="1155.5625" y2="1155.5625" stroke="#000000" fill="none" style="stroke-width: 2; marker-end: url("#markerArrowBlock");"></line></g><g class="signal"><text x="1562.375" y="1186.15625" style="font-size: 16px; font-family: "Andale Mono", monospace;"><tspan x="1562.375">Story Summary model</tspan></text><line x1="1808.3828125" x2="1499.3984375" y1="1194.78125" y2="1194.78125" stroke="#000000" fill="none" style="stroke-width: 2; stroke-dasharray: 6, 2; marker-end: url("#markerArrowBlock");"></line></g><g class="note"><rect x="1392.3359375" y="1214.78125" width="87.0625" height="29.21875" stroke="#000000" fill="#ffffff" style="stroke-width: 2;"></rect><text x="1397.3359375" y="1234.984375" style="font-size: 16px; font-family: "Andale Mono", monospace;"><tspan x="1397.3359375">LOOP END</tspan></text></g><g class="note"><rect x="1102.5703125" y="1264" width="376.828125" height="48.40625" stroke="#000000" fill="#ffffff" style="stroke-width: 2;"></rect><text x="1107.5703125" y="1284.203125" style="font-size: 16px; font-family: "Andale Mono", monospace;"><tspan x="1107.5703125">LOOP BEGIN:</tspan><tspan dy="1.2em" x="1107.5703125">Iterate over Story nodes in each Story</tspan></text></g><g class="signal"><text x="1509.3984375" y="1343" style="font-size: 16px; font-family: "Andale Mono", monospace;"><tspan x="1509.3984375">get_completed_nodes_in_story()</tspan></text><line x1="1499.3984375" x2="1808.3828125" y1="1351.625" y2="1351.625" stroke="#000000" fill="none" style="stroke-width: 2; marker-end: url("#markerArrowBlock");"></line></g><g class="note"><rect x="1697.421875" y="1371.625" width="221.921875" height="29.21875" stroke="#000000" fill="#ffffff" style="stroke-width: 2;"></rect><text x="1702.421875" y="1391.828125" style="font-size: 16px; font-family: "Andale Mono", monospace;"><tspan x="1702.421875">Get StoryProgressModel</tspan></text></g><g class="signal"><text x="1514.2109375" y="1431.4375" style="font-size: 16px; font-family: "Andale Mono", monospace;"><tspan x="1514.2109375">List of completed Story Nodes</tspan></text><line x1="1808.3828125" x2="1499.3984375" y1="1440.0625" y2="1440.0625" stroke="#000000" fill="none" style="stroke-width: 2; stroke-dasharray: 6, 2; marker-end: url("#markerArrowBlock");"></line></g><g class="note"><rect x="1392.3359375" y="1460.0625" width="87.0625" height="29.21875" stroke="#000000" fill="#ffffff" style="stroke-width: 2;"></rect><text x="1397.3359375" y="1480.265625" style="font-size: 16px; font-family: "Andale Mono", monospace;"><tspan x="1397.3359375">LOOP END</tspan></text></g><g class="signal"><text x="1654.16796875" y="1519.875" style="font-size: 16px; font-family: "Andale Mono", monospace;"><tspan x="1654.16796875">get_descriptions_of_skills()</tspan></text><line x1="1499.3984375" x2="2078.65625" y1="1528.5" y2="1528.5" stroke="#000000" fill="none" style="stroke-width: 2; marker-end: url("#markerArrowBlock");"></line></g><g class="note"><rect x="1818.3828125" y="1548.5" width="520.546875" height="67.609375" stroke="#000000" fill="#ffffff" style="stroke-width: 2;"></rect><text x="1823.3828125" y="1568.703125" style="font-size: 16px; font-family: "Andale Mono", monospace;"><tspan x="1823.3828125">SkillSummaryModel.get_multi() and iterates</tspan><tspan dy="1.2em" x="1823.3828125">over result to populate skill_id_to_description_dict,</tspan><tspan dy="1.2em" x="1823.3828125">deleted_skill_ids</tspan></text></g><g class="signal"><text x="1562.65234375" y="1646.703125" style="font-size: 16px; font-family: "Andale Mono", monospace;"><tspan x="1562.65234375">skill_id_to_description_dict, deleted_skill_ids</tspan></text><line x1="2078.65625" x2="1499.3984375" y1="1655.328125" y2="1655.328125" stroke="#000000" fill="none" style="stroke-width: 2; stroke-dasharray: 6, 2; marker-end: url("#markerArrowBlock");"></line></g><g class="signal"><text x="1644.53515625" y="1685.921875" style="font-size: 16px; font-family: "Andale Mono", monospace;"><tspan x="1644.53515625">get_multi_user_skill_mastery()</tspan></text><line x1="1499.3984375" x2="2078.65625" y1="1694.546875" y2="1694.546875" stroke="#000000" fill="none" style="stroke-width: 2; marker-end: url("#markerArrowBlock");"></line></g><g class="note"><rect x="1895.4453125" y="1714.546875" width="366.421875" height="48.40625" stroke="#000000" fill="#ffffff" style="stroke-width: 2;"></rect><text x="1900.4453125" y="1734.75" style="font-size: 16px; font-family: "Andale Mono", monospace;"><tspan x="1900.4453125">UserSkillMasteryModel.get_multi() and</tspan><tspan dy="1.2em" x="1900.4453125">populates degrees_of_mastery dict</tspan></text></g><g class="signal"><text x="1678.24609375" y="1793.546875" style="font-size: 16px; font-family: "Andale Mono", monospace;"><tspan x="1678.24609375">degrees_of_mastery dict</tspan></text><line x1="2078.65625" x2="1499.3984375" y1="1802.171875" y2="1802.171875" stroke="#000000" fill="none" style="stroke-width: 2; stroke-dasharray: 6, 2; marker-end: url("#markerArrowBlock");"></line></g><g class="note"><rect x="1436.6015625" y="1822.171875" width="125.59375" height="29.21875" stroke="#000000" fill="#ffffff" style="stroke-width: 2;"></rect><text x="1441.6015625" y="1842.375" style="font-size: 16px; font-family: "Andale Mono", monospace;"><tspan x="1441.6015625">Renders JSON</tspan></text></g><g class="note"><rect x="68.171875" y="1871.390625" width="241.1875" height="29.21875" stroke="#000000" fill="#ffffff" style="stroke-width: 2;"></rect><text x="73.171875" y="1891.59375" style="font-size: 16px; font-family: "Andale Mono", monospace;"><tspan x="73.171875">GET PracticeSessionsPage</tspan></text></g><g class="signal"><text x="1351.4609375" y="1931.203125" style="font-size: 16px; font-family: "Andale Mono", monospace;"><tspan x="1351.4609375">PracticeSessionsPage.get()</tspan></text><line x1="329.359375" x2="2624.015625" y1="1939.828125" y2="1939.828125" stroke="#000000" fill="none" style="stroke-width: 2; marker-end: url("#markerArrowBlock");"></line></g><g class="note"><rect x="2411.90625" y="1959.828125" width="424.21875" height="29.21875" stroke="#000000" fill="#ffffff" style="stroke-width: 2;"></rect><text x="2416.90625" y="1980.03125" style="font-size: 16px; font-family: "Andale Mono", monospace;"><tspan x="2416.90625">Returns practice-session-page.mainpage.html</tspan></text></g><g class="note"><rect x="20" y="2009.046875" width="289.359375" height="29.21875" stroke="#000000" fill="#ffffff" style="stroke-width: 2;"></rect><text x="25" y="2029.25" style="font-size: 16px; font-family: "Andale Mono", monospace;"><tspan x="25">GET PracticeSessionsPage Data</tspan></text></g><g class="signal"><text x="1298.4765625" y="2068.859375" style="font-size: 16px; font-family: "Andale Mono", monospace;"><tspan x="1298.4765625">PracticeSessionsPageDataHandler.get()</tspan></text><line x1="329.359375" x2="2624.015625" y1="2077.484375" y2="2077.484375" stroke="#000000" fill="none" style="stroke-width: 2; marker-end: url("#markerArrowBlock");"></line></g><g class="signal"><text x="1525.21875" y="2108.078125" style="font-size: 16px; font-family: "Andale Mono", monospace;"><tspan x="1525.21875">get_topic_by_name()</tspan></text><line x1="2624.015625" x2="609.453125" y1="2116.703125" y2="2116.703125" stroke="#000000" fill="none" style="stroke-width: 2; marker-end: url("#markerArrowBlock");"></line></g><g class="note"><rect x="484.0390625" y="2136.703125" width="250.828125" height="67.609375" stroke="#000000" fill="#ffffff" style="stroke-width: 2;"></rect><text x="489.0390625" y="2156.90625" style="font-size: 16px; font-family: "Andale Mono", monospace;"><tspan x="489.0390625">Get Topic by name from</tspan><tspan dy="1.2em" x="489.0390625">memorystore if key exists</tspan><tspan dy="1.2em" x="489.0390625">else get from datastore</tspan></text></g><g class="signal"><text x="1564.15625" y="2234.90625" style="font-size: 16px; font-family: "Andale Mono", monospace;"><tspan x="1563.34375">Topic model</tspan></text><line x1="609.453125" x2="2624.015625" y1="2243.53125" y2="2243.53125" stroke="#000000" fill="none" style="stroke-width: 2; stroke-dasharray: 6, 2; marker-end: url("#markerArrowBlock");"></line></g><g class="note"><rect x="2358.9296875" y="2263.53125" width="530.171875" height="29.21875" stroke="#000000" fill="#ffffff" style="stroke-width: 2;"></rect><text x="2363.9296875" y="2283.734375" style="font-size: 16px; font-family: "Andale Mono", monospace;"><tspan x="2363.9296875">Iterates over subtopics to populate selected_skill_ids</tspan></text></g><g class="signal"><text x="2399.77734375" y="2323.34375" style="font-size: 16px; font-family: "Andale Mono", monospace;"><tspan x="2399.77734375">get_multi_skills()</tspan></text><line x1="2624.015625" x2="2348.9296875" y1="2331.96875" y2="2331.96875" stroke="#000000" fill="none" style="stroke-width: 2; marker-end: url("#markerArrowBlock");"></line></g><g class="note"><rect x="2194.6171875" y="2351.96875" width="308.625" height="67.609375" stroke="#000000" fill="#ffffff" style="stroke-width: 2;"></rect><text x="2199.6171875" y="2372.171875" style="font-size: 16px; font-family: "Andale Mono", monospace;"><tspan x="2199.6171875">Does SkillModel.get_multi() and</tspan><tspan dy="1.2em" x="2199.6171875">iterates over results to check</tspan><tspan dy="1.2em" x="2199.6171875">if skill models exist</tspan></text></g><g class="signal"><text x="2457.57421875" y="2450.171875" style="font-size: 16px; font-family: "Andale Mono", monospace;"><tspan x="2457.57421875">skills</tspan></text><line x1="2348.9296875" x2="2624.015625" y1="2458.796875" y2="2458.796875" stroke="#000000" fill="none" style="stroke-width: 2; stroke-dasharray: 6, 2; marker-end: url("#markerArrowBlock");"></line></g><g class="note"><rect x="2464.890625" y="2478.796875" width="318.25" height="48.40625" stroke="#000000" fill="#ffffff" style="stroke-width: 2;"></rect><text x="2469.890625" y="2499" style="font-size: 16px; font-family: "Andale Mono", monospace;"><tspan x="2469.890625">Iterates over skills to populate</tspan><tspan dy="1.2em" x="2469.890625">skill_ids_to_descriptions_map</tspan></text></g><g class="note"><rect x="2561.21875" y="2547.203125" width="125.59375" height="29.21875" stroke="#000000" fill="#ffffff" style="stroke-width: 2;"></rect><text x="2566.21875" y="2567.40625" style="font-size: 16px; font-family: "Andale Mono", monospace;"><tspan x="2566.21875">Renders JSON</tspan></text></g></svg> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
participant acl_decorators | |
participant topic_fetchers | |
participant topic_services | |
participant user_services | |
participant topic_viewer | |
participant story_fetchers | |
participant skill_services | |
participant skill_fetchers | |
participant practice_sessions | |
Note left of acl_decorators: Receives GET request | |
acl_decorators->topic_fetchers: get_topic_by_url_fragment() | |
Note over topic_fetchers: Get Topic by url_fragment from\nmemorystore if key exists\nelse get from datastore | |
topic_fetchers-->acl_decorators:Topic model | |
Note over acl_decorators: Get classroom_url_fragment for the\ntopic id by iterating over the list of\n topic ids in the classroom config\nproperty | |
acl_decorators->topic_services:get_topic_rights() | |
Note over topic_services:Does get call to fetch TopicRightsModel | |
topic_services-->acl_decorators:TopicRights model | |
acl_decorators->user_services:UserActionsInfo.init() | |
Note over user_services:Does a get_multi call to fetch UserSettingsModel\nand get user settings and initializes UserActionsInfo | |
user_services-->acl_decorators:UserActionsInfo objects | |
Note left of acl_decorators: GET TopicViewerPage | |
acl_decorators->topic_viewer: TopicViewerPage.get() | |
Note over topic_viewer: Returns topic-viewer-page.mainpage.html | |
Note left of acl_decorators: GET TopicViewerPage Data | |
acl_decorators->topic_viewer: TopicPageDataHandler.get() | |
topic_viewer->topic_fetchers:get_topic_by_name() | |
Note over topic_fetchers: Get Topic by name from\nmemorystore if key exists\nelse get from datastore | |
topic_fetchers-->topic_viewer:Topic model | |
Note left of topic_viewer: LOOP BEGIN:\nIterate over Topic summary ids | |
topic_viewer->story_fetchers:get_story_summary_by_id() | |
story_fetchers-->topic_viewer:Story Summary model | |
Note left of topic_viewer: LOOP END | |
Note left of topic_viewer: LOOP BEGIN:\nIterate over Story nodes in each Story | |
topic_viewer->story_fetchers:get_completed_nodes_in_story() | |
Note over story_fetchers: Get StoryProgressModel | |
story_fetchers-->topic_viewer:List of completed Story Nodes | |
Note left of topic_viewer: LOOP END | |
topic_viewer->skill_services:get_descriptions_of_skills() | |
Note over skill_services:SkillSummaryModel.get_multi() and iterates\nover result to populate skill_id_to_description_dict,\ndeleted_skill_ids | |
skill_services-->topic_viewer:skill_id_to_description_dict, deleted_skill_ids | |
topic_viewer->skill_services:get_multi_user_skill_mastery() | |
Note over skill_services:UserSkillMasteryModel.get_multi() and\npopulates degrees_of_mastery dict | |
skill_services-->topic_viewer:degrees_of_mastery dict | |
Note over topic_viewer:Renders JSON | |
Note left of acl_decorators: GET PracticeSessionsPage | |
acl_decorators->practice_sessions: PracticeSessionsPage.get() | |
Note over practice_sessions: Returns practice-session-page.mainpage.html | |
Note left of acl_decorators: GET PracticeSessionsPage Data | |
acl_decorators->practice_sessions: PracticeSessionsPageDataHandler.get() | |
practice_sessions->topic_fetchers:get_topic_by_name() | |
Note over topic_fetchers: Get Topic by name from\nmemorystore if key exists\nelse get from datastore | |
topic_fetchers-->practice_sessions:Topic model | |
Note over practice_sessions: Iterates over subtopics to populate selected_skill_ids | |
practice_sessions->skill_fetchers:get_multi_skills() | |
Note over skill_fetchers: Does SkillModel.get_multi() and\niterates over results to check\nif skill models exist | |
skill_fetchers-->practice_sessions:skills | |
Note over practice_sessions: Iterates over skills to populate\nskill_ids_to_descriptions_map | |
Note over practice_sessions:Renders JSON |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Generating Sequence Diagrams using Text:
Starting from the entry method, when a new file is referred to, add the file as a new 'participant'. E.g.
participant <new_file>
When a call is made to a method in a different file, use this syntax:
current_file->new_file: method_being_called()
Represent execution of a fetch call, using this syntax:
Note over current_file: Get XYZ from datastore
When the method execution is completed, use this syntax to show control returning to the calling method and the data returned:
current_file-->new_file:XYZ model
Represent loops using a note to the left of the calling method. E.g.
Note left of current_file: LOOP BEGIN:\nIterate over XYZ ids
current_file->new_file: method_being_called()
new_file-->current_file: XYZ model
Note left of current_file: LOOP END
Once the text file is ready, generate the sequence diagram SVG by going to this page:
https://bramp.github.io/js-sequence-diagrams/
Copy paste the text content into one of the 'Demo' boxes, select 'Simple' as the theme, and download the SVG file.
See examples:
https://gist.github.com/kevintab95/3b2375f71f04476b507b22e7ad8d123f
Reference for syntax:
https://bramp.github.io/js-sequence-diagrams/