-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #551 from EotvosCollegium/staging
Deploy recent changes
- Loading branch information
Showing
106 changed files
with
3,279 additions
and
1,429 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json | ||
language: "en-GB" | ||
tone_instructions: "I would rather you spoke with a polite and serious British accent" | ||
early_access: false | ||
reviews: | ||
profile: "chill" | ||
request_changes_workflow: false | ||
high_level_summary: false | ||
poem: false | ||
review_status: false | ||
collapse_walkthrough: true | ||
auto_review: | ||
enabled: true | ||
drafts: true | ||
chat: | ||
auto_reply: true | ||
|
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 was deleted.
Oops, something went wrong.
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,60 @@ | ||
<?php | ||
|
||
namespace App\Exports\UsersSheets; | ||
|
||
use Maatwebsite\Excel\Concerns\FromCollection; | ||
use Maatwebsite\Excel\Concerns\WithMapping; | ||
use Maatwebsite\Excel\Concerns\WithHeadings; | ||
|
||
use App\Models\AnonymousQuestions\AnswerSheet; | ||
use App\Models\Semester; | ||
|
||
/** | ||
* Exports all answers to anonymous questions of a given semester. | ||
*/ | ||
class AnonymousQuestionsExport implements FromCollection, WithMapping, WithHeadings | ||
{ | ||
/** | ||
* The semester whose questions are queried. | ||
*/ | ||
private Semester $semester; | ||
|
||
public function __construct(Semester $semester) | ||
{ | ||
$this->semester = $semester; | ||
} | ||
|
||
/** | ||
* The collection on which we are going to work. | ||
* | ||
* @return \Illuminate\Support\Collection | ||
*/ | ||
public function collection(): \Illuminate\Support\Collection | ||
{ | ||
return $this->semester->answerSheets() | ||
->orderBy('year_of_acceptance') | ||
->inRandomOrder() // so that they cannot be tracked as easily | ||
->get(); | ||
} | ||
|
||
/** | ||
* The way we create a row from an element. | ||
* | ||
* @param AnswerSheet $answerSheet | ||
*/ | ||
public function map($answerSheet): array | ||
{ | ||
return $answerSheet->toArray(); | ||
} | ||
|
||
/** | ||
* The first row of the spreadsheet. | ||
*/ | ||
public function headings(): array | ||
{ | ||
return array_merge([ | ||
__('general.semester'), | ||
__('user.year_of_acceptance') | ||
], $this->semester->questions()->orderBy('id')->pluck('title')->all()); | ||
} | ||
} |
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
Oops, something went wrong.