Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to download the repository right before the deadline(Submission Repositry)? #1

Open
avatar-lavventura opened this issue Feb 18, 2018 · 3 comments

Comments

@avatar-lavventura
Copy link

avatar-lavventura commented Feb 18, 2018

Your script downloads the latest submissions for all the students.

screen shot 2018-02-18 at 15 02 49

[Q] Is there any way to download the submitted repository, which is right before the deadline?

Please note that --due-date option does not work if the its submitted after the deadline and it downloads the latest submission again.

Thank you for your valuable time and help.

@geoffryan
Copy link
Owner

geoffryan commented Feb 18, 2018 via email

@avatar-lavventura
Copy link
Author

avatar-lavventura commented Feb 18, 2018

Thanks @geoffryan. Yes its grading_branch, and I think if a student does not have any submission before deadline and have a submission after the deadline branch name remain as master, right?

The issue was: for example if deadline is now. A student did not submit any code before the deadline and he committed his code 1 hour late. The scripts pulls late submitted person's complete code under branch name master instead of __grading_branch. Hence, if a person's submission late, I do not want to pull any code of him.

But if another user submits before and after the deadline his only latest commit before the deadline pulled. (This is what I want, so there is no problem)

I have come up with this script, which moves late submissions (that is label as master branch under your script) into a folder called LATE.

cd $FOLDER/
for d in $FOLDER*/ ; do
    echo "$d"
    cd $d
    branchName=$(git rev-parse --abbrev-ref HEAD) #Branch name only
    if [ "$branchName" == "master" ]; then
	mv ../$d ../LATE
    fi
    cd ..
    echo '-----------------------------'
done

@avatar-lavventura
Copy link
Author

avatar-lavventura commented Feb 18, 2018

Ah, I am deeply sorry :( . I mismatched your code with this one (https://gist.github.com/robwhess/48547bf369ccf422cca78e5753b5a1c7#comments).

I think your code will not pull any code of someone if he/she has done a late submission.

I am trying to run your code but I was not able to make it work. Where should I find the classdata?

The way I run:
bash classroom.sh collect classroom.txt homeworkName

Thanks for your valuable help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants