Due date does not control uploading.

Due date does not control uploading.

by Varis Auzins -
Number of replies: 26

Hi, the followin problem exists in my moodle site.

I have set due date for assignment, but students still can upload files.

Even overdue time  (in red color) is shown, but no restrictions to upload?

Is there any option to configure that?

Thanks, Varis

Average of ratings: -
In reply to Varis Auzins

Re: Due date does not control uploading.

by Gaetano Bartolone -

Yes

When you configure the assignment make sure you dont allow re-submitting

You can re-configure any assignment on the fly, just update the assignments settings.

In reply to Gaetano Bartolone

Re: Due date does not control uploading.

by Senele Goba -

That could work only if you allow the students to submit onle once. What about the case where the student would like to submit a better version of their work before the due date and while the work is not marked. The student is then limited.

We have implemented the changes to Moodle that incorporate the feature that does not allow the user the submit after the due date without having to switch of resubmission. The implementation involves many other feratures and some which were in the assignment module wishlist - it was in institution's wishlist as well. I will gladly suply the code if you would like to see it.

Senele

In reply to Senele Goba

Re: Due date does not control uploading.

by Gaetano Bartolone -

No thanks ...... for the code

I have re-writen the entire assignment module for my institutions needs ( moodle 1.4.1 platform)

with due date issue also sorted out ....

Split the assigment feedback area to each student and not the whole lot.

Added viewing only students who submitted assignment's || submitted assignment's and not marked assignment's || View all. AND these setting will keep for the duration of your seession and not change everytime you refresh the page. (makes it easier for teachers to mark the assignment's oh ya also change the default sort to arrange by lastname) 

Added email immediate send to students of feedback update from teachers point of view with the ability to indicate if you would like to send an email or not. ( find this more usefull than the cron job )

Added an area to submit from the teachers a marked file version of students file. (for the students too view only after due date.)

Added a memo submission for the assignment from the teacher's point of view ( for the students too view only after due date.)

etc... working perfectly smile

