-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathclass_functions.Rmd
More file actions
executable file
·90 lines (50 loc) · 3.33 KB
/
class_functions.Rmd
File metadata and controls
executable file
·90 lines (50 loc) · 3.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
# Automated Class Functions
## Preliminary Notes
The stuff below works on the College's new R Studio Server (Ubuntu 2024 LTS operating system).
In order to use the scripts you must have been added to the sudo and instructor groups. Ask a sysadmin to do this for you.
This version of the scripts is tailored to the current RStudio server, in which all regular users are in the `usr/home/georgetowncollege.edu` directory.
## Installation and Setup
A convenient way to obtain the scripts is through git.
```{r eval = FALSE}
git clone https://github.com/homerhanumat/itr.git
```
### Install for the First Time
Save copies of `collecthomework.pl`, `createdirectories.pl` and `returnhomework.pl` into your Home directory on the Server. (They are in the `perl` directory.) Also save a copy of `class_functions.Rmd` to your Home. **Never modify the contents of `itr`!**, unless you know what you are going with git.
### Updates
If you ever need to update the scripts, go to the Shell and run:
```{r eval = F}
cd itr
git pull origin master
```
Then repeat the saving process.
### Setup
Create a textfile of student usernames, one per line in the usual way, and save it to your Home directory.
In the examples that follow:
* the student file will be called `students.txt`;
* the instructor's username is `jdoe`;
* the filename for the assignment to be collected and returned, exclusive of the filename extension, is `CSC115_Ch01`.
Create a directory in your Home directory called `homework`.
## Directory Creation
To create directories, use the script `creatdirectories.pl`. Click on the Terminal tab and copy the following into the Terminal at the prompt:
```{sh eval = FALSE}
sudo perl createdirectories.pl --studentfile=students.txt
```
Then press Enter, give your password when requested, and watch it go.
**Note**: If a student already has `submit` and `returned` directories then nothing in those directories is affected. A student must have logged in to the R Studio server previously in order for thi script to create a directories for that student.
## Homework Creation
Students should create a file with the appropraite name (in our example, it might be `CSC115_Ch01.R`) in their `submit` folder.
## Homework Collection
To collect the homework assignment run this in the Terminal:
```{sh eval = F}
sudo perl collecthomework.pl --inst=jdoe --assign=CSC115_Ch01 --file=students.txt
```
Students who have not submitted the homework will be listed in the Terminal.
**Note:** Students often name their file incorrectly, or do not save the file to their `submit` directory. Thereofore it is good practice to run this script well in advance of the due-date so you can detect problems and get wayward students in line.
## Grading Homework
When you open a submission from a student, save it with a suitable addition to the filename. It is common for this addition to be `_com` (for "commented"). Thus in our example, you would save the copy as `CSC115_Ch01_com.R`. Write your feedback into this file.
## Returning Homework
Run this in the terminal:
```{sh eval = FALSE}
sudo perl returnhomework.pl --path=CSC115_Ch01 --inst=jdoe --file=students.txt --flag=_com
```
Note that the `flag` option is set to the filename extension that you chose. The effect is to make copy of `CSC115_Ch01_com.R` to the `returned` directory of each student who submitted something.