Lab Report Repository developed by students led by Hui
 
 
 
 
 
Go to file
Lan Hui 5ba25e7294 Header.php: show user name in bold face. 2023-08-22 19:39:41 +08:00
css Update jquery and jquery-ui. 2023-08-12 20:56:27 +08:00
doc Review & revise the files under directory doc/ 2023-07-31 17:42:22 +08:00
font-awesome README.md: correct file path 2021-10-18 21:39:16 +08:00
homepage overview.html: link to Overview.html 2021-10-19 20:07:57 +08:00
test Update 3: test cases 07-16 2021-12-05 00:59:43 +08:00
.gitignore Do not track .DS_Store 2023-08-02 15:29:47 +08:00
.htaccess Fixed the Bug produced by fixing Bug196 2022-06-20 00:15:04 +03:00
Admin.php Admin.php: Admin user can see all courses. 2023-08-21 19:34:34 +08:00
Course.php Solve the no X problem in modal dialogue (complete it). 2023-08-12 21:29:49 +08:00
Courses.php Admin.php: remove dash before TA name (if any). If no TA is available, show 'None' instead of leaving it empty. 2023-08-19 21:11:48 +08:00
Download.php Xuxuan (#48) 2022-11-08 15:24:36 +08:00
Footer.php Add non-sticky footer. 2023-08-08 15:02:26 +08:00
Header.php Header.php: show user name in bold face. 2023-08-22 19:39:41 +08:00
NoDirectPhpAcess.php (1) Make php files look better; (2) Removed Visitors.php and Reset_password.php because they are no longer used; (3) TODO: review Submissions.php, Script.php, Course.php and Courses.php. 2023-08-01 17:02:33 +08:00
README.md README.md: create database before import 2023-08-03 16:14:32 +08:00
Script.php Admin.php: fix a bug that prevents Lecturer from blocking/activating a TA 2023-08-20 22:03:33 +08:00
Student.php Make PHP having UTF-8 encoding. 2023-08-03 15:31:38 +08:00
Submissions.php Solve the no X problem in modal dialogue (complete it). 2023-08-12 21:29:49 +08:00
SubmitLab.php Make student's interface look better. 2023-08-09 16:40:26 +08:00
batch_insert.php Xuxuan (#48) 2022-11-08 15:24:36 +08:00
get_mysql_credentials.php A better way to store mysql credentials. 2020-10-02 23:02:27 +08:00
index.php Make index page, sign up page and recover password page look better. 2023-08-10 22:41:59 +08:00
logo.png adding LRR files 2020-03-16 15:23:14 +08:00
logo_text.png adding LRR files 2020-03-16 15:23:14 +08:00
logout.php Make PHP having UTF-8 encoding. 2023-08-03 15:31:38 +08:00
lrr_database.sql Use more SQL statements for making the database. 2021-10-20 08:49:36 +08:00
recover_password.php Make index page, sign up page and recover password page look better. 2023-08-10 22:41:59 +08:00
signup.php Make index page, sign up page and recover password page look better. 2023-08-10 22:41:59 +08:00

README.md

About LRR

LRR (Lab Report Repository) is an online software application for course instructors to post, receive and mark assignments, and for students to submit assignments, or submit re-marking requests.

This software was originally developed by Mahomed Nor in 2018, a graduate student in the Department of Computer Science at the Zhejiang Normal University, while he was taking a graduate course called Advanced Software Engineering (http://lanlab.org/course/2018f/se/homepage.html).

The LRR's project home page is at http://121.4.94.30/homepage/. For potential project contributors, we recommend that you browse its home page first to familiarize yourself with the project.

Mission

Our mission is to make the experience of submitting assignments great for tens of hundreds of students in the department of computer science at the Zhejiang Normal University.

Installation Instructions

Hui steps

I spent about two hours installing LRR to a bare, remote Ubuntu server (Ubuntu 20.04 LTS).

LRR needs Apache and MySQL to run. I followed How To Install Linux, Apache, MySQL, PHP (LAMP) stack on Ubuntu 20.04 to set up these server applications. How to install and configure PHP is also a good guide.

LRR uses a database called lrr. So create this database using MySQL root account. Open MySQL's prompt using sudo mysql. Create the database using command CREATE DATABASE lrr;, and grant all privileges to MySQL user lrr using command GRANT ALL PRIVILEGES ON lrr.* TO 'mnc'@'localhost' WITH GRANT OPTION;. If MySQL user mnc does not exist, create it using command CREATE USER 'mnc'@'localhost' IDENTIFIED BY 'password'.

To facilitate data migration, I need to export the existing lrr to a plain text file (including many sql commands) and import that text file to the newly created lrr database on the new server. The command for exporting the database is mysqldump -u mnc -p lrr > lrr_database_dump.sql, where mnc after -u is MySQL's username, and lrr after -p is the database name. The command for importing is mysql -u username -p lrr < lrr_database_dump.sql. You must create database lrr first on your computer before doing the import. Read How to Import and Export MySQL Databases in Linux for more detail. Do not have lrr_database_dump.sql? You can use lrr_database.sql in this repo instead.

LRR also needs to store assignment submissions. We store them in a folder called ../../lrr_submission. Note that lrr_submission is two levels above the project folder (where many PHP files reside). I copied this folder from the existing one. I think it is also OK if you create an empty folder.
We need to set a proper owner and accessibility for lrr_submission using the following two commands: sudo chown -R www-data:www-data lrr_submission and sudo chmod -R g+rw lrr_submission. Also, remember to change the user name and password in lrr_submission/KeepItSafe.txt for the database connection.

The above steps are preparation work. Now we could clone the LRR's repository to /var/www/html/. Rename LRR to lrr. Change the owner of lrr: sudo chown -R $USER:$USER /var/www/lrr. Edit apache configure file: sudo nano /etc/apache2/sites-available/lrr.conf.

<VirtualHost *:80>
    ServerName lrr
    ServerAlias www.lrr.com
    ServerAdmin webmaster@localhost
    DocumentRoot /var/www/html/lrr
    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

Enable the site lrr: sudo a2ensite lrr. Restart the apache server: sudo systemctl reload apache2. Visit the LRR application by entering this URL in a web browser: http://121.4.94.30/.

Solving the coding problems in the dump file

If the database contains Chinese characters, the dump file (e.g., lrr_database_dump.sql) may contain weird characters, e.g., 研究生, so weird that no one can tell their meaning.

We need to correct these abnormal characters before we import them to the new database, so that the PHP program can correctly display Chinese information.

The simplest solution is using the ftfy (fixes text for you) Python package to convert them, as follows:

from ftfy import fix_text

with open('lrr_database_dump.sql') as f:
    content = f.read()

content2 = fix_text(content)
with open('lrr_database_dump_sql_fixed.txt', 'w') as f:
    f.write(content2)

Now, import data using lrr_database_dump_sql_fixed.txt.

If you encounter the 'Unknown MySQL server host' problem during import, replace all apostrophes with a space in the dump file. For example, if a database table field contains can't, then the apostrophe between n and t can cause that problem.

Enock steps

Enock, a graduate student here, has made a tutorial about how he deployed LRR to a remote server (http://lanlab.org/course/2021s/spm/PuTTY-Server.txt).

Current Status

This software has been actively used by students who took or are taking courses taught by Hui, e.g., Introduction to Software Engineering, Introduction to Object-oriented analysis and design, Advanced Software Engineering, Software Architecture, and Software Project Management.

There are more than 500 student accounts created since its first launch in 2018.

A running instance of this software is at http://118.25.96.118/nor/

There are about 40 bugs (most being CRITICAL) that remain unresolved before LRR can hit its Beta release. See the section The Bug Tracker for more detail. Currently, there are a few students who are taking my Advanced Software Engineering course) working on these bugs.

The Bug Tracker

We use Bugzilla to track LRR's bugs and feature requests.

Most bugs are recorded on Bugzilla.

TODO

  • [Priority low] Receiving email for password resetting. Password resetting link is not always sent successfully.

  • [Priority medium] Discuss how assignments should be stored? /student-number/course-code/semester/section-number/assignement-title/submission.txt

  • [SOLVED] Editing the assignment title after uploading a new assignment (instructor).

  • [SOLVED] A new user could not login immediately after sign up.

  • A more complete list of TODO's is at http://lanlab.org/course/2020s/spm/decide-areas-for-improvement-review.html

How to Contribute

We welcome your participation in this project.

Your participation does not have to be in the form of contributing code. You could help us on ideas, suggestions, documentation, etc.

You can fork this project and start working on your fork. After you are done, please create a pull request so that we could review your changes and give you feedback.

You will use the feature-branching workflow (see below). The main point of this workflow is that you work on a branch on your local drive, push that branch to a remote repository, and create a Pull Request (i.e., Pull Me Request) at for other people to review your changes. If everything is OK, then someone could merge your changes to the master branch in the central repository.

I believe that code review at the Pull Request stage is important for both improving code quality and improving team quality.

The Feature-branching Workflow

We will use the feature-branching workflow for collaboration. The idea is that you make your own branch, work on it, and push this branch to the remote, online repository for code review.

Check the section The feature-branching workflow in the following link for more detail:

https://github.com/spm2020spring/TeamCollaborationTutorial/blob/master/team.rst

Testing

Make sure your changes can pass all the tests in folder ./test.

Communications Method

To submit bug reports or improvement ideas, please contact Hui [lanhui at zjnu.edu.cn]. He could open a Bugzilla account for you.

We can also communicate through pull requests. You make a pull request, I review it and comment on it, and you revise your pull request until everyone is happy so that your changes get merged to the master branch.

Frequently Asked Questions

  1. Q: The web application's front page does not show properly, i.e., elements are not well aligned. A: You missed two folders css and font-awesome. These folders include third-party js or css files and therefore are not included.

  2. Q: What if I do not have any information about the lrr database? A: You could use lrr_database.sql to make a new database.

Related GitHub Repositories

Contributor List

Important contributors are highlighted.

GitHub Account - Full Name - Student number

CODEwithZAKI - Omar Mohamud Mohamed - 2020041

BloudYoussef - Khayat Youssef - 2020042

TanakaMichelle - Tanaka Michelle Sandati - 2017134

WhyteAsamoah - Yeboah Martha Asamoah - 2017135

xiaoyusoil - ZhengXiaoyu - 2017110

Benny123-cell - ZhangBin - 2017127

421281726 - LiJiaxing - 2017118

zhenghongyu-david - ZhengHongyu - 2017128

wkytz - YeHantao - 2017125

zego000 - GaoZeng - 2017117

Richard1427 - XieJiacong - 2017123

yutengYing - YingYuteng - 2017126

Samrusike - Samantha Rusike - 2016140

enockkays enockkhondowe94@yahoo.com

Teecloudy - Ashly Tafadzwa Dhani - 201150

GuedaliaBonheurSPM - Guedalia Youma - 2019221

ACorneille - Alimasi Corneille - 2019168

Tabithakipanga - Kipanga Dorcas - 2019170

Mary-AK - Mary Akussah Doe - 2019173

pkkumson - Kumson Princewill Kum - 2019166

Twizere - Twizere Pacifique - 2019174

Nicole-Rutagengwa - Nicole Rutagengwa - 2019169

hema-001 - Ibrahim Mohamed Ibrahim Ismail - omitted

SawiMg - Zhan Shenchen - omitted

References