The main reason to have an emergency action plan is to do as much as possible to keep your employees safe in case of disaster but a good plan can keep your business safe as well. Up to 40% of businesses affected by a natural or human-caused disaster never reopen. Having procedures in place to deal with disasters can help your business survive this difficult experience.
\\r\\n\\r\\nWhile many things will be different depending on the type of emergency you are preparing for—what you do during a tornado or earthquake will be much different than what you do during a fire or workplace violence incident, for example—some of the basic preparations will be similar for multiple problems. Always provide steps for getting people to safety, whether that means sheltering or evacuating them, and always have a clear and effective plan for communicating with everyone who could be affected.
\\r\\n\\r\\nBe sure to investigate not just what hazards you may face and how to stay safe during them, but also what effects they will have afterward. This should reveal such considerations as what lost income and increased expenses could be caused by your business being shut down for various amounts of time, the effect of lost customers, the delay of new business plans, and other effects of a disruption of service. Be as exact as possible in order to get a good idea of what costs you might accrue so you can most accurately plan for a disaster.
\\r\\n\\r\\nWhile many things will be different depending on the type of emergency you are preparing for—what you do during a tornado or earthquake will be much different than what you do during a fire or workplace violence incident, for example—some of the basic preparations will be similar for multiple problems. Always provide steps for getting people to safety, whether that means sheltering or evacuating them, and always have a clear and effective plan for communicating with everyone who could be affected.
\\nBe sure to investigate not just what hazards you may face and how to stay safe during them, but also what effects they will have afterward. This should reveal such considerations as what lost income and increased expenses could be caused by your business being shut down for various amounts of time, the effect of lost customers, the delay of new business plans, and other effects of a disruption of service. Be as exact as possible in order to get a good idea of what costs you might accrue so you can most accurately plan for a disaster.
\\nOnce you have identified all of the possible threats you may face and the potential effects, you should come up with responses for the hazards. Here are some tips to keep in mind.
\\r\\n\",\n \"format\": \"inline_styling\",\n \"processed\": \"Once you have identified all of the possible threats you may face and the potential effects, you should come up with responses for the hazards. Here are some tips to keep in mind.
\\n\"\n }\n },\n {\n \"id\": 264,\n \"uuid\": \"6c1ea93c-3ef8-45db-a215-5294eba0e717\",\n \"revision_id\": 597,\n \"langcode\": \"en\",\n \"type\": null,\n \"status\": true,\n \"created\": 1583858298,\n \"parent_id\": \"227\",\n \"parent_type\": \"node\",\n \"parent_field_name\": \"field_body\",\n \"behavior_settings\": [],\n \"default_langcode\": true,\n \"revision_translation_affected\": false,\n \"field_list_content\": {\n \"value\": \"OSHA has several resources to help you prepare your emergency action plan.
\\r\\n\\r\\nOSHA has several resources to help you prepare your emergency action plan.
\\nThe main reason to have an emergency action plan is to do as much as possible to keep your employees safe in case of disaster. The confusion of an emergency can make a bad situation worse and put lives at risk. The Federal Emergency Management Agency (FEMA) provides more reasons an emergency action plan is important from a purely business perspective.
\\r\\n\",\n \"format\": \"inline_styling\",\n \"processed\": \"The main reason to have an emergency action plan is to do as much as possible to keep your employees safe in case of disaster. The confusion of an emergency can make a bad situation worse and put lives at risk. The Federal Emergency Management Agency (FEMA) provides more reasons an emergency action plan is important from a purely business perspective.
\\n\"\n }\n },\n {\n \"id\": 261,\n \"uuid\": \"076bcddf-01f7-42b1-9a41-5f9910d0114b\",\n \"revision_id\": 583,\n \"langcode\": \"en\",\n \"type\": null,\n \"status\": true,\n \"created\": 1583856683,\n \"parent_id\": \"226\",\n \"parent_type\": \"node\",\n \"parent_field_name\": \"field_body\",\n \"behavior_settings\": [],\n \"default_langcode\": true,\n \"revision_translation_affected\": false,\n \"field_list_content\": {\n \"value\": \"During a disease outbreak, you may need to work from home (although not every job allows for this degree of flexibility). If you do not ordinarily work remotely, ensure that you are prepared with all the tools you need and that you have a plan to help you be as productive as you would be at work.
\\r\\n\",\n \"format\": \"inline_styling\",\n \"processed\": \"During a disease outbreak, you may need to work from home (although not every job allows for this degree of flexibility). If you do not ordinarily work remotely, ensure that you are prepared with all the tools you need and that you have a plan to help you be as productive as you would be at work.
\\n\"\n }\n },\n {\n \"id\": 346,\n \"uuid\": \"2b01dbc7-5fc5-4a59-8ec5-92a51f5d4813\",\n \"revision_id\": 876,\n \"langcode\": \"en\",\n \"type\": null,\n \"status\": true,\n \"created\": 1584542734,\n \"parent_id\": \"271\",\n \"parent_type\": \"node\",\n \"parent_field_name\": \"field_body\",\n \"behavior_settings\": [],\n \"default_langcode\": true,\n \"revision_translation_affected\": false,\n \"field_document\": {\n \"target_id\": 238,\n \"display\": true,\n \"description\": \"\"\n }\n }\n ],\n \"discussion_status\": \"hidden\"\n }\n ]\n },\n {\n \"name\": \"Virtual Team\",\n \"url\": \"/api/groups/15/topics/100\",\n \"content\": [\n {\n \"id\": \"9fecf981-8d5e-45d8-a499-8528be027418\",\n \"nid\": 275,\n \"vid\": 622,\n \"url\": \"/node/275\",\n \"name\": \"Lead Your Virtual Team: Lead Successful Meetings\",\n \"type\": \"learn_article\",\n \"changed\": \"2021-01-21T00:26:56+0000\",\n \"is_promoted\": false,\n \"is_sticky\": false,\n \"file\": {\n \"id\": \"ab179d6d-aa5e-4d0e-b4a4-5926f69f0cd8\",\n \"name\": \"node_275.zip\",\n \"url\": \"http://perls.localhost:8000/system/files/offline_page/node_275.zip\"\n },\n \"tags\": [\n {\n \"id\": \"2e03cfc6-7b44-4853-a629-1283b7b6b5cd\",\n \"vid\": 93,\n \"tid\": 93,\n \"url\": \"/taxonomy/term/93\",\n \"name\": \"SLGO\",\n \"type\": \"tags\",\n \"changed\": \"2020-03-16T19:38:00+0000\"\n },\n {\n \"id\": \"81d34d52-d62b-4769-9ab4-3f07897372c5\",\n \"vid\": 97,\n \"tid\": 97,\n \"url\": \"/taxonomy/term/97\",\n \"name\": \"Work from Home\",\n \"type\": \"tags\",\n \"changed\": \"2020-03-26T15:32:24+0000\"\n },\n {\n \"id\": \"a2cfcf08-21e8-4d9e-a0a2-e4ce0ff9f58b\",\n \"vid\": 96,\n \"tid\": 96,\n \"url\": \"/taxonomy/term/96\",\n \"name\": \"Working Remotely\",\n \"type\": \"tags\",\n \"changed\": \"2020-03-26T15:32:32+0000\"\n },\n {\n \"id\": \"f49d9d61-21ba-472d-9100-3e83beeacf33\",\n \"vid\": 98,\n \"tid\": 98,\n \"url\": \"/taxonomy/term/98\",\n \"name\": \"Virtual Team\",\n \"type\": \"tags\",\n \"changed\": \"2020-03-26T15:32:03+0000\"\n }\n ],\n \"topic\": {\n \"id\": \"39299858-9ea2-4e61-bf1e-7c7a8a91bdc9\",\n \"vid\": 100,\n \"tid\": 100,\n \"url\": \"/taxonomy/term/100\",\n \"name\": \"Virtual Team\",\n \"type\": \"category\",\n \"changed\": \"2020-03-18T14:18:16+0000\",\n \"description\": \"These days everything’s moving online… even your team. Are you ready? Knowing how to identify the dynamics of your team, communicate clearly with everyone & foster trust will give you the basic skills you need as a manager to bridge the distance & form your virtual team. \"\n },\n \"description\": \"Virtual meetings have a special set of challenges. To start, they often involve more advance planning\\r\\nand preparation. You’ll need to accommodate time schedules and time zones. To keep meetings on\\r\\ntrack, you’ll want to plan and send agendas beforehand.\",\n \"image\": {\n \"UUID\": \"6a5a47c3-7ab4-4906-abc4-1606fb139e10\",\n \"name\": \"Lead-successful_meetings_preview_image.png\",\n \"url\": \"http://perls.localhost:8000/sites/default/files/styles/large/public/2020-03/Lead-successful_meetings_preview_image.png.jpg?itok=CQ4zVc1q\",\n \"original_url\": \"http://perls.localhost:8000/sites/default/files/2020-03/Lead-successful_meetings_preview_image.png\"\n },\n \"body\": [\n {\n \"id\": 352,\n \"uuid\": \"274a885f-9f82-4cd7-ab06-5adb5a03584d\",\n \"revision_id\": 928,\n \"langcode\": \"en\",\n \"type\": null,\n \"status\": true,\n \"created\": 1584547416,\n \"parent_id\": \"275\",\n \"parent_type\": \"node\",\n \"parent_field_name\": \"field_body\",\n \"behavior_settings\": [],\n \"default_langcode\": true,\n \"revision_translation_affected\": false,\n \"field_paragraph_body\": {\n \"value\": \"Virtual meetings have a special set of challenges. To start, they often involve more advance planning and preparation. You’ll need to accommodate time schedules and time zones. To keep meetings on track, you’ll want to plan and send agendas beforehand.
\\r\\n\",\n \"format\": \"inline_styling\",\n \"processed\": \"Virtual meetings have a special set of challenges. To start, they often involve more advance planning and preparation. You’ll need to accommodate time schedules and time zones. To keep meetings on track, you’ll want to plan and send agendas beforehand.
\\n\"\n }\n },\n {\n \"id\": 353,\n \"uuid\": \"4442ab52-62ae-46d4-b9aa-4995f2489975\",\n \"revision_id\": 929,\n \"langcode\": \"en\",\n \"type\": null,\n \"status\": true,\n \"created\": 1584547533,\n \"parent_id\": \"275\",\n \"parent_type\": \"node\",\n \"parent_field_name\": \"field_body\",\n \"behavior_settings\": [],\n \"default_langcode\": true,\n \"revision_translation_affected\": false,\n \"field_document\": {\n \"target_id\": 246,\n \"display\": true,\n \"description\": \"\"\n }\n }\n ],\n \"discussion_status\": \"open\"\n },\n {\n \"id\": \"ba541590-ac32-4021-b005-001e87b824e4\",\n \"nid\": 273,\n \"vid\": 617,\n \"url\": \"/node/273\",\n \"name\": \"Form Your Virtual Team: Identify the Environment\",\n \"type\": \"learn_article\",\n \"changed\": \"2020-06-11T20:03:11+0000\",\n \"is_promoted\": false,\n \"is_sticky\": false,\n \"file\": {\n \"id\": \"f0860bf7-9d40-4b01-a227-2a1ffa396380\",\n \"name\": \"node_273.zip\",\n \"url\": \"http://perls.localhost:8000/system/files/offline_page/node_273.zip\"\n },\n \"tags\": [\n {\n \"id\": \"2e03cfc6-7b44-4853-a629-1283b7b6b5cd\",\n \"vid\": 93,\n \"tid\": 93,\n \"url\": \"/taxonomy/term/93\",\n \"name\": \"SLGO\",\n \"type\": \"tags\",\n \"changed\": \"2020-03-16T19:38:00+0000\"\n },\n {\n \"id\": \"a2cfcf08-21e8-4d9e-a0a2-e4ce0ff9f58b\",\n \"vid\": 96,\n \"tid\": 96,\n \"url\": \"/taxonomy/term/96\",\n \"name\": \"Working Remotely\",\n \"type\": \"tags\",\n \"changed\": \"2020-03-26T15:32:32+0000\"\n },\n {\n \"id\": \"81d34d52-d62b-4769-9ab4-3f07897372c5\",\n \"vid\": 97,\n \"tid\": 97,\n \"url\": \"/taxonomy/term/97\",\n \"name\": \"Work from Home\",\n \"type\": \"tags\",\n \"changed\": \"2020-03-26T15:32:24+0000\"\n },\n {\n \"id\": \"f49d9d61-21ba-472d-9100-3e83beeacf33\",\n \"vid\": 98,\n \"tid\": 98,\n \"url\": \"/taxonomy/term/98\",\n \"name\": \"Virtual Team\",\n \"type\": \"tags\",\n \"changed\": \"2020-03-26T15:32:03+0000\"\n }\n ],\n \"topic\": {\n \"id\": \"39299858-9ea2-4e61-bf1e-7c7a8a91bdc9\",\n \"vid\": 100,\n \"tid\": 100,\n \"url\": \"/taxonomy/term/100\",\n \"name\": \"Virtual Team\",\n \"type\": \"category\",\n \"changed\": \"2020-03-18T14:18:16+0000\",\n \"description\": \"These days everything’s moving online… even your team. Are you ready? Knowing how to identify the dynamics of your team, communicate clearly with everyone & foster trust will give you the basic skills you need as a manager to bridge the distance & form your virtual team. \"\n },\n \"description\": \"Take the time to consider the environment surrounding your virtual team. Where are members\\r\\nphysically located? What time differences and cultural boundaries will impact how you will work? Use\\r\\nthis checklist to determine these critical environmental factors.\",\n \"image\": {\n \"UUID\": \"f6bdfdc9-31c5-46e3-b43a-8f073cb9ae87\",\n \"name\": \"identify_environment_preview_image_0.png\",\n \"url\": \"http://perls.localhost:8000/sites/default/files/styles/large/public/2020-03/identify_environment_preview_image_0.png.jpg?itok=jkvYy0gv\",\n \"original_url\": \"http://perls.localhost:8000/sites/default/files/2020-03/identify_environment_preview_image_0.png\"\n },\n \"body\": [\n {\n \"id\": 348,\n \"uuid\": \"3b023d03-b180-49fe-98ad-809051659fb3\",\n \"revision_id\": 789,\n \"langcode\": \"en\",\n \"type\": null,\n \"status\": true,\n \"created\": 1584544601,\n \"parent_id\": \"273\",\n \"parent_type\": \"node\",\n \"parent_field_name\": \"field_body\",\n \"behavior_settings\": [],\n \"default_langcode\": true,\n \"revision_translation_affected\": true,\n \"field_paragraph_body\": {\n \"value\": \" Take the time to consider the environment surrounding your virtual team. Where are members physically located? What time differences and cultural boundaries will impact how you will work? Use this checklist to determine these critical environmental factors.
\\r\\n\",\n \"format\": \"inline_styling\",\n \"processed\": \" Take the time to consider the environment surrounding your virtual team. Where are members physically located? What time differences and cultural boundaries will impact how you will work? Use this checklist to determine these critical environmental factors.
\\n\"\n }\n },\n {\n \"id\": 349,\n \"uuid\": \"7a0cbe76-7dcd-4317-8c48-f7039ab09d8d\",\n \"revision_id\": 790,\n \"langcode\": \"en\",\n \"type\": null,\n \"status\": true,\n \"created\": 1584544651,\n \"parent_id\": \"273\",\n \"parent_type\": \"node\",\n \"parent_field_name\": \"field_body\",\n \"behavior_settings\": [],\n \"default_langcode\": true,\n \"revision_translation_affected\": true,\n \"field_document\": {\n \"target_id\": 242,\n \"display\": true,\n \"description\": \"\"\n }\n }\n ],\n \"discussion_status\": \"hidden\"\n },\n {\n \"id\": \"6f4b9aa4-f025-4a9e-9d65-e3f021feb478\",\n \"nid\": 274,\n \"vid\": 618,\n \"url\": \"/node/274\",\n \"name\": \"Form Your Virtual Team: Identify Your Team's Virtual Environment\",\n \"type\": \"learn_article\",\n \"changed\": \"2020-06-11T20:03:11+0000\",\n \"is_promoted\": false,\n \"is_sticky\": false,\n \"file\": {\n \"id\": \"e04b2083-3567-46df-b6dc-444113f21a3a\",\n \"name\": \"node_274.zip\",\n \"url\": \"http://perls.localhost:8000/system/files/offline_page/node_274.zip\"\n },\n \"tags\": [\n {\n \"id\": \"2e03cfc6-7b44-4853-a629-1283b7b6b5cd\",\n \"vid\": 93,\n \"tid\": 93,\n \"url\": \"/taxonomy/term/93\",\n \"name\": \"SLGO\",\n \"type\": \"tags\",\n \"changed\": \"2020-03-16T19:38:00+0000\"\n },\n {\n \"id\": \"81d34d52-d62b-4769-9ab4-3f07897372c5\",\n \"vid\": 97,\n \"tid\": 97,\n \"url\": \"/taxonomy/term/97\",\n \"name\": \"Work from Home\",\n \"type\": \"tags\",\n \"changed\": \"2020-03-26T15:32:24+0000\"\n },\n {\n \"id\": \"a2cfcf08-21e8-4d9e-a0a2-e4ce0ff9f58b\",\n \"vid\": 96,\n \"tid\": 96,\n \"url\": \"/taxonomy/term/96\",\n \"name\": \"Working Remotely\",\n \"type\": \"tags\",\n \"changed\": \"2020-03-26T15:32:32+0000\"\n },\n {\n \"id\": \"f49d9d61-21ba-472d-9100-3e83beeacf33\",\n \"vid\": 98,\n \"tid\": 98,\n \"url\": \"/taxonomy/term/98\",\n \"name\": \"Virtual Team\",\n \"type\": \"tags\",\n \"changed\": \"2020-03-26T15:32:03+0000\"\n }\n ],\n \"topic\": {\n \"id\": \"39299858-9ea2-4e61-bf1e-7c7a8a91bdc9\",\n \"vid\": 100,\n \"tid\": 100,\n \"url\": \"/taxonomy/term/100\",\n \"name\": \"Virtual Team\",\n \"type\": \"category\",\n \"changed\": \"2020-03-18T14:18:16+0000\",\n \"description\": \"These days everything’s moving online… even your team. Are you ready? Knowing how to identify the dynamics of your team, communicate clearly with everyone & foster trust will give you the basic skills you need as a manager to bridge the distance & form your virtual team. \"\n },\n \"description\": \"Where your team members are located matters and it makes a difference in how you craft your\\r\\nmanagement strategy. Consider how the three factors of physical location, time difference, and\\r\\ncultural boundaries impact and shape your team’s environment.\",\n \"image\": {\n \"UUID\": \"f5280391-910e-49c4-aee1-2f3e4b82f99c\",\n \"name\": \"identify_Virtual_environment_preview_image.png\",\n \"url\": \"http://perls.localhost:8000/sites/default/files/styles/large/public/2020-03/identify_Virtual_environment_preview_image.png.jpg?itok=hqJ4i49c\",\n \"original_url\": \"http://perls.localhost:8000/sites/default/files/2020-03/identify_Virtual_environment_preview_image.png\"\n },\n \"body\": [\n {\n \"id\": 350,\n \"uuid\": \"ea0bb7dd-1d34-4013-9fa0-901fb1235bce\",\n \"revision_id\": 791,\n \"langcode\": \"en\",\n \"type\": null,\n \"status\": true,\n \"created\": 1584545130,\n \"parent_id\": \"274\",\n \"parent_type\": \"node\",\n \"parent_field_name\": \"field_body\",\n \"behavior_settings\": [],\n \"default_langcode\": true,\n \"revision_translation_affected\": true,\n \"field_paragraph_body\": {\n \"value\": \"Where your team members are located matters and it makes a difference in how you craft your management strategy. Consider how the three factors of physical location, time difference, and cultural boundaries impact and shape your team’s environment.
\\r\\n\",\n \"format\": \"inline_styling\",\n \"processed\": \"Where your team members are located matters and it makes a difference in how you craft your management strategy. Consider how the three factors of physical location, time difference, and cultural boundaries impact and shape your team’s environment.
\\n\"\n }\n },\n {\n \"id\": 351,\n \"uuid\": \"31b890db-9c89-4e72-8426-e45bbedcde59\",\n \"revision_id\": 792,\n \"langcode\": \"en\",\n \"type\": null,\n \"status\": true,\n \"created\": 1584545184,\n \"parent_id\": \"274\",\n \"parent_type\": \"node\",\n \"parent_field_name\": \"field_body\",\n \"behavior_settings\": [],\n \"default_langcode\": true,\n \"revision_translation_affected\": true,\n \"field_document\": {\n \"target_id\": 244,\n \"display\": true,\n \"description\": \"\"\n }\n }\n ],\n \"discussion_status\": \"hidden\"\n },\n {\n \"id\": \"c2e5e16a-6354-4fcb-b82d-74915c561f9f\",\n \"nid\": 260,\n \"vid\": 619,\n \"url\": \"/node/260\",\n \"name\": \"Form Your Virtual Team: Set Your Team Up for Success\",\n \"type\": \"learn_article\",\n \"changed\": \"2020-03-18T14:25:40+0000\",\n \"is_promoted\": false,\n \"is_sticky\": false,\n \"file\": {\n \"id\": \"d839c9cc-0a69-4b3e-be8d-7641b71f4470\",\n \"name\": \"node_260.zip\",\n \"url\": \"http://perls.localhost:8000/system/files/offline_page/node_260.zip\"\n },\n \"tags\": [\n {\n \"id\": \"2e03cfc6-7b44-4853-a629-1283b7b6b5cd\",\n \"vid\": 93,\n \"tid\": 93,\n \"url\": \"/taxonomy/term/93\",\n \"name\": \"SLGO\",\n \"type\": \"tags\",\n \"changed\": \"2020-03-16T19:38:00+0000\"\n },\n {\n \"id\": \"a2cfcf08-21e8-4d9e-a0a2-e4ce0ff9f58b\",\n \"vid\": 96,\n \"tid\": 96,\n \"url\": \"/taxonomy/term/96\",\n \"name\": \"Working Remotely\",\n \"type\": \"tags\",\n \"changed\": \"2020-03-26T15:32:32+0000\"\n },\n {\n \"id\": \"81d34d52-d62b-4769-9ab4-3f07897372c5\",\n \"vid\": 97,\n \"tid\": 97,\n \"url\": \"/taxonomy/term/97\",\n \"name\": \"Work from Home\",\n \"type\": \"tags\",\n \"changed\": \"2020-03-26T15:32:24+0000\"\n },\n {\n \"id\": \"f49d9d61-21ba-472d-9100-3e83beeacf33\",\n \"vid\": 98,\n \"tid\": 98,\n \"url\": \"/taxonomy/term/98\",\n \"name\": \"Virtual Team\",\n \"type\": \"tags\",\n \"changed\": \"2020-03-26T15:32:03+0000\"\n }\n ],\n \"topic\": {\n \"id\": \"39299858-9ea2-4e61-bf1e-7c7a8a91bdc9\",\n \"vid\": 100,\n \"tid\": 100,\n \"url\": \"/taxonomy/term/100\",\n \"name\": \"Virtual Team\",\n \"type\": \"category\",\n \"changed\": \"2020-03-18T14:18:16+0000\",\n \"description\": \"These days everything’s moving online… even your team. Are you ready? Knowing how to identify the dynamics of your team, communicate clearly with everyone & foster trust will give you the basic skills you need as a manager to bridge the distance & form your virtual team. \"\n },\n \"description\": \"Whether your organization is going global or you’re bringing on remote hires, there are a few things you’ll need to do consistently to form an effective virtual team.\",\n \"image\": {\n \"UUID\": \"c692dd57-f6b4-413b-999c-5264b30577e7\",\n \"name\": \"set_your_team_up_success_preview_image_1.png\",\n \"url\": \"http://perls.localhost:8000/sites/default/files/styles/large/public/2020-03/set_your_team_up_success_preview_image_1.png.jpg?itok=PNY3KUjH\",\n \"original_url\": \"http://perls.localhost:8000/sites/default/files/2020-03/set_your_team_up_success_preview_image_1.png\"\n },\n \"body\": [\n {\n \"id\": 323,\n \"uuid\": \"c47ec5f4-b866-47ac-954a-a3e5c2263396\",\n \"revision_id\": 782,\n \"langcode\": \"en\",\n \"type\": null,\n \"status\": true,\n \"created\": 1584460394,\n \"parent_id\": \"260\",\n \"parent_type\": \"node\",\n \"parent_field_name\": \"field_body\",\n \"behavior_settings\": [],\n \"default_langcode\": true,\n \"revision_translation_affected\": false,\n \"field_paragraph_body\": {\n \"value\": \"Extra, open & honest communication is needed to keep a virtual team running smoothly. Learn how clearly defined roles & designated responsibilities will keep things on track.
\\r\\n\",\n \"format\": \"inline_styling\",\n \"processed\": \"Extra, open & honest communication is needed to keep a virtual team running smoothly. Learn how clearly defined roles & designated responsibilities will keep things on track.
\\n\"\n }\n },\n {\n \"id\": 328,\n \"uuid\": \"0d95682d-1112-4b05-adba-c57ad4d614ad\",\n \"revision_id\": 779,\n \"langcode\": \"en\",\n \"type\": null,\n \"status\": true,\n \"created\": 1584461716,\n \"parent_id\": \"262\",\n \"parent_type\": \"node\",\n \"parent_field_name\": \"field_body\",\n \"behavior_settings\": [],\n \"default_langcode\": true,\n \"revision_translation_affected\": false,\n \"field_video\": \"https://youtu.be/57nUlH8cFj0\"\n }\n ],\n \"discussion_status\": \"hidden\"\n },\n {\n \"id\": \"77505e29-789c-4355-9b17-961b20a5176e\",\n \"nid\": 263,\n \"vid\": 616,\n \"url\": \"/node/263\",\n \"name\": \"Form Your Virtual Team: Foster Trust\",\n \"type\": \"learn_article\",\n \"changed\": \"2020-03-18T14:22:25+0000\",\n \"is_promoted\": false,\n \"is_sticky\": false,\n \"file\": {\n \"id\": \"885d627c-bfe2-4893-b510-bd909b10c240\",\n \"name\": \"node_263.zip\",\n \"url\": \"http://perls.localhost:8000/system/files/offline_page/node_263.zip\"\n },\n \"tags\": [\n {\n \"id\": \"2e03cfc6-7b44-4853-a629-1283b7b6b5cd\",\n \"vid\": 93,\n \"tid\": 93,\n \"url\": \"/taxonomy/term/93\",\n \"name\": \"SLGO\",\n \"type\": \"tags\",\n \"changed\": \"2020-03-16T19:38:00+0000\"\n },\n {\n \"id\": \"81d34d52-d62b-4769-9ab4-3f07897372c5\",\n \"vid\": 97,\n \"tid\": 97,\n \"url\": \"/taxonomy/term/97\",\n \"name\": \"Work from Home\",\n \"type\": \"tags\",\n \"changed\": \"2020-03-26T15:32:24+0000\"\n },\n {\n \"id\": \"a2cfcf08-21e8-4d9e-a0a2-e4ce0ff9f58b\",\n \"vid\": 96,\n \"tid\": 96,\n \"url\": \"/taxonomy/term/96\",\n \"name\": \"Working Remotely\",\n \"type\": \"tags\",\n \"changed\": \"2020-03-26T15:32:32+0000\"\n },\n {\n \"id\": \"f49d9d61-21ba-472d-9100-3e83beeacf33\",\n \"vid\": 98,\n \"tid\": 98,\n \"url\": \"/taxonomy/term/98\",\n \"name\": \"Virtual Team\",\n \"type\": \"tags\",\n \"changed\": \"2020-03-26T15:32:03+0000\"\n }\n ],\n \"topic\": {\n \"id\": \"39299858-9ea2-4e61-bf1e-7c7a8a91bdc9\",\n \"vid\": 100,\n \"tid\": 100,\n \"url\": \"/taxonomy/term/100\",\n \"name\": \"Virtual Team\",\n \"type\": \"category\",\n \"changed\": \"2020-03-18T14:18:16+0000\",\n \"description\": \"These days everything’s moving online… even your team. Are you ready? Knowing how to identify the dynamics of your team, communicate clearly with everyone & foster trust will give you the basic skills you need as a manager to bridge the distance & form your virtual team. \"\n },\n \"description\": \"Trust is critical for all teams, but how do you foster trust when people are separated? Discover how to build rapport, either in person or online, to help your virtual team members learn to trust one another.\",\n \"image\": {\n \"UUID\": \"22367a71-754b-4c28-abf1-a18e2c1071f1\",\n \"name\": \"Foster_Trust_preview_image_0.png\",\n \"url\": \"http://perls.localhost:8000/sites/default/files/styles/large/public/2020-03/Foster_Trust_preview_image_0.png.jpg?itok=_I_MQOeM\",\n \"original_url\": \"http://perls.localhost:8000/sites/default/files/2020-03/Foster_Trust_preview_image_0.png\"\n },\n \"body\": [\n {\n \"id\": 329,\n \"uuid\": \"0d73664a-7988-4779-85c0-0472acefa741\",\n \"revision_id\": 776,\n \"langcode\": \"en\",\n \"type\": null,\n \"status\": true,\n \"created\": 1584462530,\n \"parent_id\": \"263\",\n \"parent_type\": \"node\",\n \"parent_field_name\": \"field_body\",\n \"behavior_settings\": [],\n \"default_langcode\": true,\n \"revision_translation_affected\": false,\n \"field_paragraph_body\": {\n \"value\": \"Consider this final piece of advice on how to keep team members engaged through casual communication channels as you work to form your virtual team.
\\r\\n\",\n \"format\": \"inline_styling\",\n \"processed\": \"Consider this final piece of advice on how to keep team members engaged through casual communication channels as you work to form your virtual team.
\\n\"\n }\n },\n {\n \"id\": 344,\n \"uuid\": \"95b168e1-6637-4293-a887-3e66bb12a83f\",\n \"revision_id\": 773,\n \"langcode\": \"en\",\n \"type\": null,\n \"status\": true,\n \"created\": 1584477383,\n \"parent_id\": \"265\",\n \"parent_type\": \"node\",\n \"parent_field_name\": \"field_body\",\n \"behavior_settings\": [],\n \"default_langcode\": true,\n \"revision_translation_affected\": false,\n \"field_video\": \"https://youtu.be/j3N1ryenxxM\"\n }\n ],\n \"discussion_status\": \"hidden\"\n },\n {\n \"id\": \"702a6935-4985-48e8-98f5-395e99d906f9\",\n \"nid\": 266,\n \"vid\": 625,\n \"url\": \"/node/266\",\n \"name\": \"Lead Your Virtual Team: Why It Matters\",\n \"type\": \"learn_article\",\n \"changed\": \"2020-03-18T14:20:55+0000\",\n \"is_promoted\": false,\n \"is_sticky\": false,\n \"file\": {\n \"id\": \"4f26f94d-6ef0-4fb5-a18b-1be35712e28a\",\n \"name\": \"node_266.zip\",\n \"url\": \"http://perls.localhost:8000/system/files/offline_page/node_266.zip\"\n },\n \"tags\": [\n {\n \"id\": \"2e03cfc6-7b44-4853-a629-1283b7b6b5cd\",\n \"vid\": 93,\n \"tid\": 93,\n \"url\": \"/taxonomy/term/93\",\n \"name\": \"SLGO\",\n \"type\": \"tags\",\n \"changed\": \"2020-03-16T19:38:00+0000\"\n },\n {\n \"id\": \"425e382c-8fc9-4a46-a252-cb6f20bc42eb\",\n \"vid\": 83,\n \"tid\": 83,\n \"url\": \"/taxonomy/term/83\",\n \"name\": \"Leadership\",\n \"type\": \"tags\",\n \"changed\": \"2020-03-26T15:33:24+0000\"\n },\n {\n \"id\": \"f49d9d61-21ba-472d-9100-3e83beeacf33\",\n \"vid\": 98,\n \"tid\": 98,\n \"url\": \"/taxonomy/term/98\",\n \"name\": \"Virtual Team\",\n \"type\": \"tags\",\n \"changed\": \"2020-03-26T15:32:03+0000\"\n },\n {\n \"id\": \"a2cfcf08-21e8-4d9e-a0a2-e4ce0ff9f58b\",\n \"vid\": 96,\n \"tid\": 96,\n \"url\": \"/taxonomy/term/96\",\n \"name\": \"Working Remotely\",\n \"type\": \"tags\",\n \"changed\": \"2020-03-26T15:32:32+0000\"\n },\n {\n \"id\": \"81d34d52-d62b-4769-9ab4-3f07897372c5\",\n \"vid\": 97,\n \"tid\": 97,\n \"url\": \"/taxonomy/term/97\",\n \"name\": \"Work from Home\",\n \"type\": \"tags\",\n \"changed\": \"2020-03-26T15:32:24+0000\"\n }\n ],\n \"topic\": {\n \"id\": \"39299858-9ea2-4e61-bf1e-7c7a8a91bdc9\",\n \"vid\": 100,\n \"tid\": 100,\n \"url\": \"/taxonomy/term/100\",\n \"name\": \"Virtual Team\",\n \"type\": \"category\",\n \"changed\": \"2020-03-18T14:18:16+0000\",\n \"description\": \"These days everything’s moving online… even your team. Are you ready? Knowing how to identify the dynamics of your team, communicate clearly with everyone & foster trust will give you the basic skills you need as a manager to bridge the distance & form your virtual team. \"\n },\n \"description\": \"What’s your role as the leader of a virtual team? It starts with your ability to communicate clearly and effectively. \",\n \"image\": {\n \"UUID\": \"048b3aff-90c1-4eb0-94cc-6b23151a5a35\",\n \"name\": \"Why_it_Matters_preview_image.png\",\n \"url\": \"http://perls.localhost:8000/sites/default/files/styles/large/public/2020-03/Why_it_Matters_preview_image.png.jpg?itok=pACP8Kp3\",\n \"original_url\": \"http://perls.localhost:8000/sites/default/files/2020-03/Why_it_Matters_preview_image.png\"\n },\n \"body\": [\n {\n \"id\": 334,\n \"uuid\": \"479119a7-51a4-45a9-9f49-440ab82a70f4\",\n \"revision_id\": 770,\n \"langcode\": \"en\",\n \"type\": null,\n \"status\": true,\n \"created\": 1584464549,\n \"parent_id\": \"266\",\n \"parent_type\": \"node\",\n \"parent_field_name\": \"field_body\",\n \"behavior_settings\": [],\n \"default_langcode\": true,\n \"revision_translation_affected\": false,\n \"field_paragraph_body\": {\n \"value\": \"The main reason to have an emergency action plan is to do as much as possible to keep your employees safe in case of disaster but a good plan can keep your business safe as well. Up to 40% of businesses affected by a natural or human-caused disaster never reopen. Having procedures in place to deal with disasters can help your business survive this difficult experience.
\\r\\n\\r\\nWhile many things will be different depending on the type of emergency you are preparing for—what you do during a tornado or earthquake will be much different than what you do during a fire or workplace violence incident, for example—some of the basic preparations will be similar for multiple problems. Always provide steps for getting people to safety, whether that means sheltering or evacuating them, and always have a clear and effective plan for communicating with everyone who could be affected.
\\r\\n\\r\\nBe sure to investigate not just what hazards you may face and how to stay safe during them, but also what effects they will have afterward. This should reveal such considerations as what lost income and increased expenses could be caused by your business being shut down for various amounts of time, the effect of lost customers, the delay of new business plans, and other effects of a disruption of service. Be as exact as possible in order to get a good idea of what costs you might accrue so you can most accurately plan for a disaster.
\\r\\n\\r\\nWhile many things will be different depending on the type of emergency you are preparing for—what you do during a tornado or earthquake will be much different than what you do during a fire or workplace violence incident, for example—some of the basic preparations will be similar for multiple problems. Always provide steps for getting people to safety, whether that means sheltering or evacuating them, and always have a clear and effective plan for communicating with everyone who could be affected.
\\nBe sure to investigate not just what hazards you may face and how to stay safe during them, but also what effects they will have afterward. This should reveal such considerations as what lost income and increased expenses could be caused by your business being shut down for various amounts of time, the effect of lost customers, the delay of new business plans, and other effects of a disruption of service. Be as exact as possible in order to get a good idea of what costs you might accrue so you can most accurately plan for a disaster.
\\nOnce you have identified all of the possible threats you may face and the potential effects, you should come up with responses for the hazards. Here are some tips to keep in mind.
\\r\\n\",\n \"format\": \"inline_styling\",\n \"processed\": \"Once you have identified all of the possible threats you may face and the potential effects, you should come up with responses for the hazards. Here are some tips to keep in mind.
\\n\"\n }\n },\n {\n \"id\": 264,\n \"uuid\": \"6c1ea93c-3ef8-45db-a215-5294eba0e717\",\n \"revision_id\": 597,\n \"langcode\": \"en\",\n \"type\": null,\n \"status\": true,\n \"created\": 1583858298,\n \"parent_id\": \"227\",\n \"parent_type\": \"node\",\n \"parent_field_name\": \"field_body\",\n \"behavior_settings\": [],\n \"default_langcode\": true,\n \"revision_translation_affected\": false,\n \"field_list_content\": {\n \"value\": \"OSHA has several resources to help you prepare your emergency action plan.
\\r\\n\\r\\nOSHA has several resources to help you prepare your emergency action plan.
\\nThe main reason to have an emergency action plan is to do as much as possible to keep your employees safe in case of disaster. The confusion of an emergency can make a bad situation worse and put lives at risk. The Federal Emergency Management Agency (FEMA) provides more reasons an emergency action plan is important from a purely business perspective.
\\r\\n\",\n \"format\": \"inline_styling\",\n \"processed\": \"The main reason to have an emergency action plan is to do as much as possible to keep your employees safe in case of disaster. The confusion of an emergency can make a bad situation worse and put lives at risk. The Federal Emergency Management Agency (FEMA) provides more reasons an emergency action plan is important from a purely business perspective.
\\n\"\n }\n },\n {\n \"id\": 261,\n \"uuid\": \"076bcddf-01f7-42b1-9a41-5f9910d0114b\",\n \"revision_id\": 583,\n \"langcode\": \"en\",\n \"type\": null,\n \"status\": true,\n \"created\": 1583856683,\n \"parent_id\": \"226\",\n \"parent_type\": \"node\",\n \"parent_field_name\": \"field_body\",\n \"behavior_settings\": [],\n \"default_langcode\": true,\n \"revision_translation_affected\": false,\n \"field_list_content\": {\n \"value\": \"The main reason to have an emergency action plan is to do as much as possible to keep your employees safe in case of disaster. The confusion of an emergency can make a bad situation worse and put lives at risk. The Federal Emergency Management Agency (FEMA) provides more reasons an emergency action plan is important from a purely business perspective.
\\r\\n\",\n \"format\": \"inline_styling\",\n \"processed\": \"The main reason to have an emergency action plan is to do as much as possible to keep your employees safe in case of disaster. The confusion of an emergency can make a bad situation worse and put lives at risk. The Federal Emergency Management Agency (FEMA) provides more reasons an emergency action plan is important from a purely business perspective.
\\n\"\n }\n },\n {\n \"id\": 261,\n \"uuid\": \"076bcddf-01f7-42b1-9a41-5f9910d0114b\",\n \"revision_id\": 583,\n \"langcode\": \"en\",\n \"type\": null,\n \"status\": true,\n \"created\": 1583856683,\n \"parent_id\": \"226\",\n \"parent_type\": \"node\",\n \"parent_field_name\": \"field_body\",\n \"behavior_settings\": [],\n \"default_langcode\": true,\n \"revision_translation_affected\": false,\n \"field_list_content\": {\n \"value\": \"The main reason to have an emergency action plan is to do as much as possible to keep your employees safe in case of disaster but a good plan can keep your business safe as well. Up to 40% of businesses affected by a natural or human-caused disaster never reopen. Having procedures in place to deal with disasters can help your business survive this difficult experience.
\\r\\n\\r\\nDuring a disease outbreak, you may need to work from home (although not every job allows for this degree of flexibility). If you do not ordinarily work remotely, ensure that you are prepared with all the tools you need and that you have a plan to help you be as productive as you would be at work.
\\r\\n\",\n \"format\": \"inline_styling\",\n \"processed\": \"During a disease outbreak, you may need to work from home (although not every job allows for this degree of flexibility). If you do not ordinarily work remotely, ensure that you are prepared with all the tools you need and that you have a plan to help you be as productive as you would be at work.
\\n\"\n }\n },\n {\n \"id\": 346,\n \"uuid\": \"2b01dbc7-5fc5-4a59-8ec5-92a51f5d4813\",\n \"revision_id\": 876,\n \"langcode\": \"en\",\n \"type\": null,\n \"status\": true,\n \"created\": 1584542734,\n \"parent_id\": \"271\",\n \"parent_type\": \"node\",\n \"parent_field_name\": \"field_body\",\n \"behavior_settings\": [],\n \"default_langcode\": true,\n \"revision_translation_affected\": false,\n \"field_document\": {\n \"target_id\": 238,\n \"display\": true,\n \"description\": \"\"\n }\n }\n ],\n \"discussion_status\": \"hidden\"\n },\n {\n \"id\": \"ccbbc825-2188-45e0-9ec7-5bc1567f2b95\",\n \"nid\": 258,\n \"vid\": 609,\n \"url\": \"/node/258\",\n \"name\": \"COVID-19: Work Virtually\",\n \"type\": \"learn_article\",\n \"changed\": \"2020-03-26T15:23:07+0000\",\n \"is_promoted\": false,\n \"is_sticky\": false,\n \"file\": {\n \"id\": \"d50da248-7850-43bf-8444-324748aec4e1\",\n \"name\": \"node_258.zip\",\n \"url\": \"http://perls.localhost:8000/system/files/offline_page/node_258.zip\"\n },\n \"tags\": [\n {\n \"id\": \"801623d6-5b1a-4934-afd2-e55f75f5bafc\",\n \"vid\": 94,\n \"tid\": 94,\n \"url\": \"/taxonomy/term/94\",\n \"name\": \"COVID-19\",\n \"type\": \"tags\",\n \"changed\": \"2020-03-26T15:18:22+0000\"\n },\n {\n \"id\": \"eff406f7-0dff-4945-812a-be707a816230\",\n \"vid\": 95,\n \"tid\": 95,\n \"url\": \"/taxonomy/term/95\",\n \"name\": \"Coronavirus\",\n \"type\": \"tags\",\n \"changed\": \"2020-03-26T15:32:45+0000\"\n }\n ],\n \"topic\": {\n \"id\": \"e2d54015-6e0b-43aa-a6b6-bd8abf7e66f6\",\n \"vid\": 99,\n \"tid\": 99,\n \"url\": \"/taxonomy/term/99\",\n \"name\": \"Take Precautions: COVID-19\",\n \"type\": \"category\",\n \"changed\": \"2020-03-18T14:34:44+0000\",\n \"description\": \"The recent coronavirus outbreak is a serious health concern. Do you know how to protect yourself and others from serious illness? Arming yourself with information and strategies will help reduce the spread of disease and enable you to work effectively in the challenging circumstances of an outbreak.\"\n },\n \"description\": \"You may need to work virtually during an outbreak, which can be difficult if this isn’t normal for your workplace. Learn strategies to communicate effectively with your team and maintain a high quality of work when you work virtually.\",\n \"image\": {\n \"UUID\": \"d20490ca-60fa-48c3-b2be-6de2751e438b\",\n \"name\": \"07_work_virtually_preview_image_0.png\",\n \"url\": \"http://perls.localhost:8000/sites/default/files/styles/large/public/2020-03/07_work_virtually_preview_image_0.png.jpg?itok=i97BI50p\",\n \"original_url\": \"http://perls.localhost:8000/sites/default/files/2020-03/07_work_virtually_preview_image_0.png\"\n },\n \"body\": [\n {\n \"id\": 319,\n \"uuid\": \"1f5b5d3f-dd49-4ce5-aada-2c7a5a1d0b3d\",\n \"revision_id\": 879,\n \"langcode\": \"en\",\n \"type\": null,\n \"status\": true,\n \"created\": 1584459356,\n \"parent_id\": \"258\",\n \"parent_type\": \"node\",\n \"parent_field_name\": \"field_body\",\n \"behavior_settings\": [],\n \"default_langcode\": true,\n \"revision_translation_affected\": false,\n \"field_paragraph_body\": {\n \"value\": \"While many things will be different depending on the type of emergency you are preparing for—what you do during a tornado or earthquake will be much different than what you do during a fire or workplace violence incident, for example—some of the basic preparations will be similar for multiple problems. Always provide steps for getting people to safety, whether that means sheltering or evacuating them, and always have a clear and effective plan for communicating with everyone who could be affected.
\\r\\n\\r\\nBe sure to investigate not just what hazards you may face and how to stay safe during them, but also what effects they will have afterward. This should reveal such considerations as what lost income and increased expenses could be caused by your business being shut down for various amounts of time, the effect of lost customers, the delay of new business plans, and other effects of a disruption of service. Be as exact as possible in order to get a good idea of what costs you might accrue so you can most accurately plan for a disaster.
\\r\\n\\r\\nWhile many things will be different depending on the type of emergency you are preparing for—what you do during a tornado or earthquake will be much different than what you do during a fire or workplace violence incident, for example—some of the basic preparations will be similar for multiple problems. Always provide steps for getting people to safety, whether that means sheltering or evacuating them, and always have a clear and effective plan for communicating with everyone who could be affected.
\\nBe sure to investigate not just what hazards you may face and how to stay safe during them, but also what effects they will have afterward. This should reveal such considerations as what lost income and increased expenses could be caused by your business being shut down for various amounts of time, the effect of lost customers, the delay of new business plans, and other effects of a disruption of service. Be as exact as possible in order to get a good idea of what costs you might accrue so you can most accurately plan for a disaster.
\\nOnce you have identified all of the possible threats you may face and the potential effects, you should come up with responses for the hazards. Here are some tips to keep in mind.
\\r\\n\",\n \"format\": \"inline_styling\",\n \"processed\": \"Once you have identified all of the possible threats you may face and the potential effects, you should come up with responses for the hazards. Here are some tips to keep in mind.
\\n\"\n }\n },\n {\n \"id\": 264,\n \"uuid\": \"6c1ea93c-3ef8-45db-a215-5294eba0e717\",\n \"revision_id\": 597,\n \"langcode\": \"en\",\n \"type\": null,\n \"status\": true,\n \"created\": 1583858298,\n \"parent_id\": \"227\",\n \"parent_type\": \"node\",\n \"parent_field_name\": \"field_body\",\n \"behavior_settings\": [],\n \"default_langcode\": true,\n \"revision_translation_affected\": false,\n \"field_list_content\": {\n \"value\": \"OSHA has several resources to help you prepare your emergency action plan.
\\r\\n\\r\\nOSHA has several resources to help you prepare your emergency action plan.
\\nThe main reason to have an emergency action plan is to do as much as possible to keep your employees safe in case of disaster but a good plan can keep your business safe as well. Up to 40% of businesses affected by a natural or human-caused disaster never reopen. Having procedures in place to deal with disasters can help your business survive this difficult experience.
\\r\\n\\r\\nThe main reason to have an emergency action plan is to do as much as possible to keep your employees safe in case of disaster. The confusion of an emergency can make a bad situation worse and put lives at risk. The Federal Emergency Management Agency (FEMA) provides more reasons an emergency action plan is important from a purely business perspective.
\\r\\n\",\n \"format\": \"inline_styling\",\n \"processed\": \"The main reason to have an emergency action plan is to do as much as possible to keep your employees safe in case of disaster. The confusion of an emergency can make a bad situation worse and put lives at risk. The Federal Emergency Management Agency (FEMA) provides more reasons an emergency action plan is important from a purely business perspective.
\\n\"\n }\n },\n {\n \"id\": 261,\n \"uuid\": \"076bcddf-01f7-42b1-9a41-5f9910d0114b\",\n \"revision_id\": 583,\n \"langcode\": \"en\",\n \"type\": null,\n \"status\": true,\n \"created\": 1583856683,\n \"parent_id\": \"226\",\n \"parent_type\": \"node\",\n \"parent_field_name\": \"field_body\",\n \"behavior_settings\": [],\n \"default_langcode\": true,\n \"revision_translation_affected\": false,\n \"field_list_content\": {\n \"value\": \"Consider this final piece of advice on how to keep team members engaged through casual communication channels as you work to form your virtual team.
\\r\\n\",\n \"format\": \"inline_styling\",\n \"processed\": \"Consider this final piece of advice on how to keep team members engaged through casual communication channels as you work to form your virtual team.
\\n\"\n }\n },\n {\n \"id\": 344,\n \"uuid\": \"95b168e1-6637-4293-a887-3e66bb12a83f\",\n \"revision_id\": 773,\n \"langcode\": \"en\",\n \"type\": null,\n \"status\": true,\n \"created\": 1584477383,\n \"parent_id\": \"265\",\n \"parent_type\": \"node\",\n \"parent_field_name\": \"field_body\",\n \"behavior_settings\": [],\n \"default_langcode\": true,\n \"revision_translation_affected\": false,\n \"field_video\": \"https://youtu.be/j3N1ryenxxM\"\n }\n ],\n \"discussion_status\": \"hidden\"\n },\n {\n \"id\": \"af9ac669-8e56-42c9-abca-4d83ca10cd5c\",\n \"nid\": 264,\n \"vid\": 613,\n \"url\": \"/node/264\",\n \"name\": \"Form Your Virtual Team: Bridge the Distance\",\n \"type\": \"learn_article\",\n \"changed\": \"2020-03-18T14:21:52+0000\",\n \"is_promoted\": false,\n \"is_sticky\": false,\n \"file\": {\n \"id\": \"b1dca302-5c13-470c-af91-26d796a38317\",\n \"name\": \"node_264.zip\",\n \"url\": \"http://perls.localhost:8000/system/files/offline_page/node_264.zip\"\n },\n \"tags\": [\n {\n \"id\": \"2e03cfc6-7b44-4853-a629-1283b7b6b5cd\",\n \"vid\": 93,\n \"tid\": 93,\n \"url\": \"/taxonomy/term/93\",\n \"name\": \"SLGO\",\n \"type\": \"tags\",\n \"changed\": \"2020-03-16T19:38:00+0000\"\n },\n {\n \"id\": \"81d34d52-d62b-4769-9ab4-3f07897372c5\",\n \"vid\": 97,\n \"tid\": 97,\n \"url\": \"/taxonomy/term/97\",\n \"name\": \"Work from Home\",\n \"type\": \"tags\",\n \"changed\": \"2020-03-26T15:32:24+0000\"\n },\n {\n \"id\": \"a2cfcf08-21e8-4d9e-a0a2-e4ce0ff9f58b\",\n \"vid\": 96,\n \"tid\": 96,\n \"url\": \"/taxonomy/term/96\",\n \"name\": \"Working Remotely\",\n \"type\": \"tags\",\n \"changed\": \"2020-03-26T15:32:32+0000\"\n },\n {\n \"id\": \"f49d9d61-21ba-472d-9100-3e83beeacf33\",\n \"vid\": 98,\n \"tid\": 98,\n \"url\": \"/taxonomy/term/98\",\n \"name\": \"Virtual Team\",\n \"type\": \"tags\",\n \"changed\": \"2020-03-26T15:32:03+0000\"\n }\n ],\n \"topic\": {\n \"id\": \"39299858-9ea2-4e61-bf1e-7c7a8a91bdc9\",\n \"vid\": 100,\n \"tid\": 100,\n \"url\": \"/taxonomy/term/100\",\n \"name\": \"Virtual Team\",\n \"type\": \"category\",\n \"changed\": \"2020-03-18T14:18:16+0000\",\n \"description\": \"These days everything’s moving online… even your team. Are you ready? Knowing how to identify the dynamics of your team, communicate clearly with everyone & foster trust will give you the basic skills you need as a manager to bridge the distance & form your virtual team. \"\n },\n \"description\": \"Getting everyone on the same page on a virtual team means being through & specific with your communication details. Find out how to select the right technological tools & use agreed upon terms to make communication easier.\",\n \"image\": {\n \"UUID\": \"7080cb95-17b5-4ad1-a071-4251472476b3\",\n \"name\": \"Bridge_the_Distance_preview_image_0.png\",\n \"url\": \"http://perls.localhost:8000/sites/default/files/styles/large/public/2020-03/Bridge_the_Distance_preview_image_0.png.jpg?itok=bfB5hsew\",\n \"original_url\": \"http://perls.localhost:8000/sites/default/files/2020-03/Bridge_the_Distance_preview_image_0.png\"\n },\n \"body\": [\n {\n \"id\": 331,\n \"uuid\": \"6bc0db84-d9fa-4475-9ae7-210629be5f2b\",\n \"revision_id\": 774,\n \"langcode\": \"en\",\n \"type\": null,\n \"status\": true,\n \"created\": 1584463759,\n \"parent_id\": \"264\",\n \"parent_type\": \"node\",\n \"parent_field_name\": \"field_body\",\n \"behavior_settings\": [],\n \"default_langcode\": true,\n \"revision_translation_affected\": false,\n \"field_paragraph_body\": {\n \"value\": \"Extra, open & honest communication is needed to keep a virtual team running smoothly. Learn how clearly defined roles & designated responsibilities will keep things on track.
\\r\\n\",\n \"format\": \"inline_styling\",\n \"processed\": \"Extra, open & honest communication is needed to keep a virtual team running smoothly. Learn how clearly defined roles & designated responsibilities will keep things on track.
\\n\"\n }\n },\n {\n \"id\": 328,\n \"uuid\": \"0d95682d-1112-4b05-adba-c57ad4d614ad\",\n \"revision_id\": 779,\n \"langcode\": \"en\",\n \"type\": null,\n \"status\": true,\n \"created\": 1584461716,\n \"parent_id\": \"262\",\n \"parent_type\": \"node\",\n \"parent_field_name\": \"field_body\",\n \"behavior_settings\": [],\n \"default_langcode\": true,\n \"revision_translation_affected\": false,\n \"field_video\": \"https://youtu.be/57nUlH8cFj0\"\n }\n ],\n \"discussion_status\": \"hidden\"\n },\n {\n \"id\": \"cbdb4d52-68a3-4c9c-9177-d37d0c973232\",\n \"nid\": 261,\n \"vid\": 615,\n \"url\": \"/node/261\",\n \"name\": \"Form Your Virtual Team: Consider Your Team\",\n \"type\": \"learn_article\",\n \"changed\": \"2020-03-18T14:25:13+0000\",\n \"is_promoted\": false,\n \"is_sticky\": false,\n \"file\": {\n \"id\": \"93dab80a-0f9c-433c-b644-a296da18ddcc\",\n \"name\": \"node_261.zip\",\n \"url\": \"http://perls.localhost:8000/system/files/offline_page/node_261.zip\"\n },\n \"tags\": [\n {\n \"id\": \"81d34d52-d62b-4769-9ab4-3f07897372c5\",\n \"vid\": 97,\n \"tid\": 97,\n \"url\": \"/taxonomy/term/97\",\n \"name\": \"Work from Home\",\n \"type\": \"tags\",\n \"changed\": \"2020-03-26T15:32:24+0000\"\n },\n {\n \"id\": \"a2cfcf08-21e8-4d9e-a0a2-e4ce0ff9f58b\",\n \"vid\": 96,\n \"tid\": 96,\n \"url\": \"/taxonomy/term/96\",\n \"name\": \"Working Remotely\",\n \"type\": \"tags\",\n \"changed\": \"2020-03-26T15:32:32+0000\"\n },\n {\n \"id\": \"f49d9d61-21ba-472d-9100-3e83beeacf33\",\n \"vid\": 98,\n \"tid\": 98,\n \"url\": \"/taxonomy/term/98\",\n \"name\": \"Virtual Team\",\n \"type\": \"tags\",\n \"changed\": \"2020-03-26T15:32:03+0000\"\n }\n ],\n \"topic\": {\n \"id\": \"39299858-9ea2-4e61-bf1e-7c7a8a91bdc9\",\n \"vid\": 100,\n \"tid\": 100,\n \"url\": \"/taxonomy/term/100\",\n \"name\": \"Virtual Team\",\n \"type\": \"category\",\n \"changed\": \"2020-03-18T14:18:16+0000\",\n \"description\": \"These days everything’s moving online… even your team. Are you ready? Knowing how to identify the dynamics of your team, communicate clearly with everyone & foster trust will give you the basic skills you need as a manager to bridge the distance & form your virtual team. \"\n },\n \"description\": \"The environment surrounding your team matters to your management strategy. Consider how physical location, time difference, & cultural norms will affect how you & your team interact.\",\n \"image\": {\n \"UUID\": \"cb63ccec-5701-4b4f-a0b9-b81e4374fb94\",\n \"name\": \"consider_your_team_preview_image_0.png\",\n \"url\": \"http://perls.localhost:8000/sites/default/files/styles/large/public/2020-03/consider_your_team_preview_image_0.png.jpg?itok=7aW_sFhv\",\n \"original_url\": \"http://perls.localhost:8000/sites/default/files/2020-03/consider_your_team_preview_image_0.png\"\n },\n \"body\": [\n {\n \"id\": 325,\n \"uuid\": \"58703df8-651c-43d4-a755-db04e29a4178\",\n \"revision_id\": 780,\n \"langcode\": \"en\",\n \"type\": null,\n \"status\": true,\n \"created\": 1584460911,\n \"parent_id\": \"261\",\n \"parent_type\": \"node\",\n \"parent_field_name\": \"field_body\",\n \"behavior_settings\": [],\n \"default_langcode\": true,\n \"revision_translation_affected\": false,\n \"field_paragraph_body\": {\n \"value\": \" Take the time to consider the environment surrounding your virtual team. Where are members physically located? What time differences and cultural boundaries will impact how you will work? Use this checklist to determine these critical environmental factors.
\\r\\n\",\n \"format\": \"inline_styling\",\n \"processed\": \" Take the time to consider the environment surrounding your virtual team. Where are members physically located? What time differences and cultural boundaries will impact how you will work? Use this checklist to determine these critical environmental factors.
\\n\"\n }\n },\n {\n \"id\": 349,\n \"uuid\": \"7a0cbe76-7dcd-4317-8c48-f7039ab09d8d\",\n \"revision_id\": 790,\n \"langcode\": \"en\",\n \"type\": null,\n \"status\": true,\n \"created\": 1584544651,\n \"parent_id\": \"273\",\n \"parent_type\": \"node\",\n \"parent_field_name\": \"field_body\",\n \"behavior_settings\": [],\n \"default_langcode\": true,\n \"revision_translation_affected\": true,\n \"field_document\": {\n \"target_id\": 242,\n \"display\": true,\n \"description\": \"\"\n }\n }\n ],\n \"discussion_status\": \"hidden\"\n },\n {\n \"id\": \"6f4b9aa4-f025-4a9e-9d65-e3f021feb478\",\n \"nid\": 274,\n \"vid\": 618,\n \"url\": \"/node/274\",\n \"name\": \"Form Your Virtual Team: Identify Your Team's Virtual Environment\",\n \"type\": \"learn_article\",\n \"changed\": \"2020-06-11T20:03:11+0000\",\n \"is_promoted\": false,\n \"is_sticky\": false,\n \"file\": {\n \"id\": \"e04b2083-3567-46df-b6dc-444113f21a3a\",\n \"name\": \"node_274.zip\",\n \"url\": \"http://perls.localhost:8000/system/files/offline_page/node_274.zip\"\n },\n \"tags\": [\n {\n \"id\": \"2e03cfc6-7b44-4853-a629-1283b7b6b5cd\",\n \"vid\": 93,\n \"tid\": 93,\n \"url\": \"/taxonomy/term/93\",\n \"name\": \"SLGO\",\n \"type\": \"tags\",\n \"changed\": \"2020-03-16T19:38:00+0000\"\n },\n {\n \"id\": \"81d34d52-d62b-4769-9ab4-3f07897372c5\",\n \"vid\": 97,\n \"tid\": 97,\n \"url\": \"/taxonomy/term/97\",\n \"name\": \"Work from Home\",\n \"type\": \"tags\",\n \"changed\": \"2020-03-26T15:32:24+0000\"\n },\n {\n \"id\": \"a2cfcf08-21e8-4d9e-a0a2-e4ce0ff9f58b\",\n \"vid\": 96,\n \"tid\": 96,\n \"url\": \"/taxonomy/term/96\",\n \"name\": \"Working Remotely\",\n \"type\": \"tags\",\n \"changed\": \"2020-03-26T15:32:32+0000\"\n },\n {\n \"id\": \"f49d9d61-21ba-472d-9100-3e83beeacf33\",\n \"vid\": 98,\n \"tid\": 98,\n \"url\": \"/taxonomy/term/98\",\n \"name\": \"Virtual Team\",\n \"type\": \"tags\",\n \"changed\": \"2020-03-26T15:32:03+0000\"\n }\n ],\n \"topic\": {\n \"id\": \"39299858-9ea2-4e61-bf1e-7c7a8a91bdc9\",\n \"vid\": 100,\n \"tid\": 100,\n \"url\": \"/taxonomy/term/100\",\n \"name\": \"Virtual Team\",\n \"type\": \"category\",\n \"changed\": \"2020-03-18T14:18:16+0000\",\n \"description\": \"These days everything’s moving online… even your team. Are you ready? Knowing how to identify the dynamics of your team, communicate clearly with everyone & foster trust will give you the basic skills you need as a manager to bridge the distance & form your virtual team. \"\n },\n \"description\": \"Where your team members are located matters and it makes a difference in how you craft your\\r\\nmanagement strategy. Consider how the three factors of physical location, time difference, and\\r\\ncultural boundaries impact and shape your team’s environment.\",\n \"image\": {\n \"UUID\": \"f5280391-910e-49c4-aee1-2f3e4b82f99c\",\n \"name\": \"identify_Virtual_environment_preview_image.png\",\n \"url\": \"http://perls.localhost:8000/sites/default/files/styles/large/public/2020-03/identify_Virtual_environment_preview_image.png.jpg?itok=hqJ4i49c\",\n \"original_url\": \"http://perls.localhost:8000/sites/default/files/2020-03/identify_Virtual_environment_preview_image.png\"\n },\n \"body\": [\n {\n \"id\": 350,\n \"uuid\": \"ea0bb7dd-1d34-4013-9fa0-901fb1235bce\",\n \"revision_id\": 791,\n \"langcode\": \"en\",\n \"type\": null,\n \"status\": true,\n \"created\": 1584545130,\n \"parent_id\": \"274\",\n \"parent_type\": \"node\",\n \"parent_field_name\": \"field_body\",\n \"behavior_settings\": [],\n \"default_langcode\": true,\n \"revision_translation_affected\": true,\n \"field_paragraph_body\": {\n \"value\": \"Where your team members are located matters and it makes a difference in how you craft your management strategy. Consider how the three factors of physical location, time difference, and cultural boundaries impact and shape your team’s environment.
\\r\\n\",\n \"format\": \"inline_styling\",\n \"processed\": \"Where your team members are located matters and it makes a difference in how you craft your management strategy. Consider how the three factors of physical location, time difference, and cultural boundaries impact and shape your team’s environment.
\\n\"\n }\n },\n {\n \"id\": 351,\n \"uuid\": \"31b890db-9c89-4e72-8426-e45bbedcde59\",\n \"revision_id\": 792,\n \"langcode\": \"en\",\n \"type\": null,\n \"status\": true,\n \"created\": 1584545184,\n \"parent_id\": \"274\",\n \"parent_type\": \"node\",\n \"parent_field_name\": \"field_body\",\n \"behavior_settings\": [],\n \"default_langcode\": true,\n \"revision_translation_affected\": true,\n \"field_document\": {\n \"target_id\": 244,\n \"display\": true,\n \"description\": \"\"\n }\n }\n ],\n \"discussion_status\": \"hidden\"\n },\n {\n \"id\": \"c2e5e16a-6354-4fcb-b82d-74915c561f9f\",\n \"nid\": 260,\n \"vid\": 619,\n \"url\": \"/node/260\",\n \"name\": \"Form Your Virtual Team: Set Your Team Up for Success\",\n \"type\": \"learn_article\",\n \"changed\": \"2020-03-18T14:25:40+0000\",\n \"is_promoted\": false,\n \"is_sticky\": false,\n \"file\": {\n \"id\": \"d839c9cc-0a69-4b3e-be8d-7641b71f4470\",\n \"name\": \"node_260.zip\",\n \"url\": \"http://perls.localhost:8000/system/files/offline_page/node_260.zip\"\n },\n \"tags\": [\n {\n \"id\": \"2e03cfc6-7b44-4853-a629-1283b7b6b5cd\",\n \"vid\": 93,\n \"tid\": 93,\n \"url\": \"/taxonomy/term/93\",\n \"name\": \"SLGO\",\n \"type\": \"tags\",\n \"changed\": \"2020-03-16T19:38:00+0000\"\n },\n {\n \"id\": \"a2cfcf08-21e8-4d9e-a0a2-e4ce0ff9f58b\",\n \"vid\": 96,\n \"tid\": 96,\n \"url\": \"/taxonomy/term/96\",\n \"name\": \"Working Remotely\",\n \"type\": \"tags\",\n \"changed\": \"2020-03-26T15:32:32+0000\"\n },\n {\n \"id\": \"81d34d52-d62b-4769-9ab4-3f07897372c5\",\n \"vid\": 97,\n \"tid\": 97,\n \"url\": \"/taxonomy/term/97\",\n \"name\": \"Work from Home\",\n \"type\": \"tags\",\n \"changed\": \"2020-03-26T15:32:24+0000\"\n },\n {\n \"id\": \"f49d9d61-21ba-472d-9100-3e83beeacf33\",\n \"vid\": 98,\n \"tid\": 98,\n \"url\": \"/taxonomy/term/98\",\n \"name\": \"Virtual Team\",\n \"type\": \"tags\",\n \"changed\": \"2020-03-26T15:32:03+0000\"\n }\n ],\n \"topic\": {\n \"id\": \"39299858-9ea2-4e61-bf1e-7c7a8a91bdc9\",\n \"vid\": 100,\n \"tid\": 100,\n \"url\": \"/taxonomy/term/100\",\n \"name\": \"Virtual Team\",\n \"type\": \"category\",\n \"changed\": \"2020-03-18T14:18:16+0000\",\n \"description\": \"These days everything’s moving online… even your team. Are you ready? Knowing how to identify the dynamics of your team, communicate clearly with everyone & foster trust will give you the basic skills you need as a manager to bridge the distance & form your virtual team. \"\n },\n \"description\": \"Whether your organization is going global or you’re bringing on remote hires, there are a few things you’ll need to do consistently to form an effective virtual team.\",\n \"image\": {\n \"UUID\": \"c692dd57-f6b4-413b-999c-5264b30577e7\",\n \"name\": \"set_your_team_up_success_preview_image_1.png\",\n \"url\": \"http://perls.localhost:8000/sites/default/files/styles/large/public/2020-03/set_your_team_up_success_preview_image_1.png.jpg?itok=PNY3KUjH\",\n \"original_url\": \"http://perls.localhost:8000/sites/default/files/2020-03/set_your_team_up_success_preview_image_1.png\"\n },\n \"body\": [\n {\n \"id\": 323,\n \"uuid\": \"c47ec5f4-b866-47ac-954a-a3e5c2263396\",\n \"revision_id\": 782,\n \"langcode\": \"en\",\n \"type\": null,\n \"status\": true,\n \"created\": 1584460394,\n \"parent_id\": \"260\",\n \"parent_type\": \"node\",\n \"parent_field_name\": \"field_body\",\n \"behavior_settings\": [],\n \"default_langcode\": true,\n \"revision_translation_affected\": false,\n \"field_paragraph_body\": {\n \"value\": \"Virtual meetings have a special set of challenges. To start, they often involve more advance planning and preparation. You’ll need to accommodate time schedules and time zones. To keep meetings on track, you’ll want to plan and send agendas beforehand.
\\r\\n\",\n \"format\": \"inline_styling\",\n \"processed\": \"Virtual meetings have a special set of challenges. To start, they often involve more advance planning and preparation. You’ll need to accommodate time schedules and time zones. To keep meetings on track, you’ll want to plan and send agendas beforehand.
\\n\"\n }\n },\n {\n \"id\": 353,\n \"uuid\": \"4442ab52-62ae-46d4-b9aa-4995f2489975\",\n \"revision_id\": 929,\n \"langcode\": \"en\",\n \"type\": null,\n \"status\": true,\n \"created\": 1584547533,\n \"parent_id\": \"275\",\n \"parent_type\": \"node\",\n \"parent_field_name\": \"field_body\",\n \"behavior_settings\": [],\n \"default_langcode\": true,\n \"revision_translation_affected\": false,\n \"field_document\": {\n \"target_id\": 246,\n \"display\": true,\n \"description\": \"\"\n }\n }\n ],\n \"discussion_status\": \"open\"\n },\n {\n \"id\": \"84ae2ee5-f845-4eda-9567-6f4b0fecaf45\",\n \"nid\": 267,\n \"vid\": 623,\n \"url\": \"/node/267\",\n \"name\": \"Lead Your Virtual Team: Lead Virtual Meetings\",\n \"type\": \"learn_article\",\n \"changed\": \"2020-03-18T14:20:33+0000\",\n \"is_promoted\": false,\n \"is_sticky\": false,\n \"file\": {\n \"id\": \"f733e365-341d-4d89-b7b9-94434cb537fc\",\n \"name\": \"node_267.zip\",\n \"url\": \"http://perls.localhost:8000/system/files/offline_page/node_267.zip\"\n },\n \"tags\": [\n {\n \"id\": \"2e03cfc6-7b44-4853-a629-1283b7b6b5cd\",\n \"vid\": 93,\n \"tid\": 93,\n \"url\": \"/taxonomy/term/93\",\n \"name\": \"SLGO\",\n \"type\": \"tags\",\n \"changed\": \"2020-03-16T19:38:00+0000\"\n },\n {\n \"id\": \"425e382c-8fc9-4a46-a252-cb6f20bc42eb\",\n \"vid\": 83,\n \"tid\": 83,\n \"url\": \"/taxonomy/term/83\",\n \"name\": \"Leadership\",\n \"type\": \"tags\",\n \"changed\": \"2020-03-26T15:33:24+0000\"\n },\n {\n \"id\": \"81d34d52-d62b-4769-9ab4-3f07897372c5\",\n \"vid\": 97,\n \"tid\": 97,\n \"url\": \"/taxonomy/term/97\",\n \"name\": \"Work from Home\",\n \"type\": \"tags\",\n \"changed\": \"2020-03-26T15:32:24+0000\"\n },\n {\n \"id\": \"a2cfcf08-21e8-4d9e-a0a2-e4ce0ff9f58b\",\n \"vid\": 96,\n \"tid\": 96,\n \"url\": \"/taxonomy/term/96\",\n \"name\": \"Working Remotely\",\n \"type\": \"tags\",\n \"changed\": \"2020-03-26T15:32:32+0000\"\n },\n {\n \"id\": \"f49d9d61-21ba-472d-9100-3e83beeacf33\",\n \"vid\": 98,\n \"tid\": 98,\n \"url\": \"/taxonomy/term/98\",\n \"name\": \"Virtual Team\",\n \"type\": \"tags\",\n \"changed\": \"2020-03-26T15:32:03+0000\"\n }\n ],\n \"topic\": {\n \"id\": \"39299858-9ea2-4e61-bf1e-7c7a8a91bdc9\",\n \"vid\": 100,\n \"tid\": 100,\n \"url\": \"/taxonomy/term/100\",\n \"name\": \"Virtual Team\",\n \"type\": \"category\",\n \"changed\": \"2020-03-18T14:18:16+0000\",\n \"description\": \"These days everything’s moving online… even your team. Are you ready? Knowing how to identify the dynamics of your team, communicate clearly with everyone & foster trust will give you the basic skills you need as a manager to bridge the distance & form your virtual team. \"\n },\n \"description\": \"Leading a good meeting is hard. Leading a good virtual meeting is even harder. Find out what you can do to make your virtual meetings successful from day one.\",\n \"image\": {\n \"UUID\": \"8986ca42-294e-4930-adcf-f1d700cf136b\",\n \"name\": \"Lead_Virtual_Meetings_preview_image_0.png\",\n \"url\": \"http://perls.localhost:8000/sites/default/files/styles/large/public/2020-03/Lead_Virtual_Meetings_preview_image_0.png.jpg?itok=0ddqbQxz\",\n \"original_url\": \"http://perls.localhost:8000/sites/default/files/2020-03/Lead_Virtual_Meetings_preview_image_0.png\"\n },\n \"body\": [\n {\n \"id\": 336,\n \"uuid\": \"0c762c9b-00a1-4ce6-9fe4-a896ca5111ce\",\n \"revision_id\": 768,\n \"langcode\": \"en\",\n \"type\": null,\n \"status\": true,\n \"created\": 1584464927,\n \"parent_id\": \"267\",\n \"parent_type\": \"node\",\n \"parent_field_name\": \"field_body\",\n \"behavior_settings\": [],\n \"default_langcode\": true,\n \"revision_translation_affected\": false,\n \"field_paragraph_body\": {\n \"value\": \"During a disease outbreak, you may need to work from home (although not every job allows for this degree of flexibility). If you do not ordinarily work remotely, ensure that you are prepared with all the tools you need and that you have a plan to help you be as productive as you would be at work.
\\r\\n\",\n \"format\": \"inline_styling\",\n \"processed\": \"During a disease outbreak, you may need to work from home (although not every job allows for this degree of flexibility). If you do not ordinarily work remotely, ensure that you are prepared with all the tools you need and that you have a plan to help you be as productive as you would be at work.
\\n\"\n }\n },\n {\n \"id\": 346,\n \"uuid\": \"2b01dbc7-5fc5-4a59-8ec5-92a51f5d4813\",\n \"revision_id\": 876,\n \"langcode\": \"en\",\n \"type\": null,\n \"status\": true,\n \"created\": 1584542734,\n \"parent_id\": \"271\",\n \"parent_type\": \"node\",\n \"parent_field_name\": \"field_body\",\n \"behavior_settings\": [],\n \"default_langcode\": true,\n \"revision_translation_affected\": false,\n \"field_document\": {\n \"target_id\": 238,\n \"display\": true,\n \"description\": \"\"\n }\n }\n ],\n \"discussion_status\": \"hidden\"\n },\n {\n \"id\": \"ccbbc825-2188-45e0-9ec7-5bc1567f2b95\",\n \"nid\": 258,\n \"vid\": 609,\n \"url\": \"/node/258\",\n \"name\": \"COVID-19: Work Virtually\",\n \"type\": \"learn_article\",\n \"changed\": \"2020-03-26T15:23:07+0000\",\n \"is_promoted\": false,\n \"is_sticky\": false,\n \"file\": {\n \"id\": \"d50da248-7850-43bf-8444-324748aec4e1\",\n \"name\": \"node_258.zip\",\n \"url\": \"http://perls.localhost:8000/system/files/offline_page/node_258.zip\"\n },\n \"tags\": [\n {\n \"id\": \"801623d6-5b1a-4934-afd2-e55f75f5bafc\",\n \"vid\": 94,\n \"tid\": 94,\n \"url\": \"/taxonomy/term/94\",\n \"name\": \"COVID-19\",\n \"type\": \"tags\",\n \"changed\": \"2020-03-26T15:18:22+0000\"\n },\n {\n \"id\": \"eff406f7-0dff-4945-812a-be707a816230\",\n \"vid\": 95,\n \"tid\": 95,\n \"url\": \"/taxonomy/term/95\",\n \"name\": \"Coronavirus\",\n \"type\": \"tags\",\n \"changed\": \"2020-03-26T15:32:45+0000\"\n }\n ],\n \"topic\": {\n \"id\": \"e2d54015-6e0b-43aa-a6b6-bd8abf7e66f6\",\n \"vid\": 99,\n \"tid\": 99,\n \"url\": \"/taxonomy/term/99\",\n \"name\": \"Take Precautions: COVID-19\",\n \"type\": \"category\",\n \"changed\": \"2020-03-18T14:34:44+0000\",\n \"description\": \"The recent coronavirus outbreak is a serious health concern. Do you know how to protect yourself and others from serious illness? Arming yourself with information and strategies will help reduce the spread of disease and enable you to work effectively in the challenging circumstances of an outbreak.\"\n },\n \"description\": \"You may need to work virtually during an outbreak, which can be difficult if this isn’t normal for your workplace. Learn strategies to communicate effectively with your team and maintain a high quality of work when you work virtually.\",\n \"image\": {\n \"UUID\": \"d20490ca-60fa-48c3-b2be-6de2751e438b\",\n \"name\": \"07_work_virtually_preview_image_0.png\",\n \"url\": \"http://perls.localhost:8000/sites/default/files/styles/large/public/2020-03/07_work_virtually_preview_image_0.png.jpg?itok=i97BI50p\",\n \"original_url\": \"http://perls.localhost:8000/sites/default/files/2020-03/07_work_virtually_preview_image_0.png\"\n },\n \"body\": [\n {\n \"id\": 319,\n \"uuid\": \"1f5b5d3f-dd49-4ce5-aada-2c7a5a1d0b3d\",\n \"revision_id\": 879,\n \"langcode\": \"en\",\n \"type\": null,\n \"status\": true,\n \"created\": 1584459356,\n \"parent_id\": \"258\",\n \"parent_type\": \"node\",\n \"parent_field_name\": \"field_body\",\n \"behavior_settings\": [],\n \"default_langcode\": true,\n \"revision_translation_affected\": false,\n \"field_paragraph_body\": {\n \"value\": \"The main reason to have an emergency action plan is to do as much as possible to keep your employees safe in case of disaster but a good plan can keep your business safe as well. Up to 40% of businesses affected by a natural or human-caused disaster never reopen. Having procedures in place to deal with disasters can help your business survive this difficult experience.
\\r\\n\\r\\n\\n \\n
This xAPI content is 100 megabytes before and after unzipping.
\\n \\n
Test the TIP Card
\\n
Test the TIP Card
\\n
\\n
\\n \\n
\\n\"\n ],\n \"body\": [\n {\n \"id\": \"a82a4950-0251-4af4-b772-15084609c369\",\n \"type\": \"text\",\n \"fields\": [\n {\n \"type\": \"Label\",\n \"attributes\": {\n \"Text\": \"
Test the TIP Card
\\r\\n\\r\\n
Test the TIP Card
\\r\\n\\r\\n
\",\n \"TextType\": \"Html\"\n }\n }\n ]\n }\n ]\n },\n {\n \"id\": \"401e2e50-97ba-4275-bdf9-9da3c95078c7\",\n \"nid\": 415,\n \"vid\": 1173,\n \"url\": \"/node/415\",\n \"name\": \"New web link under CONTENT\",\n \"type\": \"learn_link\",\n \"changed\": \"2021-03-16T15:28:12+0000\",\n \"is_promoted\": false,\n \"is_sticky\": false,\n \"file\": null,\n \"tags\": [\n {\n \"id\": \"cc163d39-95be-46b1-920d-2f50eb8e2897\",\n \"vid\": 130,\n \"tid\": 130,\n \"url\": \"/taxonomy/term/130\",\n \"name\": \"John\",\n \"type\": \"tags\",\n \"changed\": \"2020-12-08T21:05:16+0000\"\n }\n ],\n \"topic\": {\n \"id\": \"c83bf669-87e5-42c1-979a-7c132231759c\",\n \"vid\": 89,\n \"tid\": 89,\n \"url\": \"/taxonomy/term/89\",\n \"name\": \"mLearning\",\n \"type\": \"category\",\n \"changed\": \"2021-08-31T22:44:06+0000\",\n \"description\": \"Content related to Mobile Learning principles, methods, design, development, and use.\"\n },\n \"description\": \"TEST\",\n \"image\": null\n },\n {\n \"id\": \"5468222a-e5f1-4275-a204-d2d1b30a5569\",\n \"nid\": 377,\n \"vid\": 738,\n \"url\": \"/node/377\",\n \"name\": \"A CLINICAL REVIEW OF MOBILE LEARNING INTEGRATION IN FORMAL EDUCATIONAL CONTEXTS\",\n \"type\": \"course\",\n \"changed\": \"2020-12-14T15:20:04+0000\",\n \"is_promoted\": false,\n \"is_sticky\": false,\n \"file\": null,\n \"tags\": [\n {\n \"id\": \"b74951dc-27a6-4df8-9d03-83ee8cea920f\",\n \"vid\": 107,\n \"tid\": 107,\n \"url\": \"/taxonomy/term/107\",\n \"name\": \"CreatenewTags\",\n \"type\": \"tags\",\n \"changed\": \"2020-06-11T20:11:55+0000\"\n }\n ],\n \"topic\": {\n \"id\": \"c83bf669-87e5-42c1-979a-7c132231759c\",\n \"vid\": 89,\n \"tid\": 89,\n \"url\": \"/taxonomy/term/89\",\n \"name\": \"mLearning\",\n \"type\": \"category\",\n \"changed\": \"2021-08-31T22:44:06+0000\",\n \"description\": \"Content related to Mobile Learning principles, methods, design, development, and use.\"\n },\n \"description\": \"n army (from Latin arma \\\"arms, weapons\\\" via Old French armée, \\\"armed\\\" [feminine]), ground force or land force is a fighting force that fights primarily on land. In the broadest sense, it is the land-based military branch, service branch or armed service of a nation or state. It may also include aviation assets by possessing an army aviation component. Within a national military force, the word army may also mean a field army.\\r\\nn army (from Latin arma \\\"arms, weapons\\\" via Old French armée\",\n \"learning_objects\": [\n {\n \"id\": \"79d5e384-7800-4eba-aa54-2013be65db2e\",\n \"nid\": 375,\n \"vid\": 732,\n \"url\": \"/node/375\",\n \"name\": \"John Test Episode 2\",\n \"type\": \"podcast_episode\",\n \"changed\": \"2020-12-11T20:34:19+0000\",\n \"is_promoted\": false,\n \"is_sticky\": false,\n \"file\": {\n \"id\": \"a490f888-82ef-46d5-8739-0feabc749241\",\n \"name\": \"file_example_mp3_1mg_4.mp3\",\n \"url\": \"https://perls.localhost:8000/sites/default/files/podcasts/2020-12/file_example_mp3_1mg_4.mp3\",\n \"mimetype\": \"audio/mpeg\"\n },\n \"tags\": [],\n \"description\": null,\n \"duration\": 27,\n \"release_date\": \"2020-12-11\"\n }\n ],\n \"image\": null\n }\n ]\n }\n]"
+ }
+ ]
+ },
+ {
+ "name": "Bookmarks",
+ "request": {
+ "method": "GET",
+ "header": [],
+ "url": {
+ "raw": "{{server}}/{{base_url}}/bookmarks",
+ "host": [
+ "{{server}}"
+ ],
+ "path": [
+ "{{base_url}}",
+ "bookmarks"
+ ]
+ },
+ "description": "List of Recommendations for currently logged in user"
+ },
+ "response": [
+ {
+ "name": "Bookmarks",
+ "originalRequest": {
+ "method": "GET",
+ "header": [],
+ "url": {
+ "raw": "{{server}}/{{base_url}}/bookmarks",
+ "host": [
+ "{{server}}"
+ ],
+ "path": [
+ "{{base_url}}",
+ "bookmarks"
+ ]
+ }
+ },
+ "status": "OK",
+ "code": 200,
+ "_postman_previewlanguage": "json",
+ "header": [
+ {
+ "key": "Date",
+ "value": "Wed, 01 Sep 2021 20:48:12 GMT"
+ },
+ {
+ "key": "Content-Type",
+ "value": "application/json"
+ },
+ {
+ "key": "Content-Length",
+ "value": "1679"
+ },
+ {
+ "key": "Connection",
+ "value": "keep-alive"
+ },
+ {
+ "key": "Set-Cookie",
+ "value": "AWSALB=GbbfW+94C+dDveixpwQCjwbf8iNuW6C1pvAynYMUgtwccRAB6X+pbSyi0iyag9/AYugEYLUH5Mf2Hq46OxJrE0FwnGPW5HTn96xoIE4e3AbAdeEbkqRLwbeRvN/A; Expires=Wed, 08 Sep 2021 20:48:12 GMT; Path=/"
+ },
+ {
+ "key": "Set-Cookie",
+ "value": "AWSALBCORS=GbbfW+94C+dDveixpwQCjwbf8iNuW6C1pvAynYMUgtwccRAB6X+pbSyi0iyag9/AYugEYLUH5Mf2Hq46OxJrE0FwnGPW5HTn96xoIE4e3AbAdeEbkqRLwbeRvN/A; Expires=Wed, 08 Sep 2021 20:48:12 GMT; Path=/; SameSite=None; Secure"
+ },
+ {
+ "key": "Server",
+ "value": "Apache"
+ },
+ {
+ "key": "X-Content-Type-Options",
+ "value": "nosniff"
+ },
+ {
+ "key": "X-Content-Type-Options",
+ "value": "nosniff"
+ },
+ {
+ "key": "Cache-Control",
+ "value": "must-revalidate, no-cache, private"
+ },
+ {
+ "key": "X-Drupal-Dynamic-Cache",
+ "value": "MISS"
+ },
+ {
+ "key": "X-UA-Compatible",
+ "value": "IE=edge"
+ },
+ {
+ "key": "Content-language",
+ "value": "en"
+ },
+ {
+ "key": "X-Frame-Options",
+ "value": "SAMEORIGIN"
+ },
+ {
+ "key": "Permissions-Policy",
+ "value": "interest-cohort=()"
+ },
+ {
+ "key": "Expires",
+ "value": "Sun, 19 Nov 1978 05:00:00 GMT"
+ },
+ {
+ "key": "Strict-Transport-Security",
+ "value": "max-age=31536000; includeSubdomains; preload"
+ },
+ {
+ "key": "X-XSS-Protection",
+ "value": "1; mode=block"
+ }
+ ],
+ "cookie": [],
+ "body": "[\n {\n \"id\": \"a055fba8-332a-4933-ae5b-dc301e42ab82\",\n \"nid\": 1022,\n \"vid\": 2741,\n \"url\": \"/node/1022\",\n \"name\": \"Virtual Event\",\n \"type\": \"event\",\n \"changed\": \"2021-08-31T17:41:29+0000\",\n \"is_promoted\": true,\n \"is_sticky\": false,\n \"file\": null,\n \"tags\": [\n {\n \"id\": \"ebc14d90-2ad9-4bcb-a7fd-7454efb25d55\",\n \"vid\": 283,\n \"tid\": 283,\n \"url\": \"/taxonomy/term/283\",\n \"name\": \"event\",\n \"type\": \"tags\",\n \"changed\": \"2021-08-27T07:15:27+0000\"\n }\n ]\n },\n {\n \"id\": \"47ffbab9-1bd9-4518-b290-99524efd29ee\",\n \"nid\": 1019,\n \"vid\": 2733,\n \"url\": \"/node/1019\",\n \"name\": \"Testcourse-1\",\n \"type\": \"course\",\n \"changed\": \"2021-08-27T00:07:21+0000\",\n \"is_promoted\": false,\n \"is_sticky\": false,\n \"file\": null,\n \"tags\": [],\n \"topic\": {\n \"id\": \"4a16bc04-dca6-4ed9-9a07-af2e138ca6c0\",\n \"vid\": 213,\n \"tid\": 213,\n \"url\": \"/taxonomy/term/213\",\n \"name\": \"Content Test Suite [CTS]\",\n \"type\": \"category\",\n \"changed\": \"2021-08-31T22:44:06+0000\",\n \"description\": \"Create a content test suite course on the dev server with example content\"\n },\n \"description\": null,\n \"learning_objects\": [\n {\n \"id\": \"0cf81d2a-b4d3-4a1e-858c-598ff0b5a626\",\n \"nid\": 1020,\n \"vid\": 2731,\n \"url\": \"/node/1020\",\n \"name\": \"Testarticle---\",\n \"type\": \"learn_article\",\n \"changed\": \"2021-08-27T00:04:52+0000\",\n \"is_promoted\": false,\n \"is_sticky\": false,\n \"file\": {\n \"id\": \"530f3550-ead3-4570-8806-f5c6e749de55\",\n \"name\": \"node_1020.zip\",\n \"url\": \"https://perls.localhost:8000/system/files/offline_page/node_1020.zip\"\n },\n \"tags\": [],\n \"topic\": {\n \"id\": \"4a16bc04-dca6-4ed9-9a07-af2e138ca6c0\",\n \"vid\": 213,\n \"tid\": 213,\n \"url\": \"/taxonomy/term/213\",\n \"name\": \"Content Test Suite [CTS]\",\n \"type\": \"category\",\n \"changed\": \"2021-08-31T22:44:06+0000\",\n \"description\": \"Create a content test suite course on the dev server with example content\"\n },\n \"description\": null,\n \"image\": null,\n \"discussion_status\": \"hidden\"\n }\n ],\n \"image\": null\n }\n]"
+ }
+ ]
+ },
+ {
+ "name": "Followed Channels",
+ "request": {
+ "method": "GET",
+ "header": [],
+ "url": {
+ "raw": "{{server}}/{{base_url}}/channels",
+ "host": [
+ "{{server}}"
+ ],
+ "path": [
+ "{{base_url}}",
+ "channels"
+ ]
+ },
+ "description": "Get followed content for the current user"
+ },
+ "response": []
+ },
+ {
+ "name": "History",
+ "request": {
+ "method": "GET",
+ "header": [],
+ "url": {
+ "raw": "{{server}}/{{base_url}}/history",
+ "host": [
+ "{{server}}"
+ ],
+ "path": [
+ "{{base_url}}",
+ "history"
+ ]
+ },
+ "description": "List of History for currently logged in user"
+ },
+ "response": [
+ {
+ "name": "History",
+ "originalRequest": {
+ "method": "GET",
+ "header": [],
+ "url": {
+ "raw": "{{server}}/{{base_url}}/history",
+ "host": [
+ "{{server}}"
+ ],
+ "path": [
+ "{{base_url}}",
+ "history"
+ ]
+ }
+ },
+ "status": "OK",
+ "code": 200,
+ "_postman_previewlanguage": "json",
+ "header": [
+ {
+ "key": "Date",
+ "value": "Wed, 01 Sep 2021 20:48:45 GMT"
+ },
+ {
+ "key": "Content-Type",
+ "value": "application/json"
+ },
+ {
+ "key": "Content-Length",
+ "value": "385"
+ },
+ {
+ "key": "Connection",
+ "value": "keep-alive"
+ },
+ {
+ "key": "Set-Cookie",
+ "value": "AWSALB=iv3HLD40Em4VSIg7nqVzyhoRmK0qz0H9iuw805KxqI+72QhfCYA+xdO9zjGqJsQ39sHD3wr7EdtW0+lRnWCu7E5jSSk7HzMKWuISZ83LTRcnNz6aAK2gC6D+xDDa; Expires=Wed, 08 Sep 2021 20:48:44 GMT; Path=/"
+ },
+ {
+ "key": "Set-Cookie",
+ "value": "AWSALBCORS=iv3HLD40Em4VSIg7nqVzyhoRmK0qz0H9iuw805KxqI+72QhfCYA+xdO9zjGqJsQ39sHD3wr7EdtW0+lRnWCu7E5jSSk7HzMKWuISZ83LTRcnNz6aAK2gC6D+xDDa; Expires=Wed, 08 Sep 2021 20:48:44 GMT; Path=/; SameSite=None; Secure"
+ },
+ {
+ "key": "Server",
+ "value": "Apache"
+ },
+ {
+ "key": "X-Content-Type-Options",
+ "value": "nosniff"
+ },
+ {
+ "key": "X-Content-Type-Options",
+ "value": "nosniff"
+ },
+ {
+ "key": "Cache-Control",
+ "value": "must-revalidate, no-cache, private"
+ },
+ {
+ "key": "X-Drupal-Dynamic-Cache",
+ "value": "UNCACHEABLE"
+ },
+ {
+ "key": "X-UA-Compatible",
+ "value": "IE=edge"
+ },
+ {
+ "key": "Content-language",
+ "value": "en"
+ },
+ {
+ "key": "X-Frame-Options",
+ "value": "SAMEORIGIN"
+ },
+ {
+ "key": "Permissions-Policy",
+ "value": "interest-cohort=()"
+ },
+ {
+ "key": "Expires",
+ "value": "Sun, 19 Nov 1978 05:00:00 GMT"
+ },
+ {
+ "key": "Strict-Transport-Security",
+ "value": "max-age=31536000; includeSubdomains; preload"
+ },
+ {
+ "key": "X-XSS-Protection",
+ "value": "1; mode=block"
+ }
+ ],
+ "cookie": [],
+ "body": "[\n {\n \"id\": \"a055fba8-332a-4933-ae5b-dc301e42ab82\",\n \"nid\": 1022,\n \"vid\": 2741,\n \"url\": \"/node/1022\",\n \"name\": \"Virtual Event\",\n \"type\": \"event\",\n \"changed\": \"2021-08-31T17:41:29+0000\",\n \"is_promoted\": true,\n \"is_sticky\": false,\n \"file\": null,\n \"tags\": [\n {\n \"id\": \"ebc14d90-2ad9-4bcb-a7fd-7454efb25d55\",\n \"vid\": 283,\n \"tid\": 283,\n \"url\": \"/taxonomy/term/283\",\n \"name\": \"event\",\n \"type\": \"tags\",\n \"changed\": \"2021-08-27T07:15:27+0000\"\n }\n ]\n }\n]"
+ }
+ ]
+ },
+ {
+ "name": "Feature Switches",
+ "request": {
+ "method": "GET",
+ "header": [],
+ "url": {
+ "raw": "{{server}}/{{base_url}}/switches",
+ "host": [
+ "{{server}}"
+ ],
+ "path": [
+ "{{base_url}}",
+ "switches"
+ ]
+ },
+ "description": "List of configuration settings (like feature flags) for currently logged in user"
+ },
+ "response": [
+ {
+ "name": "Feature Switches",
+ "originalRequest": {
+ "method": "GET",
+ "header": [],
+ "url": {
+ "raw": "{{server}}/{{base_url}}/switches",
+ "host": [
+ "{{server}}"
+ ],
+ "path": [
+ "{{base_url}}",
+ "switches"
+ ]
+ }
+ },
+ "status": "OK",
+ "code": 200,
+ "_postman_previewlanguage": "json",
+ "header": [
+ {
+ "key": "Date",
+ "value": "Wed, 01 Sep 2021 20:48:53 GMT"
+ },
+ {
+ "key": "Content-Type",
+ "value": "application/json"
+ },
+ {
+ "key": "Content-Length",
+ "value": "222"
+ },
+ {
+ "key": "Connection",
+ "value": "keep-alive"
+ },
+ {
+ "key": "Set-Cookie",
+ "value": "AWSALB=rsW9s7uLNtnSb8l8pBmA1QKmIzuOU69tOOxSbkXpQGCn0pkndkmsxge6WY9vSxMxiXkqV7XeJeTOVhDp/ecPg0oQr7Oed4gFhX/40VU2S4r+5h0shTK9NHt8yyLM; Expires=Wed, 08 Sep 2021 20:48:53 GMT; Path=/"
+ },
+ {
+ "key": "Set-Cookie",
+ "value": "AWSALBCORS=rsW9s7uLNtnSb8l8pBmA1QKmIzuOU69tOOxSbkXpQGCn0pkndkmsxge6WY9vSxMxiXkqV7XeJeTOVhDp/ecPg0oQr7Oed4gFhX/40VU2S4r+5h0shTK9NHt8yyLM; Expires=Wed, 08 Sep 2021 20:48:53 GMT; Path=/; SameSite=None; Secure"
+ },
+ {
+ "key": "Server",
+ "value": "Apache"
+ },
+ {
+ "key": "X-Content-Type-Options",
+ "value": "nosniff"
+ },
+ {
+ "key": "X-Content-Type-Options",
+ "value": "nosniff"
+ },
+ {
+ "key": "Cache-Control",
+ "value": "must-revalidate, no-cache, private"
+ },
+ {
+ "key": "X-Drupal-Dynamic-Cache",
+ "value": "HIT"
+ },
+ {
+ "key": "X-UA-Compatible",
+ "value": "IE=edge"
+ },
+ {
+ "key": "Content-language",
+ "value": "en"
+ },
+ {
+ "key": "X-Frame-Options",
+ "value": "SAMEORIGIN"
+ },
+ {
+ "key": "Permissions-Policy",
+ "value": "interest-cohort=()"
+ },
+ {
+ "key": "Expires",
+ "value": "Sun, 19 Nov 1978 05:00:00 GMT"
+ },
+ {
+ "key": "Strict-Transport-Security",
+ "value": "max-age=31536000; includeSubdomains; preload"
+ },
+ {
+ "key": "X-XSS-Protection",
+ "value": "1; mode=block"
+ }
+ ],
+ "cookie": [],
+ "body": "{\n \"switches\": {\n \"achievements\": {\n \"status\": true\n },\n \"adaptive_learning\": {\n \"status\": true\n },\n \"new_dashboard\": {\n \"status\": true\n },\n \"offline_support\": {\n \"status\": true\n },\n \"podcast_support\": {\n \"status\": true\n },\n \"user_generated_content\": {\n \"status\": true\n }\n }\n}"
+ }
+ ]
+ },
+ {
+ "name": "Taxonomy",
+ "request": {
+ "method": "GET",
+ "header": [],
+ "url": {
+ "raw": "{{server}}/{{base_url}}/taxonomy/term/55",
+ "host": [
+ "{{server}}"
+ ],
+ "path": [
+ "{{base_url}}",
+ "taxonomy",
+ "term",
+ "55"
+ ]
+ },
+ "description": "List of nodes in the specified taxonomy term"
+ },
+ "response": [
+ {
+ "name": "Taxonomy",
+ "originalRequest": {
+ "method": "GET",
+ "header": [],
+ "url": {
+ "raw": "{{server}}/{{base_url}}/taxonomy/term/283",
+ "host": [
+ "{{server}}"
+ ],
+ "path": [
+ "{{base_url}}",
+ "taxonomy",
+ "term",
+ "283"
+ ]
+ }
+ },
+ "status": "OK",
+ "code": 200,
+ "_postman_previewlanguage": "json",
+ "header": [
+ {
+ "key": "Date",
+ "value": "Wed, 01 Sep 2021 20:49:27 GMT"
+ },
+ {
+ "key": "Content-Type",
+ "value": "application/json"
+ },
+ {
+ "key": "Content-Length",
+ "value": "385"
+ },
+ {
+ "key": "Connection",
+ "value": "keep-alive"
+ },
+ {
+ "key": "Set-Cookie",
+ "value": "AWSALB=8jTUUzoff5KEbdkRfFJOl4/j9RR9PfLKT7kGO78giYIHABmPfKTad+BnsI204EwDsrYVG+KVKDXxofh9qeX/e6sox0JPI2FA1KP1N+fM6HELnjLoS7jS9JBmH+Au; Expires=Wed, 08 Sep 2021 20:49:27 GMT; Path=/"
+ },
+ {
+ "key": "Set-Cookie",
+ "value": "AWSALBCORS=8jTUUzoff5KEbdkRfFJOl4/j9RR9PfLKT7kGO78giYIHABmPfKTad+BnsI204EwDsrYVG+KVKDXxofh9qeX/e6sox0JPI2FA1KP1N+fM6HELnjLoS7jS9JBmH+Au; Expires=Wed, 08 Sep 2021 20:49:27 GMT; Path=/; SameSite=None; Secure"
+ },
+ {
+ "key": "Server",
+ "value": "Apache"
+ },
+ {
+ "key": "X-Content-Type-Options",
+ "value": "nosniff"
+ },
+ {
+ "key": "X-Content-Type-Options",
+ "value": "nosniff"
+ },
+ {
+ "key": "Cache-Control",
+ "value": "must-revalidate, no-cache, private"
+ },
+ {
+ "key": "X-Drupal-Dynamic-Cache",
+ "value": "MISS"
+ },
+ {
+ "key": "X-UA-Compatible",
+ "value": "IE=edge"
+ },
+ {
+ "key": "Content-language",
+ "value": "en"
+ },
+ {
+ "key": "X-Frame-Options",
+ "value": "SAMEORIGIN"
+ },
+ {
+ "key": "Permissions-Policy",
+ "value": "interest-cohort=()"
+ },
+ {
+ "key": "Expires",
+ "value": "Sun, 19 Nov 1978 05:00:00 GMT"
+ },
+ {
+ "key": "Strict-Transport-Security",
+ "value": "max-age=31536000; includeSubdomains; preload"
+ },
+ {
+ "key": "X-XSS-Protection",
+ "value": "1; mode=block"
+ }
+ ],
+ "cookie": [],
+ "body": "[\n {\n \"id\": \"a055fba8-332a-4933-ae5b-dc301e42ab82\",\n \"nid\": 1022,\n \"vid\": 2741,\n \"url\": \"/node/1022\",\n \"name\": \"Virtual Event\",\n \"type\": \"event\",\n \"changed\": \"2021-08-31T17:41:29+0000\",\n \"is_promoted\": true,\n \"is_sticky\": false,\n \"file\": null,\n \"tags\": [\n {\n \"id\": \"ebc14d90-2ad9-4bcb-a7fd-7454efb25d55\",\n \"vid\": 283,\n \"tid\": 283,\n \"url\": \"/taxonomy/term/283\",\n \"name\": \"event\",\n \"type\": \"tags\",\n \"changed\": \"2021-08-27T07:15:27+0000\"\n }\n ]\n }\n]"
+ }
+ ]
+ },
+ {
+ "name": "Taxonomy, page 2",
+ "request": {
+ "method": "GET",
+ "header": [],
+ "url": {
+ "raw": "{{server}}/{{base_url}}/taxonomy/term/55?page=1",
+ "host": [
+ "{{server}}"
+ ],
+ "path": [
+ "{{base_url}}",
+ "taxonomy",
+ "term",
+ "55"
+ ],
+ "query": [
+ {
+ "key": "page",
+ "value": "1"
+ }
+ ]
+ },
+ "description": "List of nodes in the specified taxonomy term, second page"
+ },
+ "response": []
+ },
+ {
+ "name": "Prompts",
+ "request": {
+ "method": "GET",
+ "header": [],
+ "url": {
+ "raw": "{{server}}/api/prompts",
+ "host": [
+ "{{server}}"
+ ],
+ "path": [
+ "api",
+ "prompts"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "Current User goals update",
+ "request": {
+ "method": "PATCH",
+ "header": [],
+ "body": {
+ "mode": "raw",
+ "raw": "{\n \"id\": \"be7559d4-48b0-4ed4-af08-b47c52e19bf6\",\n \"goals\": {\n \"notification_days\": [\n \"sunday\",\n \"monday\",\n \"tuesday\"\n ],\n \"weekly_test_average\": \"42%\",\n \"monthly_course_completions\": 5,\n \"weekly_completions\": 2,\n \"weekly_views\": 3,\n \"notification_time\": \"11:32 AM\"\n }\n}",
+ "options": {
+ "raw": {
+ "language": "json"
+ }
+ }
+ },
+ "url": {
+ "raw": "{{server}}/{{base_url}}/user/me",
+ "host": [
+ "{{server}}"
+ ],
+ "path": [
+ "{{base_url}}",
+ "user",
+ "me"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "Podcasts",
+ "request": {
+ "method": "GET",
+ "header": [],
+ "url": {
+ "raw": "{{server}}/{{base_url}}/podcasts",
+ "host": [
+ "{{server}}"
+ ],
+ "path": [
+ "{{base_url}}",
+ "podcasts"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "Podcast Episode",
+ "request": {
+ "method": "GET",
+ "header": [],
+ "url": {
+ "raw": "{{server}}/{{base_url}}/podcasts/%uuid/episodes",
+ "host": [
+ "{{server}}"
+ ],
+ "path": [
+ "{{base_url}}",
+ "podcasts",
+ "%uuid",
+ "episodes"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "Dashboard",
+ "request": {
+ "method": "GET",
+ "header": [],
+ "url": {
+ "raw": "{{server}}/{{base_url}}/dashboard",
+ "host": [
+ "{{server}}"
+ ],
+ "path": [
+ "{{base_url}}",
+ "dashboard"
+ ]
+ },
+ "description": "Retrieve a list of contents of dashboard."
+ },
+ "response": [
+ {
+ "name": "Dashboard",
+ "originalRequest": {
+ "method": "GET",
+ "header": [],
+ "url": {
+ "raw": "{{server}}/{{base_url}}/dashboard",
+ "host": [
+ "{{server}}"
+ ],
+ "path": [
+ "{{base_url}}",
+ "dashboard"
+ ]
+ }
+ },
+ "status": "OK",
+ "code": 200,
+ "_postman_previewlanguage": "json",
+ "header": [
+ {
+ "key": "Cache-Control",
+ "value": "must-revalidate, no-cache, private"
+ },
+ {
+ "key": "Content-Encoding",
+ "value": "gzip"
+ },
+ {
+ "key": "Content-Language",
+ "value": "en"
+ },
+ {
+ "key": "Content-Type",
+ "value": "application/json"
+ },
+ {
+ "key": "Date",
+ "value": "Wed, 26 May 2021 10:24:02 GMT"
+ },
+ {
+ "key": "Expires",
+ "value": "Sun, 19 Nov 1978 05:00:00 GMT"
+ },
+ {
+ "key": "Server",
+ "value": "nginx"
+ },
+ {
+ "key": "Vary",
+ "value": "Accept-Encoding"
+ },
+ {
+ "key": "X-Content-Type-Options",
+ "value": "nosniff"
+ },
+ {
+ "key": "X-Drupal-Cache-Contexts",
+ "value": "languages:language_interface user"
+ },
+ {
+ "key": "X-Drupal-Cache-Max-Age",
+ "value": "-1 (Permanent)"
+ },
+ {
+ "key": "X-Drupal-Cache-Tags",
+ "value": "config:rest.resource.site_dashboard_resource http_response page_manager_route_name:rest.site_dashboard_resource.GET"
+ },
+ {
+ "key": "X-Drupal-Dynamic-Cache",
+ "value": "MISS"
+ },
+ {
+ "key": "X-Frame-Options",
+ "value": "SAMEORIGIN"
+ },
+ {
+ "key": "X-Generator",
+ "value": "Drupal 9 (https://www.drupal.org)"
+ },
+ {
+ "key": "X-Ua-Compatible",
+ "value": "IE=edge"
+ },
+ {
+ "key": "X-Xss-Protection",
+ "value": "1; mode=block"
+ },
+ {
+ "key": "Content-Length",
+ "value": "227"
+ }
+ ],
+ "cookie": [],
+ "body": "[\n {\n \"layout\": \"layout_onecol\",\n \"blocks\": [\n {\n \"name\": \"My groups\",\n \"entity\": \"group\",\n \"template\": \"chip\",\n \"contents_url\": \"/api/groups\"\n }\n ]\n },\n {\n \"layout\": \"tabs\",\n \"blocks\": [\n {\n \"name\": \"Recommended Content\",\n \"entity\": \"node\",\n \"template\": \"card\",\n \"contents_url\": \"/api/recommendations\"\n },\n {\n \"name\": \"Recent Content\",\n \"entity\": \"node\",\n \"template\": \"tile\",\n \"contents_url\": \"/api/recent\"\n },\n {\n \"name\": \"Trending\",\n \"entity\": \"node\",\n \"template\": \"card\",\n \"contents_url\": \"/api/trending\"\n }\n ]\n },\n {\n \"layout\": \"layout_onecol\",\n \"blocks\": [\n {\n \"name\": \"Recently viewed\",\n \"entity\": \"node\",\n \"template\": \"tile\",\n \"contents_url\": \"/api/history\"\n }\n ]\n }\n]"
+ }
+ ]
+ }
+ ],
+ "auth": {
+ "type": "oauth2",
+ "oauth2": [
+ {
+ "key": "accessTokenUrl",
+ "value": "{{server}}/oauth/token",
+ "type": "string"
+ },
+ {
+ "key": "redirect_uri",
+ "value": "https://example.com/auth",
+ "type": "string"
+ },
+ {
+ "key": "tokenType",
+ "value": "Bearer",
+ "type": "string"
+ },
+ {
+ "key": "accessToken",
+ "value": "",
+ "type": "string"
+ },
+ {
+ "key": "clientSecret",
+ "value": "{{client_secret}}",
+ "type": "string"
+ },
+ {
+ "key": "clientId",
+ "value": "{{client_id}}",
+ "type": "string"
+ },
+ {
+ "key": "authUrl",
+ "value": "{{server}}/oauth/authorize",
+ "type": "string"
+ },
+ {
+ "key": "useBrowser",
+ "value": false,
+ "type": "boolean"
+ },
+ {
+ "key": "addTokenTo",
+ "value": "header",
+ "type": "string"
+ }
+ ]
+ },
+ "event": [
+ {
+ "listen": "prerequest",
+ "script": {
+ "type": "text/javascript",
+ "exec": [
+ ""
+ ]
+ }
+ },
+ {
+ "listen": "test",
+ "script": {
+ "type": "text/javascript",
+ "exec": [
+ ""
+ ]
+ }
+ }
+ ]
+}
\ No newline at end of file
diff --git a/readme/maintenance.md b/readme/maintenance.md
new file mode 100644
index 0000000..697ae65
--- /dev/null
+++ b/readme/maintenance.md
@@ -0,0 +1,62 @@
+# Maintenance
+The system administrator may perform the several tasks using the web application. Below highlight tasks significant to set up, maintain, and debug the system. All tasks assume the user is logged into the web application and has the proper permission.
+## Edit system name
+1. Go to Configuration in the top menu.
+2. Find the System category and go to Site Information.
+3. Edit the Site Name field.
+4. Save the changes.
+
+## Adding System Admin User
+1. Go to People in the top menu.
+2. Go to Add User
+3. Fill out required fields in form
+4. Ensure user has role of SysAdmin
+5. Save the changes.
+
+## Removing System Admin User
+1. Go to People in the top menu.
+2. Find or search for the user
+3. Cancel Account and confirm
+
+## Manually Execute Cron
+1. Go to Configuration in the top menu.
+2. Find the System category and go to Cron.
+3. Run cron
+
+## Clear System Cache
+1. Go to Configuration in the top menu.
+2. Find the Development category and go to Performance.
+3. Clear all caches
+
+## Take System Offline for Maintenance
+1. Go to Configuration in the top menu.
+2. Find the Development category and go to Maintenance mode
+3. Check the “Put site into maintenance mode” box to put the site offline
+4. Save the changes.
+
+## Put System Online from Maintenance
+1. Go to Configuration in the top menu.
+2. Find the Development category and go to Maintenance mode
+3. Un-check the “Put site into maintenance mode” box to put the site offline
+4. Save the changes.
+
+## View System Status Report
+1. Go to Reports in the top menu.
+2. Go to Status report
+
+## View System Logs
+1. Go to Reports in the top menu.
+2. Go to Recent log messages
+
+## Manage Target LRS Endpoints
+1. Go to Configuration in the top menu.
+2. Find the System category and go to XAPI Content
+3. Fill out the required fields
+4. Save the changes.
+
+## Manage Recommendation Plugins
+1. Go to Configuration in the top menu.
+2. Find the System category and go to Recommendations Engine Configuration
+3. Update the required fields
+4. Save the changes.
+
diff --git a/readme/perls_tenants.md b/readme/perls_tenants.md
new file mode 100644
index 0000000..98272b9
--- /dev/null
+++ b/readme/perls_tenants.md
@@ -0,0 +1,18 @@
+#Tenant Deployment Processes
+
+##New Tenant Deploy
+1. SSH in the utility.perls.usalearning.net as the centos. Only administrators with explicitly allowed IP addresses and the centos private key will be able to login.
+2. Change directory to /home/centos/perls. "cd /home/centos/perls"
+3. Create the tenant.env file based on the scripts/perls_tenants/sample_tenant.env file.
+4. Run the command "bash make_tenant.sh".
+
+##Tenant Update
+1. SSH in the utility.perls.usalearning.net as the centos. Only administrators with explicitly allowed IP addresses and the centos private key will be able to login.
+2. Change directory in the the tenant's home directory. "cd /var/www/
"
+3. Update the VERSION variable to the version of the CMS you are upgrading to.
+4. Run the command "bash scripts/perls_tenants/bash update_tenant.sh"
+
+##Tenant Deletion
+1. SSH in the utility.perls.usalearning.net as the centos. Only administrators with explicitly allowed IP addresses and the centos private key will be able to login.
+2. Change directory to /home/centos/perls. "cd /home/centos/perls"
+3. Run the command "bash delete_tenant.sh "
diff --git a/readme/security.md b/readme/security.md
new file mode 100644
index 0000000..2bcf13f
--- /dev/null
+++ b/readme/security.md
@@ -0,0 +1,11 @@
+# Security
+
+## Drupal
+Drupal has been proven to be reliable and fight against critical internet vulnerabilities. Go here for more information about [Drupal Security](https://www.drupal.org/features/security).
+
+In general the best way to stay protected is by keeping the system up to date. Drupal has checks on the [Status Report](./maintenance.md#View-System-Status-Report) to ensure you are up to date.
+
+## REST API
+The REST API is necessary for the mobile application to communicate with the web application. It uses oAuth2 to authenticate requests using the [Simple oAuth module](https://www.drupal.org/project/simple_oauth). To be secure, it is necessary the public and private keys this modules uses are not accessible via the web.
+
+Users request OAuth tokens via the `/login` endpoint. These tokens have an expiration time, which can be set by the System Administrator. The tokens can be revoked manually by the System Administrator.
diff --git a/readme/troubleshooting.md b/readme/troubleshooting.md
new file mode 100644
index 0000000..9fd9f2c
--- /dev/null
+++ b/readme/troubleshooting.md
@@ -0,0 +1,33 @@
+# Troubleshooting
+
+## Build script fails
+
+If the `build.sh` script fails with a database message, running it a second time may work.
+
+## Drupal Warning - Permissions
+
+There may be permissions issues running on MacOS; there are slightly different permissions
+between the Linux Docker image and MacOS. This can occur after clearing the cache.
+If there are permission errors, running
+`chmod 777 web/sites/default && mkdir -p web/sites/default/files/php/twig` might help.
+
+## Drush from host
+
+For drush to work from the host it needs access to the code base and a
+database connection. The code base is already accessable as long as we
+are somewhere inside the web/ folder. For drush to see our docker container
+datatbase, we need to add a line to our host file:
+
+If your .env DB_HOST is mariadb, then your host file line would need to look like this:
+
+On Mac, edit /private/etc/hosts with elevated privileges.
+
+127.0.0.1 mariadb
+
+*mariadb matches the docker-compose container for the project database.
+Changing DB_HOST in the .env file would require the docker-compose.yml
+file to be updated as well. This is not advised.
+
+If you are having problems running drush locally, you may need to export .env variables.
+ set -a
+ source .env
diff --git a/scripts/backup_db.sh b/scripts/backup_db.sh
new file mode 100755
index 0000000..9e03b96
--- /dev/null
+++ b/scripts/backup_db.sh
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+set -e
+
+echo "== Backing up local database to db_backup.sql..."
+echo " Database backup can be skipped with the -n flag"
+drush sql:dump > db_backup.sql
\ No newline at end of file
diff --git a/scripts/build.sh b/scripts/build.sh
new file mode 100755
index 0000000..d9d02c7
--- /dev/null
+++ b/scripts/build.sh
@@ -0,0 +1,129 @@
+#!/bin/bash
+
+set -e
+
+backup=true
+sync_local=''
+force_build=false
+code_sniff=false
+export target=dev
+build_arg=''
+
+print_usage() {
+ echo "build.sh Fully build site with docker."
+ echo " "
+ echo "build.sh [options]"
+ echo " "
+ echo "options:"
+ echo "-h, --help show brief help"
+ echo "-n do not backup the database upon successful build"
+ echo "-l, -f use local db_backup.sql file for database, the existing local db will be wiped out when docker restarts"
+ echo "-b force rebuild app image (ex. for Dockerfile changes)"
+ echo "-s run phpcs from vendor directory on this project"
+}
+
+source "${BASH_SOURCE%/*}/git_hooks/copy_hooks.sh"
+
+while getopts 'nlfbs' flag; do
+ case "${flag}" in
+ l) sync_local="-f" ;;
+ f) sync_local="-f" ;;
+ n) backup=false ;;
+ b) force_build=true ;;
+ s) code_sniff=true ;;
+ *) print_usage
+ exit 1 ;;
+ esac
+done
+
+#Make sure environmental variables are setup
+if [[ ! -f .env ]]; then
+ if [[ -f .env.example ]]; then
+ echo "No .env file found. Copying .env.example to .env"
+ cp .env.example .env
+ fi
+fi
+
+#Make sure settings.local.php exists for new projects
+if [[ ! -f web/sites/default/settings.local.php ]]; then
+ if [[ -f web/sites/default/default.settings.local.php ]]; then
+ echo "No settings.local.php file found. Copying default.settings.local.php to settings.local.php"
+ cp web/sites/default/default.settings.local.php web/sites/default/settings.local.php
+ fi
+fi
+
+# Load environmental variables
+set -a
+source .env
+
+# Reset any previously created containers
+echo "Cleaning up any previous containers..."
+docker network disconnect -f ${PROJECT_NAME}_network chrome || true
+docker-compose down -v || true
+
+docker_compose_files='-f docker-compose.yml'
+
+if [[ "$force_build" == true ]]; then
+ build_arg='--build'
+fi
+
+echo "Starting docker using this config: $docker_compose_files"
+docker-compose up -d $build_arg
+
+
+# The drupal install might error if the docker containers are not fully ready.
+# Giving the docker containers a few extra moments here seems to fix the issue.
+sleep 3
+
+# Do not allow a build with an out of data lock file
+docker exec ${PROJECT_NAME}_php composer validate --no-check-all --no-check-publish && echo "pass" || exit 1
+
+# Update dependencies
+docker exec ${PROJECT_NAME}_php composer install -n && echo "pass" || exit 1
+
+if [[ "$code_sniff" == true ]]; then
+ # Run code sniffer
+ echo "== Check code styles with phpcs..."
+ # Run the sniffer a second time to generate a report only on fail.
+ docker exec ${PROJECT_NAME}_php vendor/bin/phpcs --standard=Drupal --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md '--ignore=node_modules,bower_components,vendor,*.min.js,*.min.css' web/modules/custom web/themes/custom \
+ || docker exec ${PROJECT_NAME}_php vendor/bin/phpcs --report=checkstyle --report-file=checkstyle.xml --standard=Drupal --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md '--ignore=node_modules,bower_components,vendor,*.min.js,*.min.css' web/modules/custom web/themes/custom
+fi
+
+# Set up proper settings file
+chmod 755 web/sites/default
+
+# Add default drupal core to solr server.
+cores=$(docker exec -it ${PROJECT_NAME}_solr curl -s "http://localhost:8983/solr/admin/cores?action=STATUS" | { grep -c "instanceDir" || true; })
+
+sleep 10
+
+if [[ "${cores}" == 0 ]]; then
+ echo "No solr cores found, creating a drupal core"
+ docker exec ${PROJECT_NAME}_solr make create core="drupal" -f /usr/local/bin/actions.mk
+fi
+
+# Execute this script from inside docker container.
+# This wipes the db, copies db from stage and imports config.
+docker exec ${PROJECT_NAME}_php scripts/sync_site.sh $sync_local
+
+# This is the earliest point that we have a stable DB to backup
+if [[ "$backup" == true ]]; then
+ docker exec ${PROJECT_NAME}_php scripts/backup_db.sh
+fi
+
+# Generate Keys
+echo "== Generating Keys..."
+if [[ ! -d private ]]; then
+ mkdir private
+fi
+cd private
+if [[ ! -f private.key ]]; then
+ openssl genrsa -out private.key 2048
+fi
+if [[ ! -f public.key ]]; then
+ openssl rsa -in private.key -pubout > public.key
+fi
+chmod 600 private.key && chmod 600 public.key
+cd ..
+
+echo "http://${PROJECT_NAME}.localhost:8000 username: admin@example.com password: password"
diff --git a/scripts/generate_content.sh b/scripts/generate_content.sh
new file mode 100755
index 0000000..9640cac
--- /dev/null
+++ b/scripts/generate_content.sh
@@ -0,0 +1,7 @@
+#!/usr/bin/env bash
+set -e
+drush genu 50;
+
+echo "Finished generating content.";
+
+drush sapi-i;
\ No newline at end of file
diff --git a/scripts/git_hooks/copy_hooks.sh b/scripts/git_hooks/copy_hooks.sh
new file mode 100755
index 0000000..0de0087
--- /dev/null
+++ b/scripts/git_hooks/copy_hooks.sh
@@ -0,0 +1,12 @@
+#!/usr/bin/env bash
+
+#Copy pre-commit git hook
+if [[ -d ".git" && -f "scripts/git_hooks/pre-commit" ]]; then
+ if [[ ! -d ".git/hooks" ]]; then
+ echo "== .git/hooks directory not found. Creating it ..."
+ mkdir .git/hooks
+ fi
+ echo "== Copying scripts/git_hooks/pre-commit to .git/hooks/pre-commit ..."
+ cp scripts/git_hooks/pre-commit .git/hooks/pre-commit
+fi
+
diff --git a/scripts/git_hooks/pre-commit b/scripts/git_hooks/pre-commit
new file mode 100755
index 0000000..f20221f
--- /dev/null
+++ b/scripts/git_hooks/pre-commit
@@ -0,0 +1,44 @@
+#!/bin/bash
+echo "== Running code style checks in git pre-commit hook..."
+
+vendor/bin/phpcs --standard=Drupal --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md '--ignore=node_modules,bower_components,vendor,*.min.js,*.min.css' web/modules/custom web/themes/custom
+
+if [[ $? -eq 0 ]]
+then
+ echo "== Code style check passed..."
+else
+ printf "== Code style issues found.\n Try to auto fix errors with:\n vendor/bin/phpcbf --standard=Drupal --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md '--ignore=node_modules,bower_components,vendor,*.min.js,*.min.css' web/modules/custom web/themes/custom"
+ exit 1
+fi
+
+scan_deprecations() {
+ echo "== Running drupal-check to check for Drupal 9 incompatibility..."
+
+ # Paths the scan.
+ module_path='web/modules/custom'
+ theme_path='web/themes/custom'
+ scan_command="./vendor/bin/drupal-check -d --no-progress"
+
+ # Scan modules first for deprecation.
+ scan_output=$($scan_command $module_path)
+
+ pattern='(\[ERROR\] Found )'
+
+ if [[ $scan_output =~ $pattern ]]; then
+ echo "$scan_output";
+ echo "Use of deprecated code found in '$module_path'. Please run '$scan_command $module_path' and fix the deprecations."
+ exit 1;
+ fi
+
+ # Scan themes for deprecation.
+ scan_output=$($scan_command $theme_path)
+
+ if [[ $scan_output =~ $pattern ]]; then
+ echo "$scan_output";
+ echo "Use of deprecated code found in '$theme_path'. Please run '$scan_command $theme_path' and fix the deprecations."
+ exit 1;
+ fi
+
+}
+# TODO: Uncomment this to run deprecations scan after the codebase has deprications fixed
+# scan_deprecations
diff --git a/scripts/package_functions.sh b/scripts/package_functions.sh
new file mode 100644
index 0000000..1330b74
--- /dev/null
+++ b/scripts/package_functions.sh
@@ -0,0 +1,46 @@
+#!/bin/bash
+if [ ! -d "venv/lib/python3.8/site-packages/" ]
+then
+ python3 -m venv venv
+ source venv/bin/activate
+ pip3 install -r admin_api/lambda_functions/requirements.txt
+fi
+mkdir functions
+cd venv/lib/python3.8/site-packages/
+zip -r ../../../../functions/lambda_package.zip .
+cd ../../../../admin_api/lambda_functions/create/
+cp ../../functions/lambda_package.zip ../../functions/admin_container.zip
+cp ../../functions/lambda_package.zip ../../functions/create_db.zip
+cp ../../functions/lambda_package.zip ../../functions/create_passwords.zip
+cp ../../functions/lambda_package.zip ../../functions/create_stack.zip
+cp ../../functions/lambda_package.zip ../../functions/create_lrs.zip
+cp ../../functions/lambda_package.zip ../../functions/create_solr_fs.zip
+cp ../../functions/lambda_package.zip ../../functions/admin_container.zip
+cp ../../functions/lambda_package.zip ../../functions/update_stack.zip
+cp ../../functions/lambda_package.zip ../../functions/update.zip
+cp ../../functions/lambda_package.zip ../../functions/config_export.zip
+cp ../../functions/lambda_package.zip ../../functions/invoke_delete.zip
+cp ../../functions/lambda_package.zip ../../functions/delete_tenant.zip
+cp ../../functions/lambda_package.zip ../../functions/tenant_status.zip
+cp ../../functions/lambda_package.zip ../../functions/tenant_list.zip
+cp ../../functions/lambda_package.zip ../../functions/cron.zip
+cp ../../functions/lambda_package.zip ../../functions/get_versions.zip
+zip -g ../../functions/create_db.zip create_db.py
+zip -g ../../functions/create_passwords.zip create_passwords.py
+zip -g ../../functions/create_stack.zip create_stack.py
+zip -g ../../functions/create_lrs.zip create_lrs.py
+zip -g ../../functions/create_solr_fs.zip create_solr_fs.py
+cd ../
+zip -g ../functions/admin_container.zip admin_container.py
+cd update
+zip -g ../../functions/update_stack.zip update_stack.py
+zip -g ../../functions/update.zip update.py
+zip -g ../../functions/config_export.zip config_export.py
+cd ../delete
+zip -g ../../functions/delete_tenant.zip delete_tenant.py
+cd ../status
+zip -g ../../functions/tenant_status.zip tenant_status.py
+zip -g ../../functions/tenant_list.zip tenant_list.py
+zip -g ../../functions/get_versions.zip get_versions.py
+cd ../../
+aws s3 cp functions s3://$1/functions --recursive --profile $2
diff --git a/scripts/perls_tenants/PERLS_tenant.yml b/scripts/perls_tenants/PERLS_tenant.yml
new file mode 100644
index 0000000..cae9ea7
--- /dev/null
+++ b/scripts/perls_tenants/PERLS_tenant.yml
@@ -0,0 +1,527 @@
+AWSTemplateFormatVersion: 2010-09-09
+Description: Used by bash scripts for managing PERLS tenants.
+Parameters:
+ TENANT:
+ Description: The name of the TENANT
+ Type: String
+ DBPASSWORD:
+ Description: Password for MySQL
+ Type: String
+ SMTPPASSWORD:
+ Description: Password for Email account
+ Type: String
+ PRIORITY:
+ Description: Where to put the listener rule in the LB config
+ Type: Number
+ LRSHOST:
+ Description: Endpoint for TENANT's xapi statements to be sent
+ Type: String
+ LRSUSERNAME:
+ Description: Username for the LRS
+ Type: String
+ LRSPASSWORD:
+ Description: Password for the LRS
+ Type: String
+ REDISTASKDEFVER:
+ Description: Which Task definition to use for Redis
+ Type: Number
+ Default: 1
+ SMTPUSERNAME:
+ Description: User for Email account
+ Type: String
+ SMTPHOST:
+ Description: Host for SMTP Connection
+ Type: String
+ SMTPFROM:
+ Description: Email to send from
+ Type: String
+ SMTPPORT:
+ Description: Port for SMTP connection
+ Type: String
+ SMTPPROTOCOL:
+ Description: Protocol for SMTP connections(SSL or TLS)
+ Type: String
+ Default: tls
+ VERSION:
+ Description: Version of the Container
+ Type: String
+ TASKDEFVER:
+ Description: Which Task definition to use
+ Type: Number
+ Default: 1
+ SOLRTASKDEFVER:
+ Description: Which Task definition to use for SOLR
+ Type: Number
+ Default: 1
+ SIMPLESAMLAUTHSOURCE:
+ Description: SAML auth source
+ Type: String
+ Default: perls
+ SIMPLESAMLCONFIGDIR:
+ Description: Directory location of SAML config
+ Type: String
+ Default: "/var/www/html/private/saml_config"
+ ALTHost:
+ Description: Additional hostname to add to trusted hosts in settings.php
+ Type: String
+ Default: ''
+ SIMPLESAMLHOST:
+ Description: Base address of the CMS. Only used in conjunction with ALTHost
+ Type: String
+ Default: ''
+ StackName:
+ Description: Name of the initial environment stack.
+ Type: String
+ Default: PERLS
+
+Resources:
+ TaskDefinitionPHP:
+ DependsOn: [EFSPublicAP, EFSPrivateAP, CloudWatchLogGroup]
+ Type: AWS::ECS::TaskDefinition
+ Properties:
+ ContainerDefinitions:
+ - Name: PERLS-php
+ Environment:
+ - Name: DB_DRIVER
+ Value: mysql
+ - Name: DB_HOST
+ Value:
+ Fn::ImportValue:
+ !Sub "PERLS-RDS"
+ - Name: DB_NAME
+ Value: !Sub ${TENANT}_PERLS
+ - Name: DB_PORT
+ Value: 3306
+ - Name: DB_USER
+ Value: perls_user
+ - Name: DRUPAL_SOLR_HOST
+ Value: !Sub ${TENANT}.solr.perls.net
+ - Name: SMTP_USERNAME
+ Value: !Sub ${SMTPUSERNAME}
+ - Name: DB_PASSWORD
+ Value: !Sub ${DBPASSWORD}
+ - Name: SMTP_PASSWORD
+ Value: !Sub ${SMTPPASSWORD}
+ - Name: LRS_HOST
+ Value: !Sub ${LRSHOST}
+ - Name: LRS_USERNAME
+ Value: !Sub ${LRSUSERNAME}
+ - Name: LRS_PASSWORD
+ Value: !Sub ${LRSPASSWORD}
+ - Name: SMTP_FROM
+ Value: !Sub ${SMTPFROM}
+ - Name: SMTP_HOST
+ Value: !Sub ${SMTPHOST}
+ - Name: SMTP_PORT
+ Value: !Sub ${SMTPPORT}
+ - Name: SMTP_PROTOCOL
+ Value: !Sub ${SMTPPROTOCOL}
+ - Name: BRAND
+ Value: PERLS
+ - Name: SIMPLESAML_AUTH_SOURCE
+ Value: !Sub ${SIMPLESAMLAUTHSOURCE}
+ - Name: SIMPLESAML_CONFIG_DIR
+ Value: !Sub ${SIMPLESAMLCONFIGDIR}
+ - Name: REDIS_HOST
+ Value: !Sub ${TENANT}-redis.internalservice
+ - Name: ADDITIONAL_TRUSTED_HOST
+ Value: !Sub ${ALTHost}
+ MountPoints:
+ - SourceVolume: public
+ ContainerPath: /var/www/html/web/sites/default/files
+ - SourceVolume: private
+ ContainerPath: /var/www/html/private
+ Image:
+ Fn::Join:
+ - ''
+ - - !Sub ${AWS::AccountId}
+ - '.dkr.ecr.us-east-1.amazonaws.com/perls:'
+ - !Sub ${VERSION}
+ PortMappings:
+ - containerPort: 80
+ LogConfiguration:
+ LogDriver: awslogs
+ Options:
+ awslogs-region: us-east-1
+ awslogs-group: !Sub ${TENANT}
+ awslogs-stream-prefix: php
+ Cpu: 512
+ ExecutionRoleArn:
+ Fn::ImportValue: PERLS-ECSTaskExecutionRole
+ Family: !Sub ${TENANT}-php-task
+ Memory: 1024
+ NetworkMode: awsvpc
+ RequiresCompatibilities:
+ - FARGATE
+ Volumes:
+ -
+ EFSVolumeConfiguration:
+ AuthorizationConfig:
+ AccessPointId: !Ref EFSPublicAP
+ IAM: DISABLED
+ FilesystemId:
+ Fn::ImportValue: "PERLS-EFS"
+ TransitEncryption: ENABLED
+ Name: public
+ -
+ EFSVolumeConfiguration:
+ AuthorizationConfig:
+ AccessPointId: !Ref EFSPrivateAP
+ IAM: DISABLED
+ FilesystemId:
+ Fn::ImportValue: PERLS-EFS
+ TransitEncryption: ENABLED
+ Name: private
+
+ TaskDefinitionSOLR:
+ DependsOn: [EFSSolrAP, CloudWatchLogGroup]
+ Type: AWS::ECS::TaskDefinition
+ Properties:
+ RequiresCompatibilities:
+ - FARGATE
+ Cpu: 256
+ Memory: 512
+ ExecutionRoleArn:
+ Fn::ImportValue: PERLS-ECSTaskExecutionRole
+ NetworkMode: awsvpc
+ ContainerDefinitions:
+ - Name: PERLS-solr
+ MountPoints:
+ - SourceVolume: solr
+ ContainerPath: /var/solr/data
+ Image: solr:8
+ PortMappings:
+ - containerPort: 8983
+ LogConfiguration:
+ LogDriver: awslogs
+ Options:
+ awslogs-region: us-east-1
+ awslogs-group: !Sub ${TENANT}
+ awslogs-stream-prefix: solr
+ Volumes:
+ -
+ EFSVolumeConfiguration:
+ AuthorizationConfig:
+ AccessPointId: !Ref EFSSolrAP
+ IAM: DISABLED
+ FilesystemId:
+ Fn::ImportValue: PERLS-EFS
+ TransitEncryption: ENABLED
+ Name: solr
+ Family: !Sub ${TENANT}-solr-task
+
+ TaskDefinitionRedis:
+ DependsOn: [EFSSolrAP, CloudWatchRedisLogGroup]
+ Type: AWS::ECS::TaskDefinition
+ Properties:
+ RequiresCompatibilities:
+ - FARGATE
+ Cpu: 256
+ Memory: 512
+ ExecutionRoleArn:
+ Fn::ImportValue: PERLS-ECSTaskExecutionRole
+ NetworkMode: awsvpc
+ ContainerDefinitions:
+ - Name: !Sub ${TENANT}-redis
+ Image: redis:6
+ PortMappings:
+ - containerPort: 6379
+ LogConfiguration:
+ LogDriver: awslogs
+ Options:
+ awslogs-region: us-east-1
+ awslogs-stream-prefix: redis
+ awslogs-group: !Sub ${TENANT}-redis
+ Family: !Sub ${TENANT}-redis-task
+
+ ServicePHP:
+ DependsOn: [ListenerRulePHP, TaskDefinitionPHP]
+ Type: AWS::ECS::Service
+ Properties:
+ PlatformVersion: 1.4.0
+ ServiceName: !Sub ${TENANT}-php-svc
+ Cluster:
+ Fn::ImportValue: PERLS-ECSCluster
+ TaskDefinition: !Sub ${TENANT}-php-task:${TASKDEFVER}
+ NetworkConfiguration:
+ AwsvpcConfiguration:
+ AssignPublicIp: ENABLED
+ SecurityGroups:
+ - Fn::ImportValue: PERLS-SGECS
+ Subnets:
+ - Fn::ImportValue: PERLS-PrivateSubnet1
+ - Fn::ImportValue: PERLS-PrivateSubnet2
+ - Fn::ImportValue: PERLS-PrivateSubnet3
+ - Fn::ImportValue: PERLS-PrivateSubnet4
+ - Fn::ImportValue: PERLS-PrivateSubnet5
+ - Fn::ImportValue: PERLS-PrivateSubnet6
+
+ DeploymentConfiguration:
+ MaximumPercent: 200
+ MinimumHealthyPercent: 50
+ SchedulingStrategy: REPLICA
+ DesiredCount: 1
+ LaunchType: FARGATE
+ EnableECSManagedTags: true
+ HealthCheckGracePeriodSeconds: 30
+ LoadBalancers:
+ - ContainerName: PERLS-php
+ ContainerPort: 80
+ TargetGroupArn: !Ref TargetGroupPHP
+ Tags:
+ - Key: TENANT
+ Value: !Sub ${TENANT}
+
+ ServiceSOLR:
+ DependsOn: [ListenerRuleSOLR, TaskDefinitionSOLR]
+ Type: AWS::ECS::Service
+ Properties:
+ PlatformVersion: 1.4.0
+ ServiceName: !Sub ${TENANT}-solr-svc
+ Cluster:
+ Fn::ImportValue: PERLS-ECSCluster
+ TaskDefinition: !Sub ${TENANT}-solr-task:${SOLRTASKDEFVER}
+ NetworkConfiguration:
+ AwsvpcConfiguration:
+ AssignPublicIp: ENABLED
+ SecurityGroups:
+ - Fn::ImportValue: PERLS-SGSolr
+ Subnets:
+ - Fn::ImportValue: PERLS-PrivateSubnet1
+ - Fn::ImportValue: PERLS-PrivateSubnet2
+ - Fn::ImportValue: PERLS-PrivateSubnet3
+ - Fn::ImportValue: PERLS-PrivateSubnet4
+ - Fn::ImportValue: PERLS-PrivateSubnet5
+ - Fn::ImportValue: PERLS-PrivateSubnet6
+ DeploymentConfiguration:
+ MaximumPercent: 200
+ MinimumHealthyPercent: 50
+ SchedulingStrategy: REPLICA
+ DesiredCount: 1
+ LaunchType: FARGATE
+ EnableECSManagedTags: true
+ HealthCheckGracePeriodSeconds: 30
+ LoadBalancers:
+ - ContainerName: PERLS-solr
+ ContainerPort: 8983
+ TargetGroupArn: !Ref TargetGroupSOLR
+ Tags:
+ - Key: TENANT
+ Value: !Sub ${TENANT}
+
+ RedisDiscoveryService:
+ Type: AWS::ServiceDiscovery::Service
+ Properties:
+ Description: Discovery Service for Redis
+ DnsConfig:
+ RoutingPolicy: MULTIVALUE
+ DnsRecords:
+ - TTL: 60
+ Type: A
+ HealthCheckCustomConfig:
+ FailureThreshold: 1
+ Name: !Sub ${TENANT}-redis
+ NamespaceId:
+ Fn::ImportValue: PERLS-ServiceDiscovery
+
+ ServiceRedis:
+ DependsOn: [ TaskDefinitionRedis, RedisDiscoveryService ]
+ Type: AWS::ECS::Service
+ Properties:
+ PlatformVersion: 1.4.0
+ ServiceName: !Sub ${TENANT}-redis-svc
+ Cluster:
+ Fn::ImportValue: PERLS-ECSCluster
+ TaskDefinition: !Sub ${TENANT}-redis-task:${REDISTASKDEFVER}
+ NetworkConfiguration:
+ AwsvpcConfiguration:
+ AssignPublicIp: ENABLED
+ SecurityGroups:
+ - Fn::ImportValue: PERLS-SGRedis
+ Subnets:
+ - Fn::ImportValue: PERLS-PrivateSubnet1
+ - Fn::ImportValue: PERLS-PrivateSubnet2
+ - Fn::ImportValue: PERLS-PrivateSubnet3
+ - Fn::ImportValue: PERLS-PrivateSubnet4
+ - Fn::ImportValue: PERLS-PrivateSubnet5
+ - Fn::ImportValue: PERLS-PrivateSubnet6
+ DeploymentConfiguration:
+ MaximumPercent: 200
+ MinimumHealthyPercent: 50
+ SchedulingStrategy: REPLICA
+ DesiredCount: 1
+ LaunchType: FARGATE
+ EnableECSManagedTags: true
+ ServiceRegistries:
+ - RegistryArn: !GetAtt RedisDiscoveryService.Arn
+ Tags:
+ - Key: TENANT
+ Value: !Sub ${TENANT}
+
+ ListenerRulePHP:
+ DependsOn: TargetGroupPHP
+ Type: AWS::ElasticLoadBalancingV2::ListenerRule
+ Properties:
+ Actions:
+ - Type: forward
+ TargetGroupArn: !Ref TargetGroupPHP
+ Conditions:
+ - Field: host-header
+ HostHeaderConfig:
+ Values:
+ - !Sub ${TENANT}.perls.usalearning.net
+ ListenerArn:
+ Fn::ImportValue: PERLS-AppLBListener
+ Priority: !Sub ${PRIORITY}
+
+ ListenerRuleSOLR:
+ DependsOn: TargetGroupSOLR
+ Type: AWS::ElasticLoadBalancingV2::ListenerRule
+ Properties:
+ Actions:
+ - Type: forward
+ TargetGroupArn: !Ref TargetGroupSOLR
+ Conditions:
+ - Field: host-header
+ HostHeaderConfig:
+ Values:
+ - !Sub ${TENANT}.solr.perls.net
+ ListenerArn:
+ Fn::ImportValue: PERLS-SolrLBListener
+ Priority: !Sub ${PRIORITY}
+
+
+ TargetGroupPHP:
+ Type: AWS::ElasticLoadBalancingV2::TargetGroup
+ Properties:
+ HealthCheckEnabled: true
+ HealthCheckIntervalSeconds: 45
+ HealthCheckPath: /ping
+ HealthCheckProtocol: HTTP
+ HealthCheckTimeoutSeconds: 30
+ HealthyThresholdCount: 2
+ Name: !Sub ${TENANT}-php-tg
+ Port: 80
+ Protocol: HTTP
+ TargetType: ip
+ TargetGroupAttributes:
+ - Key: stickiness.enabled
+ Value: true
+ - Key: stickiness.lb_cookie.duration_seconds
+ Value: 3600
+ - Key: deregistration_delay.timeout_seconds
+ Value: 30
+ UnhealthyThresholdCount: 2
+ VpcId:
+ Fn::ImportValue: PERLS-VPCID
+
+ TargetGroupSOLR:
+ Type: AWS::ElasticLoadBalancingV2::TargetGroup
+ Properties:
+ HealthCheckEnabled: true
+ HealthCheckIntervalSeconds: 45
+ HealthCheckPath: /solr/#/
+ HealthCheckProtocol: HTTP
+ HealthCheckTimeoutSeconds: 30
+ HealthyThresholdCount: 2
+ Name: !Sub ${TENANT}-internal-solr-tg
+ Port: 8983
+ Protocol: HTTP
+ TargetType: ip
+ UnhealthyThresholdCount: 2
+ VpcId:
+ Fn::ImportValue: PERLS-VPCID
+
+ EFSPublicAP:
+ Type: 'AWS::EFS::AccessPoint'
+ Properties:
+ FileSystemId:
+ Fn::ImportValue: PERLS-EFS
+ PosixUser:
+ Uid: "1000"
+ Gid: "1000"
+ RootDirectory:
+ CreationInfo:
+ OwnerGid: "1000"
+ OwnerUid: "1000"
+ Permissions: "0755"
+ Path: !Sub "/${TENANT}/public"
+
+ EFSPrivateAP:
+ Type: 'AWS::EFS::AccessPoint'
+ Properties:
+ FileSystemId:
+ Fn::ImportValue: PERLS-EFS
+ PosixUser:
+ Uid: "1000"
+ Gid: "1000"
+ RootDirectory:
+ CreationInfo:
+ OwnerGid: "1000"
+ OwnerUid: "1000"
+ Permissions: "0755"
+ Path: !Sub "/${TENANT}/private"
+
+ EFSSolrAP:
+ Type: 'AWS::EFS::AccessPoint'
+ Properties:
+ FileSystemId:
+ Fn::ImportValue: PERLS-EFS
+ RootDirectory:
+ Path: !Sub "/${TENANT}/solr"
+
+ ScalableTarget:
+ DependsOn: ServicePHP
+ Type: AWS::ApplicationAutoScaling::ScalableTarget
+ Properties:
+ MaxCapacity: 20
+ MinCapacity: 1
+ RoleARN:
+ Fn::ImportValue: PERLS-AppAutoScalingRole
+ ServiceNamespace: ecs
+ ScalableDimension: ecs:service:DesiredCount
+ ResourceId: !Sub service/PERLSECSCluster/${TENANT}-php-svc
+
+ ECSCPUAutoscaling:
+ DependsOn: [ServicePHP, ScalableTarget]
+ Type: AWS::ApplicationAutoScaling::ScalingPolicy
+ Properties:
+ PolicyName: !Sub ${TENANT}-CPU-AutoScaling
+ PolicyType: TargetTrackingScaling
+ ResourceId: !Sub service/PERLSECSCluster/${TENANT}-php-svc
+ ScalableDimension: ecs:service:DesiredCount
+ ServiceNamespace: ecs
+ TargetTrackingScalingPolicyConfiguration:
+ ScaleInCooldown: 300
+ ScaleOutCooldown: 120
+ TargetValue: 50
+ PredefinedMetricSpecification:
+ PredefinedMetricType: ECSServiceAverageCPUUtilization
+
+ ECSMEMAutoscaling:
+ DependsOn: [ServicePHP, ScalableTarget]
+ Type: AWS::ApplicationAutoScaling::ScalingPolicy
+ Properties:
+ PolicyName: !Sub ${TENANT}-MEM-AutoScaling
+ PolicyType: TargetTrackingScaling
+ ResourceId: !Sub service/PERLSECSCluster/${TENANT}-php-svc
+ ScalableDimension: ecs:service:DesiredCount
+ ServiceNamespace: ecs
+ TargetTrackingScalingPolicyConfiguration:
+ ScaleInCooldown: 300
+ ScaleOutCooldown: 120
+ TargetValue: 50
+ PredefinedMetricSpecification:
+ PredefinedMetricType: ECSServiceAverageMemoryUtilization
+
+ CloudWatchLogGroup:
+ Type: AWS::Logs::LogGroup
+ Properties:
+ LogGroupName: !Sub ${TENANT}-php
+ RetentionInDays: 365
+
+ CloudWatchRedisLogGroup:
+ Type: AWS::Logs::LogGroup
+ Properties:
+ LogGroupName: !Sub ${TENANT}-redis
+ RetentionInDays: 365
diff --git a/scripts/perls_tenants/ReadMe.md b/scripts/perls_tenants/ReadMe.md
new file mode 100644
index 0000000..7a9f4e9
--- /dev/null
+++ b/scripts/perls_tenants/ReadMe.md
@@ -0,0 +1,3 @@
+(Legacy) PERLS Tenant Management
+-----------
+These scripts are for updating/deleting PERLS tenants that were created under the original CloudFormation stack template. New tenants should be created and maintained using the admin API (see admin_api).
diff --git a/scripts/perls_tenants/delete_tenant.sh b/scripts/perls_tenants/delete_tenant.sh
new file mode 100644
index 0000000..56738c6
--- /dev/null
+++ b/scripts/perls_tenants/delete_tenant.sh
@@ -0,0 +1,16 @@
+#!/bin/bash
+#This file has been copied to the /home/centos/perls directory of the centos user on the utility server
+TENANT=$1
+read -p "Type 'delete' if you are sure you want to delete tenant $TENANT: " CONFIRM
+if [ "$CONFIRM" = "delete" ]; then
+ echo "Deleting tenant $TENANT"
+ TENANT=${TENANT,,}
+ RDS_HOST=$(aws cloudformation describe-stacks --stack-name PERLS | jq '.Stacks[].Outputs[] | select(.OutputKey=="PERLSRDS") | .OutputValue' -r)
+ RDS_PWD=$(aws cloudformation describe-stacks --stack-name PERLS | jq '.Stacks[].Parameters[] | select(.ParameterKey=="RDSMasterPassword") | .ParameterValue' -r)
+ aws cloudformation delete-stack --stack-name ${TENANT}
+ mysql -h ${RDS_HOST} -u 'perls_user' -p${RDS_PWD} -e "DROP DATABASE ${TENANT}_PERLS;"
+ sudo rm -rf /efs/${TENANT}
+ rm -rf /var/www/${TENANT}
+else
+ exit 0
+fi
diff --git a/scripts/perls_tenants/sample_tenant.env b/scripts/perls_tenants/sample_tenant.env
new file mode 100644
index 0000000..5cea906
--- /dev/null
+++ b/scripts/perls_tenants/sample_tenant.env
@@ -0,0 +1,29 @@
+# Name of the tenant to be created. This must be alphanumeric.
+TENANT="perls"
+
+#Name of the admin user ie. "John Doe"
+NAME="John Doe"
+
+#Email Address of the admin user. Used for login
+ADMIN_EMAIL="john.doe@example.com"
+
+#Version of the CMS to deploy. Current version is 2.3.0. This must match one the available versions provided by the vendor.
+VERSION="3.0.0"
+
+#If true a LRS will be created for the new tenant at https://lrs.perls.usalearning.net
+CREATE_LRS="true"
+
+#Settings for a CMS that has already been created or exists with another provider. If CREATE_LRS is true, leave the LRS_ variables empty.
+#Complete address of xapi endpoint.
+LRS_HOST="https://lrs.perls.usalearning.net//xapi/"
+#Username for sending xapi statements
+LRS_USERNAME="xapi_user"
+#Password for sending xapi statements
+LRS_PASSWORD="xapi_user_password"
+
+#SMTP connection info for sending emails from the CMS.
+SMTP_HOST="smtp.gmail.com"
+SMTP_USERNAME="john.doe@example.com"
+SMTP_PASSWORD="notsosecretpassword"
+SMTP_FROM="john.doe@example.com"
+SMTP_PORT="465"
diff --git a/scripts/perls_tenants/update_tenant.sh b/scripts/perls_tenants/update_tenant.sh
new file mode 100644
index 0000000..63d122e
--- /dev/null
+++ b/scripts/perls_tenants/update_tenant.sh
@@ -0,0 +1,59 @@
+#!/bin/bash
+
+TENANT=${TENANT,,}
+source /var/www/${TENANT}/tenant.env
+export BRAND=PERLS
+
+TaskDefARN=$(aws ecs describe-services --services ${TENANT}-php-svc --cluster PERLSECSCluster | jq '.services[0].deployments[0].taskDefinition' -r)
+SOLRTaskDefARN=$(aws ecs describe-services --services ${TENANT}-solr-svc --cluster PERLSECSCluster | jq '.services[0].deployments[0].taskDefinition' -r)
+TASKDEFVER=${TaskDefARN##*:}
+TASKDEFVER_new=$(($TASKDEFVER+1))
+
+drush config-split:export ignored_config -y
+# This trigger a warning if the tenant_overrides isn't active.
+drush config-split:export tenant_overrides -y
+unlink private
+unlink web/sites/default/files
+echo "Updating code base"
+aws s3 sync s3://perls-repo-pt/${VERSION}/code/ . --delete --quiet --exclude web/sites/default/settings.local.php --exclude tenant.env --exclude tenant.properties
+
+ln -s /efs/${TENANT}/private/ private
+ln -s /efs/${TENANT}/public/ web/sites/default/files
+
+sudo chown -R $(whoami): /efs/${TENANT}/{private,public}
+
+drush status
+rm -rf vendor
+composer install
+drush updatedb --entity-updates --no-post-updates -y
+drush cr
+drush config-import -y
+drush config-import -y
+drush updatedb -y
+drush cr
+
+sudo chown -R 1000:1000 /efs/${TENANT}/{private,public}
+
+echo "Updating ${TENANT} CloudFormation stack"
+aws cloudformation update-stack --stack-name ${TENANT} --template-body file://scripts/perls_tenants/PERLS_tenant.yml --parameters \
+ParameterKey=VERSION,ParameterValue=${VERSION} \
+ParameterKey=TASKDEFVER,ParameterValue=${TASKDEFVER_new} \
+ParameterKey=TENANT,UsePreviousValue=true \
+ParameterKey=DBPASSWORD,UsePreviousValue=true \
+ParameterKey=SMTPPASSWORD,UsePreviousValue=true \
+ParameterKey=SMTPUSERNAME,UsePreviousValue=true \
+ParameterKey=SMTPFROM,UsePreviousValue=true \
+ParameterKey=SMTPPORT,UsePreviousValue=true \
+ParameterKey=SMTPHOST,UsePreviousValue=true \
+ParameterKey=SMTPPROTOCOL,ParameterValue=tls \
+ParameterKey=PRIORITY,UsePreviousValue=true \
+ParameterKey=LRSPASSWORD,UsePreviousValue=true \
+ParameterKey=LRSUSERNAME,UsePreviousValue=true \
+ParameterKey=LRSHOST,UsePreviousValue=true \
+ParameterKey=SOLRTASKDEFVER,UsePreviousValue=true \
+ParameterKey=SIMPLESAMLAUTHSOURCE,UsePreviousValue=true \
+ParameterKey=SIMPLESAMLCONFIGDIR,UsePreviousValue=true \
+ParameterKey=StackName,UsePreviousValue=true
+
+aws ecs wait services-stable --cluster PERLSECSCluster --services ${TENANT}-php-svc
+
diff --git a/scripts/refresh.sh b/scripts/refresh.sh
new file mode 100755
index 0000000..93b0f3d
--- /dev/null
+++ b/scripts/refresh.sh
@@ -0,0 +1,49 @@
+#!/bin/bash
+set -e
+
+backup=true
+use_local_db=''
+use_backup_file=''
+
+print_usage() {
+ echo "refresh.sh Refresh Drupal with composer install and attempt to copy STAGE database. Do not restart docker containers."
+ echo " "
+ echo "refresh.sh [options]"
+ echo " "
+ echo "options:"
+ echo "-h, --help show brief help"
+ echo "-n do not backup the database"
+ echo "-l use local copy of the database instead of STAGE database"
+ echo "-f use db_backup.sql file instead of existing local database"
+}
+
+while getopts 'nlf' flag; do
+ case "${flag}" in
+ n) backup=false ;;
+ l) use_local_db="-l" ;;
+ f) use_backup_file="-f" ;;
+ *) print_usage
+ exit 1 ;;
+ esac
+done
+
+# Load environmental variables
+set -a
+source .env
+
+# Do a backup before trying to sync stage DB
+if [[ "$backup" == true ]] && [[ "$use_backup_file" == '' ]]; then
+ docker exec ${PROJECT_NAME}_php scripts/backup_db.sh
+fi
+
+docker exec ${PROJECT_NAME}_php composer install -n
+
+# Execute this script from inside docker container.
+# This wipes the db, copies db from stage and imports config.
+docker exec ${PROJECT_NAME}_php scripts/sync_site.sh $use_local_db $use_backup_file
+
+# If our Database sync was successful we update our backup file.
+if [[ "$backup" == true ]]; then
+ echo "== Refreshing db_backup.sql with updated database..."
+ docker exec ${PROJECT_NAME}_php scripts/backup_db.sh
+fi
\ No newline at end of file
diff --git a/scripts/styles.sh b/scripts/styles.sh
new file mode 100755
index 0000000..7f91cca
--- /dev/null
+++ b/scripts/styles.sh
@@ -0,0 +1,10 @@
+#!/usr/bin/env bash
+set -e
+
+# Todo -- handle npm install fail and gulp build theme fail.
+echo "== Generating styles-sheets..."
+echo "== Npm install && gulp build-theme"
+cd web/themes/custom/perls
+npm rebuild node-sass && npm install && ./node_modules/.bin/gulp build-theme
+echo "== Cache rebuild"
+drush cache:rebuild
diff --git a/scripts/sync_site.sh b/scripts/sync_site.sh
new file mode 100755
index 0000000..ad196fc
--- /dev/null
+++ b/scripts/sync_site.sh
@@ -0,0 +1,112 @@
+#!/usr/bin/env bash
+set -e
+
+use_local_db=false
+use_backup_file=false
+
+print_usage() {
+ echo "sync_site.sh should run inside php docker container. Can sync remote repo. Brings in local config."
+ echo " "
+ echo "sync_site.sh [options]"
+ echo " "
+ echo "options:"
+ echo "-h, --help show brief help"
+ echo "-l use local copy of the database instead of STAGE database"
+ echo "-f use db_backup.sql file instead of existing local database"
+}
+
+while getopts 'nlf' flag; do
+ case "${flag}" in
+ l) use_local_db=true ;;
+ f) use_backup_file=true ;;
+ *) print_usage
+ exit 1 ;;
+ esac
+done
+
+##
+# If you have trouble running locally, try from inside a container.
+#
+# docker exec PERLS_php scripts/sync_site.sh
+##
+
+sync_fail=false
+
+if [[ "$use_local_db" == false ]] && [[ "$use_backup_file" == false ]]; then
+
+ # PHP_DEV is set to 1 in the PERLS_php docker container
+ if [ $PHP_DEV ]; then
+ if [ ! -f ~/.ssh/perls_drush ]; then
+ echo "== Copy ssh keys to .ssh user directory..."
+ cp -r ./.ssh ~/ || true
+ fi
+ fi
+
+ if [ -f ~/.ssh/perls_drush ]; then
+ echo "== Setting proper permissions on SSH keys..."
+ chmod 0600 ~/.ssh/perls_drush ~/.ssh/perls_drush.pub
+ fi
+
+ echo "== Checking connection to STAGE..."
+
+ drush @stage status && echo "== Successfully connected to stage..." || sync_fail=true
+
+ if [[ "$sync_fail" == true ]];
+ then
+ echo "== Failed to connect to STAGE..."
+ else
+ echo "== Drop and sync database from STAGE..."
+ drush sql:drop -y
+
+ # Attempt to sync db from stage. Allow recovery and continue with db_backup.sql
+ drush sql:sync @stage @self -y && echo "== Successfully loaded STAGE database" || sync_fail=true
+
+ if [[ "$sync_fail" == true ]]; then
+ echo "== Failed to copy database from STAGE."
+ fi
+ fi
+fi
+
+file_fail=false
+
+if [[ "$sync_fail" == true ]] || [[ "$use_backup_file" == true ]]; then
+ if [[ -f db_backup.sql ]]; then
+ echo "== Importing database from db_backup.sql..."
+ drush sql-cli < db_backup.sql && echo "== Successfully imported db_backup.sql..." || file_fail=true
+ else
+ file_fail=true
+ echo "== File db_backup.sql not found..."
+ fi
+
+ if [[ "$file_fail" == true ]]; then
+ echo "== Failed to load database from db_backup.sql, attempting to build the site from scratch..."
+ drush site-install --existing-config
+ fi
+fi
+
+if [[ "$use_local_db" == true ]] || [[ "$file_fail" == true ]]; then
+ echo "== Using existing local database..."
+fi
+
+echo "== Update database with any code changes..."
+drush cr
+drush updatedb --no-post-updates -y
+drush config-import -y
+drush config-import -y
+drush updatedb -y
+drush sqlq "UPDATE users_field_data SET name='admin', mail='admin@example.com' WHERE uid=1;"
+drush cr
+drush upwd admin password
+drush user:role:add sysadmin admin
+drush user:unblock admin
+drush wd all -y
+
+# Set up an oAuth consumer for API calls
+# This client ID/secret should only be used in development environments...since it's not very secret.
+echo "== Creating oAuth consumer for development..."
+drush perls:createConsumer "0bba92e5-68ea-4e9b-8ab0-b43b2022330c" 'not-very-secret' --label="Mobile App-Development" --no-third_party --roles=rest_api_user --redirect="https://example.com/auth"
+
+echo "== Rebuild search index from local solr..."
+# This might fail outside of a docker container
+drush search-api:clear
+drush search-api:index
diff --git a/scripts/tenant.yml b/scripts/tenant.yml
new file mode 100644
index 0000000..6f60df2
--- /dev/null
+++ b/scripts/tenant.yml
@@ -0,0 +1,935 @@
+AWSTemplateFormatVersion: 2010-09-09
+Description: Next-gen template; not yet widely used.
+Parameters:
+ TENANT:
+ Description: The name of the TENANT
+ Type: String
+ SMTPPASSWORDARN:
+ Description: ARN of secret containing the SMTP Password
+ Type: String
+ PRIORITY:
+ Description: Where to put the listener rule in the LB config
+ Type: Number
+ LRSHOST:
+ Description: Endpoint for TENANT's xapi statements to be sent
+ Type: String
+ LRSPASSWORDARN:
+ Description: ARN of secret containing the LRS Password
+ Type: String
+ SMTPUSERNAME:
+ Description: User for Email account
+ Type: String
+ SMTPHOST:
+ Description: Host for SMTP Connection
+ Type: String
+ SMTPFROM:
+ Description: Email to send from
+ Type: String
+ SMTPPORT:
+ Description: Port for SMTP connection
+ Type: String
+ SMTPPROTOCOL:
+ Description: Protocol for SMTP connections(SSL or TLS)
+ Type: String
+ Default: tls
+ VERSION:
+ Description: Version of the Container
+ Type: String
+ SIMPLESAMLAUTHSOURCE:
+ Description: SAML auth source
+ Type: String
+ Default: perls
+ SIMPLESAMLCONFIGDIR:
+ Description: Directory location of SAML config
+ Type: String
+ Default: "/var/www/html/private/saml_config"
+ Project:
+ Description: Lowercase name of the project for pulling the container
+ Type: String
+ BaseStack:
+ Description: Name of the initial base cloudformation stack
+ Type: String
+ ADDRESS:
+ Description: Address of the CMS
+ Type: String
+ BRAND:
+ Description: Which brand of CMS
+ AllowedValues: [PERLS]
+ Type: String
+ Default: PERLS
+ SNSTopic:
+ Description: ARN of the SNS Topic to send alerts to
+ Type: String
+ DBPASSWORDARN:
+ Description: ARN of secret containing the SMTP Password
+ Type: String
+ FIREBASEKEY:
+ Description: Key for sending push notifications
+ Type: String
+ FIREBASEID:
+ Description: ID for sending push notifications
+ Type: String
+ ALTHost:
+ Description: Additional hostname to add to trusted hosts in settings.php
+ Type: String
+ Default: ''
+ SIMPLESAMLHOST:
+ Description: URL for initiating SSO requests. Only needed if the site is accessible from multiple URLs.
+ Type: String
+ Default: ''
+
+Conditions:
+ NoAltName: !Equals
+ - !Ref ALTHost
+ - ''
+
+Resources:
+ TaskDefinitionPHP:
+ DependsOn: CloudWatchPHPLogGroup
+ Type: AWS::ECS::TaskDefinition
+ Properties:
+ ContainerDefinitions:
+ - Name: !Sub ${TENANT}-php
+ Secrets:
+ - Name: DB_PASSWORD
+ ValueFrom: !Sub ${DBPASSWORDARN}
+ - Name: LRS_PASSWORD
+ ValueFrom: !Sub ${LRSPASSWORDARN}
+ - Name: SMTP_PASSWORD
+ ValueFrom: !Sub ${SMTPPASSWORDARN}
+ Environment:
+ - Name: DB_DRIVER
+ Value: mysql
+ - Name: DB_HOST
+ Value:
+ Fn::ImportValue:
+ !Sub ${BaseStack}-RDS
+ - Name: DB_NAME
+ Value: !Sub ${TENANT}_${BRAND}
+ - Name: DB_PORT
+ Value: 3306
+ - Name: DB_USER
+ Value: !Sub ${TENANT}
+ - Name: DRUPAL_SOLR_HOST
+ Value:
+ Fn::Join:
+ - ''
+ - - !Sub ${TENANT}.solr.
+ - Fn::ImportValue:
+ !Sub ${BaseStack}-InternalBaseURL
+ - Name: SMTP_USERNAME
+ Value: !Sub ${SMTPUSERNAME}
+ - Name: LRS_HOST
+ Value: !Sub ${LRSHOST}
+ - Name: LRS_USERNAME
+ Value: !Sub ${TENANT}
+ - Name: SMTP_FROM
+ Value: !Sub ${SMTPFROM}
+ - Name: SMTP_HOST
+ Value: !Sub ${SMTPHOST}
+ - Name: SMTP_PORT
+ Value: !Sub ${SMTPPORT}
+ - Name: SMTP_PROTOCOL
+ Value: !Sub ${SMTPPROTOCOL}
+ - Name: BRAND
+ Value: !Sub ${BRAND}
+ - Name: SIMPLESAML_AUTH_SOURCE
+ Value: !Sub ${SIMPLESAMLAUTHSOURCE}
+ - Name: SIMPLESAML_CONFIG_DIR
+ Value: !Sub ${SIMPLESAMLCONFIGDIR}
+ - Name: REDIS_HOST
+ Value: !Sub ${TENANT}-redis.internalservice
+ - Name: FIREBASE_SERVER_KEY
+ Value: !Sub ${FIREBASEKEY}
+ - Name: FIREBASE_SENDER_ID
+ Value: !Sub ${FIREBASEID}
+ - Name: ADDITIONAL_TRUSTED_HOST
+ Value:
+ Fn::If:
+ - NoAltName
+ - !Ref AWS::NoValue
+ - !Sub ${ALTHost}
+ - Name: SIMPLESAML_HOST
+ Value:
+ Fn::If:
+ - NoAltName
+ - !Ref AWS::NoValue
+ - !Sub ${SIMPLESAMLHOST}
+
+ MountPoints:
+ - SourceVolume: public
+ ContainerPath: /var/www/html/web/sites/default/files
+ - SourceVolume: private
+ ContainerPath: /var/www/html/private
+ Image: !Sub '${AWS::AccountId}.dkr.ecr.us-east-1.amazonaws.com/${Project}:${VERSION}'
+ PortMappings:
+ - ContainerPort: 80
+ LogConfiguration:
+ LogDriver: awslogs
+ Options:
+ awslogs-region: us-east-1
+ awslogs-group: !Sub ${TENANT}-php
+ awslogs-stream-prefix: php
+ Cpu: 512
+ ExecutionRoleArn:
+ Fn::ImportValue:
+ !Sub ${BaseStack}-ECSTaskExecutionRole
+ Family: !Sub ${TENANT}-php-task
+ Memory: 1024
+ NetworkMode: awsvpc
+ RequiresCompatibilities:
+ - FARGATE
+ Volumes:
+ -
+ EFSVolumeConfiguration:
+ AuthorizationConfig:
+ AccessPointId: !Ref EFSPublicAP
+ IAM: DISABLED
+ FilesystemId:
+ Fn::ImportValue:
+ !Sub ${BaseStack}-EFS
+ TransitEncryption: ENABLED
+ Name: public
+ -
+ EFSVolumeConfiguration:
+ AuthorizationConfig:
+ AccessPointId: !Ref EFSPrivateAP
+ IAM: DISABLED
+ FilesystemId:
+ Fn::ImportValue:
+ !Sub ${BaseStack}-EFS
+ TransitEncryption: ENABLED
+ Name: private
+
+ TaskDefinitionPHPAdmin:
+ DependsOn: CloudWatchPHPLogGroup
+ Type: AWS::ECS::TaskDefinition
+ Properties:
+ ContainerDefinitions:
+ - Name: !Sub ${TENANT}-php
+ Secrets:
+ - Name: DB_PASSWORD
+ ValueFrom: !Sub ${DBPASSWORDARN}
+ - Name: LRS_PASSWORD
+ ValueFrom: !Sub ${LRSPASSWORDARN}
+ - Name: SMTP_PASSWORD
+ ValueFrom: !Sub ${SMTPPASSWORDARN}
+ Environment:
+ - Name: DB_DRIVER
+ Value: mysql
+ - Name: DB_HOST
+ Value:
+ Fn::ImportValue:
+ !Sub ${BaseStack}-RDS
+ - Name: DB_NAME
+ Value: !Sub ${TENANT}_${BRAND}
+ - Name: DB_PORT
+ Value: 3306
+ - Name: DB_USER
+ Value: !Sub ${TENANT}
+ - Name: DRUPAL_SOLR_HOST
+ Value:
+ Fn::Join:
+ - ''
+ - - !Sub ${TENANT}.solr.
+ - Fn::ImportValue:
+ !Sub ${BaseStack}-InternalBaseURL
+ - Name: SMTP_USERNAME
+ Value: !Sub ${SMTPUSERNAME}
+ - Name: LRS_HOST
+ Value: !Sub ${LRSHOST}
+ - Name: LRS_USERNAME
+ Value: !Sub ${TENANT}
+ - Name: SMTP_FROM
+ Value: !Sub ${SMTPFROM}
+ - Name: SMTP_HOST
+ Value: !Sub ${SMTPHOST}
+ - Name: SMTP_PORT
+ Value: !Sub ${SMTPPORT}
+ - Name: BRAND
+ Value: !Sub ${BRAND}
+ - Name: SIMPLESAML_AUTH_SOURCE
+ Value: !Sub ${SIMPLESAMLAUTHSOURCE}
+ - Name: SIMPLESAML_CONFIG_DIR
+ Value: !Sub ${SIMPLESAMLCONFIGDIR}
+ - Name: REDIS_HOST
+ Value: !Sub ${TENANT}-redis.internalservice
+ MountPoints:
+ - SourceVolume: public
+ ContainerPath: /var/www/html/web/sites/default/files
+ - SourceVolume: private
+ ContainerPath: /var/www/html/private
+ Image: !Sub '${AWS::AccountId}.dkr.ecr.us-east-1.amazonaws.com/${Project}:${VERSION}'
+ PortMappings:
+ - ContainerPort: 80
+ LogConfiguration:
+ LogDriver: awslogs
+ Options:
+ awslogs-region: us-east-1
+ awslogs-group: !Sub ${TENANT}-php-updates
+ awslogs-stream-prefix: php
+ Cpu: 512
+ ExecutionRoleArn:
+ Fn::ImportValue:
+ !Sub ${BaseStack}-ECSTaskExecutionRole
+ Family: !Sub ${TENANT}-php-admin-task
+ Memory: 1024
+ NetworkMode: awsvpc
+ RequiresCompatibilities:
+ - FARGATE
+ Volumes:
+ -
+ EFSVolumeConfiguration:
+ AuthorizationConfig:
+ AccessPointId: !Ref EFSPublicAP
+ IAM: DISABLED
+ FilesystemId:
+ Fn::ImportValue:
+ !Sub ${BaseStack}-EFS
+ TransitEncryption: ENABLED
+ Name: public
+ -
+ EFSVolumeConfiguration:
+ AuthorizationConfig:
+ AccessPointId: !Ref EFSPrivateAP
+ IAM: DISABLED
+ FilesystemId:
+ Fn::ImportValue:
+ !Sub ${BaseStack}-EFS
+ TransitEncryption: ENABLED
+ Name: private
+
+ TaskDefinitionRedis:
+ DependsOn: [EFSSolrAP, CloudWatchRedisLogGroup]
+ Type: AWS::ECS::TaskDefinition
+ Properties:
+ RequiresCompatibilities:
+ - FARGATE
+ Cpu: 256
+ Memory: 512
+ ExecutionRoleArn:
+ Fn::ImportValue:
+ !Sub ${BaseStack}-ECSTaskExecutionRole
+ NetworkMode: awsvpc
+ ContainerDefinitions:
+ - Name: !Sub ${TENANT}-redis
+ Image: redis:6
+ PortMappings:
+ - ContainerPort: 6379
+ LogConfiguration:
+ LogDriver: awslogs
+ Options:
+ awslogs-region: us-east-1
+ awslogs-stream-prefix: redis
+ awslogs-group: !Sub ${TENANT}-redis
+ Family: !Sub ${TENANT}-redis-task
+
+ TaskDefinitionSOLR:
+ DependsOn: CloudWatchSOLRLogGroup
+ Type: AWS::ECS::TaskDefinition
+ Properties:
+ RequiresCompatibilities:
+ - FARGATE
+ Cpu: 256
+ Memory: 512
+ ExecutionRoleArn:
+ Fn::ImportValue:
+ !Sub ${BaseStack}-ECSTaskExecutionRole
+ NetworkMode: awsvpc
+ ContainerDefinitions:
+ - Name: !Sub ${TENANT}-solr
+ Environment:
+ - Name: SOLR_JAVA_MEM
+ Value: -Xms384m -Xmx384m
+ MountPoints:
+ - SourceVolume: solr
+ ContainerPath: /var/solr/data
+ Image: solr:8
+ PortMappings:
+ - ContainerPort: 8983
+ LogConfiguration:
+ LogDriver: awslogs
+ Options:
+ awslogs-region: us-east-1
+ awslogs-group: !Sub ${TENANT}-solr
+ awslogs-stream-prefix: solr
+ Volumes:
+ -
+ EFSVolumeConfiguration:
+ AuthorizationConfig:
+ AccessPointId: !Ref EFSSolrAP
+ IAM: DISABLED
+ FilesystemId:
+ Fn::ImportValue:
+ !Sub ${BaseStack}-EFS
+ TransitEncryption: ENABLED
+ Name: solr
+ Family: !Sub ${TENANT}-solr-task
+
+ ServicePHP:
+ DependsOn: ListenerRulePHP
+ Type: AWS::ECS::Service
+ Properties:
+ PlatformVersion: 1.4.0
+ ServiceName: !Sub ${TENANT}-php-svc
+ Cluster:
+ Fn::ImportValue:
+ !Sub ${BaseStack}-ECSCluster
+ TaskDefinition: !Ref TaskDefinitionPHP
+ NetworkConfiguration:
+ AwsvpcConfiguration:
+ AssignPublicIp: ENABLED
+ SecurityGroups:
+ - Fn::ImportValue:
+ !Sub ${BaseStack}-SGECS
+ Subnets:
+ - Fn::ImportValue:
+ !Sub ${BaseStack}-PrivateSubnet1
+ - Fn::ImportValue:
+ !Sub ${BaseStack}-PrivateSubnet2
+ - Fn::ImportValue:
+ !Sub ${BaseStack}-PrivateSubnet3
+ - Fn::ImportValue:
+ !Sub ${BaseStack}-PrivateSubnet4
+ - Fn::ImportValue:
+ !Sub ${BaseStack}-PrivateSubnet5
+ - Fn::ImportValue:
+ !Sub ${BaseStack}-PrivateSubnet6
+
+ DeploymentConfiguration:
+ MaximumPercent: 200
+ MinimumHealthyPercent: 50
+ SchedulingStrategy: REPLICA
+ DesiredCount: 1
+ LaunchType: FARGATE
+ EnableECSManagedTags: true
+ HealthCheckGracePeriodSeconds: 30
+ LoadBalancers:
+ - ContainerName: !Sub ${TENANT}-php
+ ContainerPort: 80
+ TargetGroupArn: !Ref TargetGroupPHP
+ Tags:
+ - Key: TENANT
+ Value: !Sub ${TENANT}
+
+ ServiceSOLR:
+ DependsOn: ListenerRuleSOLR
+ Type: AWS::ECS::Service
+ Properties:
+ PlatformVersion: 1.4.0
+ ServiceName: !Sub ${TENANT}-solr-svc
+ Cluster:
+ Fn::ImportValue:
+ !Sub ${BaseStack}-ECSCluster
+ TaskDefinition: !Ref TaskDefinitionSOLR
+ NetworkConfiguration:
+ AwsvpcConfiguration:
+ AssignPublicIp: ENABLED
+ SecurityGroups:
+ - Fn::ImportValue:
+ !Sub ${BaseStack}-SGSolr
+ Subnets:
+ - Fn::ImportValue:
+ !Sub ${BaseStack}-PrivateSubnet1
+ - Fn::ImportValue:
+ !Sub ${BaseStack}-PrivateSubnet2
+ - Fn::ImportValue:
+ !Sub ${BaseStack}-PrivateSubnet3
+ - Fn::ImportValue:
+ !Sub ${BaseStack}-PrivateSubnet4
+ - Fn::ImportValue:
+ !Sub ${BaseStack}-PrivateSubnet5
+ - Fn::ImportValue:
+ !Sub ${BaseStack}-PrivateSubnet6
+ DeploymentConfiguration:
+ MaximumPercent: 200
+ MinimumHealthyPercent: 50
+ SchedulingStrategy: REPLICA
+ DesiredCount: 1
+ LaunchType: FARGATE
+ EnableECSManagedTags: true
+ HealthCheckGracePeriodSeconds: 30
+ LoadBalancers:
+ - ContainerName: !Sub ${TENANT}-solr
+ ContainerPort: 8983
+ TargetGroupArn: !Ref TargetGroupSOLR
+ Tags:
+ - Key: TENANT
+ Value: !Sub ${TENANT}
+
+ RedisDiscoveryService:
+ Type: AWS::ServiceDiscovery::Service
+ Properties:
+ Description: Discovery Service for redis
+ DnsConfig:
+ RoutingPolicy: MULTIVALUE
+ DnsRecords:
+ - TTL: 60
+ Type: A
+ HealthCheckCustomConfig:
+ FailureThreshold: 1
+ Name: !Sub ${TENANT}-redis
+ NamespaceId:
+ Fn::ImportValue:
+ !Sub ${BaseStack}-ServiceDiscovery
+
+ ServiceRedis:
+ Type: AWS::ECS::Service
+ Properties:
+ PlatformVersion: 1.4.0
+ ServiceName: !Sub ${TENANT}-redis-svc
+ Cluster:
+ Fn::ImportValue:
+ !Sub ${BaseStack}-ECSCluster
+ TaskDefinition: !Ref TaskDefinitionRedis
+ NetworkConfiguration:
+ AwsvpcConfiguration:
+ AssignPublicIp: ENABLED
+ SecurityGroups:
+ - Fn::ImportValue:
+ !Sub ${BaseStack}-SGRedis
+ Subnets:
+ - Fn::ImportValue:
+ !Sub ${BaseStack}-PrivateSubnet1
+ - Fn::ImportValue:
+ !Sub ${BaseStack}-PrivateSubnet2
+ - Fn::ImportValue:
+ !Sub ${BaseStack}-PrivateSubnet3
+ - Fn::ImportValue:
+ !Sub ${BaseStack}-PrivateSubnet4
+ - Fn::ImportValue:
+ !Sub ${BaseStack}-PrivateSubnet5
+ - Fn::ImportValue:
+ !Sub ${BaseStack}-PrivateSubnet6
+ DeploymentConfiguration:
+ MaximumPercent: 200
+ MinimumHealthyPercent: 50
+ SchedulingStrategy: REPLICA
+ DesiredCount: 1
+ LaunchType: FARGATE
+ EnableECSManagedTags: true
+ ServiceRegistries:
+ - RegistryArn: !GetAtt RedisDiscoveryService.Arn
+ Tags:
+ - Key: TENANT
+ Value: !Sub ${TENANT}
+
+ ListenerRulePHP:
+ Type: AWS::ElasticLoadBalancingV2::ListenerRule
+ Properties:
+ Actions:
+ - Type: forward
+ TargetGroupArn: !Ref TargetGroupPHP
+ Conditions:
+ - Field: host-header
+ HostHeaderConfig:
+ Values:
+ - !Sub ${ADDRESS}
+ ListenerArn:
+ Fn::ImportValue:
+ !Sub ${BaseStack}-AppLBListener
+ Priority: !Sub ${PRIORITY}
+
+ ListenerRuleSOLR:
+ Type: AWS::ElasticLoadBalancingV2::ListenerRule
+ Properties:
+ Actions:
+ - Type: forward
+ TargetGroupArn: !Ref TargetGroupSOLR
+ Conditions:
+ - Field: host-header
+ HostHeaderConfig:
+ Values:
+ -
+ Fn::Join:
+ - ''
+ - - !Sub ${TENANT}.solr.
+ - Fn::ImportValue:
+ !Sub ${BaseStack}-InternalBaseURL
+ ListenerArn:
+ Fn::ImportValue:
+ !Sub ${BaseStack}-SolrLBListener
+ Priority: !Sub ${PRIORITY}
+
+
+ TargetGroupPHP:
+ Type: AWS::ElasticLoadBalancingV2::TargetGroup
+ Properties:
+ HealthCheckEnabled: true
+ HealthCheckIntervalSeconds: 45
+ HealthCheckPath: /ping
+ HealthCheckProtocol: HTTP
+ HealthCheckTimeoutSeconds: 30
+ HealthyThresholdCount: 2
+ Name: !Sub ${TENANT}-php-tg
+ Port: 80
+ Protocol: HTTP
+ TargetType: ip
+ TargetGroupAttributes:
+ - Key: stickiness.enabled
+ Value: true
+ - Key: stickiness.lb_cookie.duration_seconds
+ Value: 3600
+ - Key: deregistration_delay.timeout_seconds
+ Value: 30
+ UnhealthyThresholdCount: 2
+ VpcId:
+ Fn::ImportValue:
+ !Sub ${BaseStack}-VPCID
+
+ TargetGroupSOLR:
+ Type: AWS::ElasticLoadBalancingV2::TargetGroup
+ Properties:
+ HealthCheckEnabled: true
+ HealthCheckIntervalSeconds: 45
+ HealthCheckPath: /solr/#/
+ HealthCheckProtocol: HTTP
+ HealthCheckTimeoutSeconds: 30
+ HealthyThresholdCount: 2
+ Name: !Sub ${TENANT}-solr-tg
+ Port: 8983
+ Protocol: HTTP
+ TargetType: ip
+ UnhealthyThresholdCount: 2
+ VpcId:
+ Fn::ImportValue:
+ !Sub ${BaseStack}-VPCID
+
+ EFSPublicAP:
+ Type: AWS::EFS::AccessPoint
+ Properties:
+ FileSystemId:
+ Fn::ImportValue:
+ !Sub ${BaseStack}-EFS
+ PosixUser:
+ Uid: "1000"
+ Gid: "1000"
+ RootDirectory:
+ Path: !Sub "/${TENANT}/public"
+
+ EFSPrivateAP:
+ Type: AWS::EFS::AccessPoint
+ Properties:
+ FileSystemId:
+ Fn::ImportValue:
+ !Sub ${BaseStack}-EFS
+ PosixUser:
+ Uid: "1000"
+ Gid: "1000"
+ RootDirectory:
+ Path: !Sub "/${TENANT}/private"
+
+ EFSSolrAP:
+ Type: AWS::EFS::AccessPoint
+ Properties:
+ FileSystemId:
+ Fn::ImportValue:
+ !Sub ${BaseStack}-EFS
+ PosixUser:
+ Uid: "8983"
+ Gid: "8983"
+ RootDirectory:
+ Path: !Sub "/${TENANT}/solr"
+
+ ScalableTarget:
+ DependsOn: ServicePHP
+ Type: AWS::ApplicationAutoScaling::ScalableTarget
+ Properties:
+ MaxCapacity: 20
+ MinCapacity: 1
+ RoleARN:
+ Fn::ImportValue:
+ !Sub ${BaseStack}-AppAutoScalingRole
+ ServiceNamespace: ecs
+ ScalableDimension: ecs:service:DesiredCount
+ ResourceId:
+ Fn::Join:
+ - '/'
+ - - service
+ - Fn::ImportValue:
+ !Sub ${BaseStack}-ECSCluster
+ - !Sub ${TENANT}-php-svc
+
+ ECSCPUAutoscaling:
+ DependsOn: [ServicePHP, ScalableTarget]
+ Type: AWS::ApplicationAutoScaling::ScalingPolicy
+ Properties:
+ PolicyName: !Sub ${TENANT}-CPU-AutoScaling
+ PolicyType: TargetTrackingScaling
+ ScalableDimension: ecs:service:DesiredCount
+ ServiceNamespace: ecs
+ TargetTrackingScalingPolicyConfiguration:
+ ScaleInCooldown: 300
+ ScaleOutCooldown: 120
+ TargetValue: 50
+ PredefinedMetricSpecification:
+ PredefinedMetricType: ECSServiceAverageCPUUtilization
+ ResourceId:
+ Fn::Join:
+ - '/'
+ - - service
+ - Fn::ImportValue:
+ !Sub ${BaseStack}-ECSCluster
+ - !Sub ${TENANT}-php-svc
+
+ ECSMEMAutoscaling:
+ DependsOn: [ServicePHP, ScalableTarget]
+ Type: AWS::ApplicationAutoScaling::ScalingPolicy
+ Properties:
+ PolicyName: !Sub ${TENANT}-MEM-AutoScaling
+ PolicyType: TargetTrackingScaling
+ ScalableDimension: ecs:service:DesiredCount
+ ServiceNamespace: ecs
+ TargetTrackingScalingPolicyConfiguration:
+ ScaleInCooldown: 300
+ ScaleOutCooldown: 120
+ TargetValue: 50
+ PredefinedMetricSpecification:
+ PredefinedMetricType: ECSServiceAverageMemoryUtilization
+ ResourceId:
+ Fn::Join:
+ - '/'
+ - - service
+ - Fn::ImportValue:
+ !Sub ${BaseStack}-ECSCluster
+ - !Sub ${TENANT}-php-svc
+
+ CloudWatchPHPLogGroup:
+ Type: AWS::Logs::LogGroup
+ Properties:
+ LogGroupName: !Sub ${TENANT}-php
+ RetentionInDays: 365
+
+ CloudWatchPHPAdminLogGroup:
+ Type: AWS::Logs::LogGroup
+ Properties:
+ LogGroupName: !Sub ${TENANT}-php-updates
+ RetentionInDays: 365
+
+ CloudWatchSOLRLogGroup:
+ Type: AWS::Logs::LogGroup
+ Properties:
+ LogGroupName: !Sub ${TENANT}-solr
+ RetentionInDays: 365
+
+ CloudWatchRedisLogGroup:
+ Type: AWS::Logs::LogGroup
+ Properties:
+ LogGroupName: !Sub ${TENANT}-redis
+ RetentionInDays: 365
+
+ SearchAPIMetric:
+ Type: AWS::Logs::MetricFilter
+ Properties:
+ FilterPattern: "ERROR search_api"
+ LogGroupName: !Ref CloudWatchPHPLogGroup
+ MetricTransformations:
+ - MetricName: !Sub ${TENANT}-SOLR-error
+ MetricNamespace: !Sub ${TENANT}
+ MetricValue: 1
+
+ SearchAPIAlarm:
+ Type: AWS::CloudWatch::Alarm
+ DependsOn: SearchAPIMetric
+ Properties:
+ AlarmActions:
+ - !Sub ${SNSTopic}
+ AlarmDescription: "SOLR has triggered an error. Check Watchdog and Status Report"
+ AlarmName: !Sub ${TENANT}-SOLR-Error-Alarm
+ ComparisonOperator: GreaterThanOrEqualToThreshold
+ DatapointsToAlarm: 1
+ EvaluationPeriods: 1
+ Threshold: 0
+ MetricName: !Sub ${TENANT}-SOLR-error
+ Namespace: !Sub ${TENANT}
+ Period: 60
+ Statistic: Sum
+ TreatMissingData: notBreaching
+
+ LRSMetric:
+ Type: AWS::Logs::MetricFilter
+ Properties:
+ FilterPattern: "ERROR xapi"
+ LogGroupName: !Ref CloudWatchPHPLogGroup
+ MetricTransformations:
+ - MetricName: !Sub ${TENANT}-LRS-error
+ MetricNamespace: !Sub ${TENANT}
+ MetricValue: 1
+
+ LRSAlarm:
+ Type: AWS::CloudWatch::Alarm
+ DependsOn: LRSMetric
+ Properties:
+ AlarmActions:
+ - !Sub ${SNSTopic}
+ AlarmDescription: "LRS has triggered an error. Check Watchdog and Status Report"
+ AlarmName: !Sub ${TENANT}-LRS-Error-Alarm
+ ComparisonOperator: GreaterThanOrEqualToThreshold
+ DatapointsToAlarm: 1
+ EvaluationPeriods: 1
+ Threshold: 0
+ MetricName: !Sub ${TENANT}-LRS-error
+ Namespace: !Sub ${TENANT}
+ Period: 60
+ Statistic: Sum
+ TreatMissingData: notBreaching
+
+ 5xxMetric:
+ Type: AWS::Logs::MetricFilter
+ Properties:
+ FilterPattern: "[ip, id, user, timestamp, request, status_code=5*, size]"
+ LogGroupName: !Ref CloudWatchPHPLogGroup
+ MetricTransformations:
+ - MetricName: !Sub ${TENANT}-5xx-error
+ MetricNamespace: !Sub ${TENANT}
+ MetricValue: 1
+
+ 5xxAlarm:
+ Type: AWS::CloudWatch::Alarm
+ DependsOn: 5xxMetric
+ Properties:
+ AlarmActions:
+ - !Sub ${SNSTopic}
+ AlarmDescription: "Internal Server Error has occured."
+ AlarmName: !Sub ${TENANT}-5xx-Error-Alarm
+ ComparisonOperator: GreaterThanOrEqualToThreshold
+ DatapointsToAlarm: 1
+ EvaluationPeriods: 1
+ Threshold: 0
+ MetricName: !Sub ${TENANT}-5xx-error
+ Namespace: !Sub ${TENANT}
+ Period: 60
+ Statistic: Sum
+ TreatMissingData: notBreaching
+
+ ELB5xxAlarm:
+ Type: AWS::CloudWatch::Alarm
+ Properties:
+ AlarmActions:
+ - !Sub ${SNSTopic}
+ AlarmDescription: "5xx error has occured on Load Balancer level."
+ AlarmName: !Sub ${TENANT}-ELB-5xx-Error-Alarm
+ ComparisonOperator: GreaterThanOrEqualToThreshold
+ DatapointsToAlarm: 1
+ EvaluationPeriods: 5
+ Threshold: 0
+ MetricName: HTTPCode_ELB_5XX_Count
+ Namespace: AWS/ApplicationELB
+ Dimensions:
+ - Name: LoadBalancer
+ Value: !Sub ${BaseStack}AppLB
+ Period: 60
+ Statistic: Sum
+ TreatMissingData: notBreaching
+
+ HealthCheck:
+ Type: 'AWS::Route53::HealthCheck'
+ Properties:
+ HealthCheckConfig:
+ Port: 443
+ Type: HTTPS
+ ResourcePath: '/user/login'
+ FullyQualifiedDomainName: !Sub ${ADDRESS}
+ RequestInterval: 30
+ FailureThreshold: 2
+ HealthCheckTags:
+ -
+ Key: Name
+ Value: !Sub ${TENANT}-HealthCheck
+
+ HealthCheckAlarm :
+ Type: AWS::CloudWatch::Alarm
+ DependsOn: ServicePHP
+ Properties:
+ AlarmDescription : "Health Check Alarm"
+ AlarmName: !Sub ${TENANT}-HealthCheck-Alarm
+ Namespace: AWS/Route53
+ MetricName: HealthCheckStatus
+ Dimensions:
+ - Name: HealthCheckId
+ Value: !Ref HealthCheck
+ ComparisonOperator: LessThanThreshold
+ Period: 60
+ EvaluationPeriods: 5
+ Statistic: Minimum
+ Threshold: 1.0
+ AlarmActions:
+ - !Sub ${SNSTopic}
+
+ CPUAlarm:
+ Type: AWS::CloudWatch::Alarm
+ DependsOn: ServicePHP
+ Properties:
+ AlarmActions:
+ - !Sub ${SNSTopic}
+ AlarmDescription: "CPU utilitzation alarm"
+ AlarmName: !Sub ${TENANT}-CPU-Alarm
+ ComparisonOperator: GreaterThanOrEqualToThreshold
+ DatapointsToAlarm: 3
+ Dimensions:
+ - Name: ClusterName
+ Value:
+ Fn::ImportValue:
+ !Sub ${BaseStack}-ECSCluster
+ - Name: ServiceName
+ Value: !Sub ${TENANT}-php-svc
+ EvaluationPeriods: 5
+ Threshold: 65
+ MetricName: CPUUtilization
+ Namespace: AWS/ECS
+ Period: 60
+ Statistic: Average
+ TreatMissingData: notBreaching
+
+ MemoryAlarm:
+ Type: AWS::CloudWatch::Alarm
+ DependsOn: ServicePHP
+ Properties:
+ AlarmActions:
+ - !Sub ${SNSTopic}
+ AlarmDescription: "Memory utilitzation alarm"
+ AlarmName: !Sub ${TENANT}-MEM-Alarm
+ ComparisonOperator: GreaterThanOrEqualToThreshold
+ DatapointsToAlarm: 3
+ Dimensions:
+ - Name: ClusterName
+ Value:
+ Fn::ImportValue:
+ !Sub ${BaseStack}-ECSCluster
+ - Name: ServiceName
+ Value: !Sub ${TENANT}-php-svc
+
+ EvaluationPeriods: 5
+ Threshold: 65
+ MetricName: MemoryUtilization
+ Namespace: AWS/ECS
+ Period: 60
+ Statistic: Average
+ TreatMissingData: notBreaching
+
+ CronEvent:
+ Type: AWS::Events::Rule
+ Properties:
+ Description: "Scheduled Cloudwatch Event for Tenant Cron runs"
+ Name: !Sub ${TENANT}
+ ScheduleExpression: "rate(10 minutes)"
+ Targets:
+ -
+ Arn:
+ Fn::ImportValue:
+ "api-CronFunction"
+ Id: "cron_function"
+ Input:
+ Fn::Sub:
+ '{"tenant": "${TENANT}"}'
+
+ PermissionForEventsToInvokeLambda:
+ Type: AWS::Lambda::Permission
+ Properties:
+ FunctionName: "cron_function"
+ Action: "lambda:InvokeFunction"
+ Principal: "events.amazonaws.com"
+ SourceArn:
+ Fn::GetAtt:
+ - "CronEvent"
+ - "Arn"
diff --git a/scripts/test.sh b/scripts/test.sh
new file mode 100755
index 0000000..df5c021
--- /dev/null
+++ b/scripts/test.sh
@@ -0,0 +1,100 @@
+#!/bin/bash
+set -e
+
+#
+# Runs tests against the Drupal site and writes results to `tests/artifacts`.
+# Must be run from git root.
+
+set -a
+
+print_usage() {
+ echo "test.sh Run Behat tests for Perls"
+ echo " "
+ echo "test.sh [options]"
+ echo " "
+ echo "options:"
+ echo "-h, --help show brief help"
+ echo "-a Run all tests core and recommendation engine."
+}
+run_all=false
+while getopts 'a' flag; do
+ case "${flag}" in
+ a) run_all=true ;;
+ *) print_usage
+ exit 1 ;;
+ esac
+done
+
+TAGS='@core_functionality'
+if [[ "$run_all" == true ]]; then
+ TAGS='@core_functionality,@recommendation_engine'
+fi
+
+#Make sure environmental variables are setup
+if [ ! -f .env ]; then
+ if [ -f .env.example ]; then
+ echo "No .env file found. Copying .env.example to .env"
+ cp .env.example .env
+ fi
+fi
+
+# Check that screenshots folder is existing.
+if [ -d "artifacts/screenshots" ]; then
+ rm -R artifacts
+ mkdir -p artifacts/screenshots
+else
+ mkdir -p artifacts/screenshots
+fi
+
+# Load environmental variables
+source .env
+
+
+if [ $(docker inspect -f {{.State.Running}} ${PROJECT_NAME}_chrome 2>/dev/null) ]; then
+ echo "Remove the old chrome container"
+ docker stop ${PROJECT_NAME}_chrome
+ docker rm ${PROJECT_NAME}_chrome
+fi
+
+echo "Starting tests..."
+# Check to see if the app container is already running
+ALREADY_RUNNING=$(docker inspect -f {{.State.Running}} ${PROJECT_NAME}_php 2>/dev/null)
+
+if [ ! $ALREADY_RUNNING = "true" ]; then
+ docker-compose up -d
+fi
+
+echo "Starting a Google Chrome container for running the Behat tests..."
+# The Google Chrome container must have access to the file system in order to upload files.
+docker run -d --network=${PROJECT_NAME}_network \
+--cap-add=SYS_ADMIN \
+--publish=9222 --name="${PROJECT_NAME}_chrome" \
+justinribeiro/chrome-headless
+
+ALREADY_RUNNING=$(docker inspect -f {{.State.Running}} ${PROJECT_NAME}_chrome 2>/dev/null)
+
+if [ ! $ALREADY_RUNNING = "true" ]; then
+ echo 'Chrome container has stopped.'
+ exit 1
+fi
+
+echo "Starting UI tests..."
+BEHAT_PARAMS="{\"extensions\":{\"Drupal\\\MinkExtension\":{\"sessions\":{\"javascript\":{\"chrome\":{\"api_url\":\"http://${PROJECT_NAME}_chrome:9222\"}},\"browserChrome\":{\"chrome\":{\"api_url\":\"http://${PROJECT_NAME}_chrome:9222\"}}}}}}"
+echo $BEHAT_PARAMS
+docker exec -e BEHAT_PARAMS=$BEHAT_PARAMS ${PROJECT_NAME}_php ./vendor/bin/behat --init
+docker exec -e BEHAT_PARAMS=$BEHAT_PARAMS ${PROJECT_NAME}_php ./vendor/bin/behat \
+--config=./behat.yml --colors --tags $TAGS
+
+mkdir ./web/sites/simpletest
+mkdir ./web/sites/simpletest/browser_output
+chmod 777 ./web/sites/simpletest/browser_output
+
+./scripts/unit.sh
+
+echo "Shutting down Chrome..."
+
+docker network disconnect -f ${PROJECT_NAME}_network ${PROJECT_NAME}_chrome
+docker stop ${PROJECT_NAME}_chrome
+docker rm ${PROJECT_NAME}_chrome -f
+
+echo "Finished running tests! 🎉"
diff --git a/scripts/unit.sh b/scripts/unit.sh
new file mode 100755
index 0000000..36ca5ae
--- /dev/null
+++ b/scripts/unit.sh
@@ -0,0 +1,3 @@
+#!/bin/bash
+
+docker exec ${PROJECT_NAME}_php ./vendor/bin/phpunit -v -c ./phpunit.xml ./web/core/modules/node/tests/src/Unit
diff --git a/simplesamlphp_config/config/authsources.php b/simplesamlphp_config/config/authsources.php
new file mode 100644
index 0000000..9824744
--- /dev/null
+++ b/simplesamlphp_config/config/authsources.php
@@ -0,0 +1,69 @@
+ array(
+ // The default is to use core:AdminPassword, but it can be replaced with
+ // any authentication source.
+ 'core:AdminPassword',
+ ),
+);
+
+$path = getenv('SIMPLESAML_CONFIG_DIR');
+if (!$path) {
+ $path = '/var/www/html/private/saml_config';
+}
+try {
+ $file_count = 0;
+ foreach (new DirectoryIterator($path) as $fileInfo) {
+ if($fileInfo->isDot()) continue;
+ $ext = $fileInfo->getExtension();
+ if ($ext == 'xml') {
+ $xmldata = file_get_contents($path . '/' . $fileInfo->getFilename());
+ $entities = \SimpleSAML\Metadata\SAMLParser::parseDescriptorsString($xmldata);
+ if (!empty($entities)) {
+ $file_count++;
+ $keys = array_unique(array_keys($entities));
+ }
+ }
+ }
+ // Set IDP only if we encounter 1 XML file.
+ if ($file_count == 1 && !empty($keys)) {
+ $idp = reset($keys);
+ }
+ else {
+ // If there are more files, let the user choose the IDP.
+ $idp = NULL;
+ }
+}
+// If the path cannot be opened.
+catch (\UnexpectedValueException $e) {
+ echo "There seems to be an issue with the SSO configuration path. Please contact the administrator.";
+}
+// If the path is an empty string.
+catch (\RuntimeException $e) {
+ echo "The SSO configuration could not be loaded. Please contact the administrator.";
+}
+
+$authsource = getenv('SIMPLESAML_AUTH_SOURCE') ?? 'default-sp';
+$config[$authsource] = array(
+ 'saml:SP',
+ 'entityID' => $authsource,
+ 'idp' => $idp,
+ 'discoURL' => null,
+ 'acs.Bindings' => array(
+ 'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST',
+ ),
+ 'SingleLogoutServiceBinding' => array(),
+ 'signature.algorithm' => 'http://www.w3.org/2001/04/xmldsig-more#rsa-sha256',
+ 'name' => 'PERLS',
+ 'NameIDPolicy' => 'urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress',
+ 'attributes' => array(
+ 'mail',
+ 'sn',
+ 'givenName',
+ ),
+ 'attributes.required' => array (
+ 'mail',
+ ),
+);
diff --git a/simplesamlphp_config/config/config.php b/simplesamlphp_config/config/config.php
new file mode 100644
index 0000000..16bcf95
--- /dev/null
+++ b/simplesamlphp_config/config/config.php
@@ -0,0 +1,1042 @@
+ 'https://' . $_SERVER['HTTP_HOST'] . '/simplesaml/',
+
+ /*
+ * The 'application' configuration array groups a set configuration options
+ * relative to an application protected by SimpleSAMLphp.
+ */
+ //'application' => array(
+ /*
+ * The 'baseURL' configuration option allows you to specify a protocol,
+ * host and optionally a port that serves as the canonical base for all
+ * your application's URLs. This is useful when the environment
+ * observed in the server differs from the one observed by end users,
+ * for example, when using a load balancer to offload TLS.
+ *
+ * Note that this configuration option does not allow setting a path as
+ * part of the URL. If your setup involves URL rewriting or any other
+ * tricks that would result in SimpleSAMLphp observing a URL for your
+ * application's scripts different than the canonical one, you will
+ * need to compute the right URLs yourself and pass them dynamically
+ * to SimpleSAMLphp's API.
+ */
+ //'baseURL' => 'https://example.com'
+ //),
+
+ /*
+ * The following settings are *filesystem paths* which define where
+ * SimpleSAMLphp can find or write the following things:
+ * - 'certdir': The base directory for certificate and key material.
+ * - 'loggingdir': Where to write logs.
+ * - 'datadir': Storage of general data.
+ * - 'temdir': Saving temporary files. SimpleSAMLphp will attempt to create
+ * this directory if it doesn't exist.
+ * When specified as a relative path, this is relative to the SimpleSAMLphp
+ * root directory.
+ */
+ 'certdir' => 'cert/',
+ 'loggingdir' => 'log/',
+ 'datadir' => 'data/',
+ 'tempdir' => '/tmp/simplesaml',
+
+ /*
+ * Some information about the technical persons running this installation.
+ * The email address will be used as the recipient address for error reports, and
+ * also as the technical contact in generated metadata.
+ */
+ 'technicalcontact_name' => '',
+ 'technicalcontact_email' => '',
+
+ /*
+ * The timezone of the server. This option should be set to the timezone you want
+ * SimpleSAMLphp to report the time in. The default is to guess the timezone based
+ * on your system timezone.
+ *
+ * See this page for a list of valid timezones: http://php.net/manual/en/timezones.php
+ */
+ 'timezone' => 'America/Chicago',
+
+
+
+ /**********************************
+ | SECURITY CONFIGURATION OPTIONS |
+ **********************************/
+
+ /*
+ * This is a secret salt used by SimpleSAMLphp when it needs to generate a secure hash
+ * of a value. It must be changed from its default value to a secret value. The value of
+ * 'secretsalt' can be any valid string of any length.
+ *
+ * A possible way to generate a random salt is by running the following command from a unix shell:
+ * tr -c -d '0123456789abcdefghijklmnopqrstuvwxyz' /dev/null;echo
+ */
+ 'secretsalt' => 'rOld6lwRJiJJN877PKR90ohHypDY',
+
+ /*
+ * This password must be kept secret, and modified from the default value 123.
+ * This password will give access to the installation page of SimpleSAMLphp with
+ * metadata listing and diagnostics pages.
+ * You can also put a hash here; run "bin/pwgen.php" to generate one.
+ */
+ 'auth.adminpassword' => '',
+
+ /*
+ * Set this options to true if you want to require administrator password to access the web interface
+ * or the metadata pages, respectively.
+ */
+ 'admin.protectindexpage' => true,
+ 'admin.protectmetadata' => true,
+
+ /*
+ * Set this option to false if you don't want SimpleSAMLphp to check for new stable releases when
+ * visiting the configuration tab in the web interface.
+ */
+ 'admin.checkforupdates' => true,
+
+ /*
+ * Array of domains that are allowed when generating links or redirects
+ * to URLs. SimpleSAMLphp will use this option to determine whether to
+ * to consider a given URL valid or not, but you should always validate
+ * URLs obtained from the input on your own (i.e. ReturnTo or RelayState
+ * parameters obtained from the $_REQUEST array).
+ *
+ * SimpleSAMLphp will automatically add your own domain (either by checking
+ * it dynamically, or by using the domain defined in the 'baseurlpath'
+ * directive, the latter having precedence) to the list of trusted domains,
+ * in case this option is NOT set to NULL. In that case, you are explicitly
+ * telling SimpleSAMLphp to verify URLs.
+ *
+ * Set to an empty array to disallow ALL redirects or links pointing to
+ * an external URL other than your own domain. This is the default behaviour.
+ *
+ * Set to NULL to disable checking of URLs. DO NOT DO THIS UNLESS YOU KNOW
+ * WHAT YOU ARE DOING!
+ *
+ * Example:
+ * 'trusted.url.domains' => array('sp.example.com', 'app.example.com'),
+ */
+ 'trusted.url.domains' => NULL,
+
+ /*
+ * Enable regular expression matching of trusted.url.domains.
+ *
+ * Set to true to treat the values in trusted.url.domains as regular
+ * expressions. Set to false to do exact string matching.
+ *
+ * If enabled, the start and end delimiters ('^' and '$') will be added to
+ * all regular expressions in trusted.url.domains.
+ */
+ 'trusted.url.regex' => false,
+
+ /*
+ * Enable secure POST from HTTPS to HTTP.
+ *
+ * If you have some SP's on HTTP and IdP is normally on HTTPS, this option
+ * enables secure POSTing to HTTP endpoint without warning from browser.
+ *
+ * For this to work, module.php/core/postredirect.php must be accessible
+ * also via HTTP on IdP, e.g. if your IdP is on
+ * https://idp.example.org/ssp/, then
+ * http://idp.example.org/ssp/module.php/core/postredirect.php must be accessible.
+ */
+ 'enable.http_post' => false,
+
+
+
+ /************************
+ | ERRORS AND DEBUGGING |
+ ************************/
+
+ /*
+ * The 'debug' option allows you to control how SimpleSAMLphp behaves in certain
+ * situations where further action may be taken
+ *
+ * It can be left unset, in which case, debugging is switched off for all actions.
+ * If set, it MUST be an array containing the actions that you want to enable, or
+ * alternatively a hashed array where the keys are the actions and their
+ * corresponding values are booleans enabling or disabling each particular action.
+ *
+ * SimpleSAMLphp provides some pre-defined actiones, though modules could add new
+ * actions here. Refer to the documentation of every module to learn if they
+ * allow you to set any more debugging actions.
+ *
+ * The pre-defined actions are:
+ *
+ * - 'saml': this action controls the logging of SAML messages exchanged with other
+ * entities. When enabled ('saml' is present in this option, or set to true), all
+ * SAML messages will be logged, including plaintext versions of encrypted
+ * messages.
+ *
+ * - 'backtraces': this action controls the logging of error backtraces. If you
+ * want to log backtraces so that you can debug any possible errors happening in
+ * SimpleSAMLphp, enable this action (add it to the array or set it to true).
+ *
+ * - 'validatexml': this action allows you to validate SAML documents against all
+ * the relevant XML schemas. SAML 1.1 messages or SAML metadata parsed with
+ * the XML to SimpleSAMLphp metadata converter or the metaedit module will
+ * validate the SAML documents if this option is enabled.
+ *
+ * If you want to disable debugging completely, unset this option or set it to an
+ * empty array.
+ */
+ 'debug' => array(
+ 'saml' => false,
+ 'backtraces' => false,
+ 'validatexml' => false,
+ ),
+
+ /*
+ * When 'showerrors' is enabled, all error messages and stack traces will be output
+ * to the browser.
+ *
+ * When 'errorreporting' is enabled, a form will be presented for the user to report
+ * the error to 'technicalcontact_email'.
+ */
+ 'showerrors' => false,
+ 'errorreporting' => false,
+
+ /*
+ * Custom error show function called from SimpleSAML_Error_Error::show.
+ * See docs/simplesamlphp-errorhandling.txt for function code example.
+ *
+ * Example:
+ * 'errors.show_function' => array('sspmod_example_Error_Show', 'show'),
+ */
+
+
+
+ /**************************
+ | LOGGING AND STATISTICS |
+ **************************/
+
+ /*
+ * Define the minimum log level to log. Available levels:
+ * - SimpleSAML\Logger::ERR No statistics, only errors
+ * - SimpleSAML\Logger::WARNING No statistics, only warnings/errors
+ * - SimpleSAML\Logger::NOTICE Statistics and errors
+ * - SimpleSAML\Logger::INFO Verbose logs
+ * - SimpleSAML\Logger::DEBUG Full debug logs - not recommended for production
+ *
+ * Choose logging handler.
+ *
+ * Options: [syslog,file,errorlog]
+ *
+ */
+ 'logging.level' => SimpleSAML\Logger::DEBUG,
+ 'logging.handler' => 'syslog',
+
+ /*
+ * Specify the format of the logs. Its use varies depending on the log handler used (for instance, you cannot
+ * control here how dates are displayed when using the syslog or errorlog handlers), but in general the options
+ * are:
+ *
+ * - %date{}: the date and time, with its format specified inside the brackets. See the PHP documentation
+ * of the strftime() function for more information on the format. If the brackets are omitted, the standard
+ * format is applied. This can be useful if you just want to control the placement of the date, but don't care
+ * about the format.
+ *
+ * - %process: the name of the SimpleSAMLphp process. Remember you can configure this in the 'logging.processname'
+ * option below.
+ *
+ * - %level: the log level (name or number depending on the handler used).
+ *
+ * - %stat: if the log entry is intended for statistical purposes, it will print the string 'STAT ' (bear in mind
+ * the trailing space).
+ *
+ * - %trackid: the track ID, an identifier that allows you to track a single session.
+ *
+ * - %srcip: the IP address of the client. If you are behind a proxy, make sure to modify the
+ * $_SERVER['REMOTE_ADDR'] variable on your code accordingly to the X-Forwarded-For header.
+ *
+ * - %msg: the message to be logged.
+ *
+ */
+ //'logging.format' => '%date{%b %d %H:%M:%S} %process %level %stat[%trackid] %msg',
+
+ /*
+ * Choose which facility should be used when logging with syslog.
+ *
+ * These can be used for filtering the syslog output from SimpleSAMLphp into its
+ * own file by configuring the syslog daemon.
+ *
+ * See the documentation for openlog (http://php.net/manual/en/function.openlog.php) for available
+ * facilities. Note that only LOG_USER is valid on windows.
+ *
+ * The default is to use LOG_LOCAL5 if available, and fall back to LOG_USER if not.
+ */
+ 'logging.facility' => defined('LOG_LOCAL5') ? constant('LOG_LOCAL5') : LOG_USER,
+
+ /*
+ * The process name that should be used when logging to syslog.
+ * The value is also written out by the other logging handlers.
+ */
+ 'logging.processname' => 'simplesamlphp',
+
+ /*
+ * Logging: file - Logfilename in the loggingdir from above.
+ */
+ 'logging.logfile' => 'simplesamlphp.log',
+
+ /*
+ * This is an array of outputs. Each output has at least a 'class' option, which
+ * selects the output.
+ */
+ 'statistics.out' => array(// Log statistics to the normal log.
+ /*
+ array(
+ 'class' => 'core:Log',
+ 'level' => 'notice',
+ ),
+ */
+ // Log statistics to files in a directory. One file per day.
+ /*
+ array(
+ 'class' => 'core:File',
+ 'directory' => '/var/log/stats',
+ ),
+ */
+ ),
+
+
+
+ /***********************
+ | PROXY CONFIGURATION |
+ ***********************/
+
+ /*
+ * Proxy to use for retrieving URLs.
+ *
+ * Example:
+ * 'proxy' => 'tcp://proxy.example.com:5100'
+ */
+ 'proxy' => null,
+
+ /*
+ * Username/password authentication to proxy (Proxy-Authorization: Basic)
+ * Example:
+ * 'proxy.auth' = 'myuser:password'
+ */
+ 'proxy.auth' => false,
+
+
+
+ /**************************
+ | DATABASE CONFIGURATION |
+ **************************/
+
+ /*
+ * This database configuration is optional. If you are not using
+ * core functionality or modules that require a database, you can
+ * skip this configuration.
+ */
+
+ /*
+ * Database connection string.
+ * Ensure that you have the required PDO database driver installed
+ * for your connection string.
+ */
+ 'database.dsn' => 'mysql:host=localhost;dbname=saml',
+
+ /*
+ * SQL database credentials
+ */
+ 'database.username' => 'simplesamlphp',
+ 'database.password' => 'secret',
+
+ /*
+ * (Optional) Table prefix
+ */
+ 'database.prefix' => '',
+
+ /*
+ * True or false if you would like a persistent database connection
+ */
+ 'database.persistent' => false,
+
+ /*
+ * Database slave configuration is optional as well. If you are only
+ * running a single database server, leave this blank. If you have
+ * a master/slave configuration, you can define as many slave servers
+ * as you want here. Slaves will be picked at random to be queried from.
+ *
+ * Configuration options in the slave array are exactly the same as the
+ * options for the master (shown above) with the exception of the table
+ * prefix.
+ */
+ 'database.slaves' => array(
+ /*
+ array(
+ 'dsn' => 'mysql:host=myslave;dbname=saml',
+ 'username' => 'simplesamlphp',
+ 'password' => 'secret',
+ 'persistent' => false,
+ ),
+ */
+ ),
+
+
+
+ /*************
+ | PROTOCOLS |
+ *************/
+
+ /*
+ * Which functionality in SimpleSAMLphp do you want to enable. Normally you would enable only
+ * one of the functionalities below, but in some cases you could run multiple functionalities.
+ * In example when you are setting up a federation bridge.
+ */
+ 'enable.saml20-idp' => false,
+ 'enable.shib13-idp' => false,
+ 'enable.adfs-idp' => false,
+ 'enable.wsfed-sp' => false,
+ 'enable.authmemcookie' => false,
+
+ /*
+ * Default IdP for WS-Fed.
+ */
+ 'default-wsfed-idp' => 'urn:federation:pingfederate:localhost',
+
+ /*
+ * Whether SimpleSAMLphp should sign the response or the assertion in SAML 1.1 authentication
+ * responses.
+ *
+ * The default is to sign the assertion element, but that can be overridden by setting this
+ * option to TRUE. It can also be overridden on a pr. SP basis by adding an option with the
+ * same name to the metadata of the SP.
+ */
+ 'shib13.signresponse' => true,
+
+
+
+ /***********
+ | MODULES |
+ ***********/
+
+ /*
+ * Configuration to override module enabling/disabling.
+ *
+ * Example:
+ *
+ * 'module.enable' => array(
+ * 'exampleauth' => TRUE, // Setting to TRUE enables.
+ * 'saml' => FALSE, // Setting to FALSE disables.
+ * 'core' => NULL, // Unset or NULL uses default.
+ * ),
+ *
+ */
+
+
+
+ /*************************
+ | SESSION CONFIGURATION |
+ *************************/
+
+ /*
+ * This value is the duration of the session in seconds. Make sure that the time duration of
+ * cookies both at the SP and the IdP exceeds this duration.
+ */
+ 'session.duration' => 8 * (60 * 60), // 8 hours.
+
+ /*
+ * Sets the duration, in seconds, data should be stored in the datastore. As the data store is used for
+ * login and logout requests, this option will control the maximum time these operations can take.
+ * The default is 4 hours (4*60*60) seconds, which should be more than enough for these operations.
+ */
+ 'session.datastore.timeout' => (4 * 60 * 60), // 4 hours
+
+ /*
+ * Sets the duration, in seconds, auth state should be stored.
+ */
+ 'session.state.timeout' => (60 * 60), // 1 hour
+
+ /*
+ * Option to override the default settings for the session cookie name
+ */
+ 'session.cookie.name' => 'SimpleSAMLSessionID',
+
+ /*
+ * Expiration time for the session cookie, in seconds.
+ *
+ * Defaults to 0, which means that the cookie expires when the browser is closed.
+ *
+ * Example:
+ * 'session.cookie.lifetime' => 30*60,
+ */
+ 'session.cookie.lifetime' => 0,
+
+ /*
+ * Limit the path of the cookies.
+ *
+ * Can be used to limit the path of the cookies to a specific subdirectory.
+ *
+ * Example:
+ * 'session.cookie.path' => '/simplesaml/',
+ */
+ 'session.cookie.path' => '/',
+
+ /*
+ * Cookie domain.
+ *
+ * Can be used to make the session cookie available to several domains.
+ *
+ * Example:
+ * 'session.cookie.domain' => '.example.org',
+ */
+ 'session.cookie.domain' => null,
+
+ /*
+ * Set the secure flag in the cookie.
+ *
+ * Set this to TRUE if the user only accesses your service
+ * through https. If the user can access the service through
+ * both http and https, this must be set to FALSE.
+ */
+ 'session.cookie.secure' => !empty($_SERVER['HTTPS']),
+
+ /*
+ * Options to override the default settings for php sessions.
+ */
+ 'session.phpsession.cookiename' => 'SimpleSAML',
+ 'session.phpsession.savepath' => null,
+ 'session.phpsession.httponly' => true,
+
+ /*
+ * Option to override the default settings for the auth token cookie
+ */
+ 'session.authtoken.cookiename' => 'SimpleSAMLAuthToken',
+
+ /*
+ * Options for remember me feature for IdP sessions. Remember me feature
+ * has to be also implemented in authentication source used.
+ *
+ * Option 'session.cookie.lifetime' should be set to zero (0), i.e. cookie
+ * expires on browser session if remember me is not checked.
+ *
+ * Session duration ('session.duration' option) should be set according to
+ * 'session.rememberme.lifetime' option.
+ *
+ * It's advised to use remember me feature with session checking function
+ * defined with 'session.check_function' option.
+ */
+ 'session.rememberme.enable' => false,
+ 'session.rememberme.checked' => false,
+ 'session.rememberme.lifetime' => (14 * 86400),
+
+ /*
+ * Custom function for session checking called on session init and loading.
+ * See docs/simplesamlphp-advancedfeatures.txt for function code example.
+ *
+ * Example:
+ * 'session.check_function' => array('sspmod_example_Util', 'checkSession'),
+ */
+
+
+
+ /**************************
+ | MEMCACHE CONFIGURATION |
+ **************************/
+
+ /*
+ * Configuration for the 'memcache' session store. This allows you to store
+ * multiple redundant copies of sessions on different memcache servers.
+ *
+ * 'memcache_store.servers' is an array of server groups. Every data
+ * item will be mirrored in every server group.
+ *
+ * Each server group is an array of servers. The data items will be
+ * load-balanced between all servers in each server group.
+ *
+ * Each server is an array of parameters for the server. The following
+ * options are available:
+ * - 'hostname': This is the hostname or ip address where the
+ * memcache server runs. This is the only required option.
+ * - 'port': This is the port number of the memcache server. If this
+ * option isn't set, then we will use the 'memcache.default_port'
+ * ini setting. This is 11211 by default.
+ * - 'weight': This sets the weight of this server in this server
+ * group. http://php.net/manual/en/function.Memcache-addServer.php
+ * contains more information about the weight option.
+ * - 'timeout': The timeout for this server. By default, the timeout
+ * is 3 seconds.
+ *
+ * Example of redundant configuration with load balancing:
+ * This configuration makes it possible to lose both servers in the
+ * a-group or both servers in the b-group without losing any sessions.
+ * Note that sessions will be lost if one server is lost from both the
+ * a-group and the b-group.
+ *
+ * 'memcache_store.servers' => array(
+ * array(
+ * array('hostname' => 'mc_a1'),
+ * array('hostname' => 'mc_a2'),
+ * ),
+ * array(
+ * array('hostname' => 'mc_b1'),
+ * array('hostname' => 'mc_b2'),
+ * ),
+ * ),
+ *
+ * Example of simple configuration with only one memcache server,
+ * running on the same computer as the web server:
+ * Note that all sessions will be lost if the memcache server crashes.
+ *
+ * 'memcache_store.servers' => array(
+ * array(
+ * array('hostname' => 'localhost'),
+ * ),
+ * ),
+ *
+ */
+ 'memcache_store.servers' => array(
+ array(
+ array('hostname' => 'localhost'),
+ ),
+ ),
+
+ /*
+ * This value allows you to set a prefix for memcache-keys. The default
+ * for this value is 'simpleSAMLphp', which is fine in most cases.
+ *
+ * When running multiple instances of SSP on the same host, and more
+ * than one instance is using memcache, you probably want to assign
+ * a unique value per instance to this setting to avoid data collision.
+ */
+ 'memcache_store.prefix' => '',
+
+ /*
+ * This value is the duration data should be stored in memcache. Data
+ * will be dropped from the memcache servers when this time expires.
+ * The time will be reset every time the data is written to the
+ * memcache servers.
+ *
+ * This value should always be larger than the 'session.duration'
+ * option. Not doing this may result in the session being deleted from
+ * the memcache servers while it is still in use.
+ *
+ * Set this value to 0 if you don't want data to expire.
+ *
+ * Note: The oldest data will always be deleted if the memcache server
+ * runs out of storage space.
+ */
+ 'memcache_store.expires' => 36 * (60 * 60), // 36 hours.
+
+
+
+ /*************************************
+ | LANGUAGE AND INTERNATIONALIZATION |
+ *************************************/
+
+ /*
+ * Languages available, RTL languages, and what language is the default.
+ */
+ 'language.available' => array(
+ 'en', /*'no', 'nn', 'se', 'da', 'de', 'sv', 'fi', 'es', 'fr', 'it', 'nl', 'lb', 'cs',
+ 'sl', 'lt', 'hr', 'hu', 'pl', 'pt', 'pt-br', 'tr', 'ja', 'zh', 'zh-tw', 'ru', 'et',
+ 'he', 'id', 'sr', 'lv', 'ro', 'eu', 'el', 'af'*/
+ ),
+ 'language.rtl' => array('ar', 'dv', 'fa', 'ur', 'he'),
+ 'language.default' => 'en',
+
+ /*
+ * Options to override the default settings for the language parameter
+ */
+ 'language.parameter.name' => 'language',
+ 'language.parameter.setcookie' => true,
+
+ /*
+ * Options to override the default settings for the language cookie
+ */
+ 'language.cookie.name' => 'language',
+ 'language.cookie.domain' => null,
+ 'language.cookie.path' => '/',
+ 'language.cookie.secure' => false,
+ 'language.cookie.httponly' => false,
+ 'language.cookie.lifetime' => (60 * 60 * 24 * 900),
+
+ /*
+ * Which i18n backend to use.
+ *
+ * "SimpleSAMLphp" is the home made system, valid for 1.x.
+ * For 2.x, only "gettext/gettext" will be possible.
+ *
+ * Home-made templates will always use "SimpleSAMLphp".
+ * To use twig (where avaliable), select "gettext/gettext".
+ */
+ 'language.i18n.backend' => 'SimpleSAMLphp',
+
+ /**
+ * Custom getLanguage function called from SimpleSAML\Locale\Language::getLanguage().
+ * Function should return language code of one of the available languages or NULL.
+ * See SimpleSAML\Locale\Language::getLanguage() source code for more info.
+ *
+ * This option can be used to implement a custom function for determining
+ * the default language for the user.
+ *
+ * Example:
+ * 'language.get_language_function' => array('sspmod_example_Template', 'getLanguage'),
+ */
+
+ /*
+ * Extra dictionary for attribute names.
+ * This can be used to define local attributes.
+ *
+ * The format of the parameter is a string with :.
+ *
+ * Specifying this option will cause us to look for modules//dictionaries/.definition.json
+ * The dictionary should look something like:
+ *
+ * {
+ * "firstattribute": {
+ * "en": "English name",
+ * "no": "Norwegian name"
+ * },
+ * "secondattribute": {
+ * "en": "English name",
+ * "no": "Norwegian name"
+ * }
+ * }
+ *
+ * Note that all attribute names in the dictionary must in lowercase.
+ *
+ * Example: 'attributes.extradictionary' => 'ourmodule:ourattributes',
+ */
+ 'attributes.extradictionary' => null,
+
+
+
+ /**************
+ | APPEARANCE |
+ **************/
+
+ /*
+ * Which theme directory should be used?
+ */
+ 'theme.use' => 'default',
+
+ /*
+ * Templating options
+ *
+ * By default, twig templates are not cached. To turn on template caching:
+ * Set 'template.cache' to an absolute path pointing to a directory that
+ * SimpleSAMLphp has read and write permissions to.
+ */
+ //'template.cache' => '',
+
+ /*
+ * Set the 'template.auto_reload' to true if you would like SimpleSAMLphp to
+ * recompile the templates (when using the template cache) if the templates
+ * change. If you don't want to check the source templates for every request,
+ * set it to false.
+ */
+ 'template.auto_reload' => false,
+
+
+
+ /*********************
+ | DISCOVERY SERVICE |
+ *********************/
+
+ /*
+ * Whether the discovery service should allow the user to save his choice of IdP.
+ */
+ 'idpdisco.enableremember' => true,
+ 'idpdisco.rememberchecked' => true,
+
+ /*
+ * The disco service only accepts entities it knows.
+ */
+ 'idpdisco.validate' => true,
+
+ 'idpdisco.extDiscoveryStorage' => null,
+
+ /*
+ * IdP Discovery service look configuration.
+ * Wether to display a list of idp or to display a dropdown box. For many IdP' a dropdown box
+ * gives the best use experience.
+ *
+ * When using dropdown box a cookie is used to highlight the previously chosen IdP in the dropdown.
+ * This makes it easier for the user to choose the IdP
+ *
+ * Options: [links,dropdown]
+ */
+ 'idpdisco.layout' => 'dropdown',
+
+
+
+ /*************************************
+ | AUTHENTICATION PROCESSING FILTERS |
+ *************************************/
+
+ /*
+ * Authentication processing filters that will be executed for all IdPs
+ * Both Shibboleth and SAML 2.0
+ */
+ 'authproc.idp' => array(
+ /* Enable the authproc filter below to add URN prefixes to all attributes
+ 10 => array(
+ 'class' => 'core:AttributeMap', 'addurnprefix'
+ ), */
+ /* Enable the authproc filter below to automatically generated eduPersonTargetedID.
+ 20 => 'core:TargetedID',
+ */
+
+ // Adopts language from attribute to use in UI
+ 30 => 'core:LanguageAdaptor',
+
+ 45 => array(
+ 'class' => 'core:StatisticsWithAttribute',
+ 'attributename' => 'realm',
+ 'type' => 'saml20-idp-SSO',
+ ),
+
+ /* When called without parameters, it will fallback to filter attributes ‹the old way›
+ * by checking the 'attributes' parameter in metadata on IdP hosted and SP remote.
+ */
+ 50 => 'core:AttributeLimit',
+
+ /*
+ * Search attribute "distinguishedName" for pattern and replaces if found
+
+ 60 => array(
+ 'class' => 'core:AttributeAlter',
+ 'pattern' => '/OU=studerende/',
+ 'replacement' => 'Student',
+ 'subject' => 'distinguishedName',
+ '%replace',
+ ),
+ */
+
+ /*
+ * Consent module is enabled (with no permanent storage, using cookies).
+
+ 90 => array(
+ 'class' => 'consent:Consent',
+ 'store' => 'consent:Cookie',
+ 'focus' => 'yes',
+ 'checked' => TRUE
+ ),
+ */
+ // If language is set in Consent module it will be added as an attribute.
+ 99 => 'core:LanguageAdaptor',
+ ),
+
+ /*
+ * Authentication processing filters that will be executed for all SPs
+ * Both Shibboleth and SAML 2.0
+ */
+ 'authproc.sp' => array(
+ /*
+ 10 => array(
+ 'class' => 'core:AttributeMap', 'removeurnprefix'
+ ),
+ */
+
+ /*
+ * Generate the 'group' attribute populated from other variables, including eduPersonAffiliation.
+ 60 => array(
+ 'class' => 'core:GenerateGroups', 'eduPersonAffiliation'
+ ),
+ */
+ /*
+ * All users will be members of 'users' and 'members'
+ 61 => array(
+ 'class' => 'core:AttributeAdd', 'groups' => array('users', 'members')
+ ),
+ */
+
+ // Adopts language from attribute to use in UI
+ 90 => 'core:LanguageAdaptor',
+
+ ),
+
+
+
+ /**************************
+ | METADATA CONFIGURATION |
+ **************************/
+
+ /*
+ * This option configures the metadata sources. The metadata sources is given as an array with
+ * different metadata sources. When searching for metadata, SimpleSAMLphp will search through
+ * the array from start to end.
+ *
+ * Each element in the array is an associative array which configures the metadata source.
+ * The type of the metadata source is given by the 'type' element. For each type we have
+ * different configuration options.
+ *
+ * Flat file metadata handler:
+ * - 'type': This is always 'flatfile'.
+ * - 'directory': The directory we will load the metadata files from. The default value for
+ * this option is the value of the 'metadatadir' configuration option, or
+ * 'metadata/' if that option is unset.
+ *
+ * XML metadata handler:
+ * This metadata handler parses an XML file with either an EntityDescriptor element or an
+ * EntitiesDescriptor element. The XML file may be stored locally, or (for debugging) on a remote
+ * web server.
+ * The XML metadata handler defines the following options:
+ * - 'type': This is always 'xml'.
+ * - 'file': Path to the XML file with the metadata.
+ * - 'url': The URL to fetch metadata from. THIS IS ONLY FOR DEBUGGING - THERE IS NO CACHING OF THE RESPONSE.
+ *
+ * MDQ metadata handler:
+ * This metadata handler looks up for the metadata of an entity at the given MDQ server.
+ * The MDQ metadata handler defines the following options:
+ * - 'type': This is always 'mdq'.
+ * - 'server': Base URL of the MDQ server. Mandatory.
+ * - 'validateFingerprint': The fingerprint of the certificate used to sign the metadata. You don't need this
+ * option if you don't want to validate the signature on the metadata. Optional.
+ * - 'cachedir': Directory where metadata can be cached. Optional.
+ * - 'cachelength': Maximum time metadata can be cached, in seconds. Defaults to 24
+ * hours (86400 seconds). Optional.
+ *
+ * PDO metadata handler:
+ * This metadata handler looks up metadata of an entity stored in a database.
+ *
+ * Note: If you are using the PDO metadata handler, you must configure the database
+ * options in this configuration file.
+ *
+ * The PDO metadata handler defines the following options:
+ * - 'type': This is always 'pdo'.
+ *
+ * Examples:
+ *
+ * This example defines two flatfile sources. One is the default metadata directory, the other
+ * is a metadata directory with auto-generated metadata files.
+ *
+ * 'metadata.sources' => array(
+ * array('type' => 'flatfile'),
+ * array('type' => 'flatfile', 'directory' => 'metadata-generated'),
+ * ),
+ *
+ * This example defines a flatfile source and an XML source.
+ * 'metadata.sources' => array(
+ * array('type' => 'flatfile'),
+ * array('type' => 'xml', 'file' => 'idp.example.org-idpMeta.xml'),
+ * ),
+ *
+ * This example defines an mdq source.
+ * 'metadata.sources' => array(
+ * array(
+ * 'type' => 'mdq',
+ * 'server' => 'http://mdq.server.com:8080',
+ * 'cachedir' => '/var/simplesamlphp/mdq-cache',
+ * 'cachelength' => 86400
+ * )
+ * ),
+ *
+ * This example defines an pdo source.
+ * 'metadata.sources' => array(
+ * array('type' => 'pdo')
+ * ),
+ *
+ * Default:
+ * 'metadata.sources' => array(
+ * array('type' => 'flatfile')
+ * ),
+ */
+ 'metadata.sources' => array(
+ array('type' => 'flatfile'),
+ ),
+
+ /*
+ * Should signing of generated metadata be enabled by default.
+ *
+ * Metadata signing can also be enabled for a individual SP or IdP by setting the
+ * same option in the metadata for the SP or IdP.
+ */
+ 'metadata.sign.enable' => false,
+
+ /*
+ * The default key & certificate which should be used to sign generated metadata. These
+ * are files stored in the cert dir.
+ * These values can be overridden by the options with the same names in the SP or
+ * IdP metadata.
+ *
+ * If these aren't specified here or in the metadata for the SP or IdP, then
+ * the 'certificate' and 'privatekey' option in the metadata will be used.
+ * if those aren't set, signing of metadata will fail.
+ */
+ 'metadata.sign.privatekey' => null,
+ 'metadata.sign.privatekey_pass' => null,
+ 'metadata.sign.certificate' => null,
+
+
+
+ /****************************
+ | DATA STORE CONFIGURATION |
+ ****************************/
+
+ /*
+ * Configure the data store for SimpleSAMLphp.
+ *
+ * - 'phpsession': Limited datastore, which uses the PHP session.
+ * - 'memcache': Key-value datastore, based on memcache.
+ * - 'sql': SQL datastore, using PDO.
+ * - 'redis': Key-value datastore, based on redis.
+ *
+ * The default datastore is 'phpsession'.
+ *
+ * (This option replaces the old 'session.handler'-option.)
+ */
+ 'store.type' => 'sql',
+
+ /*
+ * The DSN the sql datastore should connect to.
+ *
+ * See http://www.php.net/manual/en/pdo.drivers.php for the various
+ * syntaxes.
+ */
+ 'store.sql.dsn' => 'sqlite:/tmp/simplesamlphp.sq3',
+
+ /*
+ * The username and password to use when connecting to the database.
+ */
+ 'store.sql.username' => 'user',
+ 'store.sql.password' => 'pass',
+
+ /*
+ * The prefix we should use on our tables.
+ */
+ 'store.sql.prefix' => 'SimpleSAMLphp',
+
+ /*
+ * The hostname and port of the Redis datastore instance.
+ */
+ 'store.redis.host' => 'localhost',
+ 'store.redis.port' => 6379,
+
+ /*
+ * The prefix we should use on our Redis datastore.
+ */
+ 'store.redis.prefix' => 'SimpleSAMLphp',
+);
diff --git a/simplesamlphp_config/metadata/saml20-idp-remote.php b/simplesamlphp_config/metadata/saml20-idp-remote.php
new file mode 100644
index 0000000..899a3ab
--- /dev/null
+++ b/simplesamlphp_config/metadata/saml20-idp-remote.php
@@ -0,0 +1,59 @@
+isDot()) continue;
+ $ext = $fileInfo->getExtension();
+ if ($ext == 'xml') {
+ $xmldata = file_get_contents($path . '/' . $fileInfo->getFilename());
+ $entities = \SimpleSAML\Metadata\SAMLParser::parseDescriptorsString($xmldata);
+
+ if (!empty($entities)) {
+ // Get all metadata for the entities.
+ foreach ($entities as &$entity) {
+ $entity = [
+ 'shib13-sp-remote' => $entity->getMetadata1xSP(),
+ 'shib13-idp-remote' => $entity->getMetadata1xIdP(),
+ 'saml20-sp-remote' => $entity->getMetadata20SP(),
+ 'saml20-idp-remote' => $entity->getMetadata20IdP(),
+ ];
+ }
+
+ // Transpose from $entities[entityid][type] to $output[type][entityid]
+ $output = \SimpleSAML\Utils\Arrays::transpose($entities);
+
+ foreach ($output as $type => &$entities) {
+ foreach ($entities as $entityId => $entityMetadata) {
+ if ($entityMetadata === NULL) {
+ continue;
+ }
+
+ // Remove the entityDescriptor element because it is unused.
+ unset($entityMetadata['entityDescriptor']);
+
+ $metadata[$entityId] = $entityMetadata;
+ }
+ }
+ }
+ }
+ }
+}
+ // If the path cannot be opened.
+catch (\UnexpectedValueException $e) {
+ echo "There seems to be an issue with the SSO configuration path. Please contact the administrator.";
+}
+ // If the path is an empty string.
+catch (\RuntimeException $e) {
+ echo "The SSO configuration could not be loaded. Please contact the administrator.";
+}
diff --git a/web/.csslintrc b/web/.csslintrc
new file mode 100644
index 0000000..177e4fc
--- /dev/null
+++ b/web/.csslintrc
@@ -0,0 +1,40 @@
+--errors=box-model,
+ display-property-grouping,
+ duplicate-background-images,
+ duplicate-properties,
+ empty-rules,
+ ids,
+ import,
+ important,
+ known-properties,
+ outline-none,
+ overqualified-elements,
+ qualified-headings,
+ shorthand,
+ star-property-hack,
+ text-indent,
+ underscore-property-hack,
+ unique-headings,
+ unqualified-attributes,
+ vendor-prefix,
+ zero-units
+--ignore=adjoining-classes,
+ box-sizing,
+ bulletproof-font-face,
+ compatible-vendor-prefixes,
+ errors,
+ fallback-colors,
+ floats,
+ font-faces,
+ font-sizes,
+ gradients,
+ import-ie-limit,
+ order-alphabetical,
+ regex-selectors,
+ rules-count,
+ selector-max,
+ selector-max-approaching,
+ selector-newline,
+ universal-selector
+--exclude-list=core/assets,
+ vendor
diff --git a/web/.editorconfig b/web/.editorconfig
new file mode 100644
index 0000000..686c443
--- /dev/null
+++ b/web/.editorconfig
@@ -0,0 +1,17 @@
+# Drupal editor configuration normalization
+# @see http://editorconfig.org/
+
+# This is the top-most .editorconfig file; do not search in parent directories.
+root = true
+
+# All files.
+[*]
+end_of_line = LF
+indent_style = space
+indent_size = 2
+charset = utf-8
+trim_trailing_whitespace = true
+insert_final_newline = true
+
+[composer.{json,lock}]
+indent_size = 4
diff --git a/web/.eslintignore b/web/.eslintignore
new file mode 100644
index 0000000..9c13487
--- /dev/null
+++ b/web/.eslintignore
@@ -0,0 +1,8 @@
+core/**/*
+vendor/**/*
+sites/**/files/**/*
+libraries/**/*
+sites/**/libraries/**/*
+profiles/**/libraries/**/*
+**/js_test_files/**/*
+**/node_modules/**/*
diff --git a/web/.eslintrc.json b/web/.eslintrc.json
new file mode 100644
index 0000000..d4bbc92
--- /dev/null
+++ b/web/.eslintrc.json
@@ -0,0 +1,3 @@
+{
+ "extends": "./core/.eslintrc.json"
+}
diff --git a/web/.gitattributes b/web/.gitattributes
new file mode 100644
index 0000000..a37894e
--- /dev/null
+++ b/web/.gitattributes
@@ -0,0 +1,61 @@
+# Drupal git normalization
+# @see https://www.kernel.org/pub/software/scm/git/docs/gitattributes.html
+# @see https://www.drupal.org/node/1542048
+
+# Normally these settings would be done with macro attributes for improved
+# readability and easier maintenance. However macros can only be defined at the
+# repository root directory. Drupal avoids making any assumptions about where it
+# is installed.
+
+# Define text file attributes.
+# - Treat them as text.
+# - Ensure no CRLF line-endings, neither on checkout nor on checkin.
+# - Detect whitespace errors.
+# - Exposed by default in `git diff --color` on the CLI.
+# - Validate with `git diff --check`.
+# - Deny applying with `git apply --whitespace=error-all`.
+# - Fix automatically with `git apply --whitespace=fix`.
+
+*.config text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
+*.css text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
+*.dist text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
+*.engine text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php
+*.html text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=html
+*.inc text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php
+*.install text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php
+*.js text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
+*.json text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
+*.lock text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
+*.map text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
+*.md text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
+*.module text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php
+*.php text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php
+*.po text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
+*.profile text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php
+*.script text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
+*.sh text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php
+*.sql text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
+*.svg text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
+*.theme text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php
+*.twig text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
+*.txt text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
+*.xml text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
+*.yml text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
+
+# Define binary file attributes.
+# - Do not treat them as text.
+# - Include binary diff in patches instead of "binary files differ."
+*.eot -text diff
+*.exe -text diff
+*.gif -text diff
+*.gz -text diff
+*.ico -text diff
+*.jpeg -text diff
+*.jpg -text diff
+*.otf -text diff
+*.phar -text diff
+*.png -text diff
+*.svgz -text diff
+*.ttf -text diff
+*.woff -text diff
+*.woff2 -text diff
diff --git a/web/.gitignore b/web/.gitignore
new file mode 100644
index 0000000..b20dc31
--- /dev/null
+++ b/web/.gitignore
@@ -0,0 +1,13 @@
+/INSTALL.txt
+/README.txt
+/example.gitignore
+/README.md
+
+/core/
+/libraries/
+/modules/contrib/
+/sites/default/files/
+/themes/contrib/
+/themes/custom/perls/js/
+/themes/custom/perls/css/
+/themes/custom/perls/node_modules/
\ No newline at end of file
diff --git a/web/.ht.router.php b/web/.ht.router.php
new file mode 100644
index 0000000..054f711
--- /dev/null
+++ b/web/.ht.router.php
@@ -0,0 +1,65 @@
+
+
+ Require all denied
+
+
+ Order allow,deny
+
+
+
+# Don't show directory listings for URLs which map to a directory.
+Options -Indexes
+
+# Set the default handler.
+DirectoryIndex index.php index.html index.htm
+
+# Add correct encoding for SVGZ.
+AddType image/svg+xml svg svgz
+AddEncoding gzip svgz
+
+# Most of the following PHP settings cannot be changed at runtime. See
+# sites/default/default.settings.php and
+# Drupal\Core\DrupalKernel::bootEnvironment() for settings that can be
+# changed at runtime.
+
+# PHP 7, Apache 1 and 2.
+
+ php_value assert.active 0
+
+
+# Requires mod_expires to be enabled.
+
+ # Enable expirations.
+ ExpiresActive On
+
+ # Cache all files for 2 weeks after access (A).
+ ExpiresDefault A1209600
+
+
+ # Do not allow PHP scripts to be cached unless they explicitly send cache
+ # headers themselves. Otherwise all scripts would have to overwrite the
+ # headers set by mod_expires if they want another caching behavior. This may
+ # fail if an error occurs early in the bootstrap process, and it may cause
+ # problems if a non-Drupal PHP file is installed in a subdirectory.
+ ExpiresActive Off
+
+
+
+# Set a fallback resource if mod_rewrite is not enabled. This allows Drupal to
+# work without clean URLs. This requires Apache version >= 2.2.16. If Drupal is
+# not accessed by the top level URL (i.e.: http://example.com/drupal/ instead of
+# http://example.com/), the path to index.php will need to be adjusted.
+
+ FallbackResource /index.php
+
+
+# Various rewrite rules.
+
+ RewriteEngine on
+
+ # Set "protossl" to "s" if we were accessed via https://. This is used later
+ # if you enable "www." stripping or enforcement, in order to ensure that
+ # you don't bounce between http and https.
+ RewriteRule ^ - [E=protossl]
+ RewriteCond %{HTTPS} on
+ RewriteRule ^ - [E=protossl:s]
+
+ # Make sure Authorization HTTP header is available to PHP
+ # even when running as CGI or FastCGI.
+ RewriteRule ^ - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
+
+ # Block access to "hidden" directories whose names begin with a period. This
+ # includes directories used by version control systems such as Subversion or
+ # Git to store control files. Files whose names begin with a period, as well
+ # as the control files used by CVS, are protected by the FilesMatch directive
+ # above.
+ #
+ # NOTE: This only works when mod_rewrite is loaded. Without mod_rewrite, it is
+ # not possible to block access to entire directories from .htaccess because
+ # is not allowed here.
+ #
+ # If you do not have mod_rewrite installed, you should remove these
+ # directories from your webroot or otherwise protect them from being
+ # downloaded.
+ RewriteRule "/\.|^\.(?!well-known/)" - [F]
+
+ # If your site can be accessed both with and without the 'www.' prefix, you
+ # can use one of the following settings to redirect users to your preferred
+ # URL, either WITH or WITHOUT the 'www.' prefix. Choose ONLY one option:
+ #
+ # To redirect all users to access the site WITH the 'www.' prefix,
+ # (http://example.com/foo will be redirected to http://www.example.com/foo)
+ # uncomment the following:
+ # RewriteCond %{HTTP_HOST} .
+ # RewriteCond %{HTTP_HOST} !^www\. [NC]
+ # RewriteRule ^ http%{ENV:protossl}://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
+ #
+ # To redirect all users to access the site WITHOUT the 'www.' prefix,
+ # (http://www.example.com/foo will be redirected to http://example.com/foo)
+ # uncomment the following:
+ # RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
+ # RewriteRule ^ http%{ENV:protossl}://%1%{REQUEST_URI} [L,R=301]
+
+ # Modify the RewriteBase if you are using Drupal in a subdirectory or in a
+ # VirtualDocumentRoot and the rewrite rules are not working properly.
+ # For example if your site is at http://example.com/drupal uncomment and
+ # modify the following line:
+ # RewriteBase /drupal
+ #
+ # If your site is running in a VirtualDocumentRoot at http://example.com/,
+ # uncomment the following line:
+ # RewriteBase /
+
+ # Redirect common PHP files to their new locations.
+ RewriteCond %{REQUEST_URI} ^(.*)?/(install\.php) [OR]
+ RewriteCond %{REQUEST_URI} ^(.*)?/(rebuild\.php)
+ RewriteCond %{REQUEST_URI} !core
+ RewriteRule ^ %1/core/%2 [L,QSA,R=301]
+
+ # Rewrite install.php during installation to see if mod_rewrite is working
+ RewriteRule ^core/install\.php core/install.php?rewrite=ok [QSA,L]
+
+ # Pass all requests not referring directly to files in the filesystem to
+ # index.php.
+ RewriteCond %{REQUEST_FILENAME} !-f
+ RewriteCond %{REQUEST_FILENAME} !-d
+ RewriteCond %{REQUEST_URI} !=/favicon.ico
+ RewriteRule ^ index.php [L]
+
+ # For security reasons, deny access to other PHP files on public sites.
+ # Note: The following URI conditions are not anchored at the start (^),
+ # because Drupal may be located in a subdirectory. To further improve
+ # security, you can replace '!/' with '!^/'.
+ # Allow access to PHP files in /core (like authorize.php or install.php):
+ RewriteCond %{REQUEST_URI} !/core/[^/]*\.php$
+ # Allow access to test-specific PHP files:
+ RewriteCond %{REQUEST_URI} !/core/modules/system/tests/https?\.php
+ # Allow access to Statistics module's custom front controller.
+ # Copy and adapt this rule to directly execute PHP files in contributed or
+ # custom modules or to run another PHP application in the same directory.
+ RewriteCond %{REQUEST_URI} !/core/modules/statistics/statistics\.php$
+ # Deny access to any other PHP files that do not match the rules above.
+ # Specifically, disallow autoload.php from being served directly.
+ RewriteRule "^(.+/.*|autoload)\.php($|/)" - [F]
+
+ # Rules to correctly serve gzip compressed CSS and JS files.
+ # Requires both mod_rewrite and mod_headers to be enabled.
+
+ # Serve gzip compressed CSS files if they exist and the client accepts gzip.
+ RewriteCond %{HTTP:Accept-encoding} gzip
+ RewriteCond %{REQUEST_FILENAME}\.gz -s
+ RewriteRule ^(.*)\.css $1\.css\.gz [QSA]
+
+ # Serve gzip compressed JS files if they exist and the client accepts gzip.
+ RewriteCond %{HTTP:Accept-encoding} gzip
+ RewriteCond %{REQUEST_FILENAME}\.gz -s
+ RewriteRule ^(.*)\.js $1\.js\.gz [QSA]
+
+ # Serve correct content types, and prevent double compression.
+ RewriteRule \.css\.gz$ - [T=text/css,E=no-gzip:1,E=no-brotli:1]
+ RewriteRule \.js\.gz$ - [T=text/javascript,E=no-gzip:1,E=no-brotli:1]
+
+
+ # Serve correct encoding type.
+ Header set Content-Encoding gzip
+ # Force proxies to cache gzipped & non-gzipped css/js files separately.
+ Header append Vary Accept-Encoding
+
+
+
+
+# Various header fixes.
+
+ # Disable content sniffing, since it's an attack vector.
+ Header always set X-Content-Type-Options nosniff
+ # Disable Proxy header, since it's an attack vector.
+ RequestHeader unset Proxy
+
diff --git a/web/autoload.php b/web/autoload.php
new file mode 100644
index 0000000..2c470f3
--- /dev/null
+++ b/web/autoload.php
@@ -0,0 +1,16 @@
+handle($request);
+$response->send();
+
+$kernel->terminate($request, $response);
diff --git a/web/modules/.gitignore b/web/modules/.gitignore
new file mode 100644
index 0000000..739a339
--- /dev/null
+++ b/web/modules/.gitignore
@@ -0,0 +1 @@
+/README.txt
\ No newline at end of file
diff --git a/web/modules/.gitkeep b/web/modules/.gitkeep
new file mode 100644
index 0000000..e69de29
diff --git a/web/modules/custom/annotator/annotator.info.yml b/web/modules/custom/annotator/annotator.info.yml
new file mode 100644
index 0000000..52050e1
--- /dev/null
+++ b/web/modules/custom/annotator/annotator.info.yml
@@ -0,0 +1,8 @@
+name: Annotation
+description: 'Attaches AnnotationJS to LO and an XAPIStateStore to persist the annotations.'
+type: module
+core: 8.x
+core_version_requirement: ^8 || ^9
+dependencies:
+ - xapi_reporting
+ - xapi
diff --git a/web/modules/custom/annotator/annotator.libraries.yml b/web/modules/custom/annotator/annotator.libraries.yml
new file mode 100644
index 0000000..cfe9757
--- /dev/null
+++ b/web/modules/custom/annotator/annotator.libraries.yml
@@ -0,0 +1,52 @@
+annotations.base:
+ js:
+ js/annotator.1.2.10/annotator.min.js: {}
+ js/annotator.1.2.10/annotator.permissions.min.js: {}
+ js/plugins/annotator.touch.min.js: {}
+ js/plugins/annotator.xapistore.js: {}
+ js/plugins/view_annotator.js: {}
+ locale/en/annotator.js: {}
+ js/init.js: {}
+ css:
+ component:
+ css/annotator.1.2.10/annotator.min.css: {}
+ css/annotator.touch.css: {}
+ css/style.css: {}
+ dependencies:
+ - core/jquery
+ - xapi_reporting/xapi-reporting.xapi-lib
+ - annotator/jQuery.i18n
+ - annotator/jQuery.dateFormat
+ - annotator/jQuery.slimScroll
+ - annotator/annotations.xapi_state_store
+jQuery.i18n:
+ remote: https://github.com/recurser/jquery-i18n
+ version: 1.1.2
+ license:
+ name: MIT
+ url: https://github.com/recurser/jquery-i18n/blob/develop/LICENSE
+ gpl-compatible: true
+ js:
+ js/lib/jquery.i18n.min.js: { minified: true }
+jQuery.dateFormat:
+ remote: https://github.com/phstc/jquery-dateFormat
+ version: 1.0
+ license:
+ name: MIT
+ url: https://github.com/phstc/jquery-dateFormat/blob/master/MIT-LICENSE.txt
+ gpl-compatible: true
+ js:
+ js/lib/jquery.dateFormat.min.js: { minified: true }
+jQuery.slimScroll:
+ remote: https://github.com/rochal/jQuery-slimScroll
+ version: 1.3.8
+ license:
+ name: MIT
+ gpl-compatible: true
+ js:
+ js/lib/jquery.slimscroll.min.js: { minified: true }
+annotations.xapi_state_store:
+ js:
+ js/xapi_store_helper/xapi_store_helper.web.js: {}
+ dependencies:
+ - xapi_reporting/xapi-reporting.xapi-lib
diff --git a/web/modules/custom/annotator/annotator.services.yml b/web/modules/custom/annotator/annotator.services.yml
new file mode 100644
index 0000000..d2e3e84
--- /dev/null
+++ b/web/modules/custom/annotator/annotator.services.yml
@@ -0,0 +1,6 @@
+services:
+ annotator.annotations_voided_statement_subscriber:
+ class: Drupal\annotator\EventSubscriber\AnnotationVoidedStatementSubscriber
+ arguments: ['@xapi.xapi_statement_helper', '@entity_type.manager', '@current_user', '@lrs.request_generator']
+ tags:
+ - { name: event_subscriber }
diff --git a/web/modules/custom/annotator/annotator_ui/annotator_ui.info.yml b/web/modules/custom/annotator/annotator_ui/annotator_ui.info.yml
new file mode 100644
index 0000000..eec2205
--- /dev/null
+++ b/web/modules/custom/annotator/annotator_ui/annotator_ui.info.yml
@@ -0,0 +1,9 @@
+name: Annotation UI
+description: 'Allows annotations to be viewed in the web interface.'
+type: module
+core: 8.x
+core_version_requirement: ^8 || ^9
+dependencies:
+ - pdb_vue
+ - annotator
+ - xapi_reporting
diff --git a/web/modules/custom/annotator/annotator_ui/annotator_ui.routing.yml b/web/modules/custom/annotator/annotator_ui/annotator_ui.routing.yml
new file mode 100644
index 0000000..1f0e7d7
--- /dev/null
+++ b/web/modules/custom/annotator/annotator_ui/annotator_ui.routing.yml
@@ -0,0 +1,7 @@
+annotator_ui.list_annotations:
+ path: '/user/annotations'
+ defaults:
+ _controller: '\Drupal\annotator_ui\Controller\AnnotationController::view'
+ _title: 'Annotations'
+ requirements:
+ _permission: 'access content'
diff --git a/web/modules/custom/annotator/annotator_ui/components/annotations_block/annotations_block.css b/web/modules/custom/annotator/annotator_ui/components/annotations_block/annotations_block.css
new file mode 100644
index 0000000..cd118a8
--- /dev/null
+++ b/web/modules/custom/annotator/annotator_ui/components/annotations_block/annotations_block.css
@@ -0,0 +1,55 @@
+body.perls-learner.l-page--path--user.l-page--user-annotations .l-main {
+ max-width: 1260px;
+}
+
+.annotation-list {
+ display: flex;
+ flex-direction: column;
+}
+
+.annotation-container {
+ display: flex;
+ padding: 10px;
+}
+
+.annotation-container .information {
+ flex-grow: 100;
+ margin-right: 30px;
+}
+.annotation-container .information:hover {
+ cursor: pointer;
+}
+
+.information p {
+ font-size: 16px;
+}
+
+.quote {
+ background-color: #e8f5f9;
+ padding: 10px 20px;
+}
+
+.subtitle {
+ font-size: 11px;
+ color: #333333;
+ margin-top: 10px;
+}
+
+.subtitle:after {
+ display: flex;
+ content: '';
+ width: 75%;
+ height: 1px;
+ background: #b5b5b5;
+ margin-top: 10px;
+}
+
+.delete button {
+ background-image: url('./images/trash-can.png');
+ width: 30px;
+ height: 45px;
+ background-repeat: no-repeat;
+ background-size: contain;
+ padding: 10px;
+ background-color: rgba(255, 255, 255, 0);
+}
diff --git a/web/modules/custom/annotator/annotator_ui/components/annotations_block/annotations_block.info.yml b/web/modules/custom/annotator/annotator_ui/components/annotations_block/annotations_block.info.yml
new file mode 100644
index 0000000..c06d446
--- /dev/null
+++ b/web/modules/custom/annotator/annotator_ui/components/annotations_block/annotations_block.info.yml
@@ -0,0 +1,21 @@
+name: Annotations Block
+machine_name: annotator_block
+type: pdb
+description: 'This block lists the annotations for the given user.'
+package: Perls - Vue
+core: 8.x
+core_version_requirement: ^8 || ^9
+module_status: active
+presentation: vue
+add_js:
+ footer:
+ 'annotations_block.js': {}
+add_css:
+ header:
+ component:
+ 'annotations_block.css': {}
+template: template.html
+libraries:
+ - pdb_vue/vue.vuex
+ - xapi_reporting/xapi-reporting.lib-common
+ - annotator/annotations.xapi_state_store
diff --git a/web/modules/custom/annotator/annotator_ui/components/annotations_block/annotations_block.js b/web/modules/custom/annotator/annotator_ui/components/annotations_block/annotations_block.js
new file mode 100644
index 0000000..29bd27e
--- /dev/null
+++ b/web/modules/custom/annotator/annotator_ui/components/annotations_block/annotations_block.js
@@ -0,0 +1,90 @@
+const xapi_store = new XAPIStoreHelper();
+
+// store.js This is a basic store.
+const store = new Vuex.Store({
+ state: {
+ count: 0,
+ annotations: [],
+ },
+ mutations: {
+ SET_ANNOTATIONS(state, annotations) {
+ state.annotations = annotations;
+ }
+ },
+ actions: {
+ async fetch_annotations() {
+ try {
+ const response = await fetch('/api/annotations');
+ const annotations = await response.json();
+ return store.commit('SET_ANNOTATIONS', annotations);
+ } catch {}
+ },
+ remove(store, annotation) {
+ var annotations = store.state.annotations.filter(_annotation => _annotation.statement_id !== annotation.statement_id);
+ return new Promise((resolve) => {
+ store.commit('SET_ANNOTATIONS', annotations);
+ resolve(annotation);
+ }).then((annotation) => {
+ return store.dispatch('persist', annotation);
+ });
+ },
+ persist(state, annotation) {
+ return new Promise((resolve) => {
+ resolve();
+ xapi_store.sendVoidedStatement(annotation);
+ });
+ }
+ },
+});
+
+// app Vue instance
+var app = new Vue({
+ store,
+ data: {},
+ // computed properties
+ computed: {
+ annotations() {
+ return this.$store.state.annotations;
+ },
+ },
+
+ // methods that implement data logic.
+ // note there's no DOM manipulation here at all.
+ methods: {
+ removeAnnotation: function (annotation) {
+ this.$store.dispatch('remove', annotation);
+ },
+ goTo: function(node_url) {
+ if (!node_url) {
+ return;
+ }
+ window.location.href = node_url;
+ },
+ },
+
+ // a custom directive to wait for the DOM to be updated
+ // before focusing on the input field.
+ // http://vuejs.org/guide/custom-directive.html
+ directives: {
+ 'annotation-focus': function (el, value) {
+ if (value) {
+ el.focus()
+ }
+ }
+ },
+
+ mounted() {
+ this.$store.dispatch('fetch_annotations');
+ },
+})
+
+// handle routing
+function onHashChange() {
+ window.location.hash = ''
+}
+
+window.addEventListener('hashchange', onHashChange)
+onHashChange()
+
+// mount
+app.$mount('.annotationApp')
diff --git a/web/modules/custom/annotator/annotator_ui/components/annotations_block/images/trash-can.png b/web/modules/custom/annotator/annotator_ui/components/annotations_block/images/trash-can.png
new file mode 100644
index 0000000..c4c3281
Binary files /dev/null and b/web/modules/custom/annotator/annotator_ui/components/annotations_block/images/trash-can.png differ
diff --git a/web/modules/custom/annotator/annotator_ui/components/annotations_block/template.html b/web/modules/custom/annotator/annotator_ui/components/annotations_block/template.html
new file mode 100644
index 0000000..98a74f3
--- /dev/null
+++ b/web/modules/custom/annotator/annotator_ui/components/annotations_block/template.html
@@ -0,0 +1,27 @@
+
+
+
+ You have not created any notes yet.
+
+
+
+
diff --git a/web/modules/custom/annotator/annotator_ui/src/Controller/AnnotationController.php b/web/modules/custom/annotator/annotator_ui/src/Controller/AnnotationController.php
new file mode 100644
index 0000000..c3062a1
--- /dev/null
+++ b/web/modules/custom/annotator/annotator_ui/src/Controller/AnnotationController.php
@@ -0,0 +1,62 @@
+entityTypeManager = $entity_type_manager;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public static function create(ContainerInterface $container) {
+ return new static(
+ $container->get('entity_type.manager')
+ );
+ }
+
+ /**
+ * Renders VueJS block to show list of annotations.
+ */
+ public function view() {
+ $block = Block::load(self::BLOCK_NAME);
+ if (empty($block)) {
+ throw new \Exception('A block must be defined');
+ }
+
+ $block_content = $this->entityTypeManager
+ ->getViewBuilder('block')
+ ->view($block);
+
+ return [
+ '#type' => 'container',
+ 'element-content' => $block_content,
+ ];
+ }
+
+}
diff --git a/web/modules/custom/annotator/css/annotator.1.2.10/annotator.min.css b/web/modules/custom/annotator/css/annotator.1.2.10/annotator.min.css
new file mode 100644
index 0000000..0584acf
--- /dev/null
+++ b/web/modules/custom/annotator/css/annotator.1.2.10/annotator.min.css
@@ -0,0 +1 @@
+.annotator-notice,.annotator-filter *,.annotator-widget *{font-family:"Helvetica Neue",Arial,Helvetica,sans-serif;font-weight:normal;text-align:left;margin:0;padding:0;background:0;-webkit-transition:none;-moz-transition:none;-o-transition:none;transition:none;-moz-box-shadow:none;-webkit-box-shadow:none;-o-box-shadow:none;box-shadow:none;color:#909090}.annotator-adder{background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJAAAAAwCAYAAAD+WvNWAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA2ZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAAD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mbSeD/PUpB8WeV7F9J+nEgXbiMdLclYmNGLc+2rvnYZyvIXleyPyj+lwfMbTf6ej+vBO9/K5lYT2OrV69e6XwkCBmPPjpDsj7s0Z6cnGOb6Xdu5du84NunibS8/vrrxJ/N047kv3Juu8Tfi/J3TV4srdk33tjELM9m+l1A/INTM+45/7rr+1aiPz0olsuYz4+RNkM/7XoO++35m+l3AfG/PHCuJrQ+yM4QtL3JsV1H16xZs4IKh32eyf7ihks8b8lUr2Q6iVwwHVwC4r96fgfll1brMnX6MCqe3VQ8//LJPzg13etc4n3hX3dt3woumY5/F2SGwoB9joLNWdf2+eR/edCPAxp/fQd0SJ4ttFkMY4KxWCx5Op0u4pNPPlkvi/YV4ZcvX04IuWd/DNAnPxOMYG/J4zg+4lrhFz75B495geAB4s+6+vVbln72PB3l33ztgE/+ZYOfCJie8/GX6v06h8wnyzMDveu9/CqRp4vtxBNM43/5y1/ueMO5I/gl8QRRLp/NfiD4mXiC2oq6U3rXxBOFVUzmY1tcr/Lq6CjxdERxTfwd8Qcrno4orom/I/5gxdMhAlIQkXwF064CLzwI4lERUUD891M8KiIKiP9OxNNhAvISEVFZDpevaJIHRTwKIvKb/0EQj4KI/Oa/U/F0qIA03JnS+wdKPD7cmSL/gyQeH+5Mkb8jxHOnWZiWiOTBLVH6/kEtbmHIglui9P2DWtzCWH3534r8HSUcd/l/AQYA7PGYKl3+RK0AAAAASUVORK5CYII=');background-repeat:no-repeat}.annotator-resize,.annotator-widget::after,.annotator-editor a::after,.annotator-viewer .annotator-controls button,.annotator-viewer .annotator-controls a,.annotator-filter .annotator-filter-navigation button::after,.annotator-filter .annotator-filter-property .annotator-filter-clear{background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAEiCAYAAAD0w4JOAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/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KZ0YuJr1lPB91ihImjmhlj5bfI118SlIHkRIRqeYAxFchNZiX+EMP6ScImq7WpuSi5SwTHYyc4u7rFEvWuS09TH79wz6nwADANCoQA3w0fcjAAAAAElFTkSuQmCC');background-repeat:no-repeat}.annotator-hl{background:rgba(255,255,10,0.3)}.annotator-hl-temporary{background:rgba(0,124,255,0.3)}.annotator-wrapper{position:relative}.annotator-adder,.annotator-outer,.annotator-notice{z-index:1020}.annotator-filter{z-index:1010}.annotator-adder,.annotator-outer,.annotator-widget,.annotator-notice{position:absolute;font-size:10px;line-height:1}.annotator-hide{display:none;visibility:hidden}.annotator-adder{margin-top:-48px;margin-left:-24px;width:48px;height:48px;background-position:left top}.annotator-adder:hover{background-position:center top}.annotator-adder:active{background-position:center right}.annotator-adder button{display:block;width:36px;height:41px;margin:0 auto;border:0;background:0;text-indent:-999em;cursor:pointer}.annotator-outer{width:0;height:0}.annotator-widget{margin:0;padding:0;bottom:15px;left:-18px;min-width:265px;background-color:rgba(251,251,251,0.98);border:1px solid rgba(122,122,122,0.6);-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;-webkit-box-shadow:0 5px 15px rgba(0,0,0,0.2);-moz-box-shadow:0 5px 15px rgba(0,0,0,0.2);-o-box-shadow:0 5px 15px rgba(0,0,0,0.2);box-shadow:0 5px 15px rgba(0,0,0,0.2)}.annotator-invert-x .annotator-widget{left:auto;right:-18px}.annotator-invert-y .annotator-widget{bottom:auto;top:8px}.annotator-widget strong{font-weight:bold}.annotator-widget .annotator-listing,.annotator-widget .annotator-item{padding:0;margin:0;list-style:none}.annotator-widget::after{content:"";display:block;width:18px;height:10px;background-position:0 0;position:absolute;bottom:-10px;left:8px}.annotator-invert-x .annotator-widget::after{left:auto;right:8px}.annotator-invert-y .annotator-widget::after{background-position:0 -15px;bottom:auto;top:-9px}.annotator-widget .annotator-item,.annotator-editor .annotator-item input,.annotator-editor .annotator-item textarea{position:relative;font-size:12px}.annotator-viewer .annotator-item{border-top:2px solid rgba(122,122,122,0.2)}.annotator-widget .annotator-item:first-child{border-top:0}.annotator-editor .annotator-item,.annotator-viewer div{border-top:1px solid rgba(133,133,133,0.11)}.annotator-viewer div{padding:6px 6px}.annotator-viewer .annotator-item ol,.annotator-viewer .annotator-item ul{padding:4px 16px}.annotator-viewer div:first-of-type,.annotator-editor .annotator-item:first-child textarea{padding-top:12px;padding-bottom:12px;color:#3c3c3c;font-size:13px;font-style:italic;line-height:1.3;border-top:0}.annotator-viewer .annotator-controls{position:relative;top:5px;right:5px;padding-left:5px;opacity:0;-webkit-transition:opacity .2s ease-in;-moz-transition:opacity .2s ease-in;-o-transition:opacity .2s ease-in;transition:opacity .2s ease-in;float:right}.annotator-viewer li:hover .annotator-controls,.annotator-viewer li .annotator-controls.annotator-visible{opacity:1}.annotator-viewer .annotator-controls button,.annotator-viewer .annotator-controls a{cursor:pointer;display:inline-block;width:13px;height:13px;margin-left:2px;border:0;opacity:.2;text-indent:-900em;background-color:transparent;outline:0}.annotator-viewer .annotator-controls button:hover,.annotator-viewer .annotator-controls button:focus,.annotator-viewer .annotator-controls a:hover,.annotator-viewer .annotator-controls a:focus{opacity:.9}.annotator-viewer .annotator-controls button:active,.annotator-viewer .annotator-controls a:active{opacity:1}.annotator-viewer .annotator-controls button[disabled]{display:none}.annotator-viewer .annotator-controls .annotator-edit{background-position:0 -60px}.annotator-viewer .annotator-controls .annotator-delete{background-position:0 -75px}.annotator-viewer .annotator-controls .annotator-link{background-position:0 -270px}.annotator-editor .annotator-item{position:relative}.annotator-editor .annotator-item label{top:0;display:inline;cursor:pointer;font-size:12px}.annotator-editor .annotator-item input,.annotator-editor .annotator-item textarea{display:block;min-width:100%;padding:10px 8px;border:0;margin:0;color:#3c3c3c;background:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-o-box-sizing:border-box;box-sizing:border-box;resize:none}.annotator-editor .annotator-item textarea::-webkit-scrollbar{height:8px;width:8px}.annotator-editor .annotator-item textarea::-webkit-scrollbar-track-piece{margin:13px 0 3px;background-color:#e5e5e5;-webkit-border-radius:4px}.annotator-editor .annotator-item textarea::-webkit-scrollbar-thumb:vertical{height:25px;background-color:#ccc;-webkit-border-radius:4px;-webkit-box-shadow:0 1px 1px rgba(0,0,0,0.1)}.annotator-editor .annotator-item textarea::-webkit-scrollbar-thumb:horizontal{width:25px;background-color:#ccc;-webkit-border-radius:4px}.annotator-editor .annotator-item:first-child textarea{min-height:5.5em;-webkit-border-radius:5px 5px 0 0;-moz-border-radius:5px 5px 0 0;-o-border-radius:5px 5px 0 0;border-radius:5px 5px 0 0}.annotator-editor .annotator-item input:focus,.annotator-editor .annotator-item textarea:focus{background-color:#f3f3f3;outline:0}.annotator-editor .annotator-item input[type=radio],.annotator-editor .annotator-item input[type=checkbox]{width:auto;min-width:0;padding:0;display:inline;margin:0 4px 0 0;cursor:pointer}.annotator-editor .annotator-checkbox{padding:8px 6px}.annotator-filter,.annotator-filter .annotator-filter-navigation button,.annotator-editor .annotator-controls{text-align:right;padding:3px;border-top:1px solid #d4d4d4;background-color:#d4d4d4;background-image:-webkit-gradient(linear,left top,left bottom,from(#f5f5f5),color-stop(0.6,#dcdcdc),to(#d2d2d2));background-image:-moz-linear-gradient(to bottom,#f5f5f5,#dcdcdc 60%,#d2d2d2);background-image:-webkit-linear-gradient(to bottom,#f5f5f5,#dcdcdc 60%,#d2d2d2);background-image:linear-gradient(to bottom,#f5f5f5,#dcdcdc 60%,#d2d2d2);-webkit-box-shadow:inset 1px 0 0 rgba(255,255,255,0.7),inset -1px 0 0 rgba(255,255,255,0.7),inset 0 1px 0 rgba(255,255,255,0.7);-moz-box-shadow:inset 1px 0 0 rgba(255,255,255,0.7),inset -1px 0 0 rgba(255,255,255,0.7),inset 0 1px 0 rgba(255,255,255,0.7);-o-box-shadow:inset 1px 0 0 rgba(255,255,255,0.7),inset -1px 0 0 rgba(255,255,255,0.7),inset 0 1px 0 rgba(255,255,255,0.7);box-shadow:inset 1px 0 0 rgba(255,255,255,0.7),inset -1px 0 0 rgba(255,255,255,0.7),inset 0 1px 0 rgba(255,255,255,0.7);-webkit-border-radius:0 0 5px 5px;-moz-border-radius:0 0 5px 5px;-o-border-radius:0 0 5px 5px;border-radius:0 0 5px 5px}.annotator-editor.annotator-invert-y .annotator-controls{border-top:0;border-bottom:1px solid #b4b4b4;-webkit-border-radius:5px 5px 0 0;-moz-border-radius:5px 5px 0 0;-o-border-radius:5px 5px 0 0;border-radius:5px 5px 0 0}.annotator-editor a,.annotator-filter .annotator-filter-property label{position:relative;display:inline-block;padding:0 6px 0 22px;color:#363636;text-shadow:0 1px 0 rgba(255,255,255,0.75);text-decoration:none;line-height:24px;font-size:12px;font-weight:bold;border:1px solid #a2a2a2;background-color:#d4d4d4;background-image:-webkit-gradient(linear,left top,left bottom,from(#f5f5f5),color-stop(0.5,#d2d2d2),color-stop(0.5,#bebebe),to(#d2d2d2));background-image:-moz-linear-gradient(to bottom,#f5f5f5,#d2d2d2 50%,#bebebe 50%,#d2d2d2);background-image:-webkit-linear-gradient(to bottom,#f5f5f5,#d2d2d2 50%,#bebebe 50%,#d2d2d2);background-image:linear-gradient(to bottom,#f5f5f5,#d2d2d2 50%,#bebebe 50%,#d2d2d2);-webkit-box-shadow:inset 0 0 5px rgba(255,255,255,0.2),inset 0 0 1px rgba(255,255,255,0.8);-moz-box-shadow:inset 0 0 5px rgba(255,255,255,0.2),inset 0 0 1px rgba(255,255,255,0.8);-o-box-shadow:inset 0 0 5px rgba(255,255,255,0.2),inset 0 0 1px rgba(255,255,255,0.8);box-shadow:inset 0 0 5px rgba(255,255,255,0.2),inset 0 0 1px rgba(255,255,255,0.8);-webkit-border-radius:5px;-moz-border-radius:5px;-o-border-radius:5px;border-radius:5px}.annotator-editor a::after{position:absolute;top:50%;left:5px;display:block;content:"";width:15px;height:15px;margin-top:-7px;background-position:0 -90px}.annotator-editor a:hover,.annotator-editor a:focus,.annotator-editor a.annotator-focus,.annotator-filter .annotator-filter-active label,.annotator-filter .annotator-filter-navigation button:hover{outline:0;border-color:#435aa0;background-color:#3865f9;background-image:-webkit-gradient(linear,left top,left bottom,from(#7691fb),color-stop(0.5,#5075fb),color-stop(0.5,#3865f9),to(#3665fa));background-image:-moz-linear-gradient(to bottom,#7691fb,#5075fb 50%,#3865f9 50%,#3665fa);background-image:-webkit-linear-gradient(to bottom,#7691fb,#5075fb 50%,#3865f9 50%,#3665fa);background-image:linear-gradient(to bottom,#7691fb,#5075fb 50%,#3865f9 50%,#3665fa);color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.42)}.annotator-editor a:hover::after,.annotator-editor a:focus::after{margin-top:-8px;background-position:0 -105px}.annotator-editor a:active,.annotator-filter .annotator-filter-navigation button:active{border-color:#700c49;background-color:#d12e8e;background-image:-webkit-gradient(linear,left top,left bottom,from(#fc7cca),color-stop(0.5,#e85db2),color-stop(0.5,#d12e8e),to(#ff009c));background-image:-moz-linear-gradient(to bottom,#fc7cca,#e85db2 50%,#d12e8e 50%,#ff009c);background-image:-webkit-linear-gradient(to bottom,#fc7cca,#e85db2 50%,#d12e8e 50%,#ff009c);background-image:linear-gradient(to bottom,#fc7cca,#e85db2 50%,#d12e8e 50%,#ff009c)}.annotator-editor a.annotator-save::after{background-position:0 -120px}.annotator-editor a.annotator-save:hover::after,.annotator-editor a.annotator-save:focus::after,.annotator-editor a.annotator-save.annotator-focus::after{margin-top:-8px;background-position:0 -135px}.annotator-editor .annotator-widget::after{background-position:0 -30px}.annotator-editor.annotator-invert-y .annotator-widget .annotator-controls{background-color:#f2f2f2}.annotator-editor.annotator-invert-y .annotator-widget::after{background-position:0 -45px;height:11px}.annotator-resize{position:absolute;top:0;right:0;width:12px;height:12px;background-position:2px -150px}.annotator-invert-x .annotator-resize{right:auto;left:0;background-position:0 -195px}.annotator-invert-y .annotator-resize{top:auto;bottom:0;background-position:2px -165px}.annotator-invert-y.annotator-invert-x .annotator-resize{background-position:0 -180px}.annotator-notice{color:#fff;position:absolute;position:fixed;top:-54px;left:0;width:100%;font-size:14px;line-height:50px;text-align:center;background:black;background:rgba(0,0,0,0.9);border-bottom:4px solid #d4d4d4;-webkit-transition:top .4s ease-out;-moz-transition:top .4s ease-out;-o-transition:top .4s ease-out;transition:top .4s ease-out}.ie6 .annotator-notice{position:absolute}.annotator-notice-success{border-color:#3665f9}.annotator-notice-error{border-color:#ff7e00}.annotator-notice p{margin:0}.annotator-notice a{color:#fff}.annotator-notice-show{top:0}.annotator-tags{margin-bottom:-2px}.annotator-tags .annotator-tag{display:inline-block;padding:0 8px;margin-bottom:2px;line-height:1.6;font-weight:bold;background-color:#e6e6e6;-webkit-border-radius:8px;-moz-border-radius:8px;-o-border-radius:8px;border-radius:8px}.annotator-filter{position:fixed;top:0;right:0;left:0;text-align:left;line-height:0;border:0;border-bottom:1px solid #878787;padding-left:10px;padding-right:10px;-webkit-border-radius:0;-moz-border-radius:0;-o-border-radius:0;border-radius:0;-webkit-box-shadow:inset 0 -1px 0 rgba(255,255,255,0.3);-moz-box-shadow:inset 0 -1px 0 rgba(255,255,255,0.3);-o-box-shadow:inset 0 -1px 0 rgba(255,255,255,0.3);box-shadow:inset 0 -1px 0 rgba(255,255,255,0.3)}.annotator-filter strong{font-size:12px;font-weight:bold;color:#3c3c3c;text-shadow:0 1px 0 rgba(255,255,255,0.7);position:relative;top:-9px}.annotator-filter .annotator-filter-property,.annotator-filter .annotator-filter-navigation{position:relative;display:inline-block;overflow:hidden;line-height:10px;padding:2px 0;margin-right:8px}.annotator-filter .annotator-filter-property label,.annotator-filter .annotator-filter-navigation button{text-align:left;display:block;float:left;line-height:20px;-webkit-border-radius:10px 0 0 10px;-moz-border-radius:10px 0 0 10px;-o-border-radius:10px 0 0 10px;border-radius:10px 0 0 10px}.annotator-filter .annotator-filter-property label{padding-left:8px}.annotator-filter .annotator-filter-property input{display:block;float:right;-webkit-appearance:none;background-color:#fff;border:1px solid #878787;border-left:none;padding:2px 4px;line-height:16px;min-height:16px;font-size:12px;width:150px;color:#333;background-color:#f8f8f8;-webkit-border-radius:0 10px 10px 0;-moz-border-radius:0 10px 10px 0;-o-border-radius:0 10px 10px 0;border-radius:0 10px 10px 0;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.2);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.2);-o-box-shadow:inset 0 1px 1px rgba(0,0,0,0.2);box-shadow:inset 0 1px 1px rgba(0,0,0,0.2)}.annotator-filter .annotator-filter-property input:focus{outline:0;background-color:#fff}.annotator-filter .annotator-filter-clear{position:absolute;right:3px;top:6px;border:0;text-indent:-900em;width:15px;height:15px;background-position:0 -90px;opacity:.4}.annotator-filter .annotator-filter-clear:hover,.annotator-filter .annotator-filter-clear:focus{opacity:.8}.annotator-filter .annotator-filter-clear:active{opacity:1}.annotator-filter .annotator-filter-navigation button{border:1px solid #a2a2a2;padding:0;text-indent:-900px;width:20px;min-height:22px;-webkit-box-shadow:inset 0 0 5px rgba(255,255,255,0.2),inset 0 0 1px rgba(255,255,255,0.8);-moz-box-shadow:inset 0 0 5px rgba(255,255,255,0.2),inset 0 0 1px rgba(255,255,255,0.8);-o-box-shadow:inset 0 0 5px rgba(255,255,255,0.2),inset 0 0 1px rgba(255,255,255,0.8);box-shadow:inset 0 0 5px rgba(255,255,255,0.2),inset 0 0 1px rgba(255,255,255,0.8)}.annotator-filter .annotator-filter-navigation button,.annotator-filter .annotator-filter-navigation button:hover,.annotator-filter .annotator-filter-navigation button:focus{color:transparent}.annotator-filter .annotator-filter-navigation button::after{position:absolute;top:8px;left:8px;content:"";display:block;width:9px;height:9px;background-position:0 -210px}.annotator-filter .annotator-filter-navigation button:hover::after{background-position:0 -225px}.annotator-filter .annotator-filter-navigation .annotator-filter-next{-webkit-border-radius:0 10px 10px 0;-moz-border-radius:0 10px 10px 0;-o-border-radius:0 10px 10px 0;border-radius:0 10px 10px 0;border-left:none}.annotator-filter .annotator-filter-navigation .annotator-filter-next::after{left:auto;right:7px;background-position:0 -240px}.annotator-filter .annotator-filter-navigation .annotator-filter-next:hover::after{background-position:0 -255px}.annotator-hl-active{background:rgba(255,255,10,0.8)}.annotator-hl-filtered{background-color:transparent}
\ No newline at end of file
diff --git a/web/modules/custom/annotator/css/annotator.touch.css b/web/modules/custom/annotator/css/annotator.touch.css
new file mode 100644
index 0000000..345c70c
--- /dev/null
+++ b/web/modules/custom/annotator/css/annotator.touch.css
@@ -0,0 +1,519 @@
+/* Annotator Touch Plugin - v1.1.1
+ * Copyright 2012-2013, Compendio
+ * Released under the MIT license
+ * More Information: https://github.com/aron/annotator.touch.js
+ */
+.annotator-viewer .annotator-touch-controls .annotator-edit::after {
+ background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA8AAAAtCAYAAABxsjF3AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWN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DcP7dCMBaTJnNkRbe+gLR+exv7a1etGekEi/og2vdOeSFsDeemvE+lvjmgn0C8PTYxTiJiYmN81NDSUGrGv5odPPvnk95i3/MXV1ZXiA7mOQWKkLbS2tqbt1LukjL+lpYXJzs4+7+Xl9a6jo2MQRuVDKMDK06dPl3Xnoq1SRUVF8XqqZBMSEhIYFRU1/+7du+toRxSV8MGDB/46boR2jAGUIAGxXbp06bTKyspvqqurb8TFxf0BE55VeDGOXb3QBd25c0fsL+ls33777RmlpaXHCwsLv6Kt1k1NTYXXrl2jrbC0Rd/OGJDjihUrQkpKSpIKCgqOVVVV5bM6j5szZ84YzDQ/v379+hhDIKft27dHFBcXf4GSnES18qEX2sMVQw/z8/M3EBGB2FP6PKT9+++/P3P27Nm/rq2tbXNzcxvl4ODggXnuWqVSqfmbY9oUxwiMiBf6bd269XmEfUvQIlaAjLW3t6e/0SLIx9y92ZKuFpmIrggNDX0TYd94VLdZLpd3oEpLANH5PzRoX60USEa29NZbb7kMHjx4AqC0ytWAlFb9DtJ+W/ZDmgMfEQXR3mM59GHr6ek5HlVKhwUvQ7OH4H4qZACERl9PrZSVlWn2+qPqHTqdtq2tLROj7MArV66kwtiacN0G5XagSgrasKyTGYefn9/UPn36oNAK6ui13FHCC3Kty/gjm92V2DuK/H+B/leAAQDK0OGpiD5uIgAAAABJRU5ErkJggg==');
+}
+
+/* Generic Touch Widget Styles */
+.annotator-touch-widget {
+ font-family: "Helvetica Neue", Arial, Helvetica, sans-serif;
+ border: 1px solid rgba(0, 0, 0, 0.8);
+ background: rgba(0, 0, 0, 0.85);
+ background: -webkit-gradient(linear, left top, left bottom, from(rgba(57, 57, 57, 0.85)), color-stop(0.5, rgba(58, 58, 58, 0.85)), color-stop(0.5, rgba(0, 0, 0, 0.85)), to(rgba(0, 0, 0, 0.85)));
+ background: -moz-linear-gradient(-90deg, from(rgba(57, 57, 57, 0.85)), color-stop(0.5, rgba(58, 58, 58, 0.85)), color-stop(0.5, rgba(0, 0, 0, 0.85)) 50%, to(rgba(0, 0, 0, 0.85)));
+ background: -webkit-linear-gradient(-90deg, from(rgba(57, 57, 57, 0.85)), color-stop(0.5, rgba(58, 58, 58, 0.85)) 50%, color-stop(0.5, rgba(0, 0, 0, 0.85)) 50%, to(rgba(0, 0, 0, 0.85)) );
+ background: linear-gradient(to bottom, from(rgba(57, 57, 57, 0.85)), color-stop(0.5, rgba(58, 58, 58, 0.85)) 50%, color-stop(0.5, rgba(0, 0, 0, 0.85)) 50%, to(rgba(0, 0, 0, 0.85)));
+ -webkit-border-radius: 4px;
+ -moz-border-radius: 4px;
+ -ms-border-radius: 4px;
+ -o-border-radius: 4px;
+ border-radius: 4px;
+ -webkit-box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
+ -moz-box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
+ -ms-box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
+ -o-box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
+ box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
+ -webkit-tap-highlight-color: transparent;
+}
+
+.annotator-touch-widget-inner {
+ background: #efefef;
+ border: 1px solid rgba(0, 0, 0, 0.8);
+ margin: 7px;
+ padding: 6px;
+ line-height: 0;
+ -webkit-border-radius: 3px;
+ -moz-border-radius: 3px;
+ -ms-border-radius: 3px;
+ -o-border-radius: 3px;
+ border-radius: 3px;
+ -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.8);
+ -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.8);
+ -ms-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.8);
+ -o-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.8);
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.8);
+}
+
+.annotator-touch-widget .annotator-button {
+ cursor: pointer;
+ font-size: 16px;
+ line-height: 44px;
+ padding-left: 40px;
+ padding-right: 20px;
+ -webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.1);
+ -moz-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.1);
+ -ms-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.1);
+ -o-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.1);
+ box-shadow: 0 1px 0 rgba(0, 0, 0, 0.1);
+ -webkit-user-select: none;
+ -moz-user-select: none;
+ user-select: none;
+}
+
+.annotator-touch-widget .annotator-button[disabled] {
+ opacity: 0.3;
+ cursor: default;
+}
+
+.annotator-touch-widget .annotator-button::after {
+ left: 15px;
+}
+
+.annotator-touch-widget .annotator-add::after,
+.annotator-touch-widget .annotator-add:hover::after,
+.annotator-touch-widget .annotator-add:focus::after,
+.annotator-touch-widget .annotator-add.annotator-focus::after {
+ margin-top: -7px;
+ background-position: 0 -270px;
+}
+
+/* Adder Styles */
+.annotator-touch-controls {
+ position: fixed;
+ bottom: 100px;
+ right: 15px;
+ min-width: auto;
+}
+
+.annotator-touch-controls.annotator-touch-hide {
+ right: -9999em;
+ opacity: 0;
+ -webkit-transition: opacity 0.2s 0 ease-in, right 0s 0.3s linear;
+ -moz-transition: opacity 0.2s 0 ease-in, right 0s 0.3s linear;
+ -ms-transition: opacity 0.2s 0 ease-in, right 0s 0.3s linear;
+ -o-transition: opacity 0.2s 0 ease-in, right 0s 0.3s linear;
+ transition: opacity 0.2s 0 ease-in, right 0s 0.3s linear;
+}
+
+.annotator-touch-controls .annotator-button {
+ line-height: 56px;
+}
+
+/* Viewer Overrides*/
+
+.annotator-touch-viewer .annotator-widget {
+ min-width: 380px;
+}
+
+.annotator-touch-viewer div {
+ padding: 12px;
+}
+
+.annotator-touch-viewer div:first-of-type {
+ font-size: 18px;
+ padding-top: 20px;
+ padding-bottom: 20px;
+}
+
+.annotator-touch-viewer .annotator-touch-controls {
+ position: absolute;
+ top: 0;
+ left: auto;
+ right: 0;
+ display: none;
+ background: rgba(255, 255, 255, 0.6);
+ background: -webkit-gradient(linear, right top, left top, from(rgba(255, 255, 255, 0.8)), color-stop(0.9, rgba(255, 255, 255, 0.8)), to(rgba(255, 255, 255, 0)));
+ background: -moz-linear-gradient(0deg, from(rgba(255, 255, 255, 0.8)) 90%, to(rgba(255, 255, 255, 0)));
+ background: -webkit-linear-gradient(0deg, from(rgba(255, 255, 255, 0.8)) 90%, to(rgba(255, 255, 255, 0)));
+ background: linear-gradient(to bottom, from(rgba(255, 255, 255, 0.8)) 90%, to(rgba(255, 255, 255, 0)));
+ -webkit-box-pack: end;
+ -webkit-box-align: center;
+ -webkit-box-orient: horizontal;
+ -moz-box-pack: end;
+ -moz-box-align: center;
+ -moz-box-orient: horizontal;
+ box-pack: end;
+ box-align: center;
+ box-orient: horizontal;
+ padding: 10px;
+ bottom: 0;
+ padding: 0 10px 0 20px;
+}
+
+.annotator-touch-viewer li.annotator-visible .annotator-touch-controls {
+ display: flex;
+}
+
+.annotator-touch-viewer .annotator-touch-controls button {
+ line-height: 44px;
+ padding-left: 40px;
+ padding-right: 20px;
+ margin-left: 6px;
+}
+
+.annotator-touch-viewer .annotator-touch-controls .annotator-edit::after {
+ background-position: 0 -15px;
+}
+
+.annotator-touch-viewer .annotator-touch-controls .annotator-edit:hover::after,
+.annotator-touch-viewer .annotator-touch-controls .annotator-edit:focus::after,
+.annotator-touch-viewer .annotator-touch-controls .annotator-edit:active::after,
+.annotator-touch-viewer .annotator-touch-controls .annotator-edit.annotator-focus::after {
+ background-position: 0 -30px;
+}
+
+.annotator-touch-viewer .annotator-touch-controls button::after {
+ left: 15px;
+}
+
+/* Editor Overrides */
+
+.annotator-touch-editor {
+ position: fixed;
+ top: -1000px !important;
+ left: 0 !important;
+ right: 0;
+ bottom: -1000px;
+ padding: 1000px 0;
+ width: 100%;
+ height: 100%;
+ background: rgba(255, 255, 255, 0.6);
+ display: flex;
+ -webkit-box-pack: center;
+ -webkit-box-align: center;
+ -moz-box-pack: center;
+ -moz-box-align: center;
+ box-pack: center;
+ box-align: center;
+}
+
+.annotator-touch-editor .annotator-touch-widget {
+ pointer-events: all;
+ position: relative;
+ width: 80%;
+ max-width: 680px;
+}
+
+.annotator-touch-editor .annotator-touch-widget-inner {
+ position: static;
+ width: auto;
+ padding: 0;
+ background: #fff;
+}
+
+.annotator-touch-editor .annotator-widget::after {
+ display: none;
+}
+
+.annotator-touch-editor .annotator-widget .annotator-item {
+ border-top-color: rgba(0, 0, 0, 0.15);
+}
+
+.annotator-touch-editor .annotator-widget .annotator-item,
+.annotator-touch-editor.annotator-editor .annotator-item label,
+.annotator-touch-editor.annotator-editor .annotator-item input,
+.annotator-touch-editor.annotator-editor .annotator-item textarea {
+ font-size: 18px;
+}
+
+.annotator-touch-editor.annotator-editor .annotator-item input,
+.annotator-touch-editor.annotator-editor .annotator-item label {
+ line-height: 30px;
+ margin-left: 8px;
+}
+
+.annotator-touch-editor.annotator-editor .annotator-item input[checkbox] {
+ font-size: large;
+}
+
+.annotator-touch-editor .annotator-widget .annotator-item:first-child textarea {
+ font-size: 18px;
+ background-color: #fff;
+ -webkit-border-radius: 3px 3px 0 0;
+ -moz-border-radius: 3px 3px 0 0;
+ -o-border-radius: 3px 3px 0 0;
+ border-radius: 3px 3px 0 0;
+}
+
+.annotator-touch-editor .annotator-resize {
+ display: none;
+}
+
+.annotator-touch-editor .annotator-controls {
+ padding: 7px;
+ background-color: #efefef;
+ background-image: none;
+}
+
+.annotator-touch-editor .annotator-item-quote {
+ font-size: 16px;
+ line-height: 1.2;
+ border-color: #cebfa2;
+ background-color: #fbfae9;
+ color: #a58129;
+ padding: 10px 7px;
+}
+
+.annotator-item-quote span {
+ display: block;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ color: #a58129;
+ font-family: Georgia, serif;
+}
+
+.annotator-item-quote.annotator-touch-expand span {
+ overflow: visible;
+ text-overflow: inherit;
+ white-space: inherit;
+}
+
+.annotator-item-quote button {
+ font-size: 14px;
+ line-height: 44px;
+ margin-top: -13px;
+ float: right;
+ text-transform: uppercase;
+ font-weight: bold;
+ color: #a58129;
+ border: none;
+ background: none;
+ margin-left: 10px;
+ cursor: pointer;
+}
+
+.annotator-button::after {
+ background-repeat: no-repeat;
+}
+
+.annotator-button {
+ -webkit-user-select: none;
+ -moz-user-select: none;
+ user-select: none;
+ position: relative;
+ display: inline-block;
+ padding: 0 6px 0 22px;
+ color: rgb(54, 54, 54);
+ text-shadow: 0 1px 0 rgba(255, 255, 255, 0.75);
+ text-decoration: none;
+ line-height: 24px;
+ font-size: 12px;
+ font-weight: bold;
+ border: 1px solid rgb(162, 162, 162);
+ background-color: rgb(212, 212, 212);
+ background-image: -webkit-gradient(linear, left top, left bottom, from(rgb(245, 245, 245)), color-stop(0.5, rgb(210, 210, 210)), color-stop(0.5, rgb(190, 190, 190)), to(rgb(210, 210, 210)));
+ background-image: -moz-linear-gradient( -90deg, rgb(245, 245, 245), rgb(210, 210, 210) 50%, rgb(190, 190, 190) 50%, rgb(210, 210, 210));
+ background-image: -webkit-linear-gradient( -90deg, rgb(245, 245, 245), rgb(210, 210, 210) 50%, rgb(190, 190, 190) 50%, rgb(210, 210, 210));
+ background-image: linear-gradient( to bottom, rgb(245, 245, 245), rgb(210, 210, 210) 50%, rgb(190, 190, 190) 50%, rgb(210, 210, 210));
+ -webkit-box-shadow: inset 0 0 5px rgba(255, 255, 255, 0.2), inset 0 0 1px rgba(255, 255, 255, 0.8);
+ -moz-box-shadow: inset 0 0 5px rgba(255, 255, 255, 0.2), inset 0 0 1px rgba(255, 255, 255, 0.8);
+ -o-box-shadow: inset 0 0 5px rgba(255, 255, 255, 0.2), inset 0 0 1px rgba(255, 255, 255, 0.8);
+ box-shadow: inset 0 0 5px rgba(255, 255, 255, 0.2), inset 0 0 1px rgba(255, 255, 255, 0.8);
+ -webkit-border-radius: 5px;
+ -moz-border-radius: 5px;
+ -o-border-radius: 5px;
+ border-radius: 5px;
+}
+
+.annotator-button::after {
+ position: absolute;
+ top: 50%;
+ left: 5px;
+ display: block;
+ content: "";
+ width: 15px;
+ height: 15px;
+ margin-top: -7px;
+ background-position: 0 -90px;
+}
+
+.annotator-button:hover,
+.annotator-button:focus,
+.annotator-button.annotator-focus {
+ outline: none;
+ border-color: rgb(67, 90, 160);
+ background-color: rgb(56, 101, 249);
+ background-image: -webkit-gradient(linear, left top, left bottom, from(rgb(118, 145, 251)), color-stop(0.5, rgb(80, 117, 251)), color-stop(0.5, rgb(56, 101, 249)), to(rgb(54, 101, 250)));
+ background-image: -moz-linear-gradient( -90deg, rgb(118, 145, 251), rgb(80, 117, 251) 50%, rgb(56, 101, 249) 50%, rgb(54, 101, 250));
+ background-image: -webkit-linear-gradient( -90deg, rgb(118, 145, 251), rgb(80, 117, 251) 50%, rgb(56, 101, 249) 50%, rgb(54, 101, 250));
+ background-image: linear-gradient( to bottom, rgb(118, 145, 251), rgb(80, 117, 251) 50%, rgb(56, 101, 249) 50%, rgb(54, 101, 250));
+ color: rgb(255, 255, 255);
+ text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.42);
+}
+
+.annotator-button:hover::after,
+.annotator-button:focus::after {
+ margin-top: -8px;
+ background-position: 0 -105px;
+}
+
+.annotator-button:active {
+ border-color: rgb(112, 12, 73);
+ background-color: rgb(209, 46, 142);
+ background-image: -webkit-gradient(linear, left top, left bottom, from(rgb(252, 124, 202)), color-stop(0.5, rgb(232, 93, 178)), color-stop(0.5, rgb(209, 46, 142)), to(rgb(255, 0, 156)));
+ background-image: -moz-linear-gradient(-90deg, rgb(252, 124, 202), rgb(232, 93, 178) 50%, rgb(209, 46, 142) 50%, rgb(255, 0, 156));
+ background-image: -webkit-linear-gradient(-90deg, rgb(252, 124, 202), rgb(232, 93, 178) 50%, rgb(209, 46, 142) 50%, rgb(255, 0, 156));
+ background-image: linear-gradient(to bottom, rgb(252, 124, 202), rgb(232, 93, 178) 50%, rgb(209, 46, 142) 50%, rgb(255, 0, 156));
+}
+
+.annotator-button.annotator-save::after {
+ background-position: 0 -120px;
+}
+
+.annotator-button.annotator-save::after,
+.annotator-button.annotator-save:focus::after,
+.annotator-button.annotator-save.annotator-focus::after {
+ margin-top: -8px;
+ background-position: 0 -135px;
+}
+
+/* Icon only button styles */
+
+[data-annotator-use-icons] .annotator-touch-widget .annotator-button {
+ /* width & overflow is required by Android WebKit */
+ width: 1px;
+ overflow: hidden;
+ text-indent: -999em;
+ padding-left: 25px;
+}
+
+[data-annotator-use-icons] .annotator-touch-controls .annotator-button {
+ padding-left: 35px;
+}
+
+[data-annotator-use-icons] .annotator-touch-controls .annotator-button::after {
+ left: 20px;
+}
+
+[data-annotator-use-icons] .annotator-touch-viewer .annotator-touch-controls button {
+ padding-left: 25px;
+ text-indent: -9000em;
+}
+
+[data-annotator-use-icons] .annotator-touch-viewer .annotator-touch-controls button::after {
+ left: 15px;
+}
+
+[data-annotator-use-icons] .annotator-touch-viewer .annotator-widget {
+ min-width: 320px;
+}
+
+/* Highlighter Selection Styles */
+
+.annotator-selection-handle {
+ cursor: pointer;
+ display: block;
+ position: absolute;
+ width: 44px;
+ height: 44px;
+ top: 0;
+ left: 0;
+ padding: 0;
+ margin-left: -22px;
+ margin-top: -22px;
+ border-radius: 50%;
+ /* Removes the tap outline on elements that have bound touch events */
+ -webkit-tap-highlight-color: transparent;
+}
+
+.annotator-selection-handle::after {
+ content: "";
+ display: block;
+ width: 20px;
+ height: 20px;
+ position: absolute;
+ left: 50%;
+ margin-left: -10px;
+ bottom: -5px;
+ background-position: 0 0;
+ background-repeat: no-repeat;
+}
+
+.annotator-selection-start::after {
+ top: -5px;
+ bottom: auto;
+ background-position: 0 -20px;
+}
+
+.annotator-selection-hide .annotator-selection-handle {
+ display: none;
+}
+
+/* Styles for smaller screens */
+
+@media only screen and (max-width: 480px) {
+ .annotator-touch-viewer {
+ left: 0 !important;
+ width: 100%;
+ background: none;
+ min-width: 0;
+ border: none;
+ }
+
+ .annotator-touch-viewer .annotator-widget {
+ position: static;
+ left: 0;
+ width: 100%;
+ height: auto;
+ min-width: 0;
+ box-sizing: border-box;
+ -webkit-box-sizing: border-box;
+ -webkit-border-radius: none;
+ border-radius: none;
+ }
+
+ .annotator-touch-viewer .annotator-widget::after {
+ display: none;
+ }
+
+ .annotator-touch-editor {
+ border: none;
+ -webkit-box-align: start;
+ -moz-box-align: start;
+ box-align: start;
+ }
+
+ .annotator-touch-editor .annotator-touch-widget {
+ width: 100%;
+ max-width: auto;
+ margin: 0;
+ border-color: #333;
+ border-left: none;
+ border-right: none;
+ -webkit-box-shadow: none;
+ -moz-box-shadow: none;
+ -ms-box-shadow: none;
+ -o-box-shadow: none;
+ box-shadow: none;
+ }
+
+ .annotator-touch-editor .annotator-touch-widget-inner {
+ width: 100%;
+ max-width: auto;
+ margin: 0;
+ border: 0;
+ }
+
+ .annotator-touch-editor .annotator-controls {
+ border-bottom: 1px solid #d4d4d4;
+ }
+
+ .annotator-touch-editor .annotator-touch-widget,
+ .annotator-touch-editor .annotator-touch-widget-inner,
+ .annotator-touch-editor .annotator-touch-widget .annotator-item:first-child textarea,
+ .annotator-touch-editor .annotator-controls {
+ border-radius: 0;
+ }
+}
diff --git a/web/modules/custom/annotator/css/style.css b/web/modules/custom/annotator/css/style.css
new file mode 100644
index 0000000..5e2673b
--- /dev/null
+++ b/web/modules/custom/annotator/css/style.css
@@ -0,0 +1,290 @@
+/**
+ General Adjustments
+ =============================================
+ */
+#search {
+ padding: 5px;
+ padding-left: 20px;
+ width: 100px;
+ border: 1px solid #f5f5f5;
+ font-size: 10px;
+ color: gray;
+ margin-right: 5px;
+ background-image: url('../images/glass.png');
+ background-repeat: no-repeat;
+ background-position: left center;
+ outline: 0;
+}
+
+.checkbox-inline {
+ font-size: 0.9em;
+}
+
+.rotate {
+ -webkit-transform: rotate(-90deg);
+ -moz-transform: rotate(-90deg);
+ -ms-transform: rotate(-90deg);
+ -o-transform: rotate(-90deg);
+ transform: rotate(-90deg);
+ /* also accepts left, right, top, bottom coordinates; not required, but a good idea for styling */
+ -webkit-transform-origin: 50% 50%;
+ -moz-transform-origin: 50% 50%;
+ -ms-transform-origin: 50% 50%;
+ -o-transform-origin: 50% 50%;
+ transform-origin: 50% 50%;
+ text-align: center;
+ margin: 0 auto;
+ /* @codingStandardsIgnoreStart */
+ /* Should be unset in IE9+ I think. */
+ filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=3);
+ /* @codingStandardsIgnoreEnd */
+}
+
+.annotator-hl-error {
+ background: #ffcfbf;
+ cursor: pointer;
+}
+
+.annotator-hl-good {
+ background: #dfffbf;
+ cursor: pointer;
+}
+
+.annotator-hl-highlight {
+ background: rgba(255, 255, 10, 0.3);
+ text-decoration: underline;
+ cursor: pointer;
+}
+
+.wrong {
+ background: #ffcfbf;
+ border: 1px solid #b3b3b3;
+ height: 20px;
+}
+
+.good {
+ background: #dfffbf;
+ border: 1px solid #b3b3b3;
+ height: 20px;
+}
+
+.hightlight {
+ background: #dfffbf;
+ border: 1px solid #b3b3b3;
+ height: 20px;
+}
+
+.highlight {
+ background: rgba(255, 255, 10, 0.3);
+ border: 1px solid #b3b3b3;
+ height: 20px;
+}
+
+.caixa_color {
+ float: left;
+ width: 20px;
+ margin-right: 5px;
+}
+
+.anotator_color_box {
+ float: left;
+ height: 12px;
+ margin-bottom: 4px;
+ width: 99%;
+}
+
+.annotations-list-uoc {
+ position: fixed;
+ top: 5em;
+ right: 1em;
+ height: 95%;
+ z-index: 100;
+}
+
+.label-compartit {
+ border: 1px solid #676767;
+ padding: 1px 4px 2px;
+ background-color: #666;
+ color: #fff;
+ font-size: 11px;
+ font-weight: bold;
+ line-height: 14px;
+ vertical-align: baseline;
+ white-space: nowrap;
+ margin-top: 4px;
+}
+
+.label-counter {
+ background-color: #666;
+ color: #fff;
+ font-size: 11px;
+ font-weight: bold;
+}
+
+.label-counter-alert {
+ background-color: #b20000;
+ color: #fff;
+ font-size: 11px;
+ font-weight: bold;
+}
+
+.label {
+ padding: 1px 4px 2px;
+ font-weight: bold;
+ line-height: 14px;
+ vertical-align: baseline;
+ white-space: nowrap;
+ margin-top: 4px;
+ border: 1px solid #676767;
+ color: #333;
+ font-size: 11px;
+}
+
+.container-anotacions {
+ list-style: none outside none;
+ position: relative;
+ width: 100%;
+ padding: 10px;
+ margin: 0 0 0 -22.5%;
+ float: left;
+ left: 22.5%;
+}
+
+.square {
+ border: 1px solid #b3b3b3;
+ height: 20px;
+}
+
+.annotator-viewer-delete {
+ background-image: url('../images/icono_eliminar.png');
+ background-repeat: no-repeat;
+ background-size: auto;
+ width: 20px;
+ height: 20px;
+}
+
+.annotator-viewer-delete:hover {
+ background-image: url('../images/papelera_over.png');
+}
+
+.annotator-viewer-edit {
+ background-image: url('../images/edit-icon.png');
+ background-repeat: no-repeat;
+ background-size: auto;
+ width: 20px;
+ height: 20px;
+}
+
+.annotator-viewer-share {
+ background-image: url('../images/shared-icon.png');
+ background-repeat: no-repeat;
+ background-size: auto;
+ width: 20px;
+ height: 20px;
+}
+
+.annotator-marginviewer-element {
+ border: 1px solid #b3b3b3;
+ margin: 0px;
+ margin-bottom: 10px;
+ width: 227px;
+ font-size: 12px;
+ cursor: pointer;
+}
+
+.annotator-marginviewer-element:hover {
+ border: 1px solid #666;
+ background: #fff;
+ background-color: #fff;
+}
+
+.annotator-marginviewer-header {
+ border-bottom: 1px solid #b3b3b3;
+ background-color: #e6e6e6;
+ height: 26px;
+ padding-right: 0.5em;
+ padding-left: 0.5em;
+}
+
+.annotator-marginviewer-footer {
+ background-color: #f5f5f5;
+ height: 26px;
+ padding-right: 0.5em;
+ padding-left: 0.5em;
+ padding-top: 0.3em;
+}
+
+.annotator-marginviewer-highlighted > .annotator-marginviewer-header {
+ background-color: #fbed20;
+}
+.annotator-marginviewer-selected > .annotator-marginviewer-header {
+ background-color: #fbed20;
+}
+
+.annotator-marginviewer-text,
+.annotator-marginviewer-date {
+ border-bottom: 1px solid #ccc;
+ background-color: #f5f5f5;
+ padding: 0.5em;
+ font-family: arial;
+ font-size: 11px;
+ line-height: 1.5em;
+}
+
+.panelTextArea {
+ width: 96%;
+}
+
+.annotator-marginviewer-quote {
+ border-bottom: 1px solid #ccc;
+ background-color: #f5f5f5;
+ padding: 0.5em;
+ display: none;
+ font-family: arial;
+ font-size: 11px;
+ line-height: 1.4em;
+ padding-left: 0.6em;
+}
+
+.anotador_text {
+ padding-left: 0.1em;
+}
+
+.annotator-marginviewer-selected > .annotator-marginviewer-text {
+ background: -moz-linear-gradient(top, #fef8cd, #f6edb5);
+ background: -webkit-gradient(linear, left top, left bottom, from(#fef8cd), to(#f6edb5));
+ /* @codingStandardsIgnoreStart */
+ filter: progid:DXImageTransform.Microsoft.Gradient(StartColorStr='#fef8cd', EndColorStr='#f6edb5', GradientType=0);
+ /* @codingStandardsIgnoreEnd */
+}
+
+.annotator-panel-save,
+.annotator-panel-cancel,
+.annotator-panel-reset {
+ position: relative;
+ display: inline-block;
+ padding: 0 12px 0 12px;
+ color: #363636;
+ text-shadow: 0 1px 0 rgba(255, 255, 255, 0.75);
+ text-decoration: none;
+ line-height: 20px;
+ font-size: 10px;
+ font-weight: bold;
+ border: 1px solid #a2a2a2;
+ background-color: #d4d4d4;
+ border-radius: 5px;
+ margin-right: 3px;
+}
+
+.filter-panel {
+ display: none;
+}
+
+.annotator-user,
+.annotator-marginviewer-footer > .label {
+ display: none;
+}
+
+.annotator-viewer-edit img {
+ display: auto;
+}
diff --git a/web/modules/custom/annotator/images/edit-icon.png b/web/modules/custom/annotator/images/edit-icon.png
new file mode 100644
index 0000000..046dea9
Binary files /dev/null and b/web/modules/custom/annotator/images/edit-icon.png differ
diff --git a/web/modules/custom/annotator/images/glass.png b/web/modules/custom/annotator/images/glass.png
new file mode 100644
index 0000000..2d1a000
Binary files /dev/null and b/web/modules/custom/annotator/images/glass.png differ
diff --git a/web/modules/custom/annotator/images/icono_eliminar.png b/web/modules/custom/annotator/images/icono_eliminar.png
new file mode 100644
index 0000000..455c883
Binary files /dev/null and b/web/modules/custom/annotator/images/icono_eliminar.png differ
diff --git a/web/modules/custom/annotator/images/papelera_over.png b/web/modules/custom/annotator/images/papelera_over.png
new file mode 100644
index 0000000..f3db586
Binary files /dev/null and b/web/modules/custom/annotator/images/papelera_over.png differ
diff --git a/web/modules/custom/annotator/images/shared-icon.png b/web/modules/custom/annotator/images/shared-icon.png
new file mode 100644
index 0000000..ccf5d59
Binary files /dev/null and b/web/modules/custom/annotator/images/shared-icon.png differ
diff --git a/web/modules/custom/annotator/js/annotator.1.2.10/annotator.js b/web/modules/custom/annotator/js/annotator.1.2.10/annotator.js
new file mode 100644
index 0000000..cf1941f
--- /dev/null
+++ b/web/modules/custom/annotator/js/annotator.1.2.10/annotator.js
@@ -0,0 +1,1950 @@
+
+/*
+** Annotator v1.2.10
+** https://github.com/okfn/annotator/
+**
+** Copyright 2015, the Annotator project contributors.
+** Dual licensed under the MIT and GPLv3 licenses.
+** https://github.com/okfn/annotator/blob/master/LICENSE
+**
+** Built at: 2015-02-26 03:26:47Z
+ */
+
+
+//
+
+// Generated by CoffeeScript 1.6.3
+(function() {
+ var $, Annotator, Delegator, LinkParser, Range, Util, findChild, fn, functions, g, getNodeName, getNodePosition, gettext, simpleXPathJQuery, simpleXPathPure, _Annotator, _gettext, _i, _j, _len, _len1, _ref, _ref1, _t,
+ __slice = [].slice,
+ __hasProp = {}.hasOwnProperty,
+ __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
+ __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; };
+
+ simpleXPathJQuery = function(relativeRoot) {
+ var jq;
+ jq = this.map(function() {
+ var elem, idx, path, tagName;
+ path = '';
+ elem = this;
+ while ((elem != null ? elem.nodeType : void 0) === Node.ELEMENT_NODE && elem !== relativeRoot) {
+ tagName = elem.tagName.replace(":", "\\:");
+ idx = $(elem.parentNode).children(tagName).index(elem) + 1;
+ idx = "[" + idx + "]";
+ path = "/" + elem.tagName.toLowerCase() + idx + path;
+ elem = elem.parentNode;
+ }
+ return path;
+ });
+ return jq.get();
+ };
+
+ simpleXPathPure = function(relativeRoot) {
+ var getPathSegment, getPathTo, jq, rootNode;
+ getPathSegment = function(node) {
+ var name, pos;
+ name = getNodeName(node);
+ pos = getNodePosition(node);
+ return "" + name + "[" + pos + "]";
+ };
+ rootNode = relativeRoot;
+ getPathTo = function(node) {
+ var xpath;
+ xpath = '';
+ while (node !== rootNode) {
+ if (node == null) {
+ throw new Error("Called getPathTo on a node which was not a descendant of @rootNode. " + rootNode);
+ }
+ xpath = (getPathSegment(node)) + '/' + xpath;
+ node = node.parentNode;
+ }
+ xpath = '/' + xpath;
+ xpath = xpath.replace(/\/$/, '');
+ return xpath;
+ };
+ jq = this.map(function() {
+ var path;
+ path = getPathTo(this);
+ return path;
+ });
+ return jq.get();
+ };
+
+ findChild = function(node, type, index) {
+ var child, children, found, name, _i, _len;
+ if (!node.hasChildNodes()) {
+ throw new Error("XPath error: node has no children!");
+ }
+ children = node.childNodes;
+ found = 0;
+ for (_i = 0, _len = children.length; _i < _len; _i++) {
+ child = children[_i];
+ name = getNodeName(child);
+ if (name === type) {
+ found += 1;
+ if (found === index) {
+ return child;
+ }
+ }
+ }
+ throw new Error("XPath error: wanted child not found.");
+ };
+
+ getNodeName = function(node) {
+ var nodeName;
+ nodeName = node.nodeName.toLowerCase();
+ switch (nodeName) {
+ case "#text":
+ return "text()";
+ case "#comment":
+ return "comment()";
+ case "#cdata-section":
+ return "cdata-section()";
+ default:
+ return nodeName;
+ }
+ };
+
+ getNodePosition = function(node) {
+ var pos, tmp;
+ pos = 0;
+ tmp = node;
+ while (tmp) {
+ if (tmp.nodeName === node.nodeName) {
+ pos++;
+ }
+ tmp = tmp.previousSibling;
+ }
+ return pos;
+ };
+
+ gettext = null;
+
+ if (typeof Gettext !== "undefined" && Gettext !== null) {
+ _gettext = new Gettext({
+ domain: "annotator"
+ });
+ gettext = function(msgid) {
+ return _gettext.gettext(msgid);
+ };
+ } else {
+ gettext = function(msgid) {
+ return msgid;
+ };
+ }
+
+ _t = function(msgid) {
+ return gettext(msgid);
+ };
+
+ if (!(typeof jQuery !== "undefined" && jQuery !== null ? (_ref = jQuery.fn) != null ? _ref.jquery : void 0 : void 0)) {
+ console.error(_t("Annotator requires jQuery: have you included lib/vendor/jquery.js?"));
+ }
+
+ if (!(JSON && JSON.parse && JSON.stringify)) {
+ console.error(_t("Annotator requires a JSON implementation: have you included lib/vendor/json2.js?"));
+ }
+
+ $ = jQuery;
+
+ Util = {};
+
+ Util.flatten = function(array) {
+ var flatten;
+ flatten = function(ary) {
+ var el, flat, _i, _len;
+ flat = [];
+ for (_i = 0, _len = ary.length; _i < _len; _i++) {
+ el = ary[_i];
+ flat = flat.concat(el && $.isArray(el) ? flatten(el) : el);
+ }
+ return flat;
+ };
+ return flatten(array);
+ };
+
+ Util.contains = function(parent, child) {
+ var node;
+ node = child;
+ while (node != null) {
+ if (node === parent) {
+ return true;
+ }
+ node = node.parentNode;
+ }
+ return false;
+ };
+
+ Util.getTextNodes = function(jq) {
+ var getTextNodes;
+ getTextNodes = function(node) {
+ var nodes;
+ if (node && node.nodeType !== Node.TEXT_NODE) {
+ nodes = [];
+ if (node.nodeType !== Node.COMMENT_NODE) {
+ node = node.lastChild;
+ while (node) {
+ nodes.push(getTextNodes(node));
+ node = node.previousSibling;
+ }
+ }
+ return nodes.reverse();
+ } else {
+ return node;
+ }
+ };
+ return jq.map(function() {
+ return Util.flatten(getTextNodes(this));
+ });
+ };
+
+ Util.getLastTextNodeUpTo = function(n) {
+ var result;
+ switch (n.nodeType) {
+ case Node.TEXT_NODE:
+ return n;
+ case Node.ELEMENT_NODE:
+ if (n.lastChild != null) {
+ result = Util.getLastTextNodeUpTo(n.lastChild);
+ if (result != null) {
+ return result;
+ }
+ }
+ break;
+ }
+ n = n.previousSibling;
+ if (n != null) {
+ return Util.getLastTextNodeUpTo(n);
+ } else {
+ return null;
+ }
+ };
+
+ Util.getFirstTextNodeNotBefore = function(n) {
+ var result;
+ switch (n.nodeType) {
+ case Node.TEXT_NODE:
+ return n;
+ case Node.ELEMENT_NODE:
+ if (n.firstChild != null) {
+ result = Util.getFirstTextNodeNotBefore(n.firstChild);
+ if (result != null) {
+ return result;
+ }
+ }
+ break;
+ }
+ n = n.nextSibling;
+ if (n != null) {
+ return Util.getFirstTextNodeNotBefore(n);
+ } else {
+ return null;
+ }
+ };
+
+ Util.readRangeViaSelection = function(range) {
+ var sel;
+ sel = Util.getGlobal().getSelection();
+ sel.removeAllRanges();
+ sel.addRange(range.toRange());
+ return sel.toString();
+ };
+
+ Util.xpathFromNode = function(el, relativeRoot) {
+ var exception, result;
+ try {
+ result = simpleXPathJQuery.call(el, relativeRoot);
+ } catch (_error) {
+ exception = _error;
+ console.log("jQuery-based XPath construction failed! Falling back to manual.");
+ result = simpleXPathPure.call(el, relativeRoot);
+ }
+ return result;
+ };
+
+ Util.nodeFromXPath = function(xp, root) {
+ var idx, name, node, step, steps, _i, _len, _ref1;
+ steps = xp.substring(1).split("/");
+ node = root;
+ for (_i = 0, _len = steps.length; _i < _len; _i++) {
+ step = steps[_i];
+ _ref1 = step.split("["), name = _ref1[0], idx = _ref1[1];
+ idx = idx != null ? parseInt((idx != null ? idx.split("]") : void 0)[0]) : 1;
+ node = findChild(node, name.toLowerCase(), idx);
+ }
+ return node;
+ };
+
+ Util.escape = function(html) {
+ return html.replace(/&(?!\w+;)/g, '&').replace(//g, '>').replace(/"/g, '"');
+ };
+
+ Util.uuid = (function() {
+ var counter;
+ counter = 0;
+ return function() {
+ return counter++;
+ };
+ })();
+
+ Util.getGlobal = function() {
+ return (function() {
+ return this;
+ })();
+ };
+
+ Util.maxZIndex = function($elements) {
+ var all, el;
+ all = (function() {
+ var _i, _len, _results;
+ _results = [];
+ for (_i = 0, _len = $elements.length; _i < _len; _i++) {
+ el = $elements[_i];
+ if ($(el).css('position') === 'static') {
+ _results.push(-1);
+ } else {
+ _results.push(parseFloat($(el).css('z-index')) || -1);
+ }
+ }
+ return _results;
+ })();
+ return Math.max.apply(Math, all);
+ };
+
+ Util.mousePosition = function(e, offsetEl) {
+ var offset, _ref1;
+ if ((_ref1 = $(offsetEl).css('position')) !== 'absolute' && _ref1 !== 'fixed' && _ref1 !== 'relative') {
+ offsetEl = $(offsetEl).offsetParent()[0];
+ }
+ offset = $(offsetEl).offset();
+ return {
+ top: e.pageY - offset.top,
+ left: e.pageX - offset.left
+ };
+ };
+
+ Util.preventEventDefault = function(event) {
+ return event != null ? typeof event.preventDefault === "function" ? event.preventDefault() : void 0 : void 0;
+ };
+
+ functions = ["log", "debug", "info", "warn", "exception", "assert", "dir", "dirxml", "trace", "group", "groupEnd", "groupCollapsed", "time", "timeEnd", "profile", "profileEnd", "count", "clear", "table", "error", "notifyFirebug", "firebug", "userObjects"];
+
+ if (typeof console !== "undefined" && console !== null) {
+ if (console.group == null) {
+ console.group = function(name) {
+ return console.log("GROUP: ", name);
+ };
+ }
+ if (console.groupCollapsed == null) {
+ console.groupCollapsed = console.group;
+ }
+ for (_i = 0, _len = functions.length; _i < _len; _i++) {
+ fn = functions[_i];
+ if (console[fn] == null) {
+ console[fn] = function() {
+ return console.log(_t("Not implemented:") + (" console." + name));
+ };
+ }
+ }
+ } else {
+ this.console = {};
+ for (_j = 0, _len1 = functions.length; _j < _len1; _j++) {
+ fn = functions[_j];
+ this.console[fn] = function() {};
+ }
+ this.console['error'] = function() {
+ var args;
+ args = 1 <= arguments.length ? __slice.call(arguments, 0) : [];
+ return alert("ERROR: " + (args.join(', ')));
+ };
+ this.console['warn'] = function() {
+ var args;
+ args = 1 <= arguments.length ? __slice.call(arguments, 0) : [];
+ return alert("WARNING: " + (args.join(', ')));
+ };
+ }
+
+ Delegator = (function() {
+ Delegator.prototype.events = {};
+
+ Delegator.prototype.options = {};
+
+ Delegator.prototype.element = null;
+
+ function Delegator(element, options) {
+ this.options = $.extend(true, {}, this.options, options);
+ this.element = $(element);
+ this._closures = {};
+ this.on = this.subscribe;
+ this.addEvents();
+ }
+
+ Delegator.prototype.destroy = function() {
+ return this.removeEvents();
+ };
+
+ Delegator.prototype.addEvents = function() {
+ var event, _k, _len2, _ref1, _results;
+ _ref1 = Delegator._parseEvents(this.events);
+ _results = [];
+ for (_k = 0, _len2 = _ref1.length; _k < _len2; _k++) {
+ event = _ref1[_k];
+ _results.push(this._addEvent(event.selector, event.event, event.functionName));
+ }
+ return _results;
+ };
+
+ Delegator.prototype.removeEvents = function() {
+ var event, _k, _len2, _ref1, _results;
+ _ref1 = Delegator._parseEvents(this.events);
+ _results = [];
+ for (_k = 0, _len2 = _ref1.length; _k < _len2; _k++) {
+ event = _ref1[_k];
+ _results.push(this._removeEvent(event.selector, event.event, event.functionName));
+ }
+ return _results;
+ };
+
+ Delegator.prototype._addEvent = function(selector, event, functionName) {
+ var closure,
+ _this = this;
+ closure = function() {
+ return _this[functionName].apply(_this, arguments);
+ };
+ if (selector === '' && Delegator._isCustomEvent(event)) {
+ this.subscribe(event, closure);
+ } else {
+ this.element.delegate(selector, event, closure);
+ }
+ this._closures["" + selector + "/" + event + "/" + functionName] = closure;
+ return this;
+ };
+
+ Delegator.prototype._removeEvent = function(selector, event, functionName) {
+ var closure;
+ closure = this._closures["" + selector + "/" + event + "/" + functionName];
+ if (selector === '' && Delegator._isCustomEvent(event)) {
+ this.unsubscribe(event, closure);
+ } else {
+ this.element.undelegate(selector, event, closure);
+ }
+ delete this._closures["" + selector + "/" + event + "/" + functionName];
+ return this;
+ };
+
+ Delegator.prototype.publish = function() {
+ this.element.triggerHandler.apply(this.element, arguments);
+ return this;
+ };
+
+ Delegator.prototype.subscribe = function(event, callback) {
+ var closure;
+ closure = function() {
+ return callback.apply(this, [].slice.call(arguments, 1));
+ };
+ closure.guid = callback.guid = ($.guid += 1);
+ this.element.bind(event, closure);
+ return this;
+ };
+
+ Delegator.prototype.unsubscribe = function() {
+ this.element.unbind.apply(this.element, arguments);
+ return this;
+ };
+
+ return Delegator;
+
+ })();
+
+ Delegator._parseEvents = function(eventsObj) {
+ var event, events, functionName, sel, selector, _k, _ref1;
+ events = [];
+ for (sel in eventsObj) {
+ functionName = eventsObj[sel];
+ _ref1 = sel.split(' '), selector = 2 <= _ref1.length ? __slice.call(_ref1, 0, _k = _ref1.length - 1) : (_k = 0, []), event = _ref1[_k++];
+ events.push({
+ selector: selector.join(' '),
+ event: event,
+ functionName: functionName
+ });
+ }
+ return events;
+ };
+
+ Delegator.natives = (function() {
+ var key, specials, val;
+ specials = (function() {
+ var _ref1, _results;
+ _ref1 = jQuery.event.special;
+ _results = [];
+ for (key in _ref1) {
+ if (!__hasProp.call(_ref1, key)) continue;
+ val = _ref1[key];
+ _results.push(key);
+ }
+ return _results;
+ })();
+ return "blur focus focusin focusout load resize scroll unload click dblclick\nmousedown mouseup mousemove mouseover mouseout mouseenter mouseleave\nchange select submit keydown keypress keyup error".split(/[^a-z]+/).concat(specials);
+ })();
+
+ Delegator._isCustomEvent = function(event) {
+ event = event.split('.')[0];
+ return $.inArray(event, Delegator.natives) === -1;
+ };
+
+ Range = {};
+
+ Range.sniff = function(r) {
+ if (r.commonAncestorContainer != null) {
+ return new Range.BrowserRange(r);
+ } else if (typeof r.start === "string") {
+ return new Range.SerializedRange(r);
+ } else if (r.start && typeof r.start === "object") {
+ return new Range.NormalizedRange(r);
+ } else {
+ console.error(_t("Could not sniff range type"));
+ return false;
+ }
+ };
+
+ Range.nodeFromXPath = function(xpath, root) {
+ var customResolver, evaluateXPath, namespace, node, segment;
+ if (root == null) {
+ root = document;
+ }
+ evaluateXPath = function(xp, nsResolver) {
+ var exception;
+ if (nsResolver == null) {
+ nsResolver = null;
+ }
+ try {
+ return document.evaluate('.' + xp, root, nsResolver, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue;
+ } catch (_error) {
+ exception = _error;
+ console.log("XPath evaluation failed.");
+ console.log("Trying fallback...");
+ return Util.nodeFromXPath(xp, root);
+ }
+ };
+ if (!$.isXMLDoc(document.documentElement)) {
+ return evaluateXPath(xpath);
+ } else {
+ customResolver = document.createNSResolver(document.ownerDocument === null ? document.documentElement : document.ownerDocument.documentElement);
+ node = evaluateXPath(xpath, customResolver);
+ if (!node) {
+ xpath = ((function() {
+ var _k, _len2, _ref1, _results;
+ _ref1 = xpath.split('/');
+ _results = [];
+ for (_k = 0, _len2 = _ref1.length; _k < _len2; _k++) {
+ segment = _ref1[_k];
+ if (segment && segment.indexOf(':') === -1) {
+ _results.push(segment.replace(/^([a-z]+)/, 'xhtml:$1'));
+ } else {
+ _results.push(segment);
+ }
+ }
+ return _results;
+ })()).join('/');
+ namespace = document.lookupNamespaceURI(null);
+ customResolver = function(ns) {
+ if (ns === 'xhtml') {
+ return namespace;
+ } else {
+ return document.documentElement.getAttribute('xmlns:' + ns);
+ }
+ };
+ node = evaluateXPath(xpath, customResolver);
+ }
+ return node;
+ }
+ };
+
+ Range.RangeError = (function(_super) {
+ __extends(RangeError, _super);
+
+ function RangeError(type, message, parent) {
+ this.type = type;
+ this.message = message;
+ this.parent = parent != null ? parent : null;
+ RangeError.__super__.constructor.call(this, this.message);
+ }
+
+ return RangeError;
+
+ })(Error);
+
+ Range.BrowserRange = (function() {
+ function BrowserRange(obj) {
+ this.commonAncestorContainer = obj.commonAncestorContainer;
+ this.startContainer = obj.startContainer;
+ this.startOffset = obj.startOffset;
+ this.endContainer = obj.endContainer;
+ this.endOffset = obj.endOffset;
+ }
+
+ BrowserRange.prototype.normalize = function(root) {
+ var n, node, nr, r;
+ if (this.tainted) {
+ console.error(_t("You may only call normalize() once on a BrowserRange!"));
+ return false;
+ } else {
+ this.tainted = true;
+ }
+ r = {};
+ if (this.startContainer.nodeType === Node.ELEMENT_NODE) {
+ r.start = Util.getFirstTextNodeNotBefore(this.startContainer.childNodes[this.startOffset]);
+ r.startOffset = 0;
+ } else {
+ r.start = this.startContainer;
+ r.startOffset = this.startOffset;
+ }
+ if (this.endContainer.nodeType === Node.ELEMENT_NODE) {
+ node = this.endContainer.childNodes[this.endOffset];
+ if (node != null) {
+ n = node;
+ while ((n != null) && (n.nodeType !== Node.TEXT_NODE)) {
+ n = n.firstChild;
+ }
+ if (n != null) {
+ r.end = n;
+ r.endOffset = 0;
+ }
+ }
+ if (r.end == null) {
+ node = this.endContainer.childNodes[this.endOffset - 1];
+ r.end = Util.getLastTextNodeUpTo(node);
+ r.endOffset = r.end.nodeValue.length;
+ }
+ } else {
+ r.end = this.endContainer;
+ r.endOffset = this.endOffset;
+ }
+ nr = {};
+ if (r.startOffset > 0) {
+ if (r.start.nodeValue.length > r.startOffset) {
+ nr.start = r.start.splitText(r.startOffset);
+ } else {
+ nr.start = r.start.nextSibling;
+ }
+ } else {
+ nr.start = r.start;
+ }
+ if (r.start === r.end) {
+ if (nr.start.nodeValue.length > (r.endOffset - r.startOffset)) {
+ nr.start.splitText(r.endOffset - r.startOffset);
+ }
+ nr.end = nr.start;
+ } else {
+ if (r.end.nodeValue.length > r.endOffset) {
+ r.end.splitText(r.endOffset);
+ }
+ nr.end = r.end;
+ }
+ nr.commonAncestor = this.commonAncestorContainer;
+ while (nr.commonAncestor.nodeType !== Node.ELEMENT_NODE) {
+ nr.commonAncestor = nr.commonAncestor.parentNode;
+ }
+ return new Range.NormalizedRange(nr);
+ };
+
+ BrowserRange.prototype.serialize = function(root, ignoreSelector) {
+ return this.normalize(root).serialize(root, ignoreSelector);
+ };
+
+ return BrowserRange;
+
+ })();
+
+ Range.NormalizedRange = (function() {
+ function NormalizedRange(obj) {
+ this.commonAncestor = obj.commonAncestor;
+ this.start = obj.start;
+ this.end = obj.end;
+ }
+
+ NormalizedRange.prototype.normalize = function(root) {
+ return this;
+ };
+
+ NormalizedRange.prototype.limit = function(bounds) {
+ var nodes, parent, startParents, _k, _len2, _ref1;
+ nodes = $.grep(this.textNodes(), function(node) {
+ return node.parentNode === bounds || $.contains(bounds, node.parentNode);
+ });
+ if (!nodes.length) {
+ return null;
+ }
+ this.start = nodes[0];
+ this.end = nodes[nodes.length - 1];
+ startParents = $(this.start).parents();
+ _ref1 = $(this.end).parents();
+ for (_k = 0, _len2 = _ref1.length; _k < _len2; _k++) {
+ parent = _ref1[_k];
+ if (startParents.index(parent) !== -1) {
+ this.commonAncestor = parent;
+ break;
+ }
+ }
+ return this;
+ };
+
+ NormalizedRange.prototype.serialize = function(root, ignoreSelector) {
+ var end, serialization, start;
+ serialization = function(node, isEnd) {
+ var n, nodes, offset, origParent, textNodes, xpath, _k, _len2;
+ if (ignoreSelector) {
+ origParent = $(node).parents(":not(" + ignoreSelector + ")").eq(0);
+ } else {
+ origParent = $(node).parent();
+ }
+ xpath = Util.xpathFromNode(origParent, root)[0];
+ textNodes = Util.getTextNodes(origParent);
+ nodes = textNodes.slice(0, textNodes.index(node));
+ offset = 0;
+ for (_k = 0, _len2 = nodes.length; _k < _len2; _k++) {
+ n = nodes[_k];
+ offset += n.nodeValue.length;
+ }
+ if (isEnd) {
+ return [xpath, offset + node.nodeValue.length];
+ } else {
+ return [xpath, offset];
+ }
+ };
+ start = serialization(this.start);
+ end = serialization(this.end, true);
+ return new Range.SerializedRange({
+ start: start[0],
+ end: end[0],
+ startOffset: start[1],
+ endOffset: end[1]
+ });
+ };
+
+ NormalizedRange.prototype.text = function() {
+ var node;
+ return ((function() {
+ var _k, _len2, _ref1, _results;
+ _ref1 = this.textNodes();
+ _results = [];
+ for (_k = 0, _len2 = _ref1.length; _k < _len2; _k++) {
+ node = _ref1[_k];
+ _results.push(node.nodeValue);
+ }
+ return _results;
+ }).call(this)).join('');
+ };
+
+ NormalizedRange.prototype.textNodes = function() {
+ var end, start, textNodes, _ref1;
+ textNodes = Util.getTextNodes($(this.commonAncestor));
+ _ref1 = [textNodes.index(this.start), textNodes.index(this.end)], start = _ref1[0], end = _ref1[1];
+ return $.makeArray(textNodes.slice(start, +end + 1 || 9e9));
+ };
+
+ NormalizedRange.prototype.toRange = function() {
+ var range;
+ range = document.createRange();
+ range.setStartBefore(this.start);
+ range.setEndAfter(this.end);
+ return range;
+ };
+
+ return NormalizedRange;
+
+ })();
+
+ Range.SerializedRange = (function() {
+ function SerializedRange(obj) {
+ this.start = obj.start;
+ this.startOffset = obj.startOffset;
+ this.end = obj.end;
+ this.endOffset = obj.endOffset;
+ }
+
+ SerializedRange.prototype.normalize = function(root) {
+ var contains, e, length, node, p, range, targetOffset, tn, _k, _l, _len2, _len3, _ref1, _ref2;
+ range = {};
+ _ref1 = ['start', 'end'];
+ for (_k = 0, _len2 = _ref1.length; _k < _len2; _k++) {
+ p = _ref1[_k];
+ try {
+ node = Range.nodeFromXPath(this[p], root);
+ } catch (_error) {
+ e = _error;
+ throw new Range.RangeError(p, ("Error while finding " + p + " node: " + this[p] + ": ") + e, e);
+ }
+ if (!node) {
+ throw new Range.RangeError(p, "Couldn't find " + p + " node: " + this[p]);
+ }
+ length = 0;
+ targetOffset = this[p + 'Offset'];
+ if (p === 'end') {
+ targetOffset--;
+ }
+ _ref2 = Util.getTextNodes($(node));
+ for (_l = 0, _len3 = _ref2.length; _l < _len3; _l++) {
+ tn = _ref2[_l];
+ if (length + tn.nodeValue.length > targetOffset) {
+ range[p + 'Container'] = tn;
+ range[p + 'Offset'] = this[p + 'Offset'] - length;
+ break;
+ } else {
+ length += tn.nodeValue.length;
+ }
+ }
+ if (range[p + 'Offset'] == null) {
+ throw new Range.RangeError("" + p + "offset", "Couldn't find offset " + this[p + 'Offset'] + " in element " + this[p]);
+ }
+ }
+ contains = document.compareDocumentPosition == null ? function(a, b) {
+ return a.contains(b);
+ } : function(a, b) {
+ return a.compareDocumentPosition(b) & 16;
+ };
+ $(range.startContainer).parents().each(function() {
+ if (contains(this, range.endContainer)) {
+ range.commonAncestorContainer = this;
+ return false;
+ }
+ });
+ return new Range.BrowserRange(range).normalize(root);
+ };
+
+ SerializedRange.prototype.serialize = function(root, ignoreSelector) {
+ return this.normalize(root).serialize(root, ignoreSelector);
+ };
+
+ SerializedRange.prototype.toObject = function() {
+ return {
+ start: this.start,
+ startOffset: this.startOffset,
+ end: this.end,
+ endOffset: this.endOffset
+ };
+ };
+
+ return SerializedRange;
+
+ })();
+
+ _Annotator = this.Annotator;
+
+ Annotator = (function(_super) {
+ __extends(Annotator, _super);
+
+ Annotator.prototype.events = {
+ ".annotator-adder button click": "onAdderClick",
+ ".annotator-adder button mousedown": "onAdderMousedown",
+ ".annotator-hl mouseover": "onHighlightMouseover",
+ ".annotator-hl mouseout": "startViewerHideTimer"
+ };
+
+ Annotator.prototype.html = {
+ adder: '',
+ wrapper: ''
+ };
+
+ Annotator.prototype.options = {
+ readOnly: false
+ };
+
+ Annotator.prototype.plugins = {};
+
+ Annotator.prototype.editor = null;
+
+ Annotator.prototype.viewer = null;
+
+ Annotator.prototype.selectedRanges = null;
+
+ Annotator.prototype.mouseIsDown = false;
+
+ Annotator.prototype.ignoreMouseup = false;
+
+ Annotator.prototype.viewerHideTimer = null;
+
+ function Annotator(element, options) {
+ this.onDeleteAnnotation = __bind(this.onDeleteAnnotation, this);
+ this.onEditAnnotation = __bind(this.onEditAnnotation, this);
+ this.onAdderClick = __bind(this.onAdderClick, this);
+ this.onAdderMousedown = __bind(this.onAdderMousedown, this);
+ this.onHighlightMouseover = __bind(this.onHighlightMouseover, this);
+ this.checkForEndSelection = __bind(this.checkForEndSelection, this);
+ this.checkForStartSelection = __bind(this.checkForStartSelection, this);
+ this.clearViewerHideTimer = __bind(this.clearViewerHideTimer, this);
+ this.startViewerHideTimer = __bind(this.startViewerHideTimer, this);
+ this.showViewer = __bind(this.showViewer, this);
+ this.onEditorSubmit = __bind(this.onEditorSubmit, this);
+ this.onEditorHide = __bind(this.onEditorHide, this);
+ this.showEditor = __bind(this.showEditor, this);
+ Annotator.__super__.constructor.apply(this, arguments);
+ this.plugins = {};
+ if (!Annotator.supported()) {
+ return this;
+ }
+ if (!this.options.readOnly) {
+ this._setupDocumentEvents();
+ }
+ this._setupWrapper()._setupViewer()._setupEditor();
+ this._setupDynamicStyle();
+ this.adder = $(this.html.adder).appendTo(this.wrapper).hide();
+ Annotator._instances.push(this);
+ }
+
+ Annotator.prototype._setupWrapper = function() {
+ this.wrapper = $(this.html.wrapper);
+ this.element.find('script').remove();
+ this.element.wrapInner(this.wrapper);
+ this.wrapper = this.element.find('.annotator-wrapper');
+ return this;
+ };
+
+ Annotator.prototype._setupViewer = function() {
+ var _this = this;
+ this.viewer = new Annotator.Viewer({
+ readOnly: this.options.readOnly
+ });
+ this.viewer.hide().on("edit", this.onEditAnnotation).on("delete", this.onDeleteAnnotation).addField({
+ load: function(field, annotation) {
+ if (annotation.text) {
+ $(field).html(Util.escape(annotation.text));
+ } else {
+ $(field).html("" + (_t('No Comment')) + "");
+ }
+ return _this.publish('annotationViewerTextField', [field, annotation]);
+ }
+ }).element.appendTo(this.wrapper).bind({
+ "mouseover": this.clearViewerHideTimer,
+ "mouseout": this.startViewerHideTimer
+ });
+ return this;
+ };
+
+ Annotator.prototype._setupEditor = function() {
+ this.editor = new Annotator.Editor();
+ this.editor.hide().on('hide', this.onEditorHide).on('save', this.onEditorSubmit).addField({
+ type: 'textarea',
+ label: _t('Comments') + '\u2026',
+ load: function(field, annotation) {
+ return $(field).find('textarea').val(annotation.text || '');
+ },
+ submit: function(field, annotation) {
+ return annotation.text = $(field).find('textarea').val();
+ }
+ });
+ this.editor.element.appendTo(this.wrapper);
+ return this;
+ };
+
+ Annotator.prototype._setupDocumentEvents = function() {
+ $(document).bind({
+ "mouseup": this.checkForEndSelection,
+ "mousedown": this.checkForStartSelection
+ });
+ return this;
+ };
+
+ Annotator.prototype._setupDynamicStyle = function() {
+ var max, sel, style, x;
+ style = $('#annotator-dynamic-style');
+ if (!style.length) {
+ style = $('').appendTo(document.head);
+ }
+ sel = '*' + ((function() {
+ var _k, _len2, _ref1, _results;
+ _ref1 = ['adder', 'outer', 'notice', 'filter'];
+ _results = [];
+ for (_k = 0, _len2 = _ref1.length; _k < _len2; _k++) {
+ x = _ref1[_k];
+ _results.push(":not(.annotator-" + x + ")");
+ }
+ return _results;
+ })()).join('');
+ max = Util.maxZIndex($(document.body).find(sel));
+ max = Math.max(max, 1000);
+ style.text([".annotator-adder, .annotator-outer, .annotator-notice {", " z-index: " + (max + 20) + ";", "}", ".annotator-filter {", " z-index: " + (max + 10) + ";", "}"].join("\n"));
+ return this;
+ };
+
+ Annotator.prototype.destroy = function() {
+ var idx, name, plugin, _base, _ref1;
+ Annotator.__super__.destroy.apply(this, arguments);
+ $(document).unbind({
+ "mouseup": this.checkForEndSelection,
+ "mousedown": this.checkForStartSelection
+ });
+ $('#annotator-dynamic-style').remove();
+ this.adder.remove();
+ this.viewer.destroy();
+ this.editor.destroy();
+ this.wrapper.find('.annotator-hl').each(function() {
+ $(this).contents().insertBefore(this);
+ return $(this).remove();
+ });
+ this.wrapper.contents().insertBefore(this.wrapper);
+ this.wrapper.remove();
+ this.element.data('annotator', null);
+ _ref1 = this.plugins;
+ for (name in _ref1) {
+ plugin = _ref1[name];
+ if (typeof (_base = this.plugins[name]).destroy === "function") {
+ _base.destroy();
+ }
+ }
+ idx = Annotator._instances.indexOf(this);
+ if (idx !== -1) {
+ return Annotator._instances.splice(idx, 1);
+ }
+ };
+
+ Annotator.prototype.getSelectedRanges = function() {
+ var browserRange, i, normedRange, r, ranges, rangesToIgnore, selection, _k, _len2;
+ selection = Util.getGlobal().getSelection();
+ ranges = [];
+ rangesToIgnore = [];
+ if (!selection.isCollapsed) {
+ ranges = (function() {
+ var _k, _ref1, _results;
+ _results = [];
+ for (i = _k = 0, _ref1 = selection.rangeCount; 0 <= _ref1 ? _k < _ref1 : _k > _ref1; i = 0 <= _ref1 ? ++_k : --_k) {
+ r = selection.getRangeAt(i);
+ browserRange = new Range.BrowserRange(r);
+ normedRange = browserRange.normalize().limit(this.wrapper[0]);
+ if (normedRange === null) {
+ rangesToIgnore.push(r);
+ }
+ _results.push(normedRange);
+ }
+ return _results;
+ }).call(this);
+ selection.removeAllRanges();
+ }
+ for (_k = 0, _len2 = rangesToIgnore.length; _k < _len2; _k++) {
+ r = rangesToIgnore[_k];
+ selection.addRange(r);
+ }
+ return $.grep(ranges, function(range) {
+ if (range) {
+ selection.addRange(range.toRange());
+ }
+ return range;
+ });
+ };
+
+ Annotator.prototype.createAnnotation = function() {
+ var annotation;
+ annotation = {};
+ this.publish('beforeAnnotationCreated', [annotation]);
+ return annotation;
+ };
+
+ Annotator.prototype.setupAnnotation = function(annotation) {
+ var e, normed, normedRanges, r, root, _k, _l, _len2, _len3, _ref1;
+ root = this.wrapper[0];
+ annotation.ranges || (annotation.ranges = this.selectedRanges);
+ normedRanges = [];
+ _ref1 = annotation.ranges;
+ for (_k = 0, _len2 = _ref1.length; _k < _len2; _k++) {
+ r = _ref1[_k];
+ try {
+ normedRanges.push(Range.sniff(r).normalize(root));
+ } catch (_error) {
+ e = _error;
+ if (e instanceof Range.RangeError) {
+ this.publish('rangeNormalizeFail', [annotation, r, e]);
+ } else {
+ throw e;
+ }
+ }
+ }
+ annotation.quote = [];
+ annotation.ranges = [];
+ annotation.highlights = [];
+ for (_l = 0, _len3 = normedRanges.length; _l < _len3; _l++) {
+ normed = normedRanges[_l];
+ annotation.quote.push($.trim(normed.text()));
+ annotation.ranges.push(normed.serialize(this.wrapper[0], '.annotator-hl'));
+ $.merge(annotation.highlights, this.highlightRange(normed));
+ }
+ annotation.quote = annotation.quote.join(' / ');
+ $(annotation.highlights).data('annotation', annotation);
+ $(annotation.highlights).attr('data-annotation-id', annotation.id);
+ return annotation;
+ };
+
+ Annotator.prototype.updateAnnotation = function(annotation) {
+ this.publish('beforeAnnotationUpdated', [annotation]);
+ $(annotation.highlights).attr('data-annotation-id', annotation.id);
+ this.publish('annotationUpdated', [annotation]);
+ return annotation;
+ };
+
+ Annotator.prototype.deleteAnnotation = function(annotation) {
+ var child, h, _k, _len2, _ref1;
+ if (annotation.highlights != null) {
+ _ref1 = annotation.highlights;
+ for (_k = 0, _len2 = _ref1.length; _k < _len2; _k++) {
+ h = _ref1[_k];
+ if (!(h.parentNode != null)) {
+ continue;
+ }
+ child = h.childNodes[0];
+ $(h).replaceWith(h.childNodes);
+ }
+ }
+ this.publish('annotationDeleted', [annotation]);
+ return annotation;
+ };
+
+ Annotator.prototype.loadAnnotations = function(annotations) {
+ var clone, loader,
+ _this = this;
+ if (annotations == null) {
+ annotations = [];
+ }
+ loader = function(annList) {
+ var n, now, _k, _len2;
+ if (annList == null) {
+ annList = [];
+ }
+ now = annList.splice(0, 10);
+ for (_k = 0, _len2 = now.length; _k < _len2; _k++) {
+ n = now[_k];
+ _this.setupAnnotation(n);
+ }
+ if (annList.length > 0) {
+ return setTimeout((function() {
+ return loader(annList);
+ }), 10);
+ } else {
+ return _this.publish('annotationsLoaded', [clone]);
+ }
+ };
+ clone = annotations.slice();
+ loader(annotations);
+ return this;
+ };
+
+ Annotator.prototype.dumpAnnotations = function() {
+ if (this.plugins['Store']) {
+ return this.plugins['Store'].dumpAnnotations();
+ } else {
+ console.warn(_t("Can't dump annotations without Store plugin."));
+ return false;
+ }
+ };
+
+ Annotator.prototype.highlightRange = function(normedRange, cssClass) {
+ var hl, node, white, _k, _len2, _ref1, _results;
+ if (cssClass == null) {
+ cssClass = 'annotator-hl';
+ }
+ white = /^\s*$/;
+ hl = $("");
+ _ref1 = normedRange.textNodes();
+ _results = [];
+ for (_k = 0, _len2 = _ref1.length; _k < _len2; _k++) {
+ node = _ref1[_k];
+ if (!white.test(node.nodeValue)) {
+ _results.push($(node).wrapAll(hl).parent().show()[0]);
+ }
+ }
+ return _results;
+ };
+
+ Annotator.prototype.highlightRanges = function(normedRanges, cssClass) {
+ var highlights, r, _k, _len2;
+ if (cssClass == null) {
+ cssClass = 'annotator-hl';
+ }
+ highlights = [];
+ for (_k = 0, _len2 = normedRanges.length; _k < _len2; _k++) {
+ r = normedRanges[_k];
+ $.merge(highlights, this.highlightRange(r, cssClass));
+ }
+ return highlights;
+ };
+
+ Annotator.prototype.addPlugin = function(name, options) {
+ var klass, _base;
+ if (this.plugins[name]) {
+ console.error(_t("You cannot have more than one instance of any plugin."));
+ } else {
+ klass = Annotator.Plugin[name];
+ if (typeof klass === 'function') {
+ this.plugins[name] = new klass(this.element[0], options);
+ this.plugins[name].annotator = this;
+ if (typeof (_base = this.plugins[name]).pluginInit === "function") {
+ _base.pluginInit();
+ }
+ } else {
+ console.error(_t("Could not load ") + name + _t(" plugin. Have you included the appropriate
+```
+
+Then, on the server, you can replace `__SERVER_DATA__` with a JSON of real data right before sending the response. The client code can then read `window.SERVER_DATA` to use it. **Make sure to [sanitize the JSON before sending it to the client](https://medium.com/node-security/the-most-common-xss-vulnerability-in-react-js-applications-2bdffbcc1fa0) as it makes your app vulnerable to XSS attacks.**
+
+## Running Tests
+
+>Note: this feature is available with `react-scripts@0.3.0` and higher.
+>[Read the migration guide to learn how to enable it in older projects!](https://github.com/facebookincubator/create-react-app/blob/master/CHANGELOG.md#migrating-from-023-to-030)
+
+Create React App uses [Jest](https://facebook.github.io/jest/) as its test runner. To prepare for this integration, we did a [major revamp](https://facebook.github.io/jest/blog/2016/09/01/jest-15.html) of Jest so if you heard bad things about it years ago, give it another try.
+
+Jest is a Node-based runner. This means that the tests always run in a Node environment and not in a real browser. This lets us enable fast iteration speed and prevent flakiness.
+
+While Jest provides browser globals such as `window` thanks to [jsdom](https://github.com/tmpvar/jsdom), they are only approximations of the real browser behavior. Jest is intended to be used for unit tests of your logic and your components rather than the DOM quirks.
+
+We recommend that you use a separate tool for browser end-to-end tests if you need them. They are beyond the scope of Create React App.
+
+### Filename Conventions
+
+Jest will look for test files with any of the following popular naming conventions:
+
+* Files with `.js` suffix in `__tests__` folders.
+* Files with `.test.js` suffix.
+* Files with `.spec.js` suffix.
+
+The `.test.js` / `.spec.js` files (or the `__tests__` folders) can be located at any depth under the `src` top level folder.
+
+We recommend to put the test files (or `__tests__` folders) next to the code they are testing so that relative imports appear shorter. For example, if `App.test.js` and `App.js` are in the same folder, the test just needs to `import App from './App'` instead of a long relative path. Colocation also helps find tests more quickly in larger projects.
+
+### Command Line Interface
+
+When you run `npm test`, Jest will launch in the watch mode. Every time you save a file, it will re-run the tests, just like `npm start` recompiles the code.
+
+The watcher includes an interactive command-line interface with the ability to run all tests, or focus on a search pattern. It is designed this way so that you can keep it open and enjoy fast re-runs. You can learn the commands from the “Watch Usage” note that the watcher prints after every run:
+
+![Jest watch mode](http://facebook.github.io/jest/img/blog/15-watch.gif)
+
+### Version Control Integration
+
+By default, when you run `npm test`, Jest will only run the tests related to files changed since the last commit. This is an optimization designed to make your tests runs fast regardless of how many tests you have. However it assumes that you don’t often commit the code that doesn’t pass the tests.
+
+Jest will always explicitly mention that it only ran tests related to the files changed since the last commit. You can also press `a` in the watch mode to force Jest to run all tests.
+
+Jest will always run all tests on a [continuous integration](#continuous-integration) server or if the project is not inside a Git or Mercurial repository.
+
+### Writing Tests
+
+To create tests, add `it()` (or `test()`) blocks with the name of the test and its code. You may optionally wrap them in `describe()` blocks for logical grouping but this is neither required nor recommended.
+
+Jest provides a built-in `expect()` global function for making assertions. A basic test could look like this:
+
+```js
+import sum from './sum';
+
+it('sums numbers', () => {
+ expect(sum(1, 2)).toEqual(3);
+ expect(sum(2, 2)).toEqual(4);
+});
+```
+
+All `expect()` matchers supported by Jest are [extensively documented here](http://facebook.github.io/jest/docs/expect.html).
+You can also use [`jest.fn()` and `expect(fn).toBeCalled()`](http://facebook.github.io/jest/docs/expect.html#tohavebeencalled) to create “spies” or mock functions.
+
+### Testing Components
+
+There is a broad spectrum of component testing techniques. They range from a “smoke test” verifying that a component renders without throwing, to shallow rendering and testing some of the output, to full rendering and testing component lifecycle and state changes.
+
+Different projects choose different testing tradeoffs based on how often components change, and how much logic they contain. If you haven’t decided on a testing strategy yet, we recommend that you start with creating simple smoke tests for your components:
+
+```js
+import React from 'react';
+import ReactDOM from 'react-dom';
+import App from './App';
+
+it('renders without crashing', () => {
+ const div = document.createElement('div');
+ ReactDOM.render(, div);
+});
+```
+
+This test mounts a component and makes sure that it didn’t throw during rendering. Tests like this provide a lot value with very little effort so they are great as a starting point, and this is the test you will find in `src/App.test.js`.
+
+When you encounter bugs caused by changing components, you will gain a deeper insight into which parts of them are worth testing in your application. This might be a good time to introduce more specific tests asserting specific expected output or behavior.
+
+If you’d like to test components in isolation from the child components they render, we recommend using [`shallow()` rendering API](http://airbnb.io/enzyme/docs/api/shallow.html) from [Enzyme](http://airbnb.io/enzyme/). You can write a smoke test with it too:
+
+```sh
+npm install --save-dev enzyme react-test-renderer
+```
+
+```js
+import React from 'react';
+import { shallow } from 'enzyme';
+import App from './App';
+
+it('renders without crashing', () => {
+ shallow();
+});
+```
+
+Unlike the previous smoke test using `ReactDOM.render()`, this test only renders `` and doesn’t go deeper. For example, even if `` itself renders a `
+ );
+ }
+}
+
+export default Comment;
diff --git a/web/modules/forked/react_comments/js/src/src/components/CommentActions.js b/web/modules/forked/react_comments/js/src/src/components/CommentActions.js
new file mode 100644
index 0000000..ebe1774
--- /dev/null
+++ b/web/modules/forked/react_comments/js/src/src/components/CommentActions.js
@@ -0,0 +1,26 @@
+import React from 'react';
+
+export default ({currentUser, user, editActive, replyActive, toggleState, isReplyAllowed}) => {
+ const userCanEdit = currentUser && currentUser.hasPermission('edit own comments') && !currentUser.isAnon && currentUser.id === user.id;
+ const userCanAdministerComments = currentUser && currentUser.hasPermission('administer comments');
+
+ return (
+