Risposte private di Discourse

Github: GitHub - communiteq/discourse-private-replies

Questo plugin nasconde le risposte degli argomenti a tutti tranne che all’avvio dell’argomento e all’autore del post.

Casi d’uso

Questo può essere utilizzato, ad esempio, per compiti a casa in cui l’insegnante apre un argomento e pubblica un compito, e tutti gli studenti pubblicano un post con le loro risposte. Una volta che tutti hanno consegnato il loro lavoro, l’insegnante può rendere visibili le risposte in modo che gli studenti possano discuterne.

Un secondo caso d’uso potrebbe essere un’asta in cui qualcosa viene offerto in vendita. Le persone possono pubblicare la loro offerta e, una volta conclusa la vendita, il proprietario dell’argomento può rivelare tutte le offerte per mostrare alla community che tutto è andato secondo le regole.

Utilizzo

Dopo aver installato e abilitato il plugin, è possibile attivare la funzionalità del plugin su base per argomento.

Se sei l’avvio dell’argomento, vedrai un nuovo pulsante in fondo all’argomento.

button

Premendo questo pulsante hai abilitato la funzionalità Risposte Private per questo argomento.

Apparirà un banner sopra l’argomento e accadrà quanto segue:

  • le persone potranno vedere solo i post da loro stessi, dal proprietario dell’argomento e dagli utenti nei gruppi selezionati.
  • solo il proprietario dell’argomento sarà in grado di vedere tutti i post.

banner

Premendo nuovamente il pulsante, l’argomento tornerà alla normalità.

Il plugin, quando abilitato, consentirà risposte private su tutti gli argomenti. Tuttavia, se è abilitata l’impostazione private replies on selected categories only (risposte private solo per categorie selezionate), il plugin può essere abilitato per categoria nelle impostazioni di sicurezza della categoria.

Nella stessa schermata troverai anche l’impostazione per abilitare le risposte private per impostazione predefinita per tutti i nuovi argomenti in quella categoria. Questo è particolarmente utile quando gli argomenti vengono inviati via email.

Impostazioni

  • private_replies_participants_can_see_all se abilitato, chiunque abbia partecipato all’argomento può vedere tutte le risposte
  • private_replies_min_trust_level_to_see_all le persone con questo livello di fiducia o superiore possono vedere tutte le risposte
  • private_replies_groups_can_see_all gli utenti in questi gruppi possono sempre vedere tutte le risposte (predefinito: staff)
  • private_replies_see_all_from_groups i post degli utenti in questi gruppi sono sempre visibili a tutti (predefinito: staff)
  • private_replies_topic_starter_primary_group_can_see_all gli utenti nello stesso gruppo primario del proprietario dell’argomento possono vedere tutte le risposte

Avvertenze

Il plugin disabilita i seguenti modi per recuperare il contenuto dei post:

  • visualizzazione dell’argomento (cioè, il modo normale di visualizzare i post)
  • profilo utente - attività
  • ricerca
  • raw (/raw/topic_id/post_id)

Tuttavia, puoi ancora scoprire chi ha postato nell’argomento:

  • Le icone dell’elenco degli argomenti mostreranno ancora chi ha postato nell’argomento.
  • Sarai anche in grado di vedere “l’utente xxx sta rispondendo” in fondo all’argomento.
  • Gli argomenti sono visibili anche nel profilo utente - riepilogo.

Tuttavia, nessuno di questi rivela il contenuto del post.

Contesto:

Mia moglie è un’insegnante (greco antico e latino classico) e usa Discourse nelle sue classi da diversi anni ormai. Lo usa principalmente per distribuire compiti ai suoi studenti e discuterne in seguito. Tuttavia, tutti i compiti vengono consegnati su carta durante le sue lezioni.

Fino ad ora - poiché le scuole sono state chiuse a causa di tutto il panico da coronavirus, si sta spostando all’insegnamento online al 100%, compresi i compiti. Quindi tutti questi studenti le stanno attualmente inviando il loro lavoro via email. Questo è molto sub-ottimale poiché richiede a lei un bel po’ di amministrazione (e posso dirvi che non è molto brava in quel tipo di cose :wink: ).

