Updated: 2015-04-12 05:22 EDT

1 Introduction to CentOS MarkingIndexup to index

The Checking Program that verifies your CentOS work resides on the Course Linux Server, but your work is on your CentOS Virtual Machine. To mark your work, we need to transfer information from your CentOS VM to the CLS for marking.

To do this, there is a Fetch program that you must download and use on your CentOS Virtual Machine to copy information from your CentOS Virtual Machine to your account on the CLS so that the Checking Program can check it on the CLS.

Once the Fetch program has transferred this information from your CentOS Virtual Machine to the CLS, you can run the Checking Program on the CLS to check what is saved there. When you make changes on your CentOS Virtual Machine, you need to run the Fetch program again on CentOS to update the saved files on the CLS.

Simply running the Checking Program on the CLS will not update the saved files on the CLS. You must run the Fetch program on your CentOS VM when you make changes there.

As a convenience, the Fetch program not only transfers information from your CentOS VM to the CLS for marking, it also runs the Checking Program on the CLS for you.

2 Part I – Download the Fetch Program into CentOSIndexup to index

If you have created your personal sysadmin account, choose the first method. If you only have a root account, choose the second method.

2.1 Method 1: Download Fetch using your Sysadmin AccountIndexup to index

Use this method to download the Fetch program if you have created your personal sysadmin (non-root) account on CentOS. (This is the preferred method.)

  1. Log in to CentOS using your personal sysadmin non-root account (same userid as Blackboard).
  2. If necessary, create a Base Directory in your CentOS sysadmin account named for your course, term, and assignment number, e.g. CST0001-15W/Assignments/assignmentNN where CST0001 is your course number and NN is your assignment number, e.g. assignment99 for Assignment 99. Use the current assignment number, not 99. This is your CentOS Base Directory for this assignment.
  3. Change to the above CentOS Base Directory.
  4. As shown below, use curl to get a copy of the Fetch program from the given URL into a file named do.sh. In the URL below:
    • replace cst0001 with your course number (lower-case)
    • replace NN with your assignment number (two digits).
  5. Make sure you have a file named do.sh in your Base Directory.
  6. Warning: If you printed this page on paper, you may not be able to scroll right to read the whole web URL that you must pass to the curl program.

Here is an example for course CST0001 and assignment number 99 (you must use your actual course, actual assignment number, and your own userid values):

$ whoami ; hostname ; pwd
abcd0001                                 # your userid, not abcd0001
abcd0001                                 # your userid, not abcd0001
/home/abcd0001/CST0001-15W/Assignments/assignment99     # do not use 0001 or 99

$ url=http://teaching.idallen.org/cst0001/15w/notes/data/assignment99do.sh
[... make sure you scroll right to read the full web URL above ...]

$ curl -A mozilla "$url" >do.sh
[... various download statistics print here ...]

Do not use CST0001, cst0001, assignment99, or abcd0001; use the real values from your own course, assignment, and userid.

Skip forward to “Part II – Verify the Fetch Program”.

2.2 Method 2: Download Fetch using the root AccountIndexup to index

Use this method to download the Fetch program only if you have not yet created your personal sysadmin account on CentOS. If you have your own sysadmin account, use the previous method instead.

  1. Log in to CentOS using the root account.
  2. Create a directory in the HOME directory of the root account named for your course, term, and assignment number, e.g. CST0001-15W/Assignments/assignmentNN where CST0001 is your course number and NN is your assignment number, e.g. assignment99 for Assignment 99. This is your CentOS Base Directory for this assignment.
  3. Change to the above CentOS Base Directory.
  4. As shown below, use curl to get a copy of the Fetch program from the given URL into a file named do.sh. In the URL below:
    • replace cst0001 with your course number (lower-case)
    • replace NN with your assignment number (two digits).
  5. Make sure you have a file named do.sh in your Base Directory.
  6. Warning: If you printed this page on paper, you may not be able to scroll right to read the whole web URL that you must pass to the curl program.

