Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 37 additions & 37 deletions appinfo/info.xml
Original file line number Diff line number Diff line change
@@ -1,52 +1,52 @@
<?xml version="1.0"?>
<info xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://apps.nextcloud.com/schema/apps/info.xsd">
<id>forms</id>
<name>Forms</name>
<summary>📝 Simple surveys and questionnaires, self-hosted</summary>
<description><![CDATA[**Simple surveys and questionnaires, self-hosted!**
xsi:noNamespaceSchemaLocation="https://apps.nextcloud.com/schema/apps/info.xsd">
<id>forms</id>
<name>Forms</name>
<summary>📝 Simple surveys and questionnaires, self-hosted</summary>
<description><![CDATA[**Simple surveys and questionnaires, self-hosted!**

- **📝 Simple design:** No mass of options, only the essentials. Works well on mobile of course.
- **📊 View & export results:** Results are visualized and can also be exported as CSV in the same format used by Google Forms.
- **🔒 Data under your control!** Unlike in Google Forms, Typeform, Doodle and others, the survey info and responses are kept private on your instance.
- **🙋 Get involved!** We have lots of stuff planned like more question types, collaboration on forms, [and much more](https://github.com/nextcloud/forms/milestones)!
]]></description>
<version>2.4.0</version>
<licence>agpl</licence>
]]></description>
<version>2.4.0</version>
<licence>agpl</licence>

<author>Affan Hussain</author>
<author>Ajfar Huq</author>
<author>Inigo Jiron</author>
<author>Jan C. Borchardt</author>
<author>John Molakvoæ</author>
<author>Jonas Rittershofer</author>
<author>Kai Schröer</author>
<author>Kameron Sheppard</author>
<author>Natalie Gilbert</author>
<author>Nick Gallo</author>
<author>René Gieling</author>
<author>Stephan Link</author>
<author>Tim Sattizahn</author>
<author>Vinzenz Rosenkranz</author>
<author>Affan Hussain</author>
<author>Ajfar Huq</author>
<author>Inigo Jiron</author>
<author>Jan C. Borchardt</author>
<author>John Molakvoæ</author>
<author>Jonas Rittershofer</author>
<author>Kai Schröer</author>
<author>Kameron Sheppard</author>
<author>Natalie Gilbert</author>
<author>Nick Gallo</author>
<author>René Gieling</author>
<author>Stephan Link</author>
<author>Tim Sattizahn</author>
<author>Vinzenz Rosenkranz</author>

<category>tools</category>
<category>social</category>
<category>organization</category>
<category>tools</category>
<category>social</category>
<category>organization</category>

<website>https://github.com/nextcloud/forms</website>
<bugs>https://github.com/nextcloud/forms/issues</bugs>
<repository type="git">https://github.com/nextcloud/forms</repository>
<documentation>
<admin>https://github.com/nextcloud/forms/blob/master/README.md</admin>
</documentation>
<website>https://github.com/nextcloud/forms</website>
<bugs>https://github.com/nextcloud/forms/issues</bugs>
<repository type="git">https://github.com/nextcloud/forms</repository>
<documentation>
<admin>https://github.com/nextcloud/forms/blob/master/README.md</admin>
</documentation>

<screenshot>https://raw.githubusercontent.com/nextcloud/forms/master/screenshots/forms1.png</screenshot>
<screenshot>https://raw.githubusercontent.com/nextcloud/forms/master/screenshots/forms2.png</screenshot>
<screenshot>https://raw.githubusercontent.com/nextcloud/forms/master/screenshots/forms3.png</screenshot>
<screenshot>https://raw.githubusercontent.com/nextcloud/forms/master/screenshots/forms1.png</screenshot>
<screenshot>https://raw.githubusercontent.com/nextcloud/forms/master/screenshots/forms2.png</screenshot>
<screenshot>https://raw.githubusercontent.com/nextcloud/forms/master/screenshots/forms3.png</screenshot>

<dependencies>
<nextcloud min-version="20" max-version="24" />
</dependencies>
<dependencies>
<nextcloud min-version="22" max-version="24" />
</dependencies>

<navigations>
<navigation>
Expand Down
10 changes: 0 additions & 10 deletions lib/Activity/Provider.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
use OCP\IURLGenerator;
use OCP\IUserManager;
use OCP\L10N\IFactory;
use OCP\RichObjectStrings\InvalidObjectExeption;
use OCP\RichObjectStrings\IValidator;

class Provider implements IProvider {
Expand Down Expand Up @@ -270,15 +269,6 @@ public function getRichFormTitle(string $formTitle, string $formHash, string $ro
'link' => $formLink
];

// TODO Remove validation as soon as NC21 is out of support.
try {
// Validating a dummy-subject, which uses the richFormTitle.
$this->validator->validate('{form}', ['form' => $richFormTitle]);
} catch (InvalidObjectExeption $e) {
// In case this did not work (type does not exist for <NC21.0.1), fall back to type highlight
$richFormTitle['type'] = 'highlight';
}

return $richFormTitle;
}

Expand Down
9 changes: 2 additions & 7 deletions tests/Unit/Activity/ProviderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
use OCP\IUser;
use OCP\IUserManager;
use OCP\L10N\IFactory;
use OCP\RichObjectStrings\InvalidObjectExeption;
use OCP\RichObjectStrings\IValidator;
use PHPUnit\Framework\MockObject\MockObject;
use Test\TestCase;
Expand Down Expand Up @@ -409,20 +408,16 @@ public function testGetRichGroup() {
/*
* Basic ideal functionality tested already in testGetRichParams
* Only testing special cases here
* - Form not found and type invalid (is invalid for <NC21)
* - Form not found
*/
public function testGetRichFormTitle() {
$this->formMapper->expects($this->any())
->method('findbyHash')
->with('abcdefg')
->will($this->throwException(new DoesNotExistException('Form not found')));
$this->validator->expects($this->any())
->method('validate')
->will($this->throwException(new InvalidObjectExeption()));

// Test Form not found and type invalid
$this->assertEquals([
'type' => 'highlight',
'type' => 'forms-form',
'id' => 'abcdefg',
'name' => 'Some Form Title',
'link' => 'http://localhost/apps/forms/'
Expand Down