( I am still making improvement's only started  2 days ago )

In reply to Senele Goba

Re: Due date does not control uploading.

by Bian Wu -

Senele,

I am very interested in your code, and I was wonder whether you could send me a copy, thanks a lot in advance!

Brian

In reply to Senele Goba

Re: Due date does not control uploading.

by Michele Balazs -

Hi Senele

I would also like a copy of your code. If you didnt mind.

Thankyou very much

Michele

In reply to Michele Balazs

Re: Due date does not control uploading.

by Gaetano Bartolone -
Ok .... i will post the code for you, ( I hope Martin doesn't get unhappy with me )  ... just give me until tommorrow afternoon to clean it up and to make it easier for your systems to install.
In reply to Gaetano Bartolone

Re: Due date does not control uploading.

by Michele Balazs -

Thanks Gaetano. That would be great !!

Michele

In reply to Michele Balazs

Re: Due date does not control uploading.

by Gaetano Bartolone -

Ok clean it up....

There is an install.txt file in the zipped assignment folder.

In reply to Gaetano Bartolone

Re: Due date does not control uploading.

by Lauran de Bever -

Gaertolone,

So, what i read, it only work with the english language. When I want to let it work with different languages, i need to translate it.

Is that right?

In reply to Lauran de Bever

Re: Due date does not control uploading.

by Gaetano Bartolone -

The files have the language hard coded in them ..... it will work with any language but my code is all in english.

You can go and hard code the translation of the language if you like...

If you need it to be compatible with the language files i can re-code it to include the $get_string version's of mine. 

In reply to Gaetano Bartolone

Re: Due date does not control uploading.

by Lauran de Bever -
Installed the module
Get a version error, this is my version:  1.4.1 2004083101
Needs version 2004097000,
how can this be fixed?

In reply to Lauran de Bever

Re: Due date does not control uploading.

by Gaetano Bartolone -
Replace the version.php file with this attached one in your assignment module folder. smile
In reply to Gaetano Bartolone

Re: Due date does not control uploading.

by Lauran de Bever -

File solved the problem
now trying to upload a file, this error occurs:

Warning: assignment_print_upload_form(/home/turmanl/public_html/bedrijfsman/lib/uploadlib.php): failed to open stream: No such file or directory in /home/turmanl/public_html/bedrijfsman/mod/assignment/lib.php on line 758

What can be the problem?

Do you had the same problems?
Did also a test, to add an assignment, but no mail was sent to the user
How come?

Lauran

In reply to Gaetano Bartolone

Re: Due date does not control uploading.

by Lauran de Bever -

Gaetano,

I would like to make it multi language, so if you could help me with this, need to translate it into Dutch and German.

It works now, I have some questions about it.

Uploading a memo, what can I do with this? I tried it, nothing is shown or happend.

What i believed, is that all students will get an a-mail, when a new assignment is made, is this right? Tried it , but no e-mail is sent

For so far it looks oke, i hope it will be a standard feature in the new version.

Do you think, this will be possible? Perhapps contact moodle?

Lauran

In reply to Gaetano Bartolone

Re: Due date does not control uploading.

by Michael Penney -

 Hi Gaetano, this is good stuff, but I'm getting this error:

Warning: fsockopen(): php_network_getaddresses: getaddrinfo failed: Name or service not known (is your IPV6 configuration correct? If this error happens all the time, try reconfiguring PHP using --disable-ipv6 option to configure) in /home/lms/public_html/lms2/lib/phpmailer/class.smtp.php on line 105

Warning: fsockopen(): unable to connect to :25 in /home/lms/public_html/lms2/lib/phpmailer/class.smtp.php on line 105

On Moodle 1.4.2 and 1.4.3. Standard assignment emails fine and other emails using phpmailer are also fine.

Do you mind if we get this fixed, add some mods we made (mainly to allow entering a custom score via text box rather than pull down and greater than 100 pts) and put the whole thing in CVS/contrib?

Thanks!

Michael

In reply to Varis Auzins

Re: Due date does not control uploading.

by Petr Skoda -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers
I need to stop assignment uploads completely after due date, here is my modification:

in file view.php change line 100 (version 1.25) to:
        if (($assignment->type == OFFLINE) or ($timedifference < 0)) {

in file upload.php add this after require_login():
    $timedifference = $assignment->timedue - time();
    if ($timedifference < 0) {
        error("Submissions are over");
    }



skodak
In reply to Petr Skoda

Re: Due date does not control uploading.

by Lauran de Bever -

Skodak,

Tested it, works fine, nice thing to have

But the error "Submissions are over" is not shown, how is this possible?

Can it be made language independable? with a string

Lauran

In reply to Petr Skoda

Re: Due date does not control uploading.

by Marc Lachmann -
Hi Skoda,

I just skimmed the thread and stopped at your posting.
Is your code working for v.1.4.3  and v.1.4.3+ ?

thx
Marc
In reply to Petr Skoda

Re: Due date does not control uploading.

by Marc Lachmann -
Hi Skoda,

I just skimmed the thread and stopped at your posting.
Is your code working for v.1.4.3  and v.1.4.3+ ?

thx
Marc
In reply to Petr Skoda

Re: Due date does not control uploading.

by Jaime Esteban -
Hello Skodak,

I have tried your modification and I understand the first part (related with view.php) that works fine.

However, I don´t understand the need for the second part (related with upload.php). Moreover, it doesn´t work. It generates the error even when the "time due" is not over.

(I´m using moodle 1.4.4+)

Jaime
In reply to Jaime Esteban

Re: Due date does not control uploading.

by Petr Skoda -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers
The second part is for blocking of uploading. I did not test it in latest 1.4.4+, I will look at it later today.

Next time please add the exact error message - it helps a lot.

skodak
In reply to Petr Skoda

Re: Due date does not control uploading.

by Jaime Esteban -
Hello Skodak,

The problem I have detected is that a student can´t upload a file before the due date. The modification of upload.php blocks the access giving the error "Submissions are over" instead of allowing the upload. I mean, the modification of upload.php seems to block the upload always, no matter what the date is.

(I can´t make a series of checks since the Moodle I have installed is being used for a couple of courses)

What I don´t understand is the need of blocking the uploading. Having changed view.php the student has no opportunity to upload. Does he?

I have only included your modification of view.php. It is working correctly (it doesn´t show the upload form after the 'due date'). Is there any other way to upload a file that justifies the blocking in upload.php?

Thanks in advance,

Jaime
In reply to Jaime Esteban

Re: Due date does not control uploading.

by Petr Skoda -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers
Modification of view.php does not prevent submissions! You have to do the checks in upload.php once again.
In reply to Petr Skoda

Re: Due date does not control uploading.

by Petr Skoda -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers
I have tested the code above - WFM.

The code in upload.php should be pasted after
    require_login($course->id);
In reply to Petr Skoda

Re: Due date does not control uploading.

by Jaime Esteban -
OK Skodak,

To my shame, my problems have something to do with transcription errors of your code. Now I must say it works fine. Good job! That is just what I needed!

Sorry for having made you wasting your time.

(Anyway, and also to my shame, I still don´t know how a student can upload a file if he can´t see the form that the change in view.php hides).

Jaime