Here is an example for course CST0001 and assignment number 99 (you must use your actual course, assignment, and userid values):

# whoami ; hostname ; pwd
root
abcd0001                                       # your userid, not abcd0001
/root/CST0001-15W/Assignments/assignment99     # do not use 0001 or 99

# url=http://teaching.idallen.org/cst0001/15w/notes/data/assignment99do.sh
[... make sure you scroll right to read the full web URL above ...]

# curl -A mozilla "$url" >do.sh
[... various download statistics print here ...]

Do not use CST0001, cst0001, assignment99, or abcd0001; use the real values from your own course, assignment, and userid.

3 Part II – Verify the Fetch ProgramIndexup to index

  1. Make sure you are in the Base Directory for the assignment where you downloaded the do.sh program for this assignment.

  2. Read (using less do.sh) and verify that the text file do.sh is a short shell script that contains a URL for the Fetch program with the current assignment number in it.

  3. If you read things such as Error 404 - page not found in the do.sh file then fix your typing mistakes and try again.

Here is an example for course CST0001 and assignment number 99 (you must use your actual course and assignment numbers):

$ curl -A mozilla "$url" >do.sh                # $url was set in Part I
[... various download statistics print here ...]

$ file do.sh
do.sh: POSIX shell script text executable      # see below if different

$ fgrep 'fetch.sh' do.sh
    http://"$GO"/cst0001/15w/notes/data/assignment99fetch.sh

If file doesn’t say it’s a shell script, or the fgrep does not find the notes/data URL for the current course and assignment number in the do.sh file:

  1. Read the do.sh file to see if there are any errors that need fixing. The usual cause is typing mistakes in the URL. Do not use cst0001 or assignment99; use the real values for your course for the current term and assignment.
  2. Fix the errors and re-run the Part I and II until you get a do.sh file containing the correct fetch shell script for your course and assignment number.

You only need to download this do.sh Fetch program once per assignment. Every assignment has its own separate do.sh file to download.

4 Part III – Run the do.sh Fetch ProgramIndexup to index

If you have created your personal sysadmin account and enabled the sudo command, choose the first method. If you only have a root account, or if you don’t have sudo working, choose the second method.

4.1 Method 1: Run do.sh using your Sysadmin Account and sudoIndexup to index

Use this method to run the do.sh Fetch program if you have created your personal sysadmin account and enabled the sudo command. If you only have a root account, or if you don’t have sudo working, choose the second method.

  1. Log in to CentOS as your personal sysadmin account.

  2. Change directories to the Base Directory for the assignment where you downloaded the do.sh program for this assignment.

  3. As shown below, use sudo and sh to run the do.sh script in the current directory as root, with the USER environment variable set to your own CLS account userid:

Example (use your own CLS userid, not abcd0001):

$ whoami
abcd0001

$ file do.sh
do.sh: POSIX shell script text executable 

$ sudo USER=abcd0001 sh do.sh     # use your *own* userid *not* abcd0001

4.2 Method 2: Run do.sh without using sudoIndexup to index

Use this method to run the do.sh Fetch program if you have not created your personal sysadmin account or if you have not enabled the sudo command. If you have your own sysadmin account and a working sudo, choose the previous method.

  1. Become the root user: Log in as root or else use su to become the root user.

  2. Change directories to the Base Directory for the assignment where you downloaded the do.sh program for this assignment.

  3. As shown below, use sh to run the do.sh script in the current directory as root, with the USER environment variable set to your own CLS account userid:

Example (use your own CLS userid, not abcd0001):

# whoami
root

# file do.sh
do.sh: POSIX shell script text executable 

# USER=abcd0001 sh do.sh          # use your *own* userid *not* abcd0001

5 Part IV – Answering The Fetch ProgramIndexup to index

If you see errors when you run the do.sh script, you probably skipped over Part II above. Go back and verify the script. You must have a verified script before you can run it.

