-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add SurveyReportUpload and add send report method (#31431)
* feat: add SurveyReportUpload and add send report method * docs: Update openedx/features/survey_report/management/commands/generate_report.py Co-authored-by: Maria Grimaldi <[email protected]> * docs: Update openedx/features/survey_report/models.py Co-authored-by: Maria Grimaldi <[email protected]> * refactor: Update openedx/features/survey_report/models.py Co-authored-by: Maria Grimaldi <[email protected]> * style: Update openedx/features/survey_report/api.py Co-authored-by: Maria Grimaldi <[email protected]> * feat: add migratio file and update status field name * refactor: rename send report method * test: fix test errors * test: add command options * refactor: simple conditional instead of ok method * fix: remove useless imports * fix: use status code instead of status * feat: add zapier endpoint * style: solve pylint issues * feat: add id field to send report data * refactor: regenerate migration with correct history * feat: add anonymous site id model * feat: update zapier url --------- Co-authored-by: Maria Grimaldi <[email protected]> Co-authored-by: Alejandro Cardenas <[email protected]>
- Loading branch information
1 parent
9ed2688
commit 7f90b5d
Showing
8 changed files
with
167 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
openedx/features/survey_report/migrations/0004_surveyreportupload.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Generated by Django 3.2.16 on 2023-02-01 15:16 | ||
|
||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('survey_report', '0003_add_state_field_and_add_default_values_to_fields'), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name='SurveyReportUpload', | ||
fields=[ | ||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('sent_at', models.DateTimeField(auto_now=True, help_text='Date when the report was sent to external api.')), | ||
('status_code', models.IntegerField(help_text='Request status code.')), | ||
('request_details', models.CharField(blank=True, help_text='Information about the send request.', max_length=255, null=True)), | ||
('report', models.ForeignKey(help_text='The report that was sent.', on_delete=django.db.models.deletion.CASCADE, to='survey_report.surveyreport')), | ||
], | ||
), | ||
] |
20 changes: 20 additions & 0 deletions
20
openedx/features/survey_report/migrations/0005_surveyreportanonymoussiteid.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Generated by Django 3.2.16 on 2023-02-10 15:45 | ||
|
||
from django.db import migrations, models | ||
import uuid | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('survey_report', '0004_surveyreportupload'), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name='SurveyReportAnonymousSiteID', | ||
fields=[ | ||
('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)), | ||
], | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters