-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Plugin Study Monitoring #385
Merged
Merged
Conversation
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
… sheet # Conflicts: # app/Http/Controllers/Api/Plugin/Study/StudySheetController.php # app/Model/Plugin/Study/StudySheet.php # database/factories/Plugin/Study/StudySheetFactory.php # database/migrations/tenant/2022_06_30_150001_create_study_sheets_table.php # database/seeds/PluginSeeder.php # tests/Feature/Http/Plugins/Study/StudySheetControllerTest.php
API documentationRoutesRoute Study Subject
Route Study Sheet
Requests & Responses
Create Study Subject Requests & ResponsesREQUEST BODY
RESPONSE BODY{
"data": [
{
"id": 1,
"name": "Math",
"created_at": "2022-07-01T06:00:00.000Z",
"updated_at": "2022-07-01T06:00:00.000Z",
}
],
}
Create Study Subject Requests & ResponsesREQUEST BODY
{
"name": "Math",
} RESPONSE BODY{
"id": 1,
"name": "Math",
"created_at": "2022-07-01T06:00:00.000Z",
"updated_at": "2022-07-01T06:00:00.000Z",
}
Study Sheet Index Requests & ResponsesREQUEST BODY{
"id": 1,
"is_draft": true,
"started_at": "2022-07-01T06:00:00.000Z",
"ended_at": "2022-07-01T06:30:00.000Z",
"subject_id": 1,
"subject": {
"id": 1,
"name": "Math",
},
"institution": "ruangguru.com",
"teacher": "John Doe",
"competency": "Algebra",
"learning_goals": "understand basic algebra",
"activities": "classroom",
"grade": 90,
"behavior": "A",
"remarks": "can follow the learning session",
"created_at": "2022-07-01T06:00:00.000Z",
"updated_at": "2022-07-01T06:00:00.000Z",
}
RESPONSE BODY{
"data": [
{
"id": 1,
"is_draft": true,
"started_at": "2022-07-01T06:00:00.000Z", // timestamp, ISO string
"ended_at": "2022-07-01T06:30:00.000Z", // timestamp, ISO string
"subject_id": 1,
"subject": {
"id": 1,
"name": "Math",
},
"institution": "ruangguru.com",
"teacher": "John Doe",
"competency": "Algebra",
"learning_goals": "understand basic algebra",
"activities": "classroom",
"grade": 90,
"behavior": "A",
"remarks": "can follow the learning session",
"created_at": "2022-07-01T06:00:00.000Z", // Timestamp, format: ISO String
"updated_at": "2022-07-01T06:00:00.000Z", // Timestamp, format: ISO String
}
],
"meta": {
"from": 1,
"to": 25,
"total": 250,
"last_page": 10,
"current_page": 1,
},
}
Study Sheet Create Requests & ResponsesUsed to create sheet
REQUEST BODY{
"is_draft": true,
"started_at": "2022-07-01T06:00:00.000Z", // timestamp, ISO string
"ended_at": "2022-07-01T06:30:00.000Z", // timestamp, ISO string
"photo": "<file>", // File, Image. Use multipart/form-data
"audio": "<file>", // File, Audio. Use multipart/form-data
"video": "<file>", // File, Video. Use multipart/form-data
"subject_id": 1,
"institution": "ruangguru.com",
"teacher": "John Doe",
"competency": "Algebra",
"learning_goals": "understand basic algebra",
"activities": "classroom",
"grade": 90,
"behavior": "A",
"remarks": "can follow the learning session",
} RESPONSE BODY{
"id": 1,
"is_draft": true,
"started_at": "2022-07-01T06:00:00.000Z",
"ended_at": "2022-07-01T06:30:00.000Z",
"photo": "<preview_link_to_file_in_gdrive>", // put this link to an iframe
"audio": "<preview_link_to_file_in_gdrive>", // put this link to an iframe
"video": "<preview_link_to_file_in_gdrive>", // put this link to an iframe
"subject_id": 1,
"subject": {
"id": 1,
"name": "Math",
},
"institution": "ruangguru.com",
"teacher": "John Doe",
"competency": "Algebra",
"learning_goals": "understand basic algebra",
"activities": "classroom",
"grade": 90,
"behavior": "A",
"remarks": "can follow the learning session",
"created_at": "2022-07-01T06:00:00.000Z",
"updated_at": "2022-07-01T06:00:00.000Z",
}
Study Sheet Update Requests & ResponsesUsed to update sheet
REQUEST BODY{
"is_draft": true,
"started_at": "2022-07-01T06:00:00.000Z", // timestamp, ISO string
"ended_at": "2022-07-01T06:30:00.000Z", // timestamp, ISO string
"photo_file_id": "<file>", // if don't want to update the file
"audio_file_id": "<file>", // if don't want to update the file
"video_file_id": "<file>", // if don't want to update the file
"photo": "<file>", // if updating the file
"audio": "<file>", // if updating the file
"video": "<file>", // if updating the file
"subject_id": 1,
"institution": "ruangguru.com",
"teacher": "John Doe",
"competency": "Algebra",
"learning_goals": "understand basic algebra",
"activities": "classroom",
"grade": 90,
"behavior": "A",
"remarks": "can follow the learning session",
} RESPONSE BODY{
"id": 1,
"is_draft": true,
"started_at": "2022-07-01T06:00:00.000Z",
"ended_at": "2022-07-01T06:30:00.000Z",
"photo": "<preview_link_to_file_in_gdrive>", // put this link to an iframe
"audio": "<preview_link_to_file_in_gdrive>", // put this link to an iframe
"video": "<preview_link_to_file_in_gdrive>", // put this link to an iframe
"subject_id": 1,
"subject": {
"id": 1,
"name": "Math",
},
"institution": "ruangguru.com",
"teacher": "John Doe",
"competency": "Algebra",
"learning_goals": "understand basic algebra",
"activities": "classroom",
"grade": 90,
"behavior": "A",
"remarks": "can follow the learning session",
"created_at": "2022-07-01T06:00:00.000Z",
"updated_at": "2022-07-01T06:00:00.000Z",
} |
Notes to setting up local dev with LaragonBackend
Frontend
Seed study subject\App\Model\Plugin\Study\StudySubject::create(['name' => 'Math'])
\App\Model\Plugin\Study\StudySubject::create(['name' => 'English'])
\App\Model\Plugin\Study\StudySubject::create(['name' => 'Physics'])
\App\Model\Plugin\Study\StudySubject::create(['name' => 'Biology'])
\App\Model\Plugin\Study\StudySubject::create(['name' => 'Chemistry'])
\App\Model\Plugin\Study\StudySubject::create(['name' => 'History'])
\App\Model\Plugin\Study\StudySubject::create(['name' => 'Geography'])
\App\Model\Plugin\Study\StudySubject::create(['name' => 'Sociology']) Set staging
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Step saat merge
1. Run
2. (Optional) Re cache config and routes
3. Enable google drive api
https://console.cloud.google.com/apis/library/drive.googleapis.com
4. Tambah Authorised redirect URIs
Go to https://console.cloud.google.com/apis/credentials
Click client name in OAuth 2.0 Client IDs
Add https://cloud.point.red/oauth/google/callback in Authorised redirect URIs (base app url, without tenant subdomain)
5. Edit .env tambahkan
6. Insert plugin study to database
7. Insert permission (maybe with php artisan tinker)
8. Insert role (maybe with php artisan tinker)
9. Give permission (maybe with php artisan tinker)
10. (Optional) Seed default subjects (maybe with php artisan tinker)