When you successfully run the do.sh script that calls the Fetch program, it will look similar to the text below and you will need to answer two questions:

  1. If you are on-campus, you may answer y to use the CLS local IP address instead of the public address.

  2. You will need to enter your CLS password to allow the Fetch program to transfer information from CentOS to your account on the CLS for marking.

Here is an example for course CST0001 and assignment number 99 (you must use your actual course, assignment, and userid values):

# USER=abcd0001 sh do.sh
---------------------------------------------------------------------------
abcd0001: FETCH version 3.  Connecting to CLS as USER='abcd0001' using ssh
---------------------------------------------------------------------------
abcd0001: Use local Algonquin IP cst0001-alg.idallen.ca [y/N/?]? n
abcd0001: Please wait; using ssh to connect to user 'abcd0001' on cst0001.idallen.ca ...
*** COURSE LINUX SERVER ***
abcd0001@cst0001.idallen.ca's password:         # enter your CLS password
---------------------------------------------------------------------------
idallen-ubuntu assignment99fetch_server.sh version 8 run by abcd0001.
Please wait; collecting info from abcd0001 Virtual Machine
---------------------------------------------------------------------------
VM files collected into CST0001-15W/Assignments/assignment99/abcd0001.tar.bz on CLS.
Now running checking program for abcd0001 on CLS:
[... checking program output appears here ...]

5.1 Notes on the Fetch programIndexup to index

6 Part V – Final Check and SubmitIndexup to index

Summary: Do some tasks, then run the Fetch and checking program to verify your work as you go. You can run the Fetch and checking program as often as you want. When you have the best mark, upload the marks file to Blackboard.

Since I also do manual marking of student assignments, your final mark may not be the same as the mark submitted using the current version of the Checking Program. I do not guarantee that any version of the Checking Program will find all the errors in your work. Complete your assignments according to the specifications, not according to the incomplete set of the mistakes detected by the Checking Program.

When you are done with your assignment and want to submit your marks, you need to run the checking program one last time on the CLS (not from CentOS) and submit the output file from the CLS, as follows:

Do all this on the Course Linux Server when you are ready to submit:

  1. Log in to the CLS. Go to your assignment Base Directory on the CLS.

  2. There is a Checking Program named assignmentNNcheck in the assignment Source Directory on the CLS, where NN is replaced by your current assignment number, e.g. assignment99check for Assignment 99. Use the current assignment number, not 99.

    Create a Symbolic Link to this program named check under your assignment Base Directory on the CLS so that you can easily run the program to check your work and assign your work a mark on the CLS. Note: You can create a symbolic link to this executable program but you do not have permission to read or copy the program file.

  3. Execute the above “check” program on the CLS using its symbolic link. (Review the Search Path notes if you forget how to run a program by pathname from the command line.) This program will check your fetched CentOS work from the latest tar archive, assign you a mark, and display the output on your screen. (You may want to paginate the long output so you can read all of it.)

    You may run the check program as many times as you wish, to correct mistakes and get the best mark. Some task sections require you to finish the whole section before running the checking program at the end; you may not always be able to run the checking program successfully after every single task step.

