Disable chat function

Hi All !

I have queries regarding the Homework in the Lesson Planner:

To avoid using up the storage space, I had made the Homework submission to be through Link. The students found a way around, they are clicking pics of the Homework and posting them in the chat. I have already used up 1GB of space in 3 days :cry:

Questions:
a) Can I turn off the chat?
b) Can I at least remove the picture adding function in the chat and make it plain text only chat.
c) Where are all these picture files stored?
d) Is there a way to limit the picture size?
e) Is there a way that the chat can be seen only by the teacher. Sometimes they are typing out the answers in the chat and the next guy just has to copy the work on top. (We are in this COVID scenario, so everything is being done online).

Thanks in advance !
Cheers

I found answers to (c). I want to modify the question to, how to direct the website to store the uploaded images else where, say google drive or Flickr or anywhere else?
the picture size the kids are uploading is 7mb max but it is still so much ha ha ha !

a) Thereā€™s no easy way to achieve this currently I believe. Have a look at modules/Planner/planner_view_full.php. Maybe you can achieve this with some few ā€œcommenting outā€.

b) Yep, you can achieve this by disabling the upload function. Search for the following code: getEditor( [ā€¦] , 25, true, true, false). Change the media flag to false.

c) Files are stored in uploads folder

d) Yep, through your php settings. Set same value, e.g. 2M for ā€œupload_max_filesizeā€ and ā€œpost_max_sizeā€.

e) Similar issue like a). No easy way here.

Store images elsewhere? Should be possible through hacking. Check code in src/Gibbon/FileUploader.php.

Thank you @meierrom Lots to research here. Iā€™ll get back to you ! :slight_smile:

a) There's no easy way to achieve this currently I believe. Have a look at modules/Planner/planner_view_full.php. Maybe you can achieve this with some few "commenting out".

b) Yep, you can achieve this by disabling the upload function. Search for the following code: getEditor( [ā€¦] , 25, true, true, false). Change the media flag to false.

c) Files are stored in uploads folder

d) Yep, through your php settings. Set same value, e.g. 2M for ā€œupload_max_filesizeā€ and ā€œpost_max_sizeā€.

e) Similar issue like a). No easy way here.

Store images elsewhere? Should be possible through hacking. Check code in src/Gibbon/FileUploader.php.

@meierrom which, do I change the ā€œtrueā€ written after 25 to ā€œfalseā€? I couldnā€™t find any ā€œmedia flagā€:

<?php echo __('Homework Details') ?> * <?php $initiallyHidden = true; if ($rowMyHomework['homework'] == 'Y') { $initiallyHidden = false; } echo getEditor($guid, true, 'homeworkDetails', $rowMyHomework['homeworkDetails'], 25, true, true, $initiallyHidden) ?>

Itā€™s the one next to ā€˜25ā€™. Let me know if this doesnā€™t work. :slight_smile:

@meierrom nope, it did not work. I edited the above at modules/Planner/planner_view_full.php :cry:

What next?

Ooops, wrong file: modules/Planner/planner_view_full_post.php :wink:

@meierrom I have reached the correct place it seems, but Iā€™m not getting the correct change required.

Yep, this code has been refactored.

Try this:
//$column->addEditor(ā€˜commentā€™, $guid)->setRows(20)->showMedia();
$column->addEditor(ā€˜commentā€™, $guid)->setRows(20);

:slight_smile:

Thank You So Much !!! That did the trick !!! This is brilliant o:)

(I really do want to understand what the code reads in normal English)

(a) @meierrom I know Iā€™m asking too much of you, but would you be so kind as to help in this :#.

Store images elsewhere? Should be possible through hacking. Check code in src/Gibbon/FileUploader.php.

(b) I found that ALL the files from ALL the uploads everywhere are stored in the same folder month wise. Shouldnā€™t the files from say teachers/resources be stored somewhere else?

If the HW submission files are uploaded in a separate folder, I could easily delete that folder after a few months/weeks as required.

Currently all files are stored by month, regardless of their type. Their filenames are also obfuscated with random characters, with the idea being that you want to prevent anyone from guessing and downloading a file based on itā€™s url. For example, if all files were stored by purpose, it could be a security issue if someone found and downloaded a whole folder called ā€œpassportsā€ or ā€œhomeworkā€. We have discussed plans to implement some better ways to track and cleanup files though, as currently the file references arenā€™t stored in a database and it can be easy for orphaned files to fill up the filesystem.

@flygye12
a) I havenā€™t done this before. Therefore I wouldnā€™t want to come in. Sorry.
b) I do agree with you to some extent. We currently do this for resources. In your scenario you could however use a different approach, e.g. writing a short script, which parses lesson contents for tags having a local source, redirecting the src to a dummy pic and then deleting the file from the system.