Abbiamo discusso alcune opzioni e lei ha detto: “perché non posso avere un argomento in cui le persone possano vedere solo i miei post (cioè, i post fatti dall’avvio dell’argomento) e i propri post? Questo mi permetterebbe di pubblicare un compito come argomento e far sì che ogni studente pubblichi le proprie risposte sotto, senza poter vedere tutte le altre risposte. Poi, quando tutti avranno inserito il loro lavoro e sarà il momento di discutere, voglio poter premere un pulsante per far cadere il velo e rendere tutti i post nell’argomento visibili a tutti, in modo che possano vedere e discutere il lavoro reciproco.”

Sì - geniale! (ecco perché la amo). Così ho creato un plugin per questo. Discussione precedente qui: Topic replies invisible until topic owner decides to reveal them?

77 Mi Piace

New ways schools can adopt with Discourse! Nice job! :grinning:

10 Mi Piace

Very cool and thank you for sharing this @RGJ :beers:

15 Mi Piace

Great to see this!

My one nitpick is that I’d rather have the feature enabled at the category level, then replies can get revealed per-topic when everything’s submitted.

11 Mi Piace

Very cool, I was wondering if there is a way to still access the contents of private replies:

  • by Group (Teachers)
  • Trust Level (all teachers are at least Trust Level 3).
9 Mi Piace

Why do you think that’s better?

That’s a pretty good idea. It shouldn’t be too hard to add that to the plugin.
I’ll keep it in mind but right now I don’t have a use case for this myself. PR’s are welcome though!

6 Mi Piace

Prevents random abuse from topic starters enabling the setting on non-intended categories. It’s a “why would you do that?” situation but still something that needs a flag to resolve.

7 Mi Piace

Yeah, that’s useful indeed. So that could be solved by a category setting ‘allow private replies’.
I thought you wanted a ‘topics have private replies by default’ setting, which would be harder to build.

6 Mi Piace

Hello, Richard! Your teacher should be happy because your plugin works great :grinning:

I think about 2 improvements:

  1. Is it possible to make this function active by default? This should be set in the category settings. No need to do it manually with every topic.
  2. Make replies visible to specific groups set in the settings?
7 Mi Piace

Hi! I’d like to add translations to your plugin. Tried to add 2 extra files: client.en and server.en
Then I did ./launcher rebuild app, but the translation didn’t appear after I changed the locale in the user interface. What I missed?

1 Mi Piace

The files should be called client.XX.yml and server.XX.yml where XX is the language code.

However, there are already files for en (English): https://github.com/communiteq/discourse-private-replies/tree/master/config/locales so I am not sure what you have done or what you are trying to accomplish.

3 Mi Piace

I’ve done this exact thing (added client.de.yml and server.de.yml for the German language) and nothing changed.

  • Probably, I found the mistake. I missed the language code in the file. I’ll check it later.
2 Mi Piace

Can you please make a PR once you’ve got things working? That would be much appreciated!

1 Mi Piace

Everything is working, it was my mistake. I will add all languages to your fork when I finish it.

2 Mi Piace

Hi! I got errors in /sidekiq from your plugin. Can you please check your installation? Do you have such errors?

Wrapped I18n::InvalidLocaleData: can not load translations from /var/www/discourse/plugins/discourse-private-replies/config/locales/server.ar.yml: #
<Psych::SyntaxError: (/var/www/discourse/plugins/discourse-private-replies/config/locales/server.ar.yml): did not find expected key while parsing a block mapping at line 3 column 5>

There is an extra " that should be removed.

private_replies_enabled: "قم بتمكين المكون الإضافي "الردود الخاصة."
2 Mi Piace

Thank you for reporting this! I’ve pushed a fix.

3 Mi Piace

Hey,
It won’t install from the admin interface. Is it hooks only?

The error is:

about.json does not exist. Are you sure this is a Discourse plugin?
1 Mi Piace

I am not familiar with that error message. It is not part of the Discourse source code. Are you sure this is the exact message?

Plugins are not installed from the admin interface either.
Please refer to Install plugins on a self-hosted site.

2 Mi Piace

@RGJ
My company, Haddee, is eager to develop some new features for the plugin.
I was wondering if you could put a license on it just to make contribution easier and smoother

Thanks :slight_smile:

6 Mi Piace

Right, it worked installing from the hooks system indeed.
I guess it can’t be installed from the admin like themes and extensions as it has server features and that’s why it’s called a plug-in (so many specific terms and various ways to extend or customize Discourse that we can easily get lost as a dev)

This one seems clean and small enough to be easy to customize.

Thanks for the replies :wink:

2 Mi Piace