Remember: The checking program run on the CLS does not fetch new files to the CLS from your CentOS VM. You must run the Fetch program on your CentOS VM to update the tar archive on the CLS so that the checking program can mark the latest CentOS information.

  1. When you are done with this assignment, and you like the mark displayed on your screen by the Checking Program, you must redirect only the standard output of the Checking Program into the text file assignmentNN.txt in your Base Directory on the CLS, where NN is replaced by your current assignment number, e.g. assignment99.txt for Assignment 99. Use the current assignment number, not 99.
    • Redirect only the standard output of the [Checking Program].
    • Use that exact name. Case (upper/lower case letters) matters.
    • Be absolutely accurate, as if your marks depended on it.
    • Do not edit the output file.
    • Make sure the file actually contains the output of the Checking Program!
    • The file should contain, near the bottom, a line starting with: YOUR MARK for
    • Really! MAKE SURE THE FILE HAS YOUR MARKS IN IT!
  2. Transfer the above single file assignmentNN.txt (containing the output from the Checking Program) from the CLS to your local computer.
    • You may want to refer to the File Transfer page for how to transfer the file.
    • Verify that the file still contains all the output from the Checking Program.
    • Do not edit this file! No empty files, please! Edited or damaged files will not be marked. Submit the file exactly as given.
    • The file should contain, near the bottom, a line starting with: YOUR MARK for
    • Really! MAKE SURE THE FILE YOU UPLOAD HAS YOUR MARKS IN IT!
  3. Upload the assignmentNN.txt file from your local computer to the correct Assignment area on Blackboard (with the exact name) before the due date:
    1. On your local computer use a web browser to log in to Blackboard and go to the Blackboard page for this course.
    2. Go to the Blackboard Assignments area for the course, in the left side-bar menu, and find the current assignment.
    3. Under Assignments, click on the underlined assignmentNN link for this assignment.
      1. If this is your first upload, the Upload Assignment page will open directly; skip the next sentence.
      2. If you have already uploaded previously, the Review Submission History page will be open and you must use the Start New button at the bottom of the page to get to the Upload Assignment page.
    4. On the Upload Assignment page, scroll down and beside Attach File use Browse My Computer to find and attach your assignment file from your local computer. Make sure the assignment file has the correct name on your local computer before you attach it.
    5. After you have attached the file on the Upload Assignment page, scroll down to the bottom of the page and use the Submit button to actually upload your attached assignment file to Blackboard.

    Use only Attach File on the Upload Assignment page. Do not enter any text into the Text Submission or Comments boxes on Blackboard; I do not read them. Use only the Attach File section followed by the Submit button. If you need to comment on any assignment submission, send me EMail.

    You can revise and upload the file more than once using the Start New button on the Review Submission History page to open a new Upload Assignment page. I only look at the most recent submission.

    You must upload the file with the correct name from your local computer; you cannot correct the name as you upload it to Blackboard.

  4. Verify that Blackboard has received your submission: After using the Submit button, you will see a page titled Review Submission History that will show all your uploaded submissions for this assignment. Each of your submissions is called an Attempt on this page. A drop-down list of all your attempts is available.
    1. Verify that your latest Attempt has the correct 16-character, lower-case file name under the SUBMISSION heading.
    2. The one file name must be the only thing under the SUBMISSION heading. Only the one file name is allowed.
    3. No COMMENTS heading should be visible on the page. Do not enter any comments when you upload an assignment.
    4. Save a screen capture of the Review Submission History page on your local computer, showing the single uploaded file name listed under SUBMISSION. If you want to claim that you uploaded the file and Blackboard lost it, you will need this screen capture to prove that you actually uploaded the file. (To date, Blackboard has never lost an uploaded file.)

    You will also see the Review Submission History page any time you already have an assignment attempt uploaded and you click on the underlined assignmentNN link. You can use the Start New button on this page to re-upload your assignment as many times as you like.

    You cannot delete an assignment attempt, but you can always upload a new version. I only mark the latest version.

  5. Your instructor may also mark files in your directory in your CLS account after the due date. Leave everything there on the CLS. Do not delete any assignment work from the CLS until after the term is over!

READ ALL THE WORDS. OH PLEASE, PLEASE, PLEASE READ ALL THE WORDS!

Author: 
| Ian! D. Allen  -  idallen@idallen.ca  -  Ottawa, Ontario, Canada
| Home Page: http://idallen.com/   Contact Improv: http://contactimprov.ca/
| College professor (Free/Libre GNU+Linux) at: http://teaching.idallen.com/
| Defend digital freedom:  http://eff.org/  and have fun:  http://fools.ca/

Plain Text - plain text version of this page in Pandoc Markdown format

Campaign for non-browser-specific HTML   Valid XHTML 1.0 Transitional   Valid CSS!   Creative Commons by nc sa 3.0   Hacker Ideals Emblem   Author Ian! D. Allen