.
This commit is contained in:
@@ -0,0 +1,20 @@
|
|||||||
|
# Generated by Django 3.1.2 on 2021-01-18 14:02
|
||||||
|
|
||||||
|
import anatomy.models
|
||||||
|
import django.core.files.storage
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('anatomy', '0019_auto_20210118_1339'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='anatomyquestion',
|
||||||
|
name='image',
|
||||||
|
field=models.ImageField(storage=django.core.files.storage.FileSystemStorage(base_url='http://penracourses.org.uk//media/anatomy/', location='/home/ross/sites/rad/media//anatomy/'), upload_to=anatomy.models.image_directory_path),
|
||||||
|
),
|
||||||
|
]
|
||||||
@@ -0,0 +1,52 @@
|
|||||||
|
# Generated by Django 3.1.2 on 2021-01-18 14:02
|
||||||
|
|
||||||
|
import django.core.files.storage
|
||||||
|
from django.db import migrations, models
|
||||||
|
import django.db.models.deletion
|
||||||
|
import rapids.models
|
||||||
|
import sortedm2m.fields
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('rapids', '0001_initial'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='rapid',
|
||||||
|
name='abnormality',
|
||||||
|
field=models.ManyToManyField(blank=True, help_text='The abnormality (laterality and region independent). Used for categorisation but does not affect the answer', to='rapids.Abnormality'),
|
||||||
|
),
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='rapidimage',
|
||||||
|
name='image',
|
||||||
|
field=models.ImageField(storage=django.core.files.storage.FileSystemStorage(base_url='http://penracourses.org.uk//media/rapids/', location='/home/ross/sites/rad/media//rapids/'), upload_to=rapids.models.image_directory_path),
|
||||||
|
),
|
||||||
|
migrations.CreateModel(
|
||||||
|
name='Exam',
|
||||||
|
fields=[
|
||||||
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||||
|
('name', models.CharField(max_length=200)),
|
||||||
|
('active', models.BooleanField(default=True, help_text='If an exam should be available')),
|
||||||
|
('publish_results', models.BooleanField(default=True, help_text='If an exams results should be available')),
|
||||||
|
('recreate_json', models.BooleanField(default=False, help_text='If the json cache needs updating')),
|
||||||
|
('time_limit', models.IntegerField(default=5400, help_text='Exam time limit (in seconds)')),
|
||||||
|
('exam_questions', sortedm2m.fields.SortedManyToManyField(blank='true', help_text=None, related_name='exams', to='rapids.Rapid')),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
migrations.CreateModel(
|
||||||
|
name='CidUserAnswer',
|
||||||
|
fields=[
|
||||||
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||||
|
('answer', models.TextField(blank=True, max_length=500)),
|
||||||
|
('answer_compare', models.TextField(blank=True, max_length=500)),
|
||||||
|
('cid', models.BigIntegerField(blank=True, help_text='Candidate ID (limitied by BigIntegerField size)', null=True)),
|
||||||
|
('created', models.DateTimeField(auto_now_add=True)),
|
||||||
|
('updated', models.DateTimeField(auto_now=True)),
|
||||||
|
('exam', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='cid_user_answers', to='rapids.exam')),
|
||||||
|
('question', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='cid_user_answers', to='rapids.rapid')),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
]
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
<html>
|
<html>
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
|
<title>Rapids</title>
|
||||||
{% block css %}
|
{% block css %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" />
|
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" />
|
||||||
@@ -23,8 +23,26 @@
|
|||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<title>Rapids</title>
|
<div class="page-header">
|
||||||
<div id=link-block>
|
{% if request.user.is_authenticated %}
|
||||||
|
<span id="physics-link">
|
||||||
|
<a href="{% url 'physics:index' %}">Physics</a>
|
||||||
|
</span>
|
||||||
|
<span id="logout-link">
|
||||||
|
<a href="{% url 'logout' %}">Logout</a>
|
||||||
|
</span>
|
||||||
|
<span id="profile-link">
|
||||||
|
<a href="{% url 'profile' %}">Profile</a>
|
||||||
|
</span>
|
||||||
|
{% endif %}
|
||||||
|
{% if request.user.is_staff %}
|
||||||
|
<span id="admin-link">
|
||||||
|
<a href="{% url 'admin:index' %}">Admin</a>
|
||||||
|
</span>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="content container">
|
||||||
{% if request.user.is_staff %}<span id="admin-link"><a
|
{% if request.user.is_staff %}<span id="admin-link"><a
|
||||||
href="{% url 'admin:index' %}">Admin</a></span>{% endif %}
|
href="{% url 'admin:index' %}">Admin</a></span>{% endif %}
|
||||||
<span id="view-link"><a href="{% url 'rapids:rapid_view' %}">View questions</a></span>
|
<span id="view-link"><a href="{% url 'rapids:rapid_view' %}">View questions</a></span>
|
||||||
@@ -34,12 +52,6 @@
|
|||||||
</br>
|
</br>
|
||||||
Questions by:
|
Questions by:
|
||||||
<span id="authors-link"><a href="{% url 'rapids:author_list' %}">author</a></span>
|
<span id="authors-link"><a href="{% url 'rapids:author_list' %}">author</a></span>
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="page-header">
|
|
||||||
<h1>Rapids</h1>
|
|
||||||
</div>
|
|
||||||
<div class="content container">
|
|
||||||
{% block navigation %}
|
{% block navigation %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
{% extends "rapids/base.html" %}
|
{% extends "rapids/base.html" %}
|
||||||
{% load static from staticfiles %}
|
{% load static from static %}
|
||||||
|
|
||||||
{% block js %}
|
{% block js %}
|
||||||
<!--<script type="text/javascript" src="/admin/jsi18n/"></script>-->
|
<!--<script type="text/javascript" src="/admin/jsi18n/"></script>-->
|
||||||
|
|||||||
Reference in New Issue
Block a user