Commit 90b4f1ad authored by Adarsh's avatar Adarsh

commnets

parent aaef1238
<?php <?php
/*! /*! \file
This script returns the code files present in a user's workspace, but doesn't account for directories and sub-directories. This script returns the code files present in a user's workspace, but doesn't account for directories and sub-directories.
This script is obselete because of the script dir_tree.php, which returns the directory tree of the user's workspace. This script is obselete because of the script dir_tree.php, which returns the directory tree of the user's workspace.
*/ */
......
<?php <?php
/** \file /** \file
This script registers a user using a username, password, name, and email. * This script registers a user using a username, password, name, and email.
This script communicates with the MySQL server to save user data. * This script communicates with the MySQL server to save user data.
Passowrd is hashed, and SQL injection is taken care of. * Passowrd is hashed, and SQL injection is taken care of.
The process of registering involves - * The process of registering involves -
1. An insert operation into the users table, in the database. * 1. An insert operation into the users table, in the database.
2. Creation of directories, required to store files, executables and question attempts made by the user. * 2. Creation of directories, required to store files, executables and question attempts made by the user.
Returns a 404 error if username already exists. * Returns a 404 error if username already exists.
*/ */
header("Access-Control-Allow-Origin: *"); header("Access-Control-Allow-Origin: *");
......
/** \file
* Interface for Directory having attributes for storing it's child directories, files and the path where it is tored in the server.
* Used in File management for providing User a workspace.
*/
import {File} from './file'; import {File} from './file';
export interface Directory { export interface Directory {
......
/** \file
* Interface for File having attributes for storing the extensions and contents of the file.
* Used in services and components for storing the ide text and uploading the server, as well as
* compiling and executing programs.
*/
export interface File { export interface File {
username: string; username: string;
filename: string; filename: string;
......
/** \file
* A temporary Interface for Problem
*/
export interface Problem { export interface Problem {
id: number; id: number;
title: string; title: string;
......
/** \file
* Interface for Question which are to be uploaded by different users.
*/
export interface Question { export interface Question {
title: string; title: string;
username: string; username: string;
......
...@@ -28,11 +28,6 @@ export class RunCodeService { ...@@ -28,11 +28,6 @@ export class RunCodeService {
}); });
} }
// compileProblemFile(prob: Problem): Observable<any> {
// if (Math.floor(Math.random() * 2) === 1) {return of('done'); }
// else {return throwError('error'); }
// }
verifyTestcase(file: File, out: string, ind: number, isSubmit: number): Observable<any> { verifyTestcase(file: File, out: string, ind: number, isSubmit: number): Observable<any> {
return this.httpClient.post(this.baseUrl + 'questions/check_output.php', { return this.httpClient.post(this.baseUrl + 'questions/check_output.php', {
title: file.filename, title: file.filename,
......
/** \file
* Interface for User containing his/her details and login credentials.
* Used in services and components as a data structure for each user.
*/
export interface User { export interface User {
id: number; id: number;
username: string; username